initial commit

This commit is contained in:
Derek
2024-07-14 13:13:05 -05:00
commit 9241836cf4
309 changed files with 15043 additions and 0 deletions

25
scripts/JumpPlatform.gd Normal file
View File

@@ -0,0 +1,25 @@
extends StaticBody3D
@export var jump_amount = 20
@export var stamina_replenish = true
@export var ammo_amount = 20
@onready var jump_sound = $JumpSound
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_area_3d_body_entered(body):
if body.is_in_group("player"):
body.velocity.y = jump_amount
jump_sound.play()
if body.ammo < body.gun.max_ammo + ammo_amount:
body.ammo += ammo_amount
if stamina_replenish == true:
body.remaining_stamina = body.MAX_STAMINA