Example #1
0
 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;
 }
Example #2
0
 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;
 }
Example #3
0
 public void addThings(Thing t)
 {
     if ( canAddToStack() )
         thingsInStack.Add(t);
 }
Example #4
0
 private void removeFromCup(Thing t)
 {
     cup.Remove(t);
 }
Example #5
0
 private void removeFromBank(string type, Thing t)
 {
     bank[type].Remove(t);
 }
Example #6
0
 public void AddThingToRack(int id, Thing thing)
 {
     rack.Add(id, thing);
 }
Example #7
0
 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;
 }
Example #8
0
 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);
     }
 }