public void AttackUnit(ulong unitId) { if (_selectedUnitId == 0) { return; } if (_runner.TryAddCommand(new AttackCommand(_selectedUnitId, unitId))) { OnUnitCanTurn(_selectedUnitId, false); OnUnitSelected(0); _selectedUnitId = 0; } }
public void Equip(StateUnitModel unit, ItemModel item) { var stateItem = (StateItemModel)item; _runner.TryAddCommand(new EquipItemCommand(stateItem.State.Id, unit.State.Id)); }
public void StartLevelWithSelectedUnits(string levelDesc, UnitModel[] units) { var unitIds = GetUnitIds(units); _runner.TryAddCommand(new StartLevelCommand(levelDesc, unitIds)); }