forked from team-sg/hero-mark-2
great job!
This commit is contained in:
parent
6fdd5b5510
commit
7240402776
8 changed files with 29 additions and 5 deletions
|
@ -40,6 +40,10 @@ const a_good_job_penny = preload("res://audio/sounds/good_job_penny.ogg")
|
||||||
const a_good_job_haze = preload("res://audio/sounds/good_job_haze.ogg")
|
const a_good_job_haze = preload("res://audio/sounds/good_job_haze.ogg")
|
||||||
const a_good_job_ivy = preload("res://audio/sounds/good_job_ivy.ogg")
|
const a_good_job_ivy = preload("res://audio/sounds/good_job_ivy.ogg")
|
||||||
const a_good_job_dog = preload("res://audio/sounds/good_job_dog.ogg")
|
const a_good_job_dog = preload("res://audio/sounds/good_job_dog.ogg")
|
||||||
|
const a_great_job_penny = preload("res://audio/sounds/great_job_penny.ogg")
|
||||||
|
const a_great_job_haze = preload("res://audio/sounds/great_job_haze.ogg")
|
||||||
|
const a_great_job_ivy = preload("res://audio/sounds/great_job_ivy.ogg")
|
||||||
|
const a_great_job_dog = preload("res://audio/sounds/great_job_dog.ogg")
|
||||||
const a_2600_charge = preload("res://audio/sounds/2600_charge.ogg")
|
const a_2600_charge = preload("res://audio/sounds/2600_charge.ogg")
|
||||||
const a_victory = preload("res://audio/sounds/victory.ogg")
|
const a_victory = preload("res://audio/sounds/victory.ogg")
|
||||||
const a_shard_results = preload("res://audio/sounds/shard_results.ogg")
|
const a_shard_results = preload("res://audio/sounds/shard_results.ogg")
|
||||||
|
@ -53,6 +57,7 @@ const a_famira = preload("res://audio/sounds/famira.ogg")
|
||||||
|
|
||||||
var loop_section = null
|
var loop_section = null
|
||||||
var has_looped = false
|
var has_looped = false
|
||||||
|
var r = 0
|
||||||
|
|
||||||
#Plays a sound
|
#Plays a sound
|
||||||
func play_sound(snd: AudioStream, player: AudioStreamPlayer, pitch: float = 1.0):
|
func play_sound(snd: AudioStream, player: AudioStreamPlayer, pitch: float = 1.0):
|
||||||
|
@ -91,3 +96,17 @@ func _on_ShardSound_finished():
|
||||||
AudioServer.set_bus_mute(idx, false)
|
AudioServer.set_bus_mute(idx, false)
|
||||||
if !get_tree().paused: ac_music.set_stream_paused(false)
|
if !get_tree().paused: ac_music.set_stream_paused(false)
|
||||||
ac_pause_music.set_stream_paused(false)
|
ac_pause_music.set_stream_paused(false)
|
||||||
|
|
||||||
|
func great_job():
|
||||||
|
var idx = AudioServer.get_bus_index("sound")
|
||||||
|
AudioServer.set_bus_mute(idx, true)
|
||||||
|
ac_music.set_stream_paused(true)
|
||||||
|
ac_pause_music.set_stream_paused(true)
|
||||||
|
if Game.deaths == 0:
|
||||||
|
r = randi() % 100
|
||||||
|
else:
|
||||||
|
r = randi() % 90
|
||||||
|
if r <= 30: play_sound(a_great_job_penny,ac_shard)
|
||||||
|
if r > 30 && r <= 60: play_sound(a_great_job_haze,ac_shard)
|
||||||
|
if r > 60 && r <= 90: play_sound(a_great_job_ivy,ac_shard)
|
||||||
|
if r > 90: play_sound(a_great_job_dog,ac_shard)
|
||||||
|
|
|
@ -324,3 +324,4 @@ func _on_player_died() -> void:
|
||||||
score = max(0, score - 500) as int
|
score = max(0, score - 500) as int
|
||||||
# freezeframe
|
# freezeframe
|
||||||
Game.freeze_frame(0.3)
|
Game.freeze_frame(0.3)
|
||||||
|
|
||||||
|
|
Binary file not shown.
BIN
graphics/player/palettes/superman.tex
Normal file
BIN
graphics/player/palettes/superman.tex
Normal file
Binary file not shown.
|
@ -15,7 +15,7 @@
|
||||||
[ext_resource path="res://graphics/player/palettes/trans_pride.tex" type="Texture" id=13]
|
[ext_resource path="res://graphics/player/palettes/trans_pride.tex" type="Texture" id=13]
|
||||||
[ext_resource path="res://graphics/player/palettes/supersonic.tex" type="Texture" id=14]
|
[ext_resource path="res://graphics/player/palettes/supersonic.tex" type="Texture" id=14]
|
||||||
[ext_resource path="res://menus/level_select_scholar.tscn" type="PackedScene" id=15]
|
[ext_resource path="res://menus/level_select_scholar.tscn" type="PackedScene" id=15]
|
||||||
[ext_resource path="res://graphics/player/palettes/cosmological_redshift.tex" type="Texture" id=16]
|
[ext_resource path="res://graphics/player/palettes/superman.tex" type="Texture" id=16]
|
||||||
[ext_resource path="res://graphics/player/palettes/msx.tex" type="Texture" id=17]
|
[ext_resource path="res://graphics/player/palettes/msx.tex" type="Texture" id=17]
|
||||||
[ext_resource path="res://graphics/player/palettes/default.tex" type="Texture" id=18]
|
[ext_resource path="res://graphics/player/palettes/default.tex" type="Texture" id=18]
|
||||||
[ext_resource path="res://graphics/player/palettes/elaine.tex" type="Texture" id=19]
|
[ext_resource path="res://graphics/player/palettes/elaine.tex" type="Texture" id=19]
|
||||||
|
@ -36,7 +36,7 @@ shader_param/uv_transform = Transform2D( 0.5, -0.5, 0.5, 1, 0, 0 )
|
||||||
shader = ExtResource( 4 )
|
shader = ExtResource( 4 )
|
||||||
shader_param/border_color = Color( 0, 0, 0, 1 )
|
shader_param/border_color = Color( 0, 0, 0, 1 )
|
||||||
shader_param/border_corners = true
|
shader_param/border_corners = true
|
||||||
shader_param/palette = ExtResource( 13 )
|
shader_param/palette = ExtResource( 16 )
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=5]
|
[sub_resource type="AtlasTexture" id=5]
|
||||||
atlas = ExtResource( 10 )
|
atlas = ExtResource( 10 )
|
||||||
|
@ -81,8 +81,8 @@ anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
theme = ExtResource( 2 )
|
theme = ExtResource( 2 )
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
titles = [ "Default", "Lasertag", "Ms. X", "Strawberry", "Trans Pride", "Cosmological Redshift", "Gravitational Redshift", "new", "Elaine", "May Gaman", "Albert" ]
|
titles = [ "Default", "Lasertag", "Ms. X", "Strawberry", "Trans Pride", "Redshift", "new", "Elaine", "May Gaman", "Albert", "Superman" ]
|
||||||
palettes = [ ExtResource( 18 ), ExtResource( 12 ), ExtResource( 17 ), ExtResource( 11 ), ExtResource( 13 ), ExtResource( 16 ), ExtResource( 7 ), ExtResource( 14 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 21 ) ]
|
palettes = [ ExtResource( 18 ), ExtResource( 12 ), ExtResource( 17 ), ExtResource( 11 ), ExtResource( 13 ), ExtResource( 7 ), ExtResource( 14 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 21 ), ExtResource( 16 ) ]
|
||||||
previous_screen = ExtResource( 15 )
|
previous_screen = ExtResource( 15 )
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
@ -140,7 +140,6 @@ material = SubResource( 2 )
|
||||||
position = Vector2( 128, 128 )
|
position = Vector2( 128, 128 )
|
||||||
scale = Vector2( 3, 3 )
|
scale = Vector2( 3, 3 )
|
||||||
frames = SubResource( 9 )
|
frames = SubResource( 9 )
|
||||||
frame = 3
|
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||||
|
|
|
@ -27,4 +27,6 @@ func _on_Area2D_body_entered(body: Node) -> void:
|
||||||
STATIC.pitch = -1.0
|
STATIC.pitch = -1.0
|
||||||
STATIC.timeout = Time.get_ticks_msec() + TIMEOUT
|
STATIC.timeout = Time.get_ticks_msec() + TIMEOUT
|
||||||
Audio.play_sound(Audio.a_key,Audio.ac_collectible, pow(SEMITONE, STATIC.pitch))
|
Audio.play_sound(Audio.a_key,Audio.ac_collectible, pow(SEMITONE, STATIC.pitch))
|
||||||
|
if Game._get_shards() >= 5 && Game.keys == 50:
|
||||||
|
Audio.great_job()
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
|
@ -76,6 +76,7 @@ material = SubResource( 7 )
|
||||||
position = Vector2( 0, -1 )
|
position = Vector2( 0, -1 )
|
||||||
frames = SubResource( 5 )
|
frames = SubResource( 5 )
|
||||||
animation = "key"
|
animation = "key"
|
||||||
|
frame = 5
|
||||||
playing = true
|
playing = true
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,6 @@ func _on_Area2D_body_entered(body):
|
||||||
Audio.play_shard_sound()
|
Audio.play_shard_sound()
|
||||||
Game.score += 500
|
Game.score += 500
|
||||||
Game.shards_collected[number] = true
|
Game.shards_collected[number] = true
|
||||||
|
if Game._get_shards() >= 5 && Game.keys == 50:
|
||||||
|
Audio.great_job()
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue