Esempio n. 1
0
 public void SwitchToLoudWhenNewRoundInBattle(NodeAddedEvent e, ActiveRoundNode round, [Context, JoinByBattle] SelfBattleUserNode battleUser, [JoinAll] SoundListenerBattleStateNode listener)
 {
     this.SwitchToLoud(listener, listener.soundListenerBattleMixerSnapshotTransition.TransitionToLoudTimeInBattle);
 }
        public void UpdateGUI(UpdateEvent e, BattleUserNode battleUser, [JoinByUser] Optional <BattleUserCounterNode> idleCounter, [JoinBy(typeof(BattleGroupComponent))] ActiveRoundNode activeRound, [JoinAll] VisiblePauseServiceMessageNode serviceMessage)
        {
            bool flag  = idleCounter.IsPresent();
            bool flag2 = battleUser.Entity.HasComponent <PauseComponent>();
            int  num   = 0;

            if (flag)
            {
                num = (int)Math.Ceiling((double)IdleKickUtils.CalculateTimeLeft(idleCounter.Get().idleCounter, idleCounter.Get().idleBeginTime, idleCounter.Get().idleKickConfig));
            }
            if ((flag2 && flag) && (idleCounter.Get().idleBeginTime.IdleBeginTime != null))
            {
                serviceMessage.timer.Timer.SecondsLeft = num;
            }
        }
Esempio n. 3
0
 public void CleanOldSoundsMarkerWhenRoundRestart(NodeRemoveEvent evt, ActiveRoundNode activeRound, [JoinByBattle] SelfBattleUserNode battleUser, [JoinAll] SingleNode <OldRoundRestartSoundsListenerComponent> listener)
 {
     listener.Entity.RemoveComponent <OldRoundRestartSoundsListenerComponent>();
 }
        public void UpdateGUI(UpdateEvent e, BattleUserCounterWithWarningNode idleCounter, [JoinBy(typeof(BattleGroupComponent))] ActiveRoundNode activeRound, [JoinAll] VisibleAutokickServiceMessageNode serviceMessage)
        {
            float num  = IdleKickUtils.CalculateTimeLeft(idleCounter.idleCounter, idleCounter.idleBeginTime, idleCounter.idleKickConfig);
            int   num2 = (int)Math.Ceiling((double)num);

            if (num < idleCounter.idleKickConfig.IdleWarningTimeSec)
            {
                serviceMessage.timer.Timer.SecondsLeft = num2;
            }
        }
Esempio n. 5
0
 public void CleanFirstRoundSpawnWhenRoundFinished(NodeRemoveEvent evt, ActiveRoundNode round, [JoinByBattle] SelfBattleUserNode battleUser, [JoinAll] SingleNode <RoundFirstSpawnPlayedComponent> listener)
 {
     listener.Entity.RemoveComponent <RoundFirstSpawnPlayedComponent>();
 }