コード例 #1
0
ファイル: EnemyController.cs プロジェクト: SIL3nCe/DontWreck
    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;
    }
コード例 #2
0
ファイル: Unit.cs プロジェクト: SIL3nCe/DontWreck
    ///==================================================================================
    ///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;
    }