예제 #1
0
 void Start()
 {
     if (GlobalController.HasFlag(this.flag))
     {
         merchant.AddGameFlagInventory(this);
     }
 }
예제 #2
0
 override protected void Awake()
 {
     if (enableOnState)
     {
         targetObject.SetActive(GlobalController.HasFlag(gameFlag));
     }
     else
     {
         targetObject.SetActive(!GlobalController.HasFlag(gameFlag));
     }
 }
예제 #3
0
 protected virtual void Awake()
 {
     if (enableOnState)
     {
         this.gameObject.SetActive(GlobalController.HasFlag(gameFlag));
     }
     else
     {
         this.gameObject.SetActive(!GlobalController.HasFlag(gameFlag));
     }
 }
예제 #4
0
 override public void Activate()
 {
     foreach (GameFlag f in gameFlags)
     {
         if (!GlobalController.HasFlag(f))
         {
             if (noActivatable != null)
             {
                 noActivatable.Activate();
                 if (yesActivatable != null)
                 {
                     yesActivatable.ActivateSwitch(false);
                 }
                 return;
             }
         }
         yesActivatable.Activate();
     }
 }
예제 #5
0
 public void CheckDiscovery()
 {
     if (!startedBefore)
     {
         Start();
     }
     anim = anim ?? GetComponent <Animator>();
     if (requiredGameFlag != GameFlag.None && !GlobalController.HasFlag(requiredGameFlag))
     {
         GetComponentInChildren <Text>().text = "???";
         anim.SetBool("Interactable", false);
         discovered = false;
     }
     else
     {
         GetComponentInChildren <Text>().text = originalText;
         anim.SetBool("Interactable", true);
         discovered = true;
     }
 }
예제 #6
0
 void Start()
 {
     toSet = GlobalController.HasFlag(gameFlag) && !invertPresence;
 }