Ejemplo n.º 1
0
        public void Initialize()
        {
            Debug.Log("[InitializeSystem] Initialize");
            var position = Vector3.zero;
            var rotation = Quaternion.identity;

            EntitiesFactory.CreatePlayer(_gameContext, position, rotation);
        }
        public void SetUp()
        {
            var settings = Resources.Load("GameSettings") as GameSettings;

            _context = new Contexts();
            _context.game.SetDeltaTime(0f);
            _context.game.SetGameSettings(settings);

            _playerMoveSystem            = new PlayerMoveSystem(10, _context.game, _context.input);
            _gameEventSystems            = new GameEventSystems(_context);
            _addPlayerViewReactiveSystem = new AddPlayerViewReactiveSystem(1, _context.game);

            _systems = new Feature("Game")
                       .Add(_addPlayerViewReactiveSystem)
                       .Add(_playerMoveSystem)
                       .Add(_gameEventSystems);

            _player = EntitiesFactory.CreatePlayer(_context.game, Vector3.zero, Quaternion.identity);
            _systems.Execute();
        }