Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
ac154d31
Commit
ac154d31
authored
Jan 06, 2016
by
Theodore Lopez
Browse files
Stairs now end the game
parent
2348118f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/gameloop/DummyLocalGameLoop.java
View file @
ac154d31
package
gameloop
;
import
core.event.Event
;
import
core.event.MapChangeEvent
;
import
core.event.MapInit
;
import
core.event.ToClientDeathEvent
;
import
core.gamestate.GameContent
;
...
...
@@ -149,6 +150,9 @@ public class DummyLocalGameLoop extends Thread{
setFollowedRelayer
(
firstEntityRelayer
);
relayerSemaphore
.
release
();
}
if
(
eventToReceive
instanceof
MapChangeEvent
){
GraphicsMasterAbstraction
.
getInstance
().
changeGUIStateTo
(
GraphicsMasterAbstraction
.
GUIStates
.
GAME_WIN
);
}
if
(
eventToReceive
instanceof
ToClientDeathEvent
&&
((
ToClientDeathEvent
)
eventToReceive
).
getEntityID
()==
followedRelayer
.
getCharacter
().
getID
())
{
GraphicsMasterAbstraction
.
getInstance
().
changeGUIStateTo
(
GraphicsMasterAbstraction
.
GUIStates
.
GAME_OVER
);
...
...
src/graphics/graphical_abstraction/GraphicsMasterAbstraction.java
View file @
ac154d31
...
...
@@ -39,7 +39,8 @@ public abstract class GraphicsMasterAbstraction {
LOST_CONNECTION
,
PLEASE_WAIT
,
SERVER_ADDRESS_PANEL
,
SERVER_CREATED_PANEL
SERVER_CREATED_PANEL
,
GAME_WIN
;
}
//This map indicates to graphicsMaster which guiPanel is associated to each GUIState, it is filled in Graphicsmaster's constructor
protected
HashMap
<
GUIStates
,
PanelAbstraction
>
mapGUIStatesToGUIPanel
=
new
HashMap
<>();
...
...
src/graphics/guiSkeleton/GraphicsMaster.java
View file @
ac154d31
...
...
@@ -58,6 +58,7 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
SERVER_ADDRESS_PANEL
,
new
ServerAddressPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
GAME_OVER
,
new
GameOverPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
GAME_WIN
,
new
GameWinPanel
(
this
));
}
public
static
void
build
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment