private void NetworkAttackUnitOfFleet(int fleetID, int unitPosition, int strength) { var fleet = FleetList.Find(f => f.ID == fleetID); if (fleet == null) { return; } fleet.AttackUnit(unitPosition, strength); }
private void NetworkMoveFleet(int fleetID, Vector2 targetTilePosition) { var fleet = FleetList.Find(f => f.ID == fleetID); if (fleet == null) { return; } var currentTile = TileList.Find(t => t.Fleet == fleet); var targetTile = TileList.Find(t => t.Position == targetTilePosition); targetTile.Fleet = fleet; currentTile.Fleet = null; fleet.MoveFleet(targetTile.TileParent.position); }
private void NetworkRotateFleet(int fleetID, bool rotateRight) { var fleet = FleetList.Find(f => f.ID == fleetID); fleet.RotateFleet(rotateRight ? 1 : -1); }