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) }
//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; }
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; }
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; }
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; }
public Warship(ShipType st) : base(st) { damage = st.damage; range = st.range; }
//public Carrier(String s) // : base(s) //{ // range = 1; // speed = 2; // buildTime = 5; //} public Carrier(ShipType st) : base(st) { capacity = st.capacity; }