예제 #1
0
 public TimeController(InputController inputController, ListUnits listUnits, ButtonUI buttonUI)
 {
     _inputController  = inputController;
     _listUnits        = listUnits;
     lastRoundForCycle = 0;
     _buttonUI         = buttonUI;
 }
예제 #2
0
 public void Initialisation(ListUnits units)
 {
     _units                  = units;
     _moveZone               = GetComponent <Tilemap>();
     _groundZone             = Object.FindObjectOfType <TileGround>().GetTilemap();
     _tileSpecialZoneFactory = new TileSpecialZoneFactory(_greenZone, _radZone, _moveZone, _groundZone);
 }
예제 #3
0
        public void CreateSpecialZone(Vector3 playerPosition, int langthStep, ListUnits units)
        {
            var playerIntPoint = _moveZone.WorldToCell(playerPosition);

            SetPointsZone(langthStep, playerIntPoint);
            _point = new Vector3Int();
            CreateZone(units);
        }
예제 #4
0
        public override void Inicialisation(ListUnits listUnits, TileSpecialZone tileSpecialZone)
        {
            _attack = new MeleeAttack();
            _enemyGuards.GetComponent <EnemyGuards>();

            ReturnStep();
            _mathOfUnits     = new MathOfUnits();
            _HP              = _maxHP;
            _listUnits       = listUnits;
            _tileSpecialZone = tileSpecialZone;
        }
예제 #5
0
        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;
        }
예제 #6
0
 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);
     }
 }
예제 #7
0
 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);
                     }
                 }
             }
         }
     }
 }
예제 #8
0
파일: Units.cs 프로젝트: MrDarkGoBlin/TBS
 public abstract void Inicialisation(ListUnits listUnits, TileSpecialZone tileSpecialZone);
예제 #9
0
 internal void Initialization(InputController inputController, TileSpecialZone tileSpecialZone, ListUnits units)
 {
     _tileSpecialZone = tileSpecialZone;
     _inputController = inputController;
     _units           = units;
 }
예제 #10
0
        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);
        }