Beispiel #1
0
 public override void Pressed()
 {
     Door01.GetComponent <Object_Door>().DoorSwitch();
     if (Door02 != null)
     {
         Door02.GetComponent <Object_Door>().DoorSwitch();
     }
     soundsource.PlayOneShot(click);
 }
Beispiel #2
0
 public void checkCode(string attempt)
 {
     if (code == attempt)
     {
         Door01.GetComponent <Object_Door>().DoorSwitch();
         if (Door02 != null)
         {
             Door02.GetComponent <Object_Door>().DoorSwitch();
         }
         soundsource.PlayOneShot(Accepted);
         SubtitleEngine.instance.playSub("playStrings", "play_button_code");
     }
     else
     {
         SubtitleEngine.instance.playSub("playStrings", "play_button_wrongcode");
         soundsource.PlayOneShot(Rejected);
     }
 }
    public override void Pressed()
    {
        Player_Control player = GameController.instance.player.GetComponent <Player_Control>();


        if (player.equipment[(int)bodyPart.Hand] != null && ItemController.instance.items[player.equipment[(int)bodyPart.Hand].itemFileName] is Equipable_Key)
        {
            if (!WaitForBool || (WaitForBool && GameController.instance.globalBools[ThisValue]))
            {
                Equipable_Key key;
                key = (Equipable_Key)ItemController.instance.items[player.equipment[(int)bodyPart.Hand].itemFileName];
                if (key.level >= Clearance)
                {
                    Door01.GetComponent <Object_Door>().DoorSwitch();
                    if (Door02 != null)
                    {
                        Door02.GetComponent <Object_Door>().DoorSwitch();
                    }
                    soundsource.PlayOneShot(Accepted);
                    SubtitleEngine.instance.playSub("playStrings", "play_button_card");
                }
                else
                {
                    SubtitleEngine.instance.playSub("playStrings", "play_button_lowcard");
                    soundsource.PlayOneShot(Rejected);
                }
            }
            else
            {
                SubtitleEngine.instance.playSub("playStrings", "play_button_failcard");
                soundsource.PlayOneShot(Rejected);
            }
        }
        else
        {
            SubtitleEngine.instance.playSub("playStrings", "play_button_nocard");
        }
    }
Beispiel #4
0
    public override void Pressed()
    {
        Player_Control player = GameController.instance.player.GetComponent <Player_Control>();

        if (!WaitForBool || (WaitForBool && GameController.instance.globalBools[ThisValue]))
        {
            if (player.equipment[(int)bodyPart.Hand] != null && ItemController.instance.items[player.equipment[(int)bodyPart.Hand].itemFileName] is Equipable_Hand)
            {
                Equipable_Hand hand;
                hand = (Equipable_Hand)ItemController.instance.items[player.equipment[(int)bodyPart.Hand].itemFileName];
                if (hand.handID == handID)
                {
                    Door01.GetComponent <Object_Door>().DoorSwitch();
                    if (Door02 != null)
                    {
                        Door02.GetComponent <Object_Door>().DoorSwitch();
                    }
                    soundsource.PlayOneShot(Accepted);
                    SubtitleEngine.instance.playSub("playStrings", "play_button_dna");
                }
                else
                {
                    SubtitleEngine.instance.playSub("playStrings", "play_button_wrongdna");
                    soundsource.PlayOneShot(Rejected);
                }
            }
            else
            {
                SubtitleEngine.instance.playSub("playStrings", "play_button_wrongdna");
                soundsource.PlayOneShot(Rejected);
            }
        }
        else
        {
            SubtitleEngine.instance.playSub("playStrings", "play_button_faildna");
            soundsource.PlayOneShot(Rejected);
        }
    }