コード例 #1
0
 private void OnCollisionEnter(Collision col)
 {
     if (trigger.hit == true)
     {
         uicontrol.changeText("you open the box");
     }
 }
コード例 #2
0
ファイル: Trigger.cs プロジェクト: LunaWoolf/IGDMidterm
 private void OnCollisionEnter(Collision col)
 {
     if (col.gameObject.tag == "Player" && !hit)
     {
         hit = true;
         uicontrol.keyCount += 1;
         uicontrol.changeText("Find " + uicontrol.keyCount + " key");
     }
 }