GetHex() public method

public GetHex ( Tuple c ) : Hex3D
c Tuple
return Hex3D
コード例 #1
0
ファイル: QueuedCommand.cs プロジェクト: cclay/spaceconquest
 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;
 }
コード例 #2
0
ファイル: QueuedCommand.cs プロジェクト: cclay/spaceconquest
 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;
 }