Exemple #1
0
    public void CheckState()
    {
        bool hasState = GlobalController.HasState(wantedState);

        if (setDisabled)
        {
            gameObject.SetActive(!hasState);
        }
        else
        {
            gameObject.SetActive(hasState);
        }
    }
 override public void Activate()
 {
     foreach (GameState s in gameStates)
     {
         if (!GlobalController.HasState(s))
         {
             if (noActivatable != null)
             {
                 noActivatable.Activate();
             }
             return;
         }
         yesActivatable.Activate();
     }
 }
Exemple #3
0
 public void CheckDiscovery()
 {
     if (!startedBefore)
     {
         Start();
     }
     anim = anim ?? GetComponent <Animator>();
     if (requiredState != null && !GlobalController.HasState(requiredState))
     {
         GetComponentInChildren <Text>().text = "???";
         // anim.SetBool("Interactable", false);
         discovered = false;
     }
     else
     {
         GetComponentInChildren <Text>().text = originalText;
         // anim.SetBool("Interactable", true);
         discovered = true;
     }
 }
 override protected bool Check()
 {
     return(GlobalController.HasState(state));
 }