private void CreateActiveRotors(GameEntity entity) { var removerId = IdHelper.GetNewRemoverId(); var pos = entity.gridPosition.value; CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Left, pos, removerId); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Right, pos, removerId); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Up, pos, removerId); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Down, pos, removerId); }
private void CreateActivateRotors(GameEntity entity) { var removerId = IdHelper.GetNewRemoverId(); var axis = entity.itemAxis.Value; var pos = entity.gridPosition.value; var id = removerId; switch (axis) { case Axis.Horizontal: CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Left, pos, id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Right, pos, id); break; case Axis.Vertical: CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Up, pos, id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Down, pos, id); break; } }
private void CreateActivateRotors(GameEntity entity) { var id = IdHelper.GetNewRemoverId(); var pos = entity.gridPosition.value; CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Up, new Vector2Int(pos.x - 1, pos.y), id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Up, pos, id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Up, new Vector2Int(pos.x + 1, pos.y), id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Down, new Vector2Int(pos.x - 1, pos.y), id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Down, pos, id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Down, new Vector2Int(pos.x + 1, pos.y), id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Left, new Vector2Int(pos.x, pos.y + 1), id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Left, pos, id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Left, new Vector2Int(pos.x, pos.y - 1), id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Right, new Vector2Int(pos.x, pos.y + 1), id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Right, pos, id); CreateActivePositiveItemService.CreateActiveRotor(_contexts, RotorDirection.Right, new Vector2Int(pos.x, pos.y - 1), id); }