soundvision/UnityProject/Assets/AzureKinectExamples/KinectDemos/ColliderDemo/Scripts/EggMover.cs

24 lines
424 B
C#
Raw Normal View History

using UnityEngine;
using System.Collections;
namespace com.rfilkov.components
{
public class EggMover : MonoBehaviour
{
void Awake()
{
//GetComponent<Rigidbody>().AddForce(new Vector3(0, -10f, 0), ForceMode.Force);
}
void Update()
{
if (transform.position.y < -10)
{
Destroy(gameObject);
}
}
}
}