Пример #1
0
    public void CheckState()
    {
        bool hasState = GlobalController.HasState(wantedState);

        if (setDisabled)
        {
            gameObject.SetActive(!hasState);
        }
        else
        {
            gameObject.SetActive(hasState);
        }
    }
Пример #2
0
 override public void Activate()
 {
     foreach (GameState s in gameStates)
     {
         if (!GlobalController.HasState(s))
         {
             if (noActivatable != null)
             {
                 noActivatable.Activate();
             }
             return;
         }
         yesActivatable.Activate();
     }
 }
Пример #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;
     }
 }
Пример #4
0
 override protected bool Check()
 {
     return(GlobalController.HasState(state));
 }