Пример #1
0
    // Start is called before the first frame update
    protected override void Awake()
    {
        base.Awake();
        if (m_attackType == attack_type.MELEE)
        {
            m_meleeHandler.Init(m_animatorController);
        }
        else
        {
            m_projectileHandler.Init(m_animatorController);
        }

        if (m_player == null)
        {
            GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>();
        }

        if (m_healthHandler.Die == null)
        {
            m_healthHandler.Die += DieEffect;
        }
    }
Пример #2
0
 protected override void Awake()
 {
     base.Awake();
     m_idleAnimController.Init(m_animatorController, GetComponent <SpriteRenderer>());
     m_meleeHandler.Init(m_animatorController);
 }