Skip to content
Snippets Groups Projects
Commit 2fd83e4c authored by Trandinh Thien's avatar Trandinh Thien
Browse files

Different players now have different info screens, at different positions

parent c44c8df6
No related branches found
No related tags found
No related merge requests found
Showing
with 283 additions and 40 deletions
......@@ -123,14 +123,30 @@
<Content Include="GameThumbnail.png">
<XnaPlatformSpecific>true</XnaPlatformSpecific>
</Content>
<None Include="Resources\warrior_attack.png" />
<None Include="Resources\mage_attack.png" />
<None Include="Resources\archer_attack.png" />
<None Include="Resources\2warrior_stats.png" />
<None Include="Resources\2warrior_attack.png" />
<None Include="Resources\2warrior_art.png" />
<None Include="Resources\2warrior.png" />
<None Include="Resources\2mage_stats.png" />
<None Include="Resources\2mage_attack.png" />
<None Include="Resources\2mage_art.png" />
<None Include="Resources\2mage.png" />
<None Include="Resources\2archer_stats.png" />
<None Include="Resources\2archer_attack.png" />
<None Include="Resources\2archer.png" />
<None Include="Resources\mage.png" />
<None Include="Resources\mage_stats.png" />
<None Include="Resources\archer.png" />
<None Include="Resources\archer_stats.png" />
<None Include="Resources\warrior_stats.png" />
<None Include="Resources\instructions3.png" />
<None Include="Resources\instructions2.png" />
<None Include="Resources\instructions1.png" />
<None Include="Resources\warrior.png" />
<None Include="Resources\Warrior_Info.png" />
<None Include="Resources\warrior_stats.png" />
<None Include="Resources\Game_Map.jpg" />
<None Include="Resources\warrior_art.png" />
<None Include="Resources\wait.png" />
<None Include="Resources\move.png" />
<None Include="Resources\items.png" />
......
......@@ -6,12 +6,23 @@ Content\attack.xnb
Content\items.xnb
Content\move.xnb
Content\wait.xnb
Content\warrior_art.xnb
Content\warrior_stats.xnb
Content\Warrior_Info.xnb
Content\warrior.xnb
Content\PixelFont.xnb
Content\warrior_stats.xnb
Content\PixelFontLarge.xnb
Content\warrior.xnb
Content\instructions1.xnb
Content\instructions2.xnb
Content\instructions3.xnb
Content\mage_stats.xnb
Content\archer_stats.xnb
Content\archer.xnb
Content\mage.xnb
Content\2archer.xnb
Content\2archer_attack.xnb
Content\2archer_stats.xnb
Content\2mage.xnb
Content\2mage_attack.xnb
Content\2mage_stats.xnb
Content\2warrior.xnb
Content\2warrior_attack.xnb
Content\2warrior_stats.xnb
......@@ -105,8 +105,8 @@ namespace Controller
player2 = new Player();
// load character sprite and set position
player1.addUnit(getNewUnit(UnitType.Warrior, new Vector2(4*32f, 6*32f)));
player2.addUnit(getNewUnit(UnitType.Warrior, new Vector2(15*32f, 6*32f)));
player1.addUnit(getNewUnit(UnitType.Warrior, new Vector2(4*32f, 6*32f),1));
player2.addUnit(getNewUnit(UnitType.Warrior, new Vector2(15*32f, 6*32f),2));
GameState.setCurrentPlayer(player1);
GameState.setEnemyPlayer(player2);
......@@ -293,12 +293,16 @@ namespace Controller
#endregion
}
#region Character Info Screen
#region Character Info Screen player1
if(GameState.getCurrentPlayer() == player1){ //if player 1, prints info screen for player 1
Vector2 statLocation = new Vector2(180, 533); //starting location for first stat
Vector2 increment = new Vector2(0, 11.5f); //increment downwards for each stat
Vector2 infoLocation = new Vector2(20, 513);
for (int k=0; k<7; k++) //for 6 stats - str, int, skill, speed, def, res
for (int k = 0; k < 7; k++) //for 6 stats - str, int, skill, speed, def, res
{
spriteBatch.DrawString(font, unit.getStats(k).ToString(), statLocation, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws each stat
statLocation = statLocation + increment; //increment downwards
......@@ -306,7 +310,22 @@ namespace Controller
spriteBatch.DrawString(largeFont, unit.getHp().ToString(), new Vector2(255, 515), Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws each stat
spriteBatch.Draw(unit.getCharInfo(), infoLocation, null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.7f); //draw charInfoBackground texture
}
else //else, info screen for player 2
{
Vector2 statLocation = new Vector2(795, 533); //starting location for first stat
Vector2 increment = new Vector2(0, 11.5f); //increment downwards for each stat
Vector2 infoLocation = new Vector2(635, 513);
for (int k = 0; k < 7; k++) //for 6 stats - str, int, skill, speed, def, res
{
spriteBatch.DrawString(font, unit.getStats(k).ToString(), statLocation, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws each stat
statLocation = statLocation + increment; //increment downwards
}
spriteBatch.DrawString(largeFont, unit.getHp().ToString(), new Vector2(255, 515), Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws each stat
spriteBatch.Draw(unit.getCharInfo(), infoLocation, null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.7f); //draw charInfoBackground texture
}
#endregion
}
......@@ -331,19 +350,33 @@ namespace Controller
base.Draw(gameTime); // repeatedly calls draw
}
private Unit getNewUnit(UnitType unitType, Vector2 unitPosition)
//method to return a unit: takes in unit type (warrior/mage/ranger), unit position, and which player's unit (since different model/colors)
private Unit getNewUnit(UnitType unitType, Vector2 unitPosition, int player)
{
MenuButton attackButton = new MenuButton(MenuButtonType.Attack, unitPosition, Content.Load<Texture2D>("attack"));
MenuButton moveButton = new MenuButton(MenuButtonType.Move, unitPosition, Content.Load<Texture2D>("move"));
MenuButton itemButton = new MenuButton(MenuButtonType.Items, unitPosition, Content.Load<Texture2D>("items")); ;
MenuButton waitButton = new MenuButton(MenuButtonType.Wait, unitPosition, Content.Load<Texture2D>("wait")); ;
if (unitType == UnitType.Warrior)
if (player == 1)
{
if (unitType == UnitType.Warrior)
{
Unit unit = new Warrior(Content.Load<Texture2D>("warrior"), attackButton, moveButton,
itemButton, waitButton, Content.Load<Texture2D>("warrior_stats"), unitPosition);
graph.getNode(unitPosition).setUnitOnNode(unit);
return unit;
}
}
else
{
Unit unit = new Warrior(Content.Load<Texture2D>("warrior"), attackButton, moveButton,
itemButton, waitButton, Content.Load<Texture2D>("warrior_Info"), unitPosition);
graph.getNode(unitPosition).setUnitOnNode(unit);
return unit;
if (unitType == UnitType.Warrior)
{
Unit unit = new Warrior(Content.Load<Texture2D>("2warrior"), attackButton, moveButton,
itemButton, waitButton, Content.Load<Texture2D>("2warrior_stats"), unitPosition);
graph.getNode(unitPosition).setUnitOnNode(unit);
return unit;
}
}
return null;
......@@ -351,6 +384,7 @@ namespace Controller
private void setObstacles(Graph graph)
{
// manually sets obstacle nodes for graph
for (int y=5; y<=14; y++)
{
......
......@@ -60,6 +60,126 @@ namespace Blaze_Brigade {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2archer {
get {
object obj = ResourceManager.GetObject("_2archer", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2archer_attack {
get {
object obj = ResourceManager.GetObject("_2archer_attack", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2archer_stats {
get {
object obj = ResourceManager.GetObject("_2archer_stats", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2mage {
get {
object obj = ResourceManager.GetObject("_2mage", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2mage_attack {
get {
object obj = ResourceManager.GetObject("_2mage_attack", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2mage_stats {
get {
object obj = ResourceManager.GetObject("_2mage_stats", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2warrior {
get {
object obj = ResourceManager.GetObject("_2warrior", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2warrior_attack {
get {
object obj = ResourceManager.GetObject("_2warrior_attack", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _2warrior_stats {
get {
object obj = ResourceManager.GetObject("_2warrior_stats", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap archer {
get {
object obj = ResourceManager.GetObject("archer", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap archer_attack {
get {
object obj = ResourceManager.GetObject("archer_attack", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap archer_stats {
get {
object obj = ResourceManager.GetObject("archer_stats", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
......@@ -130,6 +250,36 @@ namespace Blaze_Brigade {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mage {
get {
object obj = ResourceManager.GetObject("mage", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mage_attack {
get {
object obj = ResourceManager.GetObject("mage_attack", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mage_stats {
get {
object obj = ResourceManager.GetObject("mage_stats", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
......@@ -183,19 +333,9 @@ namespace Blaze_Brigade {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap warrior_art {
get {
object obj = ResourceManager.GetObject("warrior_art", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Warrior_Info {
internal static System.Drawing.Bitmap warrior_attack {
get {
object obj = ResourceManager.GetObject("Warrior_Info", resourceCulture);
object obj = ResourceManager.GetObject("warrior_attack", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
......
......@@ -118,18 +118,12 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="warrior_art" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\warrior_art.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="moveableNode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\moveableNode.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="warrior" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\warrior.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="warrior_stats" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\warrior_stats.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MenuImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\MenuImage.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......@@ -148,9 +142,6 @@
<data name="items" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\items.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Warrior_Info" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Warrior_Info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="attack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\attack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......@@ -163,4 +154,55 @@
<data name="instructions3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\instructions3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="archer" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\archer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="archer_attack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\archer_attack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="archer_stats" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\archer_stats.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\mage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mage_attack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\mage_attack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mage_stats" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\mage_stats.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="warrior_attack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\warrior_attack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="warrior_stats" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\warrior_stats.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2archer" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2archer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2archer_attack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2archer_attack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2archer_stats" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2archer_stats.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2mage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2mage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2mage_attack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2mage_attack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2mage_stats" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2mage_stats.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2warrior" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2warrior.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2warrior_attack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2warrior_attack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_2warrior_stats" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\2warrior_stats.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file
src/Blaze-Brigade/Blaze_Brigade/Resources/Warrior_Info.png

29.1 KiB

src/Blaze-Brigade/Blaze_Brigade/Resources/archer.png

7.27 KiB

src/Blaze-Brigade/Blaze_Brigade/Resources/archer_attack.png

152 KiB

src/Blaze-Brigade/Blaze_Brigade/Resources/archer_stats.png

31.7 KiB

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