Example #1
0
 protected virtual void Awake()
 {
     levelManager = GameObject.FindGameObjectWithTag("LevelManager").GetComponent <LevelManager>();
     thisButton   = GetComponent <Button>();
     atkIcon      = GetComponent <Image>().sprite;
     player       = GetComponentInParent <PlayerController>();
     guard        = player.GetComponent <GuardController>();
     mana         = player.GetComponent <Mana>();
     fighter      = player.GetComponent <Fighter>();
     attackValues = player.GetComponent <BaseAttackStats>();
 }
        private void OnEnable()
        {
            GameObject player = GameObject.FindGameObjectWithTag("Player");

            atkStats = player.GetComponent <BaseAttackStats>();
        }