public PlayerSuperGaugeSubComponent(PlayerInfoComponent infoComp) : base(infoComp.gameObject) { m_InfoComponent = infoComp; if (m_InfoComponent.GetPlayerSettings().SuperGaugeAlwaysFilled) { IncreaseGaugeValue(AttackConfig.Instance.m_SuperGaugeMaxValue); } else { IncreaseGaugeValue(GameManager.Instance.GetSubManager <RoundSubGameManager>(ESubManager.Round).GetPlayerSuperGaugeValue(m_InfoComponent.GetPlayerEnum())); } m_InfoComponent.GetPlayerSettings().OnSuperGaugeAlwaysFilledChanged += OnSuperGaugeAlwaysFilledChanged; }
// OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (stateInfo.normalizedTime >= 1.0f && !m_EndOfRoundAnim) { PlayerInfoComponent infoComponent = animator.transform.root.GetComponent <PlayerInfoComponent>(); Utils.GetPlayerEventManager(animator.gameObject).TriggerEvent(EPlayerEvent.EndOfRoundAnimation, new EndOfRoundAnimationEventParameters(infoComponent.GetPlayerEnum())); m_EndOfRoundAnim = true; } }