From 63795c45af9ecca5aea36fbe291b18fcd9fb9b7d Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 18 Feb 2022 14:38:20 +0800 Subject: *rename folder name --- .../Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs | 18 ++++++++++++++++++ .../Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs create mode 100644 JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta (limited to 'JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests') diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs new file mode 100644 index 0000000..3bf706a --- /dev/null +++ b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +/// +/// Use this component with a game object for demonstration purposes. +/// +[DisallowMultipleComponent] +[RequireComponent(typeof(InterpolationObjectController))] +public class TestMotion : MonoBehaviour +{ + [SerializeField] + private float _speed = 2f; + + private void FixedUpdate() + { + transform.position += Vector3.right * _speed * Time.fixedDeltaTime; + transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y + _speed * 30 * Time.fixedDeltaTime, transform.rotation.eulerAngles.z); + } +} diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta new file mode 100644 index 0000000..fe06ffe --- /dev/null +++ b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 80afb4adbb1d67247ac41a23d04b67d7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- cgit v1.1-26-g67d0