53c1b2d7b5
Bought the asset to test with
23 lines
424 B
C#
23 lines
424 B
C#
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);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|