public void Start() { if (economyGC == null) { economyGC = FindObjectOfType <EconomyGC>(); } }
public void UpdateButton() { economyGC = FindObjectOfType <EconomyGC>(); if (currentTeamName == "A") { if (price <= economyGC.ram_A) { installButton.interactable = true; } if (price > economyGC.ram_A) { installButton.interactable = false; } } if (currentTeamName == "B") { if (price <= economyGC.ram_B) { installButton.interactable = true; } if (price > economyGC.ram_B) { installButton.interactable = false; } } }
public string currentTeamName, enemyTeamName; //What team they belong to //MAIN void Start() { //Verifies References if (economyGC == null) { economyGC = FindObjectOfType <EconomyGC>(); } if (anim == null) { anim = GetComponent <Animator>(); } if (optionCanvasGroup == null) { optionCanvasGroup = optionCanvas.GetComponent <CanvasGroup>(); } //Themes SetTeamColor(); }
//MAIN METHODS public virtual void Start() { //Makes sure we have the proper references if (economyGC == null) { economyGC = FindObjectOfType <EconomyGC>(); } if (animator == null) { animator = GetComponent <Animator>(); } //Sets healthpoints maxHealthPoints = healthPoints; //Begins installation Install(); //For inherited classes OnStart(); }
void Awake() { economyGC = FindObjectOfType <EconomyGC>(); installButton = GetComponent <Button>(); }