LMQT/Assets/TouchScript/Examples/RawInput/Scripts/Ball.cs
2024-12-10 09:03:45 +08:00

21 lines
442 B
C#

/*
* @author Valentin Simonov / http://va.lent.in/
*/
using UnityEngine;
namespace TouchScript.Examples.RawInput
{
/// <exclude />
public class Ball : MonoBehaviour
{
public float Speed = 1f;
private void Update()
{
Speed *= 1.01f;
transform.position += transform.forward * Speed * Time.unscaledDeltaTime;
if (Speed > 1000) Destroy(gameObject);
}
}
}