Example #1
0
 public Command(Hex3D sh, Hex3D th, Action a, ShipType s)
 {
     start = new Tuple<int, int, int>(sh.hexgrid.index, sh.x, sh.y);
     target = new Tuple<int, int, int>(th.hexgrid.index, th.x, th.y);
     action = a;
     shiptype = s;
     //if (shiptype.IsSubclassOf(Ship)
 }
Example #2
0
 //For moves-before-bording only
 public QueuedCommand(Ship s, Hex3D h, int offset)
 {
     agent = s;
     targetHex = h;
     order = Command.Action.Move;
     shiptype = null;
     priority = 50 + offset;
 }
Example #3
0
 public Ship(ShipType st)
 {
     modelstring = st.modelstring;
     speed = st.speed;
     shiptype = st;
     health = st.shield;
     buildTime = st.buildTime;
     buildCost = st.cost;
     maxHealth = st.shield;
     miningRobots = st.miningRobots;
 }
Example #4
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;
 }
Example #5
0
 public IconButton AddShipCommand(int x, int y, String iconaddress, ShipType c)
 {
     IconButton ib = new IconButton(new Rectangle(area.Left + padding + x * (60 + padding), area.Top + padding + y * (60 + padding), 60, 60), iconaddress, delegate(Object o, EventArgs e) { gamescreen.clickedaction = Command.Action.None; gamescreen.middleman.AddCommand(new Command(gamescreen.selectedhex, gamescreen.selectedhex, Command.Action.Build, c)); });
     this.Add(ib);
     return ib;
 }
Example #6
0
 public Warship(ShipType st)
     : base(st)
 {
     damage = st.damage;
     range = st.range;
 }
Example #7
0
 //public Carrier(String s)
 //    : base(s)
 //{
 //    range = 1;
 //    speed = 2;
 //    buildTime = 5;
 //}
 public Carrier(ShipType st)
     : base(st)
 {
     capacity = st.capacity;
 }