Example #1
0
    private void Start()
    {
        m_ui = transform.Find("EnemyUI").GetComponent <UI.UnitUI>();

        m_navMeshAgent = GetComponent <NavMeshAgent>();
        m_animator     = GetComponent <Animator>();

        m_speedHash  = Animator.StringToHash("Speed");
        m_attackHash = Animator.StringToHash("Attack");

        m_hp = 100;
    }
Example #2
0
    ///==================================================================================
    ///ENGINE METHODS
    ///==================================================================================

    private void Awake()
    {
        m_ui = transform.Find("UnitUI").GetComponent <UI.UnitUI>();

        m_target = new STarget(ETargetType.NONE, null, null);

        m_maxHp = 100;

        SetHP(m_maxHp);
        SetSelected(false);

        m_animStopped = true;
    }