// Start is called before the first frame update void Start() { instance = GameManager.instance; Assert.IsNotNull(instance, "Could not find Game Manager."); loader = GetComponent <RuleLoader>(); Assert.IsNotNull(loader, "Could not find Rule Loader."); messenger = FindObjectOfType <RuleMessenger>(); if (messenger == null) { Debug.Log("Could not find RuleMessenger."); } setter = GetComponent <RuleSetter>(); Assert.IsNotNull(setter, "Could not find Rule Setter."); ui = GetComponent <RuleUI>(); Assert.IsNotNull(ui, "Could not find Rule UI."); }
// Use this for initialization void Start() { instance = GameManager.instance; Assert.IsNotNull(instance, "Could not find Game Manager."); setter = GetComponent <RuleSetter>(); Assert.IsNotNull(setter, "Could not find Rule Setter."); loader = panelLoad.GetComponent <RuleLoader>(); Assert.IsNotNull(loader, "Could not find Rule Loader."); defaultColor = textRange.color; panelColor1 = panelRuleUse.GetComponent <Image>().color; panelColor2 = panelActivation.GetComponent <Image>().color; messenger = ruleMessenger.GetComponent <RuleMessenger>(); if (instance.Rules.Count > 0) { buttonLoad.interactable = true; } }