protected override Systems CreateUpdateSystems(IContext context)
        {
            GameSettingsContext gameSettingsContext = (GameSettingsContext)context;

            return(new Systems()
                   .Add(new InitializeSpeedrunControllerSystem(gameSettingsContext))
                   .Add(new RemoveSpeedrunControllerSystem(gameSettingsContext)));
        }
Example #2
0
    public Contexts()
    {
        game         = new GameContext();
        gameSettings = new GameSettingsContext();
        input        = new InputContext();
        saveData     = new SaveDataContext();

        var postConstructors = System.Linq.Enumerable.Where(
            GetType().GetMethods(),
            method => System.Attribute.IsDefined(method, typeof(Entitas.CodeGeneration.Attributes.PostConstructorAttribute))
            );

        foreach (var postConstructor in postConstructors)
        {
            postConstructor.Invoke(this, null);
        }
    }
Example #3
0
        protected override Systems CreateUpdateSystems(IContext context)
        {
            GameContext         gameContext         = (GameContext)context;
            GameSettingsContext gameSettingsContext = Contexts.sharedInstance.gameSettings;

            return(new Systems()
                   .Add(new InitializeSpeedrunTimeSystem())
                   .Add(new InitializeLevelSpeedrunTimerSystem())
                   .Add(new MeasureSpeedrunTimeSystem())
                   .Add(new StopSpeedrunTimeSystem(gameContext))
                   .Add(new ResumeSpeedrunTimeSystem(gameContext))
                   .Add(new ReachedGoalInSpeedrunSystem(gameContext))
                   .Add(new RemoveSpeedrunTimeSystem(gameSettingsContext))
                   .Add(new UpdateSpeedrunLevelTimerSystem(gameContext))
                   .Add(new TeardownSpeedrunLevelTimerSystem())
                   .Add(new TeardownSpeedrunTimeSystem()));
        }