예제 #1
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (GM.codeoffflag == true)
     {
         A4S.Interaction(2);
     }
     else if (GM.codeoffflag == false)
     {
         A4S.Interaction(0);
     }
 }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return))
     {
         if (GameObject.Find("InputField").GetComponent <InputField>().text.Contains("5231") && SC.alien1riddlecontact == true && GM.codeoffflag == false)
         {
             GM.codeoffflag = true;
             A4S.Interaction(1);
             SC.completedb = true;
             GM.PartCollide();
         }
         else if (GM.songcompleted == false && SC.alien1riddlecontact == true && GM.codeoffflag == false)
         {
             SS.Interact(1);
         }
     }
 }
예제 #3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return))
     {
         if (GameObject.Find("InputField").GetComponent <InputField>().text.Contains("5231") && GM.songcompleted == false && SC.safecolliding == true && GM.codeflag == true)
         {
             A4S.Interaction(1);
             SS.gameObject.GetComponent <Text>().text = "";
             GM.codeflag    = false;
             GM.codeoffflag = true;
             GM.PartCollide();
         }
         else if (GM.songcompleted == false && SC.safecolliding == true && GM.codeflag == true)
         {
             SS.Interaction(2);
         }
     }
 }