Ejemplo n.º 1
0
 private void StopTimerTick()
 {
     if (UiTimer != null)
     {
         UiTimer.Stop();
     }
 }
Ejemplo n.º 2
0
        private void TrainTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            Counter        = 0;
            FirstEventTime = DateTime.MinValue;
            LastEventTime  = DateTime.MinValue;

            UiTimer.Stop();
        }
Ejemplo n.º 3
0
        public Effect(EffectManager.EffectEnums Effect, Vector2 Location, bool Spritesheet)
        {
            EffectE = Effect;

            effectTex    = GetEffect(Effect);
            effectLength = GetEffectLength(Effect);

            location    = Location;
            spriteSheet = Spritesheet;
            Timer       = new UiTimer(effectLength);
        }
        public EngineEventsManagerService([ServiceDependency] StateManagerService stateManager, [ServiceDependency] IEngineCmdManagerService engineCmdManager)
        {
            _StateManager     = stateManager;
            _EngineCmdManager = engineCmdManager;

            _ScreenSaverTimer           = new UiTimer(Settings.Default.NoJacksScreenSaverSg * 1000);
            _ScreenSaverTimer.AutoReset = false;
            _ScreenSaverTimer.Elapsed  += OnScreenSaverTimerElapsed;

            _HangupCallsTimer           = new UiTimer(Settings.Default.NoJacksEndComunicationsSg * 1000);
            _HangupCallsTimer.AutoReset = false;
            _HangupCallsTimer.Elapsed  += OnHangupCallsTimerElapsed;
        }
Ejemplo n.º 5
0
        public async Task NewFollower(string newFollowerName)
        {
            // Cheer 200 goranhal 15/9/19
            // Cheer 110 copperbeardy 20/9/19

            if (Configuration.Type != UserActivityConfiguration.UserActivityTrainType.Follow)
            {
                return;
            }

            // cheer 1000 jamesmontemagno 15/10/19
            // cheer 1050 tbdgamer 15/10/19

            TrackNewFollowers();

            TrainTimer.Stop();
            TrainTimer.Interval = TimeSpan.FromSeconds(Configuration.MaxTimeBetweenActionsInSeconds).TotalMilliseconds;
            if (this.Counter == 0)
            {
                FirstEventTime = DateTime.Now;
            }
            LastEventTime = DateTime.Now;
            this.Counter++;
            LatestFollower = newFollowerName;
            await StartAnimation();

            TrainTimer.Start();
            InvokeAsync(StateHasChanged);

            if (!UiTimer.Enabled)
            {
                UiTimer.Start();
            }


            /**
             * If the train type isnt FOLLOWER stop processing
             * If the train has not started, start it
             * ==> animation & timer
             * If the train HAS started
             * => increment train, restart animation, reset timer
             *
             * When the timer expires, clear animation, zero-out the train?
             *
             * NOTE:   Store a list of the new followers so that we don't retrigger the train for the same follower multiple times
             *
             *
             */
        }
Ejemplo n.º 6
0
 private async Task StartAnimation()
 {
     UiTimer.Stop();
     await InvokeAsync(StateHasChanged);
 }
Ejemplo n.º 7
0
 private void StopTimerTick()
 {
     UiTimer?.Stop();
 }
Ejemplo n.º 8
0
 void Awake()
 {
     instance = this;
 }
Ejemplo n.º 9
0
    public Effect(EffectManager.EffectEnums Effect, Vector2 Location, bool Spritesheet)
    {
        EffectE = Effect;

        effectTex = GetEffect(Effect);
        effectLength = GetEffectLength(Effect);

        location = Location;
        spriteSheet = Spritesheet;
        Timer = new UiTimer(effectLength);
    }