aboutsummaryrefslogtreecommitdiff
path: root/SuperPolarityMac/Player.cs
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2014-02-11 01:15:19 -0600
committerBen Beltran <ben@nsovocal.com>2014-02-11 01:15:19 -0600
commitd7a43ae2d3d4702bd199fa5d8ca84c7c6e78ed36 (patch)
tree28be1c08e360ad3122042243a326f1352797d802 /SuperPolarityMac/Player.cs
parent6fceaa7b34f4d6efc497cda51679b37e530a61aa (diff)
Consolidate with mac project.
Diffstat (limited to 'SuperPolarityMac/Player.cs')
-rw-r--r--SuperPolarityMac/Player.cs81
1 files changed, 0 insertions, 81 deletions
diff --git a/SuperPolarityMac/Player.cs b/SuperPolarityMac/Player.cs
deleted file mode 100644
index 184abdd..0000000
--- a/SuperPolarityMac/Player.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-
-namespace SuperPolarity
-{
- public class Player
- {
- public int Score;
- public int Multiplier;
- public int Lives;
-
-
- SpriteFont DebugFont;
- SuperPolarity Game;
-
- Texture2D LifeSprite;
-
- public Player(SuperPolarity game)
- {
- Score = 0;
- Multiplier = 1;
- Lives = 3;
- Game = game;
- DebugFont = Game.Content.Load<SpriteFont>("Fonts\\bigfont");
- LifeSprite = Game.Content.Load<Texture2D>("Graphics\\neutral-ship");
- }
-
- public void AddScore(int value)
- {
- Score = Score + (value * Multiplier);
- }
-
- public void AddMultiplier(int value)
- {
- Multiplier = Multiplier + 1;
- }
-
- public void ResetMultiplier()
- {
- Multiplier = 1;
- }
-
- public void Draw(SpriteBatch spriteBatch)
- {
- var UiColor = new Color(0, 0, 0, 200);
- var lightColor = new Color(0, 0, 0, 128);
- spriteBatch.DrawString(DebugFont, Score.ToString(), new Vector2(40, 30), UiColor);
- spriteBatch.DrawString(DebugFont, "x" + Multiplier.ToString(), new Vector2(40, 50), lightColor);
-
- var lifePosition = new Vector2(Game.GraphicsDevice.Viewport.Width - 140, 30);
- if (Lives > 4)
- {
- spriteBatch.Draw(LifeSprite, lifePosition, null, UiColor, (float)(Math.PI / 2), Vector2.Zero, 0.5f, SpriteEffects.None, 0f);
- spriteBatch.DrawString(DebugFont, "x " + Lives.ToString(), new Vector2(lifePosition.X + 8, lifePosition.Y + 5), UiColor);
- }
- else
- {
- for (var i = 0; i < Lives; i++)
- {
- spriteBatch.Draw(LifeSprite, new Vector2(lifePosition.X + (i * 28), lifePosition.Y), null, UiColor, (float)(Math.PI / 2), Vector2.Zero, 0.5f, SpriteEffects.None, 0f);
- }
- }
- }
-
- public void Update()
- {
-
- }
-
- public void Reset()
- {
- Score = 0;
- Multiplier = 1;
- Lives = 3;
- }
- }
-}