t1 / TFDContents / Assets / KinectDemos / ColliderDemo / Scripts / EggMover.cs @ 3
이력 | 보기 | 이력해설 | 다운로드 (341 Bytes)
| 1 |
using UnityEngine; |
|---|---|
| 2 |
using System.Collections; |
| 3 |
|
| 4 |
public class EggMover : MonoBehaviour |
| 5 |
{
|
| 6 |
void Awake() |
| 7 |
{
|
| 8 |
//GetComponent<Rigidbody>().AddForce(new Vector3(0, -10f, 0), ForceMode.Force); |
| 9 |
} |
| 10 |
|
| 11 |
void Update () |
| 12 |
{
|
| 13 |
if (transform.position.y < -10) |
| 14 |
{
|
| 15 |
Destroy(gameObject); |
| 16 |
} |
| 17 |
} |
| 18 |
} |