Artemis.Modules.Games.Overwatch.OverwatchModel.UpdateOverwatch C# (CSharp) Method

UpdateOverwatch() public method

public UpdateOverwatch ( ) : void
return void
        public void UpdateOverwatch()
        {
            var gameDataModel = (OverwatchDataModel) DataModel;

            if (_lastMessage == null)
                return;

            var colors = ParseColorArray(_lastMessage);

            if (colors == null)
                return;

            // TODO: Get the debug viewmodel and update the color array
            //_events.PublishOnUIThread(new RazerColorArrayChanged(colors));

            // Determine general game state
            ParseGameSate(gameDataModel, colors);

            // Parse the lighting
            var characterMatch = ParseCharacter(gameDataModel, colors);

            // Ult can't possibly be ready within 2 seconds of changing, this avoids false positives.
            // Filtering on ultReady and ultUsed removes false positives from the native ultimate effects
            // The control keys don't show during character select, so don't continue on those either.
            if ((_characterChange.AddSeconds(2) >= DateTime.Now) ||
                (_ultimateUsed.AddSeconds(2) >= DateTime.Now) ||
                (_ultimateReady.AddSeconds(2) >= DateTime.Now) ||
                (_stickyStatus.Value == OverwatchStatus.InCharacterSelect))
                return;

            ParseSpecialKeys(gameDataModel, characterMatch, colors);
            ParseAbilities(gameDataModel, colors);
        }