Пример #1
0
 public static List<QueuedCommand> QueuedCommandList(Command C, Galaxy g)
 {
     List<QueuedCommand> qcs = new List<QueuedCommand>();
     int dist = ((Ship)(g.GetHex(C.start).GetGameObject())).getSpeed();
     for (int i = 0; i < dist; i++) {
         qcs.Add(new QueuedCommand(C, g, i));
     }
     return qcs;
 }
Пример #2
0
 public QueuedCommand(Command C, Galaxy g, int offset)
 {
     agent = (Unit)g.GetHex(C.start).GetGameObject();
     try
     {
         targetHex = g.GetHex(C.target);
     }
     catch (NullReferenceException) {
         targetHex = null;
     }
     order = C.action;
     shiptype = C.shiptype;
     priority = 10*(int)order+offset;
 }
Пример #3
0
 public void AddCommand(Command c)
 {
     commands.Add(c);
 }