Ejemplo n.º 1
0
        protected override void Awake()
        {
            m_inputMgr = GameManager.Instance.GetInstanceOf <InputManager>();
            m_player   = GetComponent <Player>();
            base.Awake();
            m_movement = GetComponent <Movement>();

            m_sounds = GetComponentInChildren <PlayerSounds>();
            if (!m_sounds)
            {
                Debug.LogError("No Sounds on fighting " + gameObject.ToString());
            }

            m_specialAttackTrigger = GetComponentInChildren <SpecialAttackTrigger>();
            AssignAttackEvent();
        }
Ejemplo n.º 2
0
        // Use this for initialization
        public virtual void Awake()
        {
            GameManager gameMgr = GameManager.Instance;

            m_inputMgr = gameMgr.GetInstanceOf <InputManager>();

            m_playerMgr = GameObject.FindObjectOfType <PlayerManager>();
            m_animator  = GetComponentInChildren <Animator>();

            m_movement       = GetComponent <Movement>();
            m_fighting       = GetComponent <PlayerFighting>();
            m_flaskInventory = GetComponent <FlaskInventory>();

            m_damageable   = GetComponentInChildren <Damageable>();
            m_recoveryLife = m_damageable.Life;

            m_sounds = GetComponentInChildren <PlayerSounds>();
        }
Ejemplo n.º 3
0
        override protected void Awake()
        {
            base.Awake();
            m_sounds = GetComponentInChildren <PlayerSounds>();
            if (!m_sounds)
            {
                Debug.LogError("No Sounds on character " + gameObject.ToString());
            }

            m_positionDetector = GetComponent <PositionDetector>();
            if (!m_positionDetector)
            {
                Debug.LogError("No Position Detector on character " + gameObject.ToString());
            }

            PlayerFighting fighting = GetComponent <PlayerFighting>();

            m_dashTrigger.OnHitEvent.AddListener(fighting.OnSuccessfulHit);
        }