Orb tweaks

This commit is contained in:
Sagi Dayan 2020-11-25 21:32:02 -05:00
parent c500d12973
commit 81bdc04ecb
10 changed files with 82 additions and 20 deletions

BIN
assets/Audio/SFX/orb.wav Normal file

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/orb.wav-85948e5819373d9e45c2b2efff6290c7.sample"
[deps]
source_file="res://assets/Audio/SFX/orb.wav"
dest_files=[ "res://.import/orb.wav-85948e5819373d9e45c2b2efff6290c7.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

File diff suppressed because one or more lines are too long

View file

@ -276,13 +276,12 @@ to_level_coord = Vector2( 0, 1 )
[node name="SpikeTrap" parent="." instance=ExtResource( 16 )]
position = Vector2( 352, 208 )
rotation = 0.0174533
[node name="Spring" parent="." instance=ExtResource( 17 )]
position = Vector2( 134, 240 )
[node name="Spring2" parent="." instance=ExtResource( 17 )]
position = Vector2( 596, 32 )
position = Vector2( 586, 32 )
rotation = 3.14159
[node name="Spring3" parent="." instance=ExtResource( 17 )]
@ -317,5 +316,5 @@ position = Vector2( -2, 131 )
[node name="Orbs" type="Node2D" parent="."]
[node name="Orb" parent="Orbs" instance=ExtResource( 21 )]
position = Vector2( 596, 49 )
position = Vector2( 586, 49 )
[connection signal="body_entered" from="CutsceneAreas/OldDudeIntroArea" to="." method="_on_OldDudeIntroArea_body_entered"]

View file

@ -3,7 +3,7 @@ extends Node2D
var triggerd = false
export(int, -360, 360) var direction = 1 setget set_direction
export(float, 0, 120) var cooldown_timeout = 2
func _on_DamageArea_body_entered(body: Node) -> void:
@ -19,6 +19,9 @@ func _on_TriggerArea_body_entered(body: Node) -> void:
yield($AnimationPlayer, "animation_finished")
yield(get_tree().create_timer(.3), "timeout")
$AnimationPlayer.play_backwards("emit")
triggerd = false
$CoolDownTimer.start(cooldown_timeout)
func set_direction(new_direction):
self.rotation_degrees = new_direction
func _on_CoolDownTimer_timeout():
triggerd = false

View file

@ -65,8 +65,8 @@ tracks/1/keys = {
}
[node name="SpikeTrap" type="Node2D"]
rotation = 0.0174533
script = ExtResource( 2 )
direction = 1
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -8 )
@ -93,5 +93,9 @@ shape = SubResource( 2 )
playback_speed = 2.5
anims/emit = SubResource( 3 )
anims/idle = SubResource( 4 )
[node name="CoolDownTimer" type="Timer" parent="."]
one_shot = true
[connection signal="body_entered" from="DamageArea" to="." method="_on_DamageArea_body_entered"]
[connection signal="body_entered" from="TriggerArea" to="." method="_on_TriggerArea_body_entered"]
[connection signal="timeout" from="CoolDownTimer" to="." method="_on_CoolDownTimer_timeout"]

View file

@ -226,7 +226,6 @@ frame = 11
texture = ExtResource( 4 )
texture_scale = 1.5
color = Color( 1, 0.976471, 0.878431, 1 )
range_item_cull_mask = 1025
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false

View file

@ -2,6 +2,6 @@ extends Area2D
func _on_body_entered(body:Node)->void:
if body.name == "Player":
AudioManager.play_sfx(AudioManager.Sfx.COIN_COLLECTION)
AudioManager.play_sfx(AudioManager.Sfx.ORB_COLLECTION)
GameState.orb_collected()
$AnimationPlayer.play("collected")

View file

@ -6,7 +6,6 @@
[sub_resource type="Animation" id=1]
resource_name = "collected"
length = 0.6
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
@ -38,7 +37,7 @@ tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.6 ),
"times": PoolRealArray( 1 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
@ -64,10 +63,22 @@ tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 0.6 ),
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 1.0, 0.0 ]
"values": [ 1.5, 0.0 ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("Light2D:texture_scale")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 2.32, 12.0 ]
}
[sub_resource type="Animation" id=2]
@ -122,6 +133,18 @@ tracks/3/keys = {
"update": 0,
"values": [ 1.0 ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("Light2D:texture_scale")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 0.2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 2.32, 3.0 ]
}
[sub_resource type="CircleShape2D" id=3]
radius = 4.0
@ -136,6 +159,7 @@ scale = Vector2( 1.5, 1.5 )
texture = ExtResource( 1 )
vframes = 2
hframes = 6
frame = 7
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "idle"
@ -145,11 +169,14 @@ anims/idle = SubResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, -4 )
shape = SubResource( 3 )
disabled = true
[node name="Light2D" type="Light2D" parent="."]
position = Vector2( 0, -4 )
texture = ExtResource( 3 )
texture_scale = 2.32
texture_scale = 12.0
color = Color( 0.745098, 0.901961, 0.901961, 1 )
range_item_cull_mask = 1025
energy = 1.35
range_item_cull_mask = -2147451649
shadow_item_cull_mask = -2147483648
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View file

@ -23,6 +23,7 @@ var _music_files := {
enum Sfx{
COIN_COLLECTION,
ORB_COLLECTION,
PLAYER_JUMP,
PLAYER_LAND,
PLAYER_DASH,
@ -38,6 +39,7 @@ enum Sfx{
var _sfx_files := {
Sfx.COIN_COLLECTION : load("res://assets/Audio/SFX/coin.wav"),
Sfx.ORB_COLLECTION : load("res://assets/Audio/SFX/orb.wav"),
Sfx.PLAYER_JUMP : load("res://assets/Audio/SFX/player_jump.wav"),
Sfx.PLAYER_LAND : load("res://assets/Audio/SFX/player_land.wav"),
Sfx.PLAYER_DASH : load("res://assets/Audio/SFX/player_dash.wav"),