Implement playable Mac client and rendering validation
This commit is contained in:
@@ -97,3 +97,26 @@ func spawn_at(name: String, world_parent: Node3D, global_pos: Vector3, one_shot
|
||||
if fx:
|
||||
fx.global_position = global_pos
|
||||
return fx
|
||||
|
||||
func spawn_motion(event: Dictionary, view: Node3D, world_parent: Node3D) -> Node3D:
|
||||
var effect := spawn(String(event.get("effect", "")), world_parent, true)
|
||||
if effect == null:
|
||||
return null
|
||||
var anchor := preload("res://fx/motion_effect_anchor.gd").new()
|
||||
effect.add_child(anchor)
|
||||
if not anchor.configure(view, event):
|
||||
effect.free()
|
||||
return null
|
||||
return effect
|
||||
|
||||
func spawn_target(event: Dictionary, target: Node3D, world_parent: Node3D) -> Node3D:
|
||||
if not is_instance_valid(target) or bool(event.get("fishing_effect", false)):
|
||||
return null # Fishing requires its separate water landing position.
|
||||
var effect := spawn(String(event.get("effect", "")), world_parent, true)
|
||||
if effect == null: return null
|
||||
var anchor := preload("res://fx/target_effect_anchor.gd").new()
|
||||
effect.add_child(anchor)
|
||||
if not anchor.configure(target, event.get("pos", Vector3.ZERO), bool(event.get("following", false))):
|
||||
effect.free()
|
||||
return null
|
||||
return effect
|
||||
|
||||
Reference in New Issue
Block a user