]> git.r.bdr.sh - rbdr/super-polarity/blob - Super Polarity/MainShip.cs
51d1eb306126e8c7c17141245586e1cf9509969d
[rbdr/super-polarity] / Super Polarity / MainShip.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Graphics;
7
8 namespace SuperPolarity
9 {
10 class MainShip
11 {
12 public Texture2D PlayerTexture;
13 public Vector2 Position;
14 public bool Active;
15 public int Lives;
16 public int Multiplier;
17 public int Score;
18 public float Angle;
19
20 public int Width
21 {
22 get { return PlayerTexture.Width; }
23 }
24
25 public int Height
26 {
27 get { return PlayerTexture.Height; }
28 }
29
30 public void Initialize(Texture2D texture, Vector2 position)
31 {
32 PlayerTexture = texture;
33 Position = position;
34 Active = true;
35 Multiplier = 1;
36 Lives = 3;
37 Score = 0;
38 }
39
40 public void Update()
41 {
42 }
43
44 public void Draw(SpriteBatch spriteBatch)
45 {
46 spriteBatch.Draw(PlayerTexture, Position, null, Color.White, Angle, Vector2.Zero, 1f, SpriteEffects.None, 0f);
47 }
48 }
49 }