void Start() { if (GlobalController.HasFlag(this.flag)) { merchant.AddGameFlagInventory(this); } }
override protected void Awake() { if (enableOnState) { targetObject.SetActive(GlobalController.HasFlag(gameFlag)); } else { targetObject.SetActive(!GlobalController.HasFlag(gameFlag)); } }
protected virtual void Awake() { if (enableOnState) { this.gameObject.SetActive(GlobalController.HasFlag(gameFlag)); } else { this.gameObject.SetActive(!GlobalController.HasFlag(gameFlag)); } }
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(); } }
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; } }
void Start() { toSet = GlobalController.HasFlag(gameFlag) && !invertPresence; }