2 using System.Collections.Generic;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Content;
7 using Microsoft.Xna.Framework.Graphics;
9 namespace SuperPolarity
11 public class GameActor : Actor
14 protected Texture2D Texture;
15 protected Vector2 Origin;
17 // Constraints / Behavior
19 protected bool Immortal;
22 public override int Width
24 get { return Texture.Width; }
27 public override int Height
29 get { return Texture.Height; }
32 public GameActor(SuperPolarity newGame)
37 public virtual void Initialize(Texture2D texture, Vector2 position)
39 base.Initialize (position);
45 Origin = new Vector2(Texture.Width / 2, Texture.Height / 2);
54 public override void Draw(SpriteBatch spriteBatch)
56 base.Draw(spriteBatch);
59 spriteBatch.Draw(Texture, Position, null, Color, Angle, Origin, 1f, SpriteEffects.None, 0f);
60 } catch (ArgumentNullException) {
61 Console.WriteLine ("Where'd the texture go?.");
65 public override void CleanUp()
72 public void TakeDamage(int amount)