コード例 #1
0
 void Awake()
 {
     renderers = transform.parent.GetComponentsInChildren <MeshRenderer> ();
     mainGO    = transform.parent.gameObject;
     animator  = mainGO.GetComponent <Animator> ();
     loot      = mainGO.GetComponent <LootSpawning> ();
 }
コード例 #2
0
 void Awake()
 {
     anim  = GetComponent <Animator> ();
     stats = GetComponent <CharacterStats> ();
     loot  = GetComponent <LootSpawning> ();
     if (loot)
     {
         Death += loot.SpawnLoot;
     }
     Death += Destroy;
 }