コード例 #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         heliControl helic = heli.GetComponent <heliControl>();
         helic.speed = 2;
     }
 }
コード例 #2
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
     }
 }