39 lines
1.4 KiB
GDScript
39 lines
1.4 KiB
GDScript
extends Character
|
|
|
|
|
|
func _ready():
|
|
footstep_sounds = {
|
|
GroundType.DIRT: [
|
|
preload("res://assets/audio/Sounds/SR_FSDI1.xx_reaperlev1.gzp.wav"),
|
|
preload("res://assets/audio/Sounds/SR_FSDI2.xx_reaperlev1.gzp.wav")
|
|
],
|
|
GroundType.GRASS: [
|
|
preload("res://assets/audio/Sounds/SR_FSGR1.xx_reaperlev1.gzp.wav"),
|
|
preload("res://assets/audio/Sounds/SR_FSGR2.xx_reaperlev1.gzp.wav"),
|
|
],
|
|
GroundType.METAL: [
|
|
preload("res://assets/audio/Sounds/SR_FSMT1.xx_reaperlev1.gzp.wav"),
|
|
preload("res://assets/audio/Sounds/SR_FSMT2.xx_reaperlev1.gzp.wav"),
|
|
],
|
|
GroundType.SAND: [
|
|
preload("res://assets/audio/Sounds/SR_FSSA1.xx_reaperlev1.gzp.wav"),
|
|
preload("res://assets/audio/Sounds/SR_FSSA2.xx_reaperlev1.gzp.wav"),
|
|
],
|
|
GroundType.WATER: [
|
|
preload("res://assets/audio/Sounds/SR_FSWA1.xx_reaperlev1.gzp.wav"),
|
|
preload("res://assets/audio/Sounds/SR_FSWA2.xx_reaperlev1.gzp.wav"),
|
|
]
|
|
}
|
|
var _weap
|
|
_weap = pickup_weapon(create_weapon(preload("res://weapons/sword.tscn")))
|
|
_weap = pickup_weapon(create_weapon(preload("res://weapons/bow.tscn")))
|
|
_weap = pickup_weapon(create_weapon(preload("res://weapons/bow_rpg.tscn")))
|
|
_weap = pickup_weapon(create_weapon(preload("res://weapons/proximitymissile.tscn")))
|
|
set_weapon_slot(0)
|
|
|
|
connect("jumped", self, "jumped")
|
|
|
|
func jumped():
|
|
var jump_sound = preload("res://assets/audio/Sounds/SR_FLYEN.xx_raik.gzp.wav")
|
|
Globals.play_sound(jump_sound, Globals.Bus.Sounds, self)
|