public TimeController(InputController inputController, ListUnits listUnits, ButtonUI buttonUI) { _inputController = inputController; _listUnits = listUnits; lastRoundForCycle = 0; _buttonUI = buttonUI; }
public void Initialisation(ListUnits units) { _units = units; _moveZone = GetComponent <Tilemap>(); _groundZone = Object.FindObjectOfType <TileGround>().GetTilemap(); _tileSpecialZoneFactory = new TileSpecialZoneFactory(_greenZone, _radZone, _moveZone, _groundZone); }
public void CreateSpecialZone(Vector3 playerPosition, int langthStep, ListUnits units) { var playerIntPoint = _moveZone.WorldToCell(playerPosition); SetPointsZone(langthStep, playerIntPoint); _point = new Vector3Int(); CreateZone(units); }
public override void Inicialisation(ListUnits listUnits, TileSpecialZone tileSpecialZone) { _attack = new MeleeAttack(); _enemyGuards.GetComponent <EnemyGuards>(); ReturnStep(); _mathOfUnits = new MathOfUnits(); _HP = _maxHP; _listUnits = listUnits; _tileSpecialZone = tileSpecialZone; }
public override void Inicialisation(ListUnits listUnits, TileSpecialZone tileSpecialZone) { _attack = new MeleeAttack(); _tileSpecialZone = tileSpecialZone; _skills1 = new HighHitSkill(_tileSpecialZone, _ATK, _zoneAtack, _zoneNoAtack); _skills2 = new LowHitSkill(_tileSpecialZone, _ATK, _zoneAtack, _zoneNoAtack); _playerGuards = GetComponent <PlayerUnit>(); ReturnStep(); _HP = _maxHP; _mathOfUnits = new MathOfUnits(); _listUnits = listUnits; }
private void Start() { _mainCamera = Camera.main; _units = new ListUnits(Object.FindObjectsOfType <Units>()); _tileSpecialZone = Object.FindObjectOfType <TileSpecialZone>(); _tileSpecialZone.Initialisation(_units); _listExecute = new ListExecuteObject(); _imputController = new InputController(_mainCamera); _buttonUI = Object.FindObjectOfType <ButtonUI>(); _buttonUI.Initialization(_imputController, _tileSpecialZone, _units); _timeController = new TimeController(_imputController, _units, _buttonUI); _listExecute.AddExecuteObject(_imputController); _listExecute.AddExecuteObject(_timeController); for (int i = 0; i < _units.Length; i++) { _units[i].Inicialisation(_units, _tileSpecialZone); } }
private void CreateZone(ListUnits units) { for (int i = _firstPoint.x; i < _secondPoint.x; i++) { for (int j = _firstPoint.y; j < _secondPoint.y; j++) { if (_groundZone.GetTile(new Vector3Int(i, j, 0)) != null) { _moveZone.SetTile(new Vector3Int(i, j, 0), _greenZone); for (int item = 0; item < units.Length; item++) { _point = _moveZone.WorldToCell(units[item].GetPosition()); if (_point.x == i && _point.y == j) { _moveZone.SetTile(new Vector3Int(i, j, 0), _radZone); } } } } } }
public abstract void Inicialisation(ListUnits listUnits, TileSpecialZone tileSpecialZone);
internal void Initialization(InputController inputController, TileSpecialZone tileSpecialZone, ListUnits units) { _tileSpecialZone = tileSpecialZone; _inputController = inputController; _units = units; }
public void CreateSpecialZone(Vector3 playerPosition, int AttackZone, int NoAttackZone, ListUnits units) { var playerIntPoint = _moveZone.WorldToCell(playerPosition); SetPointsZone(AttackZone, playerIntPoint); _point = new Vector3Int(); CreateZone(units); SetPointsZone(NoAttackZone, playerIntPoint); DestroyZone(); SetPointsZone(AttackZone, playerIntPoint); }