コード例 #1
0
 public void AddDrone(PlayerDrone drone)
 {
     if (DroneOwners.Keys.Contains(drone.GetOwnerId()))
     {
         if (DroneOwners[drone.GetOwnerId()].DroneCount() < DronesPerPlayerSquad)
         {
             DroneOwners[drone.GetOwnerId()].AddDrone(drone);
             Util.GetInstance().Log("[PlayerDronemanager.AddDrone] squad existed: drone added!");
         }
     }
     else
     {
         var sq = new PlayerDroneSquad(drone.GetOwnerId());
         sq.SetOwner(drone.GetOwnerId());
         sq.AddDrone(drone);
         Util.GetInstance().Log("[PlayerDronemanager.AddDrone] squad created: drone added!");
         DroneOwners.Add(drone.GetOwnerId(), sq);
     }
 }
コード例 #2
0
 public void AddDrone(PlayerDrone drone)
 {
     if (DroneOwners.Keys.Contains(drone.GetOwnerId()))
     {
         if (DroneOwners[drone.GetOwnerId()].DroneCount() < DronesPerPlayerSquad)
         {
             DroneOwners[drone.GetOwnerId()].AddDrone(drone);
             Util.GetInstance().Log("[PlayerDronemanager.AddDrone] squad existed: drone added!");
         }
     }
     else
     {
         var sq = new PlayerDroneSquad(drone.GetOwnerId());
         sq.SetOwner(drone.GetOwnerId());
         sq.AddDrone(drone);
         Util.GetInstance().Log("[PlayerDronemanager.AddDrone] squad created: drone added!");
         DroneOwners.Add(drone.GetOwnerId(), sq);
     }
 }