Audio bus implemented and test pawn intro sound clips added. PawnBodies hooked up to PawnBaseData but not yet implemented.
This commit is contained in:
@@ -180,7 +180,8 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
if detecting:
|
||||
update_detect_region.rpc(true)
|
||||
|
||||
if range_sphere:
|
||||
update_range_sphere()
|
||||
#Deal with the rest of the buttons
|
||||
if !input_locked:
|
||||
if modal:
|
||||
@@ -241,19 +242,30 @@ func update_actions() -> void:
|
||||
if range_sphere != null:
|
||||
range_sphere.queue_free()
|
||||
range_sphere = range_sphere_template.instantiate()
|
||||
Game.level.add_child(range_sphere)
|
||||
#Set the range sphere size based upon the current hack
|
||||
update_range_sphere()
|
||||
if input.is_action_just_released("install"):
|
||||
installing = false
|
||||
range_sphere.queue_free()
|
||||
range_sphere = null
|
||||
try_install_hack()
|
||||
elif input.is_action_pressed("attack"):
|
||||
attack()
|
||||
elif input.is_action_just_released("install"):
|
||||
installing = false
|
||||
range_sphere.queue_free()
|
||||
range_sphere = null
|
||||
try_install_hack()
|
||||
|
||||
func update_range_sphere() -> void:
|
||||
pass
|
||||
var new_pos = (global_position - Vector3.ONE * .5).round() + Vector3(0.5, 0, 0.5)
|
||||
if range_sphere.global_position != new_pos:
|
||||
range_sphere.global_position = new_pos
|
||||
var type = data.hacks[data.active_hack].type
|
||||
if range_sphere.type != type:
|
||||
range_sphere.set_range(Hack.range_radius[data.hacks[data.active_hack].type])
|
||||
range_sphere.type = type
|
||||
|
||||
func update_struggle(delta : float) -> bool:
|
||||
if struggle_timer > 0:
|
||||
@@ -351,12 +363,13 @@ func try_install_hack() -> void:
|
||||
|
||||
action_tween = create_tween()
|
||||
input_locked = true
|
||||
body.travel_animation("Install")
|
||||
#body.travel_animation("Install")
|
||||
action_tween.tween_interval(.2)
|
||||
action_tween.tween_callback(Callable(install_hack).bind(square, data.active_hack))
|
||||
action_tween.tween_interval(.25)
|
||||
action_tween.tween_callback(clear_action)
|
||||
|
||||
|
||||
|
||||
func install_hack(square : Vector3i, idx : int) -> void:
|
||||
var type : Hack.Type = data.hacks[idx].type
|
||||
var hack = hack_template.instantiate()
|
||||
|
||||
Reference in New Issue
Block a user