Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Blaze-Brigade
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Susan Yuen
Blaze-Brigade
Commits
20dac996
Commit
20dac996
authored
8 years ago
by
Trandinh Thien
Browse files
Options
Downloads
Patches
Plain Diff
Character info screen now no longer shows up during attack screen
parent
548da1e2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Blaze-Brigade/Blaze_Brigade/Game.cs
+4
-1
4 additions, 1 deletion
src/Blaze-Brigade/Blaze_Brigade/Game.cs
src/Blaze-Brigade/Blaze_Brigade/MouseHandler.cs
+3
-8
3 additions, 8 deletions
src/Blaze-Brigade/Blaze_Brigade/MouseHandler.cs
with
7 additions
and
9 deletions
src/Blaze-Brigade/Blaze_Brigade/Game.cs
+
4
−
1
View file @
20dac996
...
...
@@ -322,7 +322,7 @@ namespace Controller
#
region
Character
Info
Screen
player1
//if player 1, prints info screen for player 1
if
(
GameState
.
currentPlayer
==
player1
)
if
(
(
GameState
.
currentPlayer
==
player1
)
&&(!
GameState
.
attackConfirmOpen
))
{
Vector2
statLocation
=
new
Vector2
(
180
,
533
);
//starting location for first stat
Vector2
increment
=
new
Vector2
(
0
,
11.5f
);
//increment downwards for each stat
...
...
@@ -340,6 +340,8 @@ namespace Controller
//else, info screen for player 2
else
{
if
(!
GameState
.
attackConfirmOpen
)
{
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
);
...
...
@@ -351,6 +353,7 @@ namespace Controller
}
spriteBatch
.
DrawString
(
largeFont
,
unit
.
Hp
.
ToString
(),
new
Vector2
(
864
,
512
),
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
...
...
This diff is collapsed.
Click to expand it.
src/Blaze-Brigade/Blaze_Brigade/MouseHandler.cs
+
3
−
8
View file @
20dac996
...
...
@@ -58,7 +58,7 @@ namespace Controller
if
(
getMenuButtonClicked
(
mouseClickCoordinates
)
!=
null
)
{
MenuButton
menuButton
=
getMenuButtonClicked
(
mouseClickCoordinates
);
//
Debug.WriteLine(getMenuButtonClicked(mouseClickCoordinates).getButtonType());
Debug
.
WriteLine
(
getMenuButtonClicked
(
mouseClickCoordinates
).
getButtonType
());
buttonAction
(
menuButton
);
return
;
}
...
...
@@ -78,8 +78,6 @@ namespace Controller
{
updateUnitPosition
(
graph
,
mouseClickCoordinates
,
path
);
}
turnState
=
TurnState
.
Wait
;
}
if
(
turnState
==
TurnState
.
Attack
)
//if a unit is clicked after attack is clicked
...
...
@@ -87,10 +85,9 @@ namespace Controller
Unit
unit
=
getPlayableUnitOnNodeClicked
(
graph
.
getNode
(
mouseClickCoordinates
),
mouseClickCoordinates
,
GameState
.
currentPlayer
);
if
(
unit
!=
null
)
{
setAttackedUnit
(
unit
,
true
);
setAttackedUnit
(
unit
,
true
);
GameState
.
attackConfirmOpen
=
true
;
//opens attack confirm button
unit
.
getAttackConfirmButton
().
setActive
(
true
);
}
}
}
...
...
@@ -335,7 +332,6 @@ namespace Controller
button
.
setActive
(
false
);
break
;
case
MenuButtonType
.
AttackConfirm
:
// if confirm attack clicked
turnState
=
TurnState
.
AttackMenu
;
button
.
setActive
(
false
);
unit
.
getMenuButtonAt
(
1
).
setActive
(
false
);
int
attackDirection
=
0
;
...
...
@@ -369,7 +365,6 @@ namespace Controller
GameState
.
dropDownMenuOpen
=
false
;
break
;
case
MenuButtonType
.
Wait
:
// if wait is clicked
turnState
=
TurnState
.
Wait
;
GameState
.
dropDownMenuOpen
=
false
;
GameState
.
playableUnitSelected
=
false
;
button
.
setActive
(
false
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment