You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Feel/NiceVibrations/Demo/DemoAssets/HapticClipsDemo/Scripts/HapticClipsDemoRotator.cs

27 lines
706 B
C#

3 months ago
// Copyright (c) Meta Platforms, Inc. and affiliates.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Lofelt.NiceVibrations
{
/// <summary>
/// A minimal, demo only class, used to rotate an image in the demo's UI
/// </summary>
public class HapticClipsDemoRotator : MonoBehaviour
{
/// the speed at which the image should rotate
public Vector3 RotationSpeed = new Vector3(0, 0, 100f);
/// <summary>
/// On Update we rotate our image
/// </summary>
protected void Update()
{
this.transform.Rotate(RotationSpeed * Time.deltaTime, Space.Self);
}
}
}