Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Progark gruppe 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Tobias Ingebrigt Ørstad
Progark gruppe 3
Commits
00a144da
Commit
00a144da
authored
5 years ago
by
Turid Cecilie Dahl
Browse files
Options
Downloads
Patches
Plain Diff
#62
changed state after score because of bug
parent
8e896491
No related branches found
No related tags found
1 merge request
!59
Resolve "ScoreState"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/core/src/com/gameware/game/states/MenuState.java
+5
-1
5 additions, 1 deletion
frontend/core/src/com/gameware/game/states/MenuState.java
frontend/core/src/com/gameware/game/states/PlayStateTemplate.java
+3
-1
3 additions, 1 deletion
.../core/src/com/gameware/game/states/PlayStateTemplate.java
with
8 additions
and
2 deletions
frontend/core/src/com/gameware/game/states/MenuState.java
+
5
−
1
View file @
00a144da
package
com.gameware.game.states
;
import
com.badlogic.gdx.Gdx
;
import
com.badlogic.gdx.graphics.g2d.SpriteBatch
;
import
com.badlogic.gdx.scenes.scene2d.InputEvent
;
import
com.badlogic.gdx.scenes.scene2d.ui.Label
;
...
...
@@ -103,7 +104,10 @@ public class MenuState extends State{
protected
void
handleInput
()
{
}
@Override
public
void
update
(
float
dt
)
{
stage
.
act
(
dt
);
}
public
void
update
(
float
dt
)
{
Gdx
.
input
.
setInputProcessor
(
stage
);
stage
.
act
(
dt
);
}
@Override
public
void
render
(
SpriteBatch
sb
)
{
stage
.
draw
();
}
...
...
This diff is collapsed.
Click to expand it.
frontend/core/src/com/gameware/game/states/PlayStateTemplate.java
+
3
−
1
View file @
00a144da
...
...
@@ -14,7 +14,7 @@ public abstract class PlayStateTemplate extends State {
private
Round
round
=
null
;
private
Tournament
tournament
=
null
;
private
Round
nextRound
=
null
;
protected
float
totalGameTime
=
30
f
;
protected
float
totalGameTime
=
5
f
;
public
PlayStateTemplate
(
GameStateManager
gsm
){
super
(
gsm
);
...
...
@@ -45,6 +45,8 @@ public abstract class PlayStateTemplate extends State {
if
(
round
==
null
)
{
gsm
.
set
(
new
ScoreState
(
gsm
,
this
.
score
,
new
SinglePlayerSelectGameState
(
gsm
)));
}
else
{
//TODO: nextRound blir null :/
// gsm.set(new ScoreState(gsm, this.score, new ViewTournamentState(gsm, tournament, nextRound)));
gsm
.
set
(
new
ScoreState
(
gsm
,
this
.
score
,
new
CreateJoinTournamentState
(
gsm
)));
}
}
...
...
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