@@ -45,9 +45,9 @@ function Base.getproperty(this::PlayerMovement, s::Symbol)
45
45
MAIN. scene. camera. target = this. cameraTarget
46
46
this. gameManager = JulGame. SceneModule. get_entity_by_name (MAIN. scene, " Game Manager" ). scripts[1 ]
47
47
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)))
51
51
end
52
52
elseif s == :update
53
53
function (deltaTime)
@@ -60,7 +60,7 @@ function Base.getproperty(this::PlayerMovement, s::Symbol)
60
60
# https://wiki.libsdl.org/SDL2/SDL_Scancode
61
61
# Spaces full scancode is "SDL_SCANCODE_SPACE" so we use "SPACE". Every other key is the same.
62
62
if this. parent. rigidbody. grounded
63
- JulGame. Component. toggle_sound (this. jumpSound)
63
+ # JulGame.Component.toggle_sound(this.jumpSound)
64
64
65
65
JulGame. RigidbodyModule. SetVelocity (this. parent. rigidbody, Vector2f (JulGame. Component. get_velocity (this. parent. rigidbody). x, 0 ))
66
66
JulGame. RigidbodyModule. AddVelocity (this. parent. rigidbody, Vector2f (0 , this. jumpVelocity))
@@ -121,18 +121,18 @@ function Base.getproperty(this::PlayerMovement, s::Symbol)
121
121
function (otherCollider)
122
122
if otherCollider. tag == " Coin"
123
123
JulGame. MainLoop. destroy_entity (MAIN, otherCollider. parent)
124
- JulGame. Component. toggle_sound (this. coinSound)
124
+ # JulGame.Component.toggle_sound(this.coinSound)
125
125
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 ])))
126
126
elseif otherCollider. tag == " Star"
127
- JulGame. Component. toggle_sound (this. starSound)
127
+ # JulGame.Component.toggle_sound(this.starSound)
128
128
JulGame. MainLoop. destroy_entity (JulGame. MAIN, otherCollider. parent)
129
129
this. gameManager. starCount = this. gameManager. starCount + 1
130
130
JulGame. UI. update_text (JulGame. MAIN. scene. uiElements[2 ], string (this. gameManager. starCount))
131
131
end
132
132
end
133
133
elseif s == :respawn
134
134
function ()
135
- JulGame. Component. toggle_sound (this. hurtSound)
135
+ # JulGame.Component.toggle_sound(this.hurtSound)
136
136
this. parent. transform. position = Vector2f (1 , 4 )
137
137
this. gameManager. starCount = max (this. gameManager. starCount - 1 , 0 )
138
138
JulGame. UI. update_text (MAIN. scene. uiElements[2 ], string (this. gameManager. starCount))
0 commit comments