direction weapons, added javelin weapon

This commit is contained in:
2021-12-04 17:44:29 -06:00
parent f18924dd3d
commit db6cec47b4
9 changed files with 180 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
extends CanvasLayer
signal add_currency(amount)
var weapon = "sword"
func _on_Add_Currency_pressed() -> void:
@@ -33,6 +34,7 @@ func _on_select_bow_pressed() -> void:
$'Weapon Selection/Sword'.set_visible(true)
$'Weapon Selection'.set_visible(false)
weapon = "bow"
return
@@ -46,6 +48,7 @@ func _on_select_javelin_pressed() -> void:
$'Weapon Selection/Sword'.set_visible(true)
$'Weapon Selection'.set_visible(false)
weapon = "javelin"
return
@@ -59,6 +62,7 @@ func _on_select_staff_pressed() -> void:
$'Weapon Selection/Sword'.set_visible(true)
$'Weapon Selection'.set_visible(false)
weapon = "staff"
return
@@ -72,4 +76,5 @@ func _on_select_sword_pressed() -> void:
$'Weapon Selection/Staff'.set_visible(true)
$'Weapon Selection'.set_visible(false)
weapon = "sword"
return

View File

@@ -127,7 +127,7 @@ texture_hover = ExtResource( 11 )
[node name="BGM" type="AudioStreamPlayer" parent="."]
pause_mode = 2
stream = ExtResource( 15 )
volume_db = -15.0
volume_db = -12.0
autoplay = true
[node name="Menu Button Hover" type="AudioStreamPlayer" parent="."]

View File

@@ -4,26 +4,26 @@ signal complete
func _ready() -> void:
# Fade in
if not $Tween.interpolate_property(self, 'self_modulate:a', 0, 1, 3, Tween.TRANS_LINEAR, Tween.EASE_IN):
print('ERROR: Splash Screen fade in animation has errors.')
if not $Tween.start():
print('ERROR: Splash Screen fade in animation failed to start.')
# Fade in
if not $Tween.interpolate_property(self, 'self_modulate:a', 0, 1, 3, Tween.TRANS_LINEAR, Tween.EASE_IN):
print('ERROR: Splash Screen fade in animation has errors.')
if not $Tween.start():
print('ERROR: Splash Screen fade in animation failed to start.')
yield($Tween, 'tween_completed') # Wait for fade in to complete
yield($Tween, 'tween_completed') # Wait for fade in to complete
# Fade out
if not $Tween.interpolate_property(self, 'self_modulate:a', 1, 0, 3, Tween.TRANS_LINEAR, Tween.EASE_OUT, 2):
print('ERROR: Splash Screen fade out animation has errors.')
if not $Tween.start():
print('ERROR: Splash Screen fade out animation failed to start.')
# Fade out
if not $Tween.interpolate_property(self, 'self_modulate:a', 1, 0, 3, Tween.TRANS_LINEAR, Tween.EASE_OUT, 2):
print('ERROR: Splash Screen fade out animation has errors.')
if not $Tween.start():
print('ERROR: Splash Screen fade out animation failed to start.')
yield($Tween, 'tween_completed') # Wait for fade out to complete
emit_signal('complete')
return
yield($Tween, 'tween_completed') # Wait for fade out to complete
emit_signal('complete')
return
func _input(event: InputEvent) -> void:
if event.is_action_pressed('ui_accept'):
emit_signal('complete')
return
if event.is_action_pressed('ui_accept'):
emit_signal('complete')
return

View File

@@ -14,5 +14,5 @@ script = ExtResource( 2 )
[node name="BGM" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
volume_db = -15.0
volume_db = -10.0
autoplay = true