summaryrefslogtreecommitdiff
path: root/Penguloon/Controls/ObjectSelector.cs
diff options
context:
space:
mode:
authoraldrikboy <aldrikboy@gmail.com>2018-01-02 23:36:55 +0100
committeraldrikboy <aldrikboy@gmail.com>2018-01-02 23:36:55 +0100
commita05ae287aa87259817e6ca7627986e14eeab6098 (patch)
tree18578b24ab1c35aec05c465fbdc0af517b716fed /Penguloon/Controls/ObjectSelector.cs
parent0c58f5048e37ad40c68f56f3dc7756d60816cc0e (diff)
dank
Diffstat (limited to 'Penguloon/Controls/ObjectSelector.cs')
-rw-r--r--Penguloon/Controls/ObjectSelector.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/Penguloon/Controls/ObjectSelector.cs b/Penguloon/Controls/ObjectSelector.cs
index a13f3eb..56dff8a 100644
--- a/Penguloon/Controls/ObjectSelector.cs
+++ b/Penguloon/Controls/ObjectSelector.cs
@@ -126,7 +126,8 @@ namespace Penguloon.Controls
Objects.Add(new Tuple<ObjectBase,int>(new PenguinObject(Map), 250));
Objects.Add(new Tuple<ObjectBase, int>(new GoldPenguinObject(Map), 360));
Objects.Add(new Tuple<ObjectBase, int>(new CannonObject(Map), 650));
- Objects.Add(new Tuple<ObjectBase, int>(new HealthGeneratorObject(Map), 150));
+ Objects.Add(new Tuple<ObjectBase, int>(new HealthGeneratorObject(Map), 800));
+ Objects.Add(new Tuple<ObjectBase, int>(new MortarObject(Map), 150));
}
public override void Update(float deltaTime, TouchLocation[] touchLocations)
@@ -166,8 +167,18 @@ namespace Penguloon.Controls
destinationRectangle: new Rectangle(posX, (int)Position.Y + posY, width, height));
}
- int widthToDraw = (height / Objects[i].Item1.TileSpanY) - (padding * 2);
- int heightToDraw = (height / Objects[i].Item1.TileSpanX) - (padding * (3 - Objects[i].Item1.TileSpanX));
+ //int widthToDraw = (height / Objects[i].Item1.TileSpanY) - (padding * (3 - Objects[i].Item1.TileSpanY));
+ //int heightToDraw = (height / Objects[i].Item1.TileSpanX) - (padding * (3 - Objects[i].Item1.TileSpanX));
+
+ int spanY = 1;
+ int spanX = 1;
+
+ int widthToDraw = (width / spanY) - (padding * 2);
+ int heightToDraw = (height / spanX) - (padding * 2);
+
+ if (Objects[i].Item1.TextureBase != null)
+ ParentScene.Main.SpriteBatch.Draw(Objects[i].Item1.TextureBase,
+ destinationRectangle: new Rectangle(posX + (width - widthToDraw) / 2, (int)Position.Y + posY + (height / 2) - (heightToDraw / 2), widthToDraw, heightToDraw));
ParentScene.Main.SpriteBatch.Draw(Objects[i].Item1.Texture,
destinationRectangle: new Rectangle(posX + (width - widthToDraw) / 2, (int)Position.Y + posY + (height / 2) - (heightToDraw / 2), widthToDraw, heightToDraw));