summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldrikboy <aldrikboy@gmail.com>2017-12-19 10:38:30 +0100
committeraldrikboy <aldrikboy@gmail.com>2017-12-19 10:38:30 +0100
commit42671ab55f65af3ace94c50263b16898d32ac692 (patch)
treec729f98c208be07836a715d065162de7b2509289
parenta42938d1553565e3d864fa46c04401bbb6f8d13f (diff)
yos
-rw-r--r--Penguloon/Levels/IceLevel.cs6
-rw-r--r--Penguloon/Levels/WaveManager.cs3
-rw-r--r--Penguloon/Objects/CannonObject.cs34
-rw-r--r--Penguloon/Objects/GoldPenguinObject.cs34
-rw-r--r--Penguloon/Penguloon.csproj3
-rw-r--r--Penguloon/Projectiles/CannonballProjectile.cs23
6 files changed, 99 insertions, 4 deletions
diff --git a/Penguloon/Levels/IceLevel.cs b/Penguloon/Levels/IceLevel.cs
index 1516afe..20e3b58 100644
--- a/Penguloon/Levels/IceLevel.cs
+++ b/Penguloon/Levels/IceLevel.cs
@@ -47,7 +47,7 @@ namespace Penguloon.Levels
Tile FN = new Tile(5, Direction.Finish);
- Map.TileMap = new Tile[13, 18]
+ Map.TileMap = new Tile[13, 18]
{
{ OO,DN,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
{ OO,DN,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
@@ -65,8 +65,8 @@ namespace Penguloon.Levels
};
//Map.Objects.Add(new PenguinObject(new Vector2(0, 0), Map));
- Map.Objects.Add(new PenguinObject(new Vector2(Map.TileWidth * 2, Map.TileHeight * 4), Map));
- Map.Objects.Add(new PenguinObject(new Vector2(Map.TileWidth * 1, Map.TileHeight * 8), Map));
+ //Map.Objects.Add(new PenguinObject(new Vector2(Map.TileWidth * 2, Map.TileHeight * 4), Map));
+ Map.Objects.Add(new CannonObject(new Vector2(Map.TileWidth * 1, Map.TileHeight * 8), Map));
}
}
} \ No newline at end of file
diff --git a/Penguloon/Levels/WaveManager.cs b/Penguloon/Levels/WaveManager.cs
index 60ba210..bb738fb 100644
--- a/Penguloon/Levels/WaveManager.cs
+++ b/Penguloon/Levels/WaveManager.cs
@@ -26,8 +26,9 @@ namespace Penguloon.Levels
private void CreateWaves()
{
- Waves.Add(new Wave(new List<Tuple<Type, int>>() { new Tuple<Type, int>(typeof(BlueBalloon), 250) }, 50));
+ Waves.Add(new Wave(new List<Tuple<Type, int>>() { new Tuple<Type, int>(typeof(RedBalloon), 5) }, 500));
Waves.Add(new Wave(new List<Tuple<Type, int>>() { new Tuple<Type, int>(typeof(RedBalloon), 10) }, 500));
+ Waves.Add(new Wave(new List<Tuple<Type, int>>() { new Tuple<Type, int>(typeof(BlueBalloon), 5) }, 500));
}
public void StartSpawningEnemies()
diff --git a/Penguloon/Objects/CannonObject.cs b/Penguloon/Objects/CannonObject.cs
new file mode 100644
index 0000000..f3cf7ff
--- /dev/null
+++ b/Penguloon/Objects/CannonObject.cs
@@ -0,0 +1,34 @@
+using Microsoft.Xna.Framework;
+using Penguloon.Levels;
+using Penguloon.Projectiles;
+using System.Collections.Generic;
+
+namespace Penguloon.Objects
+{
+ class CannonObject : ObjectBase
+ {
+ public CannonObject(Vector2 position, Map map) : base(position, map)
+ {
+ this.Texture = ContentManager.GetTexture("Objects/cannon");
+ this.TileSpanX = 1;
+ this.TileSpanY = 1;
+ this.Range = Map.TileWidth * 3f;
+ this.AttackSpeedMS = 2500;
+ }
+
+ public override void DrawUnique(float deltaTime)
+ {
+
+ }
+
+ public override void UpdateUnique(float deltaTime)
+ {
+
+ }
+
+ public override void SpawnUnique()
+ {
+ Projectiles.Add(new CannonballProjectile(this, this.Rotation));
+ }
+ }
+} \ No newline at end of file
diff --git a/Penguloon/Objects/GoldPenguinObject.cs b/Penguloon/Objects/GoldPenguinObject.cs
new file mode 100644
index 0000000..fc5eb62
--- /dev/null
+++ b/Penguloon/Objects/GoldPenguinObject.cs
@@ -0,0 +1,34 @@
+using Microsoft.Xna.Framework;
+using Penguloon.Levels;
+using Penguloon.Projectiles;
+using System.Collections.Generic;
+
+namespace Penguloon.Objects
+{
+ public class GoldPenguinObject : ObjectBase
+ {
+ public GoldPenguinObject(Vector2 position, Map map) : base(position, map)
+ {
+ this.Texture = ContentManager.GetTexture("Objects/penguin2");
+ this.TileSpanX = 1;
+ this.TileSpanY = 1;
+ this.Range = Map.TileWidth * 2.5f;
+ this.AttackSpeedMS = 500;
+ }
+
+ public override void DrawUnique(float deltaTime)
+ {
+
+ }
+
+ public override void UpdateUnique(float deltaTime)
+ {
+
+ }
+
+ public override void SpawnUnique()
+ {
+ Projectiles.Add(new SnowballProjectile(this, this.Rotation));
+ }
+ }
+} \ No newline at end of file
diff --git a/Penguloon/Penguloon.csproj b/Penguloon/Penguloon.csproj
index 4fe58f9..fb68443 100644
--- a/Penguloon/Penguloon.csproj
+++ b/Penguloon/Penguloon.csproj
@@ -70,8 +70,11 @@
<Compile Include="Enemies\EnemyBase.cs" />
<Compile Include="Enemies\RedBalloon.cs" />
<Compile Include="Levels\WaveManager.cs" />
+ <Compile Include="Objects\CannonObject.cs" />
+ <Compile Include="Objects\GoldPenguinObject.cs" />
<Compile Include="Objects\ObjectBase.cs" />
<Compile Include="Objects\PenguinObject.cs" />
+ <Compile Include="Projectiles\CannonballProjectile.cs" />
<Compile Include="Projectiles\ProjectileBase.cs" />
<Compile Include="Projectiles\SnowballProjectile.cs" />
<Compile Include="Scenes\GameScene.cs" />
diff --git a/Penguloon/Projectiles/CannonballProjectile.cs b/Penguloon/Projectiles/CannonballProjectile.cs
new file mode 100644
index 0000000..bfe04e0
--- /dev/null
+++ b/Penguloon/Projectiles/CannonballProjectile.cs
@@ -0,0 +1,23 @@
+using Microsoft.Xna.Framework;
+using Penguloon.Objects;
+
+namespace Penguloon.Projectiles
+{
+ class CannonballProjectile : ProjectileBase
+ {
+ public CannonballProjectile(ObjectBase ParentObject, float RotationAngle) : base(ParentObject, RotationAngle)
+ {
+ this.Texture = ContentManager.GetTexture("Bullets/cannon-ammo");
+ this.Speed = 450f;
+ this.RotationSpeed = 5f;
+ this.Size = new Vector2(ParentObject.Map.TileWidth / 2, ParentObject.Map.TileHeight / 2);
+ this.MaxBalloonPops = 5;
+
+ Rectangle parentRec = new Rectangle(ParentObject.Position.ToPoint(),
+ new Point(ParentObject.TileSpanX * ParentObject.Map.TileWidth, ParentObject.TileSpanY * ParentObject.Map.TileHeight));
+
+ this.Position = new Vector2(ParentObject.Position.X + (parentRec.Width / 2) - (Size.X / 2),
+ ParentObject.Position.Y + (parentRec.Height / 2) - (Size.Y / 2));
+ }
+ }
+} \ No newline at end of file