예제 #1
0
    void Start()
    {
        skull = GameObject.FindGameObjectWithTag("Skull").GetComponent <ToothManager>();

        // Destroy the game object after 2 seconds.
        Destroy(gameObject, 3.0f);
    }
예제 #2
0
 void Start()
 {
     _toothManager = GetComponentInParent <ToothManager>();
     if (_toothManager == null)
     {
         throw new System.Exception("ToothManager not found amoung Tooth's parents.");
     }
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     skull = GameObject.FindGameObjectWithTag("Skull").GetComponent <ToothManager>();
     FindTooth();
 }