void Awake()
    {
        DrivesEntry drives = new DrivesEntry(
            new UnityTimeDrive(),
            new UnityLogDrive(),
            //new FileLogDrive(),
            new UnityInputDrive());

        _gameController = new GameController(gameConfig, drives);
    }
Exemplo n.º 2
0
    public GameController(IGameConfig gameConfig, DrivesEntry drives)
    {
        _systems = new GameSystem(Contexts.sharedInstance, drives);

        gameConfig.LoadLevelData("LevelData/LevelData");
        Contexts.sharedInstance.game.SetGameConfig(gameConfig);

        GameEntity entity = Contexts.sharedInstance.game.CreateEntity();

        entity.AddLoadLevel(1);
        //entity.isDestroy = true;

        reciveCenter = new EventReciveCenter(Contexts.sharedInstance);
    }
    public GameSystem(Contexts contexts, DrivesEntry drives)
    {
        Add(new TimeSystem(contexts, drives.Time));

        Add(new BoardSystem(contexts));
        Add(new AddViewSystem(contexts));

        Add(new InputSystem(contexts, drives.Input));

        Add(new SelectStarSystem(contexts));

        Add(new DestroyStarsSystem(contexts));
        Add(new GainScoreSystem(contexts));
        Add(new ResultJudgeSystem(contexts));
        Add(new SettlementSystem(contexts));
        Add(new ChangeLevelSystem(contexts));

        Add(new GameEventSystems(contexts));

        Add(new OneFrameEventSystem(contexts));
        Add(new LogSystem(contexts, drives.Log));
        Add(new GameCleanUpSystem(contexts));
    }