Example #1
0
    private float longestTargetDistance; //Used to find new creep targets for defenders when they have killed their current target

    private void Awake()
    {
        DefenderHealth   = GetComponent <scrUnitHealth>();                      //Gets the reference
        defenderAnimator = GetComponent <scrDefenderAnimation>();               //Gets the instance
        defenderMovement = GetComponent <scrDefenderMovement>();
        animEventHandler = GetComponentInChildren <scrAnimationEventHandler>(); //Get the instance
    }
    private void Awake()
    {
        CreepType = creepType;

        //For defenders
        currentTowerLevel        = 1;
        TowerDefenderLevel       = currentTowerLevel;
        TowerDefenderUpgradePath = 0;
        defenderHealth           = GetComponent <scrUnitHealth>();
        animationEventHandler    = GetComponentInChildren <scrAnimationEventHandler>();
    }
Example #3
0
 private void Awake()
 {
     localAnimationEventHandler = GetComponentInChildren <scrAnimationEventHandler>();
 }
    //I MUST set a specific reference to whatever defender this creep IS IN combat with. So that this creep can return to walking if that defender dies or is
    //moved

    private void Awake()
    {
        thisCreep = GetComponent<Creep>(); //Get the creep instance on this game object
        creepAnimationEventHandler = GetComponentInChildren<scrAnimationEventHandler>(); //Gets the reference
    }