コード例 #1
0
 void OnTriggerExit(Collider other)
 {
     if (other.name.Equals("GunPoint") || other.name.Equals("EnginePoint"))
     {
         State = CrankState.None;
     }
 }
コード例 #2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.name.Equals("GunPoint"))
     {
         State = CrankState.Gun;
     }
     if (other.name.Equals("EnginePoint"))
     {
         State = CrankState.Engine;
     }
 }
コード例 #3
0
 void Start()
 {
     State = CrankState.Engine;
 }