Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TDT4240 Tank Wars
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
Package 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
Snorre Skjellestad Kristiansen
TDT4240 Tank Wars
Commits
e1ef339e
Commit
e1ef339e
authored
2 years ago
by
Magnus Segtnan Skjølberg
Browse files
Options
Downloads
Patches
Plain Diff
(
#18
): add viewport to gamehud
parent
4702bff7
No related branches found
Branches containing commit
No related tags found
3 merge requests
!51
Resolve "Adjust cannon angle from touch input"
,
!35
Draft: Resolve "Adjust cannon angle from touch input"
,
!32
Combine hud with gameplay
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/core/src/com/game/tankwars/view/GameHud.java
+7
-0
7 additions, 0 deletions
frontend/core/src/com/game/tankwars/view/GameHud.java
with
7 additions
and
0 deletions
frontend/core/src/com/game/tankwars/view/GameHud.java
+
7
−
0
View file @
e1ef339e
...
...
@@ -18,6 +18,8 @@ public class GameHud {
private
Stage
stage
;
private
Viewport
viewport
;
private
Table
table
;
private
Skin
skin
;
...
...
@@ -37,6 +39,7 @@ public class GameHud {
private
HorizontalGroup
moveContainer
;
public
GameHud
(
Viewport
viewport
,
SpriteBatch
batch
)
{
this
.
viewport
=
viewport
;
stage
=
new
Stage
(
viewport
,
batch
);
table
=
new
Table
();
...
...
@@ -84,6 +87,10 @@ public class GameHud {
return
stage
;
}
public
Viewport
getViewport
()
{
return
viewport
;
}
public
Skin
getSkin
()
{
return
skin
;
}
...
...
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