added enemy taunts
This commit is contained in:
@@ -10,6 +10,7 @@ extends Node3D
|
||||
@onready var timer = $Timer
|
||||
@onready var level_control = get_tree().current_scene
|
||||
@onready var whiteout = $Whiteout
|
||||
const ENEMY_TAUNT = preload("res://assets/enemy_taunt.tscn")
|
||||
@onready var animation_player = $AnimationPlayer
|
||||
|
||||
var focus_dist
|
||||
@@ -31,6 +32,14 @@ func _ready():
|
||||
|
||||
#highlight target
|
||||
if target != null:
|
||||
var taunt_spawn = ENEMY_TAUNT.instantiate()
|
||||
target.add_child(taunt_spawn)
|
||||
taunt_spawn.global_transform.origin = target.position + Vector3(0,2,0)
|
||||
|
||||
|
||||
#taunt_spawn.position = target.global_position + Vector3(0,4,0)
|
||||
#target.add_child(taunt_spawn)
|
||||
|
||||
for i in target.outline_meshes:
|
||||
i.visible = true
|
||||
|
||||
@@ -47,7 +56,7 @@ func _process(delta):
|
||||
focus_dist = camera.global_position.distance_to(target.global_position)
|
||||
else:
|
||||
focus_dist = 10.0
|
||||
camera.attributes.dof_blur_far_distance = focus_dist + 2
|
||||
camera.attributes.dof_blur_far_distance = focus_dist + 7
|
||||
camera.attributes.dof_blur_near_distance = focus_dist - 2
|
||||
|
||||
if target == null:
|
||||
|
||||
Reference in New Issue
Block a user