コード例 #1
0
    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;
    }
コード例 #2
0
 // 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;
     }
 }