コード例 #1
0
ファイル: SoundTrigger.cs プロジェクト: Patiun/SmolCreatures
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.tag == "Creature")
     {
         Creature_AI ca = col.gameObject.GetComponent <Creature_AI> ();
         ca.MoveTo(transform.position);
     }
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     ca = GetComponent <Creature_AI> ();
     rb = GetComponent <Rigidbody> ();
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     ca = GetComponent <Creature_AI> ();
 }