Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BattleArena
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scherbaum Maximilian
BattleArena
Merge requests
!18
Sound: Music is playing, fuiyoh
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Sound: Music is playing, fuiyoh
sound
into
development
Overview
0
Commits
6
Pipelines
0
Changes
30
Merged
Gehrung Jonas
requested to merge
sound
into
development
1 year ago
Overview
0
Commits
6
Pipelines
0
Changes
30
Expand
0
0
Merge request reports
Compare
development
version 1
7e60e273
1 year ago
development (base)
and
latest version
latest version
7551b86b
6 commits,
1 year ago
version 1
7e60e273
5 commits,
1 year ago
30 files
+
169
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
30
Search (e.g. *.vue) (Ctrl+P)
src/main/java/de/hdm_stuttgart/battlearena/Main/Main.java
+
17
−
0
Options
package
de.hdm_stuttgart.battlearena.Main
;
import
de.hdm_stuttgart.battlearena.Model.Sound.MusicType
;
import
de.hdm_stuttgart.battlearena.Model.Sound.SFX
;
import
de.hdm_stuttgart.battlearena.Model.Sound.SoundManager
;
import
de.hdm_stuttgart.battlearena.Model.Inputs.InputHandler
;
import
javafx.application.Application
;
import
javafx.fxml.FXMLLoader
;
import
javafx.geometry.Rectangle2D
;
@@ -30,6 +35,7 @@ public class Main extends Application {
@Override
public
void
start
(
Stage
stage
)
throws
Exception
{
// loading font in start() because CSS can't handle whitespace in folder names
Font
.
loadFont
(
getClass
().
getResourceAsStream
(
"/fonts/StarshipShadow.ttf"
),
50
);
@@ -53,6 +59,17 @@ public class Main extends Application {
scene
.
getStylesheets
().
add
(
Objects
.
requireNonNull
(
this
.
getClass
().
getResource
(
"/styles/style.css"
)).
toExternalForm
());
stage
.
setScene
(
scene
);
SoundManager
soundManager
=
new
SoundManager
();
stage
.
setOnCloseRequest
(
event
->
{
if
(
soundManager
!=
null
)
{
soundManager
.
stopMusic
();
}
});
soundManager
.
playMusic
(
MusicType
.
GAME
);
stage
.
show
();
log
.
debug
(
"Project started successfully!"
);
}
Loading