// 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>(); }
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); }
protected override void Start() { base.Start(); m_fighting = GetComponentInParent <PlayerFighting>(); m_currComboLength = m_animator.GetInteger("ComboLength"); }