summaryrefslogtreecommitdiff
path: root/Penguloon
diff options
context:
space:
mode:
Diffstat (limited to 'Penguloon')
-rw-r--r--Penguloon/Content/Content.mgcb24
-rw-r--r--Penguloon/Content/SplashArt/3.pngbin0 -> 26964 bytes
-rw-r--r--Penguloon/Content/UI/alertBackground.pngbin0 -> 7875 bytes
-rw-r--r--Penguloon/Content/UI/background.pngbin1511 -> 915 bytes
-rw-r--r--Penguloon/ContentPathManager.cs2
-rw-r--r--Penguloon/Controls/Alert.cs99
-rw-r--r--Penguloon/Controls/LevelSelector.cs1
-rw-r--r--Penguloon/Levels/IceLevel3.cs88
-rw-r--r--Penguloon/Levels/LevelBase.cs38
-rw-r--r--Penguloon/Levels/Map.cs1
-rw-r--r--Penguloon/Objects/HealthGeneratorObject.cs27
-rw-r--r--Penguloon/Penguloon.csproj2
-rw-r--r--Penguloon/Resources/Values/Strings.xml2
-rw-r--r--Penguloon/SceneManager.cs5
-rw-r--r--Penguloon/StaticUIValues.cs6
-rw-r--r--Penguloon/UserdataManager.cs18
16 files changed, 305 insertions, 8 deletions
diff --git a/Penguloon/Content/Content.mgcb b/Penguloon/Content/Content.mgcb
index 72fd65c..f20b8fc 100644
--- a/Penguloon/Content/Content.mgcb
+++ b/Penguloon/Content/Content.mgcb
@@ -643,3 +643,27 @@
/processorParam:TextureFormat=Color
/build:UI/textPanel.png
+#begin UI/alertBackground.png
+/importer:TextureImporter
+/processor:TextureProcessor
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=True
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:UI/alertBackground.png
+
+#begin SplashArt/3.png
+/importer:TextureImporter
+/processor:TextureProcessor
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=True
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:SplashArt/3.png
+
diff --git a/Penguloon/Content/SplashArt/3.png b/Penguloon/Content/SplashArt/3.png
new file mode 100644
index 0000000..45a0a88
--- /dev/null
+++ b/Penguloon/Content/SplashArt/3.png
Binary files differ
diff --git a/Penguloon/Content/UI/alertBackground.png b/Penguloon/Content/UI/alertBackground.png
new file mode 100644
index 0000000..5f99413
--- /dev/null
+++ b/Penguloon/Content/UI/alertBackground.png
Binary files differ
diff --git a/Penguloon/Content/UI/background.png b/Penguloon/Content/UI/background.png
index 00a8558..2e76011 100644
--- a/Penguloon/Content/UI/background.png
+++ b/Penguloon/Content/UI/background.png
Binary files differ
diff --git a/Penguloon/ContentPathManager.cs b/Penguloon/ContentPathManager.cs
index ad94740..9f0f108 100644
--- a/Penguloon/ContentPathManager.cs
+++ b/Penguloon/ContentPathManager.cs
@@ -48,10 +48,12 @@ namespace Penguloon
"UI/unselectableTile",
"UI/lock",
"UI/textPanel",
+ "UI/alertBackground",
"SplashArt/locked",
"SplashArt/1",
"SplashArt/2",
+ "SplashArt/3",
"Enemies/pop",
"Enemies/red",
diff --git a/Penguloon/Controls/Alert.cs b/Penguloon/Controls/Alert.cs
new file mode 100644
index 0000000..21870d8
--- /dev/null
+++ b/Penguloon/Controls/Alert.cs
@@ -0,0 +1,99 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Penguloon.Scenes;
+using System;
+
+namespace Penguloon.Controls
+{
+ public static class Alert
+ {
+ static Texture2D background;
+
+ private static bool active = false;
+
+ private static float posY = 0f;
+
+ private static string text_;
+
+ private const int maxY = 50;
+
+ private const int speed = 3000;
+
+ private static float posX = 0;
+
+ private static SceneBase scene_;
+
+ private static bool movingUp = false;
+ private static bool bottomReached = false;
+ private static DateTime bottomReachedTime;
+
+ private static int displayTimeMS_ = 0;
+
+ private static SpriteFont font;
+
+ public static void Show(string text, int displayTimeMS, SceneBase scene)
+ {
+ text_ = text;
+ scene_ = scene;
+ displayTimeMS_ = displayTimeMS;
+
+ font = ContentManager.GetFont(StaticUIValues.MenuFont);
+ posX = (StaticUIValues.ScreenViewport.X / 2) - (StaticUIValues.AlertSize.X / 2);
+ background = ContentManager.GetTexture("UI/alertBackground");
+ posY = -StaticUIValues.AlertSize.Y;
+
+ active = true;
+ }
+
+ public static void Draw(float deltaTime)
+ {
+ if (!active) return;
+
+ scene_.Main.SpriteBatch.Draw(background, destinationRectangle:
+ new Microsoft.Xna.Framework.Rectangle((int)posX, (int)posY, (int)StaticUIValues.AlertSize.X, (int)StaticUIValues.AlertSize.Y));
+
+ scene_.DrawText(font, text_, new Vector2(posX, posY), StaticUIValues.AlertSize,
+ TextAllignment.CenterMiddle, Color.White, Color.Black, 2);
+ }
+
+ public static void Update(float deltaTime)
+ {
+ if (!active) return;
+
+ if (movingUp)
+ {
+ posY -= (speed * deltaTime);
+
+ // we done here
+ if (posY < -StaticUIValues.AlertSize.Y)
+ {
+ movingUp = false;
+ bottomReached = false;
+ active = false;
+ }
+
+ return;
+ }
+
+ if (bottomReached)
+ {
+ if ((DateTime.Now - bottomReachedTime).TotalMilliseconds > displayTimeMS_)
+ {
+ movingUp = true;
+ }
+
+ return;
+ }
+
+ if (posY < maxY)
+ {
+ posY += (speed * deltaTime);
+ }
+ else
+ {
+ bottomReachedTime = DateTime.Now;
+ bottomReached = true;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Penguloon/Controls/LevelSelector.cs b/Penguloon/Controls/LevelSelector.cs
index 0309b68..3e06968 100644
--- a/Penguloon/Controls/LevelSelector.cs
+++ b/Penguloon/Controls/LevelSelector.cs
@@ -105,6 +105,7 @@ namespace Penguloon.Controls
{
Levels.Add(new IceLevel());
Levels.Add(new IceLevel2());
+ Levels.Add(new IceLevel3());
}
public override void Draw(float deltaTime)
diff --git a/Penguloon/Levels/IceLevel3.cs b/Penguloon/Levels/IceLevel3.cs
new file mode 100644
index 0000000..1a7451d
--- /dev/null
+++ b/Penguloon/Levels/IceLevel3.cs
@@ -0,0 +1,88 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Input.Touch;
+using Penguloon.Enemies;
+using Penguloon.Objects;
+using Penguloon.Scenes;
+
+namespace Penguloon.Levels
+{
+ public class IceLevel3 : LevelBase
+ {
+ public IceLevel3() : base()
+ {
+ this.SplashArt = ContentManager.GetTexture("SplashArt/3");
+ this.Money = 123550;
+ this.Health = 200;
+ this.ID = 3;
+ this.MinimumLevel = 5;
+ }
+
+ public override void DrawUnique(float deltaTime)
+ {
+ base.DrawUnique(deltaTime);
+ }
+
+ public override void UpdateUnique(float deltaTime, TouchLocation[] touchLocations)
+ {
+ base.UpdateUnique(deltaTime, touchLocations);
+ }
+
+ public override void CreateMap()
+ {
+ Map = new Map(ParentScene, this);
+ Map.SpawnPoint = new Vector2(9 * Map.TileWidth, -1 * Map.TileHeight);
+ Map.SpawnPointTargetPos = new Vector2(9 * Map.TileWidth, 0 * Map.TileHeight);
+ Map.FinishPoint = new Vector2(8 * Map.TileWidth, -1 * Map.TileHeight);
+
+ Tile OO = new Tile(0, Direction.None);
+
+ Tile DN = new Tile(6, Direction.Down);
+ Tile RT = new Tile(5, Direction.Right);
+ Tile LT = new Tile(5, Direction.Left);
+ Tile UP = new Tile(6, Direction.Up);
+
+ Tile TR = new Tile(4, Direction.Right);
+ Tile RU = new Tile(4, Direction.Up);
+ Tile DR = new Tile(3, Direction.Right);
+
+ Tile DL = new Tile(1, Direction.Down);
+ Tile RD = new Tile(3, Direction.Down);
+ Tile LD = new Tile(1, Direction.Left);
+ Tile LU = new Tile(2, Direction.Left);
+ Tile TL = new Tile(2, Direction.Up);
+
+ Tile FN = new Tile(6, Direction.Finish);
+
+ Map.TileMap = new Tile[13, 18]
+ {
+ { OO,OO,OO,OO,OO,OO,OO,OO,FN,DN,OO,OO,OO,OO,OO,OO,OO,OO },
+ { OO,OO,OO,OO,OO,OO,OO,OO,UP,DN,OO,OO,OO,OO,OO,OO,OO,OO },
+ { OO,OO,DR,RT,RT,RT,RT,RT,TL,TR,RT,RT,RT,RT,RT,DL,OO,OO },
+ { OO,OO,UP,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,DN,OO,OO },
+ { OO,OO,UP,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,DN,OO,OO },
+ { OO,OO,UP,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,DN,OO,OO },
+ { OO,OO,UP,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,DN,OO,OO },
+ { OO,OO,UP,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,DN,OO,OO },
+ { OO,OO,UP,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,DN,OO,OO },
+ { OO,OO,UP,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,DN,OO,OO },
+ { OO,OO,RU,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LU,OO,OO },
+ { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ };
+
+ //{ OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ // { OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO,OO },
+ }
+ }
+} \ No newline at end of file
diff --git a/Penguloon/Levels/LevelBase.cs b/Penguloon/Levels/LevelBase.cs
index 2b003cf..e077ee4 100644
--- a/Penguloon/Levels/LevelBase.cs
+++ b/Penguloon/Levels/LevelBase.cs
@@ -1,7 +1,10 @@
-using Microsoft.Xna.Framework;
+using System;
+using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input.Touch;
using Penguloon.Scenes;
+using Penguloon.Controls;
+using System.Collections.Generic;
namespace Penguloon.Levels
{
@@ -38,6 +41,8 @@ namespace Penguloon.Levels
{
this.ParentScene = sceneBase;
CreateMap();
+
+ lastLevelCheck = UserdataManager.GetLevel();
}
public void Draw(float deltaTime)
@@ -58,6 +63,23 @@ namespace Penguloon.Levels
UpdateUnique(deltaTime, touchLocations);
CheckForObjectPlacement(touchLocations);
+
+ CheckForLevelUp();
+ }
+
+ int lastLevelCheck;
+ private void CheckForLevelUp()
+ {
+ if (Finished) return;
+
+ int lvl = UserdataManager.GetLevel(UserdataManager.TotalKills + Kills);
+
+ if (lvl != lastLevelCheck)
+ {
+ lastLevelCheck = lvl;
+
+ Alert.Show("Leveled up to " + lvl + "!", 3000, ParentScene);
+ }
}
private void CheckForObjectPlacement(TouchLocation[] touchLocations)
@@ -77,6 +99,15 @@ namespace Penguloon.Levels
int posToSpawnX = tileX * Map.TileWidth;
int posToSpawnY = tileY * Map.TileHeight;
+ List<Vector2> spawnPosToCheck = new List<Vector2>();
+ for(int x = 0; x < ParentScene.ObjectSeletor.Objects[ParentScene.ObjectSeletor.SelectedObjectIndex].Item1.TileSpanX; x++)
+ {
+ for (int y = 0; y < ParentScene.ObjectSeletor.Objects[ParentScene.ObjectSeletor.SelectedObjectIndex].Item1.TileSpanY; y++)
+ {
+ spawnPosToCheck.Add(new Vector2(posToSpawnX + (Map.TileWidth * x), posToSpawnY + (Map.TileHeight * y)));
+ }
+ }
+
// check if there isnt an object already
for (int x = 0; x < Map.Objects.Count; x++)
{
@@ -86,7 +117,8 @@ namespace Penguloon.Levels
{
Vector2 posToCheck = Map.Objects[x].Position + new Vector2(px * Map.TileWidth, py * Map.TileHeight);
- if (posToCheck == new Vector2(posToSpawnX, posToSpawnY))
+ for (int t = 0; t < spawnPosToCheck.Count; t++)
+ if (posToCheck == spawnPosToCheck[t])
return;
}
}
@@ -132,7 +164,7 @@ namespace Penguloon.Levels
}
public void FinishGame()
- {
+ {
// upload score here or something
UserdataManager.GamesPlayed++;
UserdataManager.TotalKills += Kills;
diff --git a/Penguloon/Levels/Map.cs b/Penguloon/Levels/Map.cs
index e7cb864..f3adf64 100644
--- a/Penguloon/Levels/Map.cs
+++ b/Penguloon/Levels/Map.cs
@@ -5,6 +5,7 @@ using Penguloon.Scenes;
using System.Collections.Generic;
using System;
using Penguloon.Objects;
+using Penguloon.Controls;
namespace Penguloon.Levels
{
diff --git a/Penguloon/Objects/HealthGeneratorObject.cs b/Penguloon/Objects/HealthGeneratorObject.cs
index 460387c..bce4d78 100644
--- a/Penguloon/Objects/HealthGeneratorObject.cs
+++ b/Penguloon/Objects/HealthGeneratorObject.cs
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
using Penguloon.Levels;
using Penguloon.Projectiles;
using System.Collections.Generic;
@@ -7,6 +8,13 @@ namespace Penguloon.Objects
{
public class HealthGeneratorObject : ObjectBase
{
+ public int HealthToRegenerate { get; set; } = 15;
+ public bool DrawText { get; set; } = false;
+ public SpriteFont Font { get; set; }
+ public string TextToDraw { get; set; }
+ public float PosY { get; set; }
+ public float PosX { get; set; }
+
public HealthGeneratorObject(Vector2 position, Map map) : base(position, map)
{
this.Texture = ContentManager.GetTexture("Objects/healthRegenerator");
@@ -16,6 +24,8 @@ namespace Penguloon.Objects
this.AttackSpeedMS = 9999999;
this.ShouldRotate = false;
this.infoText = map.Level.ParentScene.Main.Resources.GetString(Resource.String.ObjectHospital);
+
+ Font = ContentManager.GetFont(StaticUIValues.IngameFont);
}
public HealthGeneratorObject(Map map) : base(map)
@@ -27,23 +37,36 @@ namespace Penguloon.Objects
this.AttackSpeedMS = 9999999;
this.ShouldRotate = false;
this.infoText = map.Level.ParentScene.Main.Resources.GetString(Resource.String.ObjectHospital);
+
+ Font = ContentManager.GetFont(StaticUIValues.IngameFont);
}
public override void DrawUnique(float deltaTime)
{
-
+ if (DrawText)
+ Map.Level.ParentScene.DrawText(Font, TextToDraw, new Vector2(PosX, PosY), new Vector2(),
+ TextAllignment.CenterTop, Color.White,
+ Color.Black, 2);
}
public override void UpdateUnique(float deltaTime)
{
+ if (DrawText)
+ PosY -= (25 * deltaTime);
+ if (Position.Y - PosY > 75)
+ DrawText = false;
}
public override void RoundIsFinished()
{
base.RoundIsFinished();
- Map.Level.Health += 25;
+ DrawText = true;
+ TextToDraw = "+ " + HealthToRegenerate.ToString();
+ PosY = Position.Y;
+ PosX = Position.X + ((Map.TileWidth * TileSpanX) / 2);
+ Map.Level.Health += HealthToRegenerate;
}
public override void SpawnUnique()
diff --git a/Penguloon/Penguloon.csproj b/Penguloon/Penguloon.csproj
index 5b919a8..43b57c9 100644
--- a/Penguloon/Penguloon.csproj
+++ b/Penguloon/Penguloon.csproj
@@ -64,6 +64,7 @@
<Compile Include="Activity.cs" />
<Compile Include="ContentManager.cs" />
<Compile Include="ContentPathManager.cs" />
+ <Compile Include="Controls\Alert.cs" />
<Compile Include="Controls\Button.cs" />
<Compile Include="Controls\ButtonIngame.cs" />
<Compile Include="Controls\ControlBase.cs" />
@@ -80,6 +81,7 @@
<Compile Include="Enemies\RainbowBalloon.cs" />
<Compile Include="Enemies\RedBalloon.cs" />
<Compile Include="Enemies\YellowBalloon.cs" />
+ <Compile Include="Levels\IceLevel3.cs" />
<Compile Include="Levels\IceLevel2.cs" />
<Compile Include="Levels\WaveManager.cs" />
<Compile Include="Objects\CannonObject.cs" />
diff --git a/Penguloon/Resources/Values/Strings.xml b/Penguloon/Resources/Values/Strings.xml
index c42c669..4ceed7b 100644
--- a/Penguloon/Resources/Values/Strings.xml
+++ b/Penguloon/Resources/Values/Strings.xml
@@ -18,7 +18,7 @@
<string name="ObjectPenguin">This penguin does not like \n balloons</string>
<string name="ObjectGoldPenguin">This penguin king shoots \n even faster than regular \n penguins</string>
<string name="ObjectCannon">This penguin manufactored \n cannon can pop multiple \n balloons at once!</string>
- <string name="ObjectHospital">This weird object restores \n health after every round..</string>
+ <string name="ObjectHospital">This weird object restores \n health after every round..</string>
<!-- ingame options menu -->
<string name="IngameOptionsContinue">Continue</string>
diff --git a/Penguloon/SceneManager.cs b/Penguloon/SceneManager.cs
index 83bc64e..8ce887e 100644
--- a/Penguloon/SceneManager.cs
+++ b/Penguloon/SceneManager.cs
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework.Input.Touch;
+using Penguloon.Controls;
using Penguloon.Scenes;
namespace Penguloon
@@ -51,6 +52,8 @@ namespace Penguloon
default:
return;
}
+
+ Alert.Draw(deltaTime);
}
/// <summary>
@@ -78,6 +81,8 @@ namespace Penguloon
default:
return;
}
+
+ Alert.Update(deltaTime);
}
}
} \ No newline at end of file
diff --git a/Penguloon/StaticUIValues.cs b/Penguloon/StaticUIValues.cs
index 3a461a1..b436283 100644
--- a/Penguloon/StaticUIValues.cs
+++ b/Penguloon/StaticUIValues.cs
@@ -41,6 +41,8 @@ namespace Penguloon
public static Vector2 IngameInfoPanelSize { get; set; }
+ public static Vector2 AlertSize { get; set; }
+
public static void Initialize(Main main)
{
ScreenViewport = main.GraphicsDevice.Viewport.Bounds.Size.ToVector2();
@@ -64,6 +66,7 @@ namespace Penguloon
StatsMarginXRight = 150;
LoadingScreenTitle = "Fonts/GWENT/192";
IngameInfoPanelSize = new Vector2((int)(800 * 0.8), (int)(400 * 0.8));
+ AlertSize = new Vector2((int)(800 * 1), (int)(200 * 1));
}
else if (ScreenViewport.X >= 1920)
{
@@ -82,6 +85,7 @@ namespace Penguloon
StatsMarginXRight = 150;
LoadingScreenTitle = "Fonts/GWENT/192";
IngameInfoPanelSize = new Vector2((int)(800 * 0.8), (int)(400 * 0.8));
+ AlertSize = new Vector2((int)(800 * 1), (int)(200 * 1));
}
else if (ScreenViewport.X >= 1280)
{
@@ -99,6 +103,7 @@ namespace Penguloon
StatsMarginXRight = 100;
LoadingScreenTitle = "Fonts/GWENT/128";
IngameInfoPanelSize = new Vector2((int)(800 * 0.55), (int)(400 * 0.55));
+ AlertSize = new Vector2((int)(800 * 0.8), (int)(200 * 0.8));
}
else
{
@@ -116,6 +121,7 @@ namespace Penguloon
StatsMarginXRight = 100;
LoadingScreenTitle = "Fonts/GWENT/128";
IngameInfoPanelSize = new Vector2((int)(800 * 0.55), (int)(400 * 0.55));
+ AlertSize = new Vector2((int)(800 * 0.8), (int)(200 * 0.8));
}
LoadingProgressbarPosition = new Vector2((ScreenViewport.X - LoadingProgressbarSize.X) / 2, ScreenViewport.Y - LoadingProgressbarSize.Y - 200);
diff --git a/Penguloon/UserdataManager.cs b/Penguloon/UserdataManager.cs
index eca3580..f3c5aa5 100644
--- a/Penguloon/UserdataManager.cs
+++ b/Penguloon/UserdataManager.cs
@@ -49,9 +49,23 @@ namespace Penguloon
}
}
+ public static int GetLevel(int kills)
+ {
+ for (int i = 1; i < 999; i++)
+ {
+ int killsNeeded = (int)((i * 50) * (i * 1.1));
+
+ if (kills > killsNeeded) continue;
+
+ return i;
+ }
+
+ return 1;
+ }
+
public static int GetLevel()
{
- for (int i = 0; i < 999; i++)
+ for (int i = 1; i < 999; i++)
{
int killsNeeded = (int)((i * 50) * (i * 1.1));
@@ -60,7 +74,7 @@ namespace Penguloon
return i;
}
- return 0;
+ return 1;
}
}
} \ No newline at end of file