示例#1
0
 void Update()
 {
     if (switch1.GetBool() == true && switch2.GetBool() == true)
     {
         door.SetBool(true);
     }
     else
     {
         door.SetBool(false);
     }
 }
示例#2
0
 private void OnTriggerStay2D(Collider2D col)
 {
     if (!col.isTrigger)
     {
         switchObject.SetBool(true);
         if (door != null)
         {
             door.SetBool(true);
         }
     }
 }