Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SpaceCheckers
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
TDT4240-group23
SpaceCheckers
Commits
2bb82a83
Commit
2bb82a83
authored
4 years ago
by
Anders H. Rebner
Browse files
Options
Downloads
Patches
Plain Diff
Reset camera position after loading game from CinematicView
parent
e92edcad
No related branches found
No related tags found
1 merge request
!14
WIP: Default game
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CheckersClient/core/src/com/mygdx/game/UniCheckersClient.java
+1
-6
1 addition, 6 deletions
...kersClient/core/src/com/mygdx/game/UniCheckersClient.java
CheckersClient/core/src/com/mygdx/game/views/PlayView.java
+2
-0
2 additions, 0 deletions
CheckersClient/core/src/com/mygdx/game/views/PlayView.java
with
3 additions
and
6 deletions
CheckersClient/core/src/com/mygdx/game/UniCheckersClient.java
+
1
−
6
View file @
2bb82a83
...
@@ -68,13 +68,8 @@ public class UniCheckersClient extends ApplicationAdapter {
...
@@ -68,13 +68,8 @@ public class UniCheckersClient extends ApplicationAdapter {
skin
=
new
Skin
(
Gdx
.
files
.
internal
(
"UISkins/glassy/skin/glassy-ui.json"
));
skin
=
new
Skin
(
Gdx
.
files
.
internal
(
"UISkins/glassy/skin/glassy-ui.json"
));
gvm
=
new
GameViewManager
();
gvm
=
new
GameViewManager
();
//
gvm.push(new LoadingView(gvm, playerController, assetManager, stage, skin));
gvm
.
push
(
new
LoadingView
(
gvm
,
playerController
,
assetManager
,
stage
,
skin
));
//gvm.push(new CinematicView(gvm, playerController, assetManager, stage, skin));
//gvm.push(new CinematicView(gvm, playerController, assetManager, stage, skin));
// TODO: Remove the following four lines and use the above line instead
PlayView
playView
=
new
PlayView
(
gvm
,
playerController
,
assetManager
,
stage
,
skin
,
null
);
gameController
=
new
GameController
(
model
,
playView
);
playView
.
setGameController
(
gameController
);
gvm
.
push
(
playView
);
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
CheckersClient/core/src/com/mygdx/game/views/PlayView.java
+
2
−
0
View file @
2bb82a83
...
@@ -47,6 +47,8 @@ public class PlayView extends View{
...
@@ -47,6 +47,8 @@ public class PlayView extends View{
public
PlayView
(
GameViewManager
gvm
,
PlayerController
playerController
,
AssetManager
assetManager
,
Stage
stage
,
Skin
skin
,
ArrayList
<
AnimatedSprite
>
lobbyAvatars
)
{
public
PlayView
(
GameViewManager
gvm
,
PlayerController
playerController
,
AssetManager
assetManager
,
Stage
stage
,
Skin
skin
,
ArrayList
<
AnimatedSprite
>
lobbyAvatars
)
{
super
(
gvm
,
playerController
,
assetManager
,
stage
,
skin
);
super
(
gvm
,
playerController
,
assetManager
,
stage
,
skin
);
stage
.
getCamera
().
position
.
set
(
Gdx
.
graphics
.
getWidth
()
/
2
F
,
Gdx
.
graphics
.
getHeight
()
/
2
F
,
0
);
// Create background image
// Create background image
Texture
background
=
new
Texture
(
"Game/1x/StarBackground1x.png"
);
Texture
background
=
new
Texture
(
"Game/1x/StarBackground1x.png"
);
Image
backgroundImage
=
new
Image
(
background
);
Image
backgroundImage
=
new
Image
(
background
);
...
...
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