Пример #1
0
 public void CheckCondition()
 {
     if (GameControl.control.DPMainData.key)
     {
         SceneChangeInteract comp = this.gameObject.AddComponent <SceneChangeInteract>();
         if (GameControl.control.DPMainData.levers[0])
         {
             comp.targetSceneName = "DPLessStrangeRoom";
             comp.zone            = "DP";
             comp.targetX         = 2.1f;
             comp.targetY         = 0.75f;
         }
         else
         {
             comp.targetSceneName = "DPStrangeRoom";
             comp.zone            = "DP";
             comp.targetX         = -6.8f;
             comp.targetY         = 1f;
         }
     }
     else
     {
         DialogueInteraction comp = this.gameObject.AddComponent <DialogueInteraction>();
         comp.dialogue    = new string[1];
         comp.dialogue[0] = "The door is locked with a key.";
     }
     Destroy(this);
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     if (GameControl.control.doors[doorNumber])
     {
         Destroy(this);
     }
     else
     {
         Destroy(GetComponent <SceneChangeInteract>());
         DialogueInteraction DI = gameObject.AddComponent <DialogueInteraction>();
         DI.dialogue = lockedDialogue;
         Destroy(this);
     }
 }
Пример #3
0
    void Start()
    {
        GetComponent <Button>().onClick.AddListener(CheckAccusation);

        dialogueInteraction = GetComponent <DialogueInteraction>();
    }