24 lines
424 B
C#
24 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);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|