Skip to content
Snippets Groups Projects
Commit 03c31460 authored by Susan Yuen's avatar Susan Yuen
Browse files

Removed player field inside Unit (warrior, archer, mage)

parent 6154a3f7
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,6 @@ namespace Model ...@@ -54,7 +54,6 @@ namespace Model
private Button[] buttons = new Button[5]; // the buttons associated with the unit private Button[] buttons = new Button[5]; // the buttons associated with the unit
private Texture2D charInfo, charAttackInfo; // The character and attack info textures private Texture2D charInfo, charAttackInfo; // The character and attack info textures
private int currentFrame; // the current frame the sprite is on private int currentFrame; // the current frame the sprite is on
private int player; // which player this unit belongs to
/** /**
* The constructor for Unit Warrior * The constructor for Unit Warrior
...@@ -71,7 +70,7 @@ namespace Model ...@@ -71,7 +70,7 @@ namespace Model
*/ */
public Archer(Texture2D spriteImage, Button attackButton, Button moveButton, public Archer(Texture2D spriteImage, Button attackButton, Button moveButton,
Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo, Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo,
Texture2D charAttackInfo, Vector2 coordinates, int player) Texture2D charAttackInfo, Vector2 coordinates)
{ {
this.spriteImage = spriteImage; this.spriteImage = spriteImage;
buttons[0] = attackButton; buttons[0] = attackButton;
...@@ -81,7 +80,6 @@ namespace Model ...@@ -81,7 +80,6 @@ namespace Model
buttons[4] = confirmButton; buttons[4] = confirmButton;
this.charInfo = charInfo; this.charInfo = charInfo;
this.charAttackInfo = charAttackInfo; this.charAttackInfo = charAttackInfo;
this.player = player;
pixelCoordinates = coordinates; pixelCoordinates = coordinates;
int positionX = (int)Math.Round(coordinates.X / 32); int positionX = (int)Math.Round(coordinates.X / 32);
int positionY = (int)Math.Round(coordinates.Y / 32); int positionY = (int)Math.Round(coordinates.Y / 32);
......
This diff is collapsed.
...@@ -54,7 +54,6 @@ namespace Model ...@@ -54,7 +54,6 @@ namespace Model
private Button[] buttons = new Button[5]; // the buttons associated with the unit private Button[] buttons = new Button[5]; // the buttons associated with the unit
private Texture2D charInfo, charAttackInfo; // The character and attack info textures private Texture2D charInfo, charAttackInfo; // The character and attack info textures
private int currentFrame; // the current frame the sprite is on private int currentFrame; // the current frame the sprite is on
private int player; // which player this unit belongs to
/** /**
* The constructor for Unit Mage * The constructor for Unit Mage
...@@ -71,7 +70,7 @@ namespace Model ...@@ -71,7 +70,7 @@ namespace Model
*/ */
public Mage(Texture2D spriteImage, Button attackButton, Button moveButton, public Mage(Texture2D spriteImage, Button attackButton, Button moveButton,
Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo, Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo,
Texture2D charAttackInfo, Vector2 coordinates, int player) Texture2D charAttackInfo, Vector2 coordinates)
{ {
this.spriteImage = spriteImage; this.spriteImage = spriteImage;
buttons[0] = attackButton; buttons[0] = attackButton;
...@@ -81,7 +80,6 @@ namespace Model ...@@ -81,7 +80,6 @@ namespace Model
buttons[4] = confirmButton; buttons[4] = confirmButton;
this.charInfo = charInfo; this.charInfo = charInfo;
this.charAttackInfo = charAttackInfo; this.charAttackInfo = charAttackInfo;
this.player = player;
pixelCoordinates = coordinates; pixelCoordinates = coordinates;
int positionX = (int)Math.Round(coordinates.X / 32); int positionX = (int)Math.Round(coordinates.X / 32);
int positionY = (int)Math.Round(coordinates.Y / 32); int positionY = (int)Math.Round(coordinates.Y / 32);
......
...@@ -55,7 +55,6 @@ namespace Model ...@@ -55,7 +55,6 @@ namespace Model
private Button[] buttons = new Button[5]; // the buttons associated with the unit private Button[] buttons = new Button[5]; // the buttons associated with the unit
private Texture2D charInfo, charAttackInfo; // The character and attack info textures private Texture2D charInfo, charAttackInfo; // The character and attack info textures
private int currentFrame; // the current frame the sprite is on private int currentFrame; // the current frame the sprite is on
private int player; // which player this unit belongs to
/** /**
* The constructor for Unit Warrior * The constructor for Unit Warrior
...@@ -72,7 +71,7 @@ namespace Model ...@@ -72,7 +71,7 @@ namespace Model
*/ */
public Warrior(Texture2D spriteImage, Button attackButton, Button moveButton, public Warrior(Texture2D spriteImage, Button attackButton, Button moveButton,
Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo, Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo,
Texture2D charAttackInfo, Vector2 coordinates, int player) Texture2D charAttackInfo, Vector2 coordinates)
{ {
this.spriteImage = spriteImage; this.spriteImage = spriteImage;
buttons[0] = attackButton; buttons[0] = attackButton;
...@@ -82,7 +81,6 @@ namespace Model ...@@ -82,7 +81,6 @@ namespace Model
buttons[4] = confirmButton; buttons[4] = confirmButton;
this.charInfo = charInfo; this.charInfo = charInfo;
this.charAttackInfo = charAttackInfo; this.charAttackInfo = charAttackInfo;
this.player = player;
pixelCoordinates = coordinates; pixelCoordinates = coordinates;
int positionX = (int)Math.Round(coordinates.X / 32); int positionX = (int)Math.Round(coordinates.X / 32);
int positionY = (int)Math.Round(coordinates.Y / 32); int positionY = (int)Math.Round(coordinates.Y / 32);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment