public StackButton(Texture2D texture, Player p, SpriteBatch sBatch, Thing t, Tile hex, int width, int height, int x, int y) : base(texture, sBatch, width, height, x, y) { image = texture; thingsInStack = new List<Thing>(10); thingsInStack.Add(t); hexStackIsOn = hex; owner = p; }
public ThingButton(Texture2D texture, Player p, SpriteBatch sBatch, Thing t, int width, int height, int x, int y) : base(texture, sBatch, width, height, x, y) { owner = p; buttonID = t.getID(); thingOnButton = t; thingOnButton.setOwned(); owner.AddThingToRack(buttonID, t); thingSelected = false; isInPlay = false; originalPosition = location; }
public void addThings(Thing t) { if ( canAddToStack() ) thingsInStack.Add(t); }
private void removeFromCup(Thing t) { cup.Remove(t); }
private void removeFromBank(string type, Thing t) { bank[type].Remove(t); }
public void AddThingToRack(int id, Thing thing) { rack.Add(id, thing); }
public static StackButton createStack(Tile hex, Thing t, SpriteBatch s) { StackButton stackB = new StackButton(stackTexture, me, s, t, hex, 30, 30, 0, 0); StackButtons.Add(stackB); return stackB; }
public void addToPlayerStack(int i, Thing thing) { if (stacks.ContainsKey(i)) stacks[i].Add(thing); else { List<Thing> temp = new List<Thing>(); temp.Add(thing); stacks.Add(i, temp); } }