Пример #1
0
        public MazeFeature(GameContext game, MetaContext meta, InputContext input, Services.Services services,
                           Prefabs.Prefabs prefabs)
        {
            Add(new ServiceRegistrationSystems(game, input, services));

            Add(new InputFeature(input, game));
            Add(new GameplayFeature(game, input, meta, prefabs));
            Add(new StatisticsFeature(game, meta));

            Add(new GameCleanupSystems(Contexts.sharedInstance));
            Add(new GameEventSystems(Contexts.sharedInstance));
        }
Пример #2
0
        public GameplayFeature(GameContext game, InputContext input, MetaContext meta, Prefabs.Prefabs prefabs)
        {
            this.AddInitializeSystems
            (
            );
            this.AddExecuteSystems
            (
                new MovePlayer(game, input),

                new SpawnZombieAtStart(game),
                new SpawnSecondZombieWhenFiveCoinsPicked(game),
                new SpawnMummyWhenTenCoinsPicked(game),

                new InstantiateMummy(game, prefabs.Mummy),
                new InstantiateZombie(game, prefabs.Zombie),

                new MoveEnemy(game),

                new NullifyScoreWhenHitByMummy(game),

                new SpawnCoinsWithInterval(game, 5f),
                new StopSpawningCoinsIfLimitIsReached(game),
                new InstantiateCoin(game, prefabs.Coin),
                new PickCoin(game, meta)
            );
        }