public void Start()
 {
     if (economyGC == null)
     {
         economyGC = FindObjectOfType <EconomyGC>();
     }
 }
Example #2
0
 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;
         }
     }
 }
Example #3
0
        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();
        }
Example #4
0
        //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();
        }
Example #5
0
 void Awake()
 {
     economyGC     = FindObjectOfType <EconomyGC>();
     installButton = GetComponent <Button>();
 }