public void SetPool(Pool pool) { Random.seed = 42; _pool = pool; _group = pool.GetGroup(Matcher.BonusModel); _players = pool.GetGroup(Matcher.Player); }
public void SetPool(Pool pool) { this.pool = pool; group = pool.GetGroup(Matcher.Input); players = pool.GetGroup(Matcher.Player); slowGame = pool.GetGroup(Matcher.SlowGame); }
public void SetPool(Pool pool) { this.pool = pool; group = pool.GetGroup(Matcher.Score); time = pool.GetGroup(Matcher.Time); enemies = pool.GetGroup(Matcher.EnemiesModel); }
public void SetPool(Pool pool) { _pool = pool; _asteroids = pool.GetGroup(Matcher.Asteroid); _levels = pool.GetGroup(Matcher.Level); _players = pool.GetGroup(Matcher.Player); }
public void SetPool(Pool pool) { group = pool.GetGroup(Matcher.WaveSpawner); time = pool.GetGroup(Matcher.Time); camera = pool.GetGroup(Matcher.Camera); enemyFactory = pool.GetGroup(Matcher.EnemyFactory); }
public void SetPool(Pool pool) { this.pool = pool; this.pool.GetGroup(Matcher.SettingsModel).OnEntityUpdated += update; group = pool.GetGroup(Matcher.DifficultyController); difficulties = pool.GetGroup(Matcher.DifficultyModel); }
public void SetPool(Pool pool) { this.pool = pool; group = pool.GetGroup(Matcher.FirstBoss); time = pool.GetGroup(Matcher.Time); createStages(); }
public void SetPool(Pool pool) { group = pool.GetGroup(Matcher.AllOf(Matcher.PlayerScore, Matcher.GameObject)); killInfo = pool.GetGroup(Matcher.AllOf(Matcher.KillInfo, Matcher.GameObject)); score = pool.GetGroup(Matcher.Score); translation = pool.GetGroup(Matcher.TranslationService); }
public void SetPool(Pool pool) { _pool = pool; _camera = _pool.GetGroup(Matcher.Camera); _time = _pool.GetGroup(Matcher.Time); _group = pool.GetGroup(Matcher.AllOf(Matcher.Path, Matcher.GameObject, Matcher.Velocity, Matcher.VelocityLimit, Matcher.Position)); }
public void SetPool(Pool pool) { this.pool = pool; group = pool.GetGroup(Matcher.EnemySpawner); camera = pool.GetGroup(Matcher.Camera); enemyFactory = pool.GetGroup(Matcher.EnemyFactory); }
public void SetPool(Pool pool) { _pool = pool; _pool.GetGroup(Matcher.SettingsModel).OnEntityUpdated += update; _group = pool.GetGroup(Matcher.DifficultyController); _models = pool.GetGroup(Matcher.DifficultyModel); }
public void SetPool(Pool pool) { _pool = pool; _group = _pool.GetGroup(Matcher.Input); _players = _pool.GetGroup(Matcher.Player); _camera = _pool.GetGroup(Matcher.Camera); _slowGame = _pool.GetGroup(Matcher.SlowGame); }
public void SetPool(Pool pool) { Random.seed = 42; this.pool = pool; group = pool.GetGroup(Matcher.BonusModel); players = pool.GetGroup(Matcher.Player); currentShip = pool.GetGroup(Matcher.CurrentShip); }
public void SetPool(Pool pool) { _pool = pool; _player = pool.GetGroup(Matcher.Player); _time = pool.GetGroup(Matcher.Time); _group = pool.GetGroup(Matcher.SpeedBonus); _eventService = pool.GetGroup(Matcher.EventService); }
public void SetPool(Pool pool) { _grid = pool.GetGroup(Matcher.Grid); _time = pool.GetGroup(Matcher.Time); _group = pool.GetGroup(Matcher.AllOf(Matcher.GridField, Matcher.Position)); pool.GetGroup(Matcher.Path).OnEntityRemoved += onEntityPathRemoved; pool.GetGroup(Matcher.GridField).OnEntityRemoved += onEntityGridRemoved; }
public void SetPool(Pool pool) { _pool = pool; _playerGroup = pool.GetGroup(Matcher.Player); _timeGroup = pool.GetGroup(Matcher.Time); _pause = pool.GetGroup(Matcher.PauseGame); _settings = pool.GetGroup(Matcher.SettingsModel); }
public void SetPool(Pool pool) { this.pool = pool; group = pool.GetGroup(Matcher.BonusModel); currentShip = pool.GetGroup(Matcher.CurrentShip); player = pool.GetGroup(Matcher.Player); shipBonus = pool.GetGroup(Matcher.ShipBonus); }
public void SetPool(Pool pool) { _pool = pool; _missiles = _pool.GetGroup(Matcher.HomeMissileSpawner); _time = pool.GetGroup(Matcher.Time); _enemies = pool.GetGroup(Matcher.Enemy); _player = pool.GetGroup(Matcher.Player); }
public void SetPool(Pool pool) { this.pool = pool; group = pool.GetGroup(Matcher.LaserSpawner); time = pool.GetGroup(Matcher.Time); enemyLayerMask = (1 << LayerMask.NameToLayer("Enemy")) | (1 << LayerMask.NameToLayer("Static")); playerLayerMask = (1 << LayerMask.NameToLayer("Player")) | (1 << LayerMask.NameToLayer("Static")); }
public void SetPool(Pool pool) { Init(pool); _createLevels = pool.GetGroup(Matcher.CreateLevel); _players = pool.GetGroup(Matcher.Player); _pause = pool.GetGroup(Matcher.PauseGame); _blockade = pool.GetGroup(Matcher.MovingBlockade); }
public void SetPool(Pool pool) { _pool = pool; _group = pool.GetGroup(Matcher.FirstBoss); _time = _pool.GetGroup(Matcher.Time); _player = pool.GetGroup(Matcher.Player); _camera = pool.GetGroup(Matcher.Camera); }
public void SetPool(Pool pool) { _pool = pool; _group = pool.GetGroup(Matcher.EnemySpawner); _camera = pool.GetGroup(Matcher.Camera); _difficulty = pool.GetGroup(Matcher.DifficultyController); _factory = new EnemyFactory(); _factory.SetPool(_pool); }
public void SetPool(Pool pool) { _pool = pool; _pool.GetGroup(Matcher.SpaceshipDeathroes).OnEntityRemoved += OnDeaththroesRemoved; _waiting = _pool.GetGroup(Matcher.AllOf(Matcher.WaitingForSpace, Matcher.Spaceship)); _asteroids = pool.GetGroup(Matcher.AllOf(Matcher.Asteroid, Matcher.CollisionRadius)); _games = _pool.GetGroup(Matcher.AllOf(Matcher.Game, Matcher.Bounds)); _lives = _pool.GetGroup(Matcher.Lives); }
public void SetPool(Pool pool) { _pool = pool; _inputStringGroup = pool.GetGroup(Matcher.InputString); _leaderboardGroup = pool.GetGroup(Matcher.AllOf(Matcher.Leaderboard, Matcher.View)); _leaderboardGroup.OnEntityAdded += (group, entity, index, component) => { entity.view.gameObject.transform.Find("HighScores").GetComponent<GUIText>().text = "Highscore\nusername:\n" + entity.leaderboard.userName.ToUpper().PadRight(3, '_'); }; }
static void groupExample(Pool pool) { pool.GetGroup(Matcher.Position).GetEntities(); // ---------------------------- pool.GetGroup(Matcher.Position).OnEntityAdded += (group, entity) => { // Do something }; }
public void SetPool(Pool pool) { paths = pool.GetGroup(Matcher.PathsModel); enemies = pool.GetGroup(Matcher.EnemiesModel); difficulty = pool.GetGroup(Matcher.DifficultyController); enemyCreator = new EnemyCreator(pool); bossCreator = new BossCreator(pool); weaponProvider = new WeaponProvider(); Random.seed = pool.count; }
public void Start() { pool = Pools.pool; pool.GetGroup(EntitysToBeViewed).OnEntityAdded += (group, entity, index, component) => OnEntityAdded(entity); pool.GetGroup(EntitysToBeViewed).OnEntityRemoved += (group, entity, index, component) => OnEntityRemoved(entity); pool.GetGroup(Matcher.GameState).OnEntityAdded += (group, entity, index, component) => OnGameStateUpdated(entity.gameState.GameState); tableContents = new Dictionary<int, GameObject>(); }
void ISetPool.SetPool(Pool pool) { this.pool = pool; var gameBoard = pool.GetGroup(Matcher.GameBoard); gameBoard.OnEntityAdded += (group, entity, index, component) => CreateNewGameBoardCache((GameBoardComponent)component); gameBoard.OnEntityUpdated += (group, entity, index, previousComponent, newComponent) => CreateNewGameBoardCache((GameBoardComponent)newComponent); var gameBoardElements = pool.GetGroup(Matcher.AllOf(Matcher.GameBoardElement, Matcher.Position)); gameBoardElements.OnEntityAdded += OnGameBoardElementAdded; gameBoardElements.OnEntityUpdated += OnGameBoardElementUpdated; gameBoardElements.OnEntityRemoved += OnGameBoardElementRemoved; }
ReactiveSystem(Pool pool, IReactiveExecuteSystem subSystem, TriggerOnEvent[] triggers) { _subsystem = subSystem; var ensureComponents = subSystem as IEnsureComponents; if (ensureComponents != null) { _ensureComponents = ensureComponents.ensureComponents; } var excludeComponents = subSystem as IExcludeComponents; if (excludeComponents != null) { _excludeComponents = excludeComponents.excludeComponents; } _clearAfterExecute = (subSystem as IClearReactiveSystem) != null; var triggersLength = triggers.Length; var groups = new Group[triggersLength]; var eventTypes = new GroupEventType[triggersLength]; for (int i = 0; i < triggersLength; i++) { var trigger = triggers[i]; groups[i] = pool.GetGroup(trigger.trigger); eventTypes[i] = trigger.eventType; } _observer = new GroupObserver(groups, eventTypes); _buffer = new List<Entity>(); }
ReactiveSystem(Pool pool, IReactiveExecuteSystem subSystem, TriggerOnEvent[] triggers) { _subsystem = subSystem; var ensureComponents = subSystem as IEnsureComponents; if (ensureComponents != null) { _ensureComponents = ensureComponents.ensureComponents; } var excludeComponents = subSystem as IExcludeComponents; if (excludeComponents != null) { _excludeComponents = excludeComponents.excludeComponents; } _clearAfterExecute = (subSystem as IClearReactiveSystem) != null; var triggersLength = triggers.Length; var groups = new Group[triggersLength]; var eventTypes = new GroupEventType[triggersLength]; for (int i = 0; i < triggersLength; i++) { var trigger = triggers[i]; groups[i] = pool.GetGroup(trigger.trigger); eventTypes[i] = trigger.eventType; } _observer = new GroupObserver(groups, eventTypes); _buffer = new List <Entity>(); }
// Use awake to ensure that this fires before the systems boot // otherwise it misses the initial level set void Awake() { levelImage = GetComponent<Image>(); pool = Pools.pool; pool.GetGroup(Matcher.Level).OnEntityAdded += (group, entity, index, component) => { currentLevel = pool.level.level; pool.isLevelTransitionDelay = true; Invoke("ShowLevelImage", displayDelay); }; pool.GetGroup(Matcher.GameOver).OnEntityAdded += (group, entity, index, component) => { GameOver(); }; }
ReactiveSystem(Pool pool, IReactiveExecuteSystem subSystem, IMatcher[] triggers, GroupEventType[] eventTypes) { _subsystem = subSystem; var groups = new Group[triggers.Length]; for (int i = 0, triggersLength = triggers.Length; i < triggersLength; i++) { groups[i] = pool.GetGroup(triggers[i]); } _observer = new GroupObserver(groups, eventTypes); _buffer = new List <Entity>(); }
static GroupObserver createGroupObserver(Pool pool, TriggerOnEvent[] triggers) { var triggersLength = triggers.Length; var groups = new Group[triggersLength]; var eventTypes = new GroupEventType[triggersLength]; for (int i = 0; i < triggersLength; i++) { var trigger = triggers[i]; groups[i] = pool.GetGroup(trigger.trigger); eventTypes[i] = trigger.eventType; } return(new GroupObserver(groups, eventTypes)); }
ReactiveSystem(Pool pool, IReactiveExecuteSystem subSystem, IMatcher[] triggers, GroupEventType[] eventTypes) { _subsystem = subSystem; var ensureComponents = subSystem as IEnsureComponents; if (ensureComponents != null) { _ensureComponents = ensureComponents.ensureComponents; } var excludeComponents = subSystem as IExcludeComponents; if (excludeComponents != null) { _excludeComponents = excludeComponents.excludeComponents; } var groups = new Group[triggers.Length]; for (int i = 0, triggersLength = triggers.Length; i < triggersLength; i++) { groups[i] = pool.GetGroup(triggers[i]); } _observer = new GroupObserver(groups, eventTypes); _buffer = new List <Entity>(); }
public static Entity[] GetEntities(this Pool pool, IMatcher matcher) { return(pool.GetGroup(matcher).GetEntities()); }
public ReactiveSystem(Pool pool, IReactiveSystem subSystem) { _subsystem = subSystem; _observer = new GroupObserver(pool.GetGroup(subSystem.trigger), subSystem.eventType); _buffer = new List <Entity>(); }