예제 #1
0
 public void AttackUnit(ulong unitId)
 {
     if (_selectedUnitId == 0)
     {
         return;
     }
     if (_runner.TryAddCommand(new AttackCommand(_selectedUnitId, unitId)))
     {
         OnUnitCanTurn(_selectedUnitId, false);
         OnUnitSelected(0);
         _selectedUnitId = 0;
     }
 }
예제 #2
0
        public void Equip(StateUnitModel unit, ItemModel item)
        {
            var stateItem = (StateItemModel)item;

            _runner.TryAddCommand(new EquipItemCommand(stateItem.State.Id, unit.State.Id));
        }
예제 #3
0
        public void StartLevelWithSelectedUnits(string levelDesc, UnitModel[] units)
        {
            var unitIds = GetUnitIds(units);

            _runner.TryAddCommand(new StartLevelCommand(levelDesc, unitIds));
        }