Skip to content

Commit bd9887e

Browse files
committed
remove sound from test
1 parent 4ada332 commit bd9887e

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

src/Main.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ module MainLoop
8686
end
8787

8888
function initialize_new_scene(this::Main, isUsingEditor::Bool = false)
89-
println("Initializing new scene")
9089
SceneBuilderModule.change_scene(this.level, isUsingEditor)
9190
initialize_scripts_and_components(false)
9291

test/projects/ProfilingTest/Platformer/scripts/GameManager.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ function Base.getproperty(this::GameManager, s::Symbol)
4242

4343
this.parent.persistentBetweenScenes = true
4444
if this.currentLevel > 1
45-
JulGame.Component.unload_sound(this.currentMusic)
45+
# JulGame.Component.unload_sound(this.currentMusic)
4646
end
4747

48-
this.currentMusic = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), true, this.soundBank[this.currentLevel], Int32(25)))
49-
JulGame.Component.toggle_sound(this.currentMusic)
48+
# this.currentMusic = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), true, this.soundBank[this.currentLevel], Int32(25)))
49+
# JulGame.Component.toggle_sound(this.currentMusic)
5050

5151
JulGame.UI.update_text(MAIN.scene.uiElements[2], string(this.starCount))
5252
end

test/projects/ProfilingTest/Platformer/scripts/PlayerMovement.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ function Base.getproperty(this::PlayerMovement, s::Symbol)
4545
MAIN.scene.camera.target = this.cameraTarget
4646
this.gameManager = JulGame.SceneModule.get_entity_by_name(MAIN.scene, "Game Manager").scripts[1]
4747
this.deathsThisLevel = 0
48-
this.coinSound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "coin.wav", Int32(50)))
49-
this.hurtSound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "hit.wav", Int32(50)))
50-
this.starSound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "power-up.wav", Int32(50)))
48+
# this.coinSound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "coin.wav", Int32(50)))
49+
# this.hurtSound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "hit.wav", Int32(50)))
50+
# this.starSound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "power-up.wav", Int32(50)))
5151
end
5252
elseif s == :update
5353
function(deltaTime)
@@ -60,7 +60,7 @@ function Base.getproperty(this::PlayerMovement, s::Symbol)
6060
# https://wiki.libsdl.org/SDL2/SDL_Scancode
6161
# Spaces full scancode is "SDL_SCANCODE_SPACE" so we use "SPACE". Every other key is the same.
6262
if this.parent.rigidbody.grounded
63-
JulGame.Component.toggle_sound(this.jumpSound)
63+
# JulGame.Component.toggle_sound(this.jumpSound)
6464

6565
JulGame.RigidbodyModule.SetVelocity(this.parent.rigidbody, Vector2f(JulGame.Component.get_velocity(this.parent.rigidbody).x, 0))
6666
JulGame.RigidbodyModule.AddVelocity(this.parent.rigidbody, Vector2f(0, this.jumpVelocity))
@@ -121,18 +121,18 @@ function Base.getproperty(this::PlayerMovement, s::Symbol)
121121
function(otherCollider)
122122
if otherCollider.tag == "Coin"
123123
JulGame.MainLoop.destroy_entity(MAIN, otherCollider.parent)
124-
JulGame.Component.toggle_sound(this.coinSound)
124+
# JulGame.Component.toggle_sound(this.coinSound)
125125
JulGame.UI.update_text(JulGame.MAIN.scene.uiElements[1], string(parse(Int32, split(JulGame.MAIN.scene.uiElements[1].text, "/")[1]) + 1, "/", parse(Int32, split(JulGame.MAIN.scene.uiElements[1].text, "/")[2])))
126126
elseif otherCollider.tag == "Star"
127-
JulGame.Component.toggle_sound(this.starSound)
127+
# JulGame.Component.toggle_sound(this.starSound)
128128
JulGame.MainLoop.destroy_entity(JulGame.MAIN, otherCollider.parent)
129129
this.gameManager.starCount = this.gameManager.starCount + 1
130130
JulGame.UI.update_text(JulGame.MAIN.scene.uiElements[2], string(this.gameManager.starCount))
131131
end
132132
end
133133
elseif s == :respawn
134134
function()
135-
JulGame.Component.toggle_sound(this.hurtSound)
135+
# JulGame.Component.toggle_sound(this.hurtSound)
136136
this.parent.transform.position = Vector2f(1, 4)
137137
this.gameManager.starCount = max(this.gameManager.starCount - 1, 0)
138138
JulGame.UI.update_text(MAIN.scene.uiElements[2], string(this.gameManager.starCount))

test/projects/ProfilingTest/Platformer/scripts/Title.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function Base.getproperty(this::Title, s::Symbol)
3636
end
3737
end
3838

39-
sound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "confirm-ui.wav", Int32(50)))
40-
JulGame.Component.toggle_sound(sound)
39+
# sound = JulGame.create_sound_source(this.parent, JulGame.SoundSourceModule.SoundSource(Int32(-1), false, "confirm-ui.wav", Int32(50)))
40+
# JulGame.Component.toggle_sound(sound)
4141

4242
JulGame.MainLoop.change_scene("level_1.json")
4343
catch e

test/runtests.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ include(joinpath(PROFILINGTESTDIR, "Platformer", "src", "Platformer.jl"))
1414
@test run_platformer() == 0
1515
end
1616

17-
#include("math/mathtests.jl")
17+
include("math/mathtests.jl")
1818

19-
# cd(joinpath(SMOKETESTDIR, "src"))
20-
# @test run(SMOKETESTDIR, Test) == 0
19+
cd(joinpath(SMOKETESTDIR, "src"))
20+
@test run(SMOKETESTDIR, Test) == 0
2121

22-
# cd(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src"))
23-
# include(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src", "../Editor.jl"))
24-
# @testset "Editor" begin
25-
# @test Editor.run(true) == 0
26-
# end
22+
cd(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src"))
23+
include(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src", "../Editor.jl"))
24+
@testset "Editor" begin
25+
@test Editor.run(true) == 0
26+
end
2727
end

0 commit comments

Comments
 (0)