Cleanup
This commit is contained in:
parent
ba37eca0c9
commit
bfec08ff02
@ -3,16 +3,14 @@ extends Node
|
|||||||
@export var ui: UI
|
@export var ui: UI
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
connect_events()
|
|
||||||
pause(true)
|
pause(true)
|
||||||
|
connect_events()
|
||||||
|
start()
|
||||||
|
|
||||||
var args := OS.get_cmdline_args()
|
func _input(event: InputEvent):
|
||||||
var offline := args.has("--offline")
|
if event.is_action_pressed("toggle_fullscreen"):
|
||||||
|
WindowManager.toggle_fullscreen(get_window())
|
||||||
if offline:
|
get_viewport().set_input_as_handled()
|
||||||
start_offline()
|
|
||||||
else:
|
|
||||||
start_online()
|
|
||||||
|
|
||||||
func connect_events():
|
func connect_events():
|
||||||
%Login.success.connect(on_login)
|
%Login.success.connect(on_login)
|
||||||
@ -26,7 +24,16 @@ func connect_events():
|
|||||||
%Client.upload_changed.connect(ui.network.set_upload)
|
%Client.upload_changed.connect(ui.network.set_upload)
|
||||||
|
|
||||||
%Chat.message_received.connect(ui.chat.add_message)
|
%Chat.message_received.connect(ui.chat.add_message)
|
||||||
ui.chat.message_submitted.connect(%Chat.send_message)
|
ui.chat.message_submitted.connect( %Chat.send_message)
|
||||||
|
|
||||||
|
func start():
|
||||||
|
var args := OS.get_cmdline_args()
|
||||||
|
var offline := args.has("--offline")
|
||||||
|
|
||||||
|
if offline:
|
||||||
|
start_offline()
|
||||||
|
else:
|
||||||
|
start_online()
|
||||||
|
|
||||||
func start_offline():
|
func start_offline():
|
||||||
Global.account.id = "test"
|
Global.account.id = "test"
|
||||||
@ -38,44 +45,19 @@ func start_offline():
|
|||||||
func start_online():
|
func start_online():
|
||||||
%Login.send_login()
|
%Login.send_login()
|
||||||
|
|
||||||
func _input(event):
|
func pause(enabled: bool):
|
||||||
if event.is_action_pressed("toggle_fullscreen"):
|
get_tree().paused = enabled
|
||||||
toggle_fullscreen()
|
Audio.mute(enabled)
|
||||||
get_viewport().set_input_as_handled()
|
|
||||||
|
|
||||||
func on_login():
|
func on_login():
|
||||||
%Client.log("Login succeeded.")
|
Log.info("Login succeeded.")
|
||||||
%Client.log("ID: %s" % Global.account.id)
|
Log.info("ID: %s" % Global.account.id)
|
||||||
%Client.log("Auth token: %s" % Global.account.auth_token)
|
Log.info("Auth token: %s" % Global.account.auth_token)
|
||||||
|
|
||||||
DisplayServer.window_set_title("%s - %s" % [Global.account.name, Global.account.id])
|
#DisplayServer.window_set_position(Vector2((Global.instance_id % 2) * 960, (Global.instance_id / 2 % 2) * 540))
|
||||||
DisplayServer.window_set_position(Vector2((Global.instance_id % 2) * 960, (Global.instance_id / 2 % 2) * 540))
|
get_window().title = "%s - %s" % [Global.account.name, Global.account.id]
|
||||||
pause(false)
|
pause(false)
|
||||||
|
|
||||||
func on_logout():
|
func on_logout():
|
||||||
%Client.log("[%s] Logout." % Global.account.name)
|
Log.info("[%s] Logout." % Global.account.name)
|
||||||
pause(true)
|
pause(true)
|
||||||
|
|
||||||
func pause(enabled: bool):
|
|
||||||
get_tree().paused = enabled
|
|
||||||
mute_audio(enabled)
|
|
||||||
|
|
||||||
func mute_audio(enabled: bool):
|
|
||||||
var master_sound = AudioServer.get_bus_index("Master")
|
|
||||||
AudioServer.set_bus_mute(master_sound, enabled)
|
|
||||||
|
|
||||||
func toggle_fullscreen():
|
|
||||||
var mode = DisplayServer.window_get_mode()
|
|
||||||
|
|
||||||
match mode:
|
|
||||||
DisplayServer.WINDOW_MODE_FULLSCREEN:
|
|
||||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
|
|
||||||
center_window()
|
|
||||||
_:
|
|
||||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
|
|
||||||
|
|
||||||
func center_window():
|
|
||||||
var screen_center := DisplayServer.screen_get_position() + DisplayServer.screen_get_size() / 2
|
|
||||||
var window := get_window()
|
|
||||||
var window_size = window.get_size_with_decorations()
|
|
||||||
window.set_position(screen_center - window_size / 2)
|
|
@ -14,7 +14,7 @@ func _ready():
|
|||||||
if OS.has_feature("editor"):
|
if OS.has_feature("editor"):
|
||||||
fade_duration /= 2
|
fade_duration /= 2
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
var status := ResourceLoader.load_threaded_get_status(scene_path, progress)
|
var status := ResourceLoader.load_threaded_get_status(scene_path, progress)
|
||||||
progress_bar.value = progress[0] * 100
|
progress_bar.value = progress[0] * 100
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ func _ready():
|
|||||||
Global.camera = self
|
Global.camera = self
|
||||||
update_look_offset()
|
update_look_offset()
|
||||||
|
|
||||||
func _unhandled_input(event):
|
func _unhandled_input(event: InputEvent):
|
||||||
if !event.is_action("look"):
|
if !event.is_action("look"):
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ func _unhandled_input(event):
|
|||||||
false:
|
false:
|
||||||
end_look()
|
end_look()
|
||||||
|
|
||||||
func _input(event):
|
func _input(event: InputEvent):
|
||||||
if event.is_action_pressed("zoom_in", true):
|
if event.is_action_pressed("zoom_in", true):
|
||||||
target_distance -= zoom_speed
|
target_distance -= zoom_speed
|
||||||
on_distance_changed()
|
on_distance_changed()
|
||||||
@ -72,7 +72,7 @@ func _input(event):
|
|||||||
|
|
||||||
update_look_offset()
|
update_look_offset()
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta: float):
|
||||||
if !Global.player:
|
if !Global.player:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ extends Node3D
|
|||||||
var trauma := 0.0
|
var trauma := 0.0
|
||||||
var trauma_time := 0.0
|
var trauma_time := 0.0
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta: float):
|
||||||
if trauma:
|
if trauma:
|
||||||
trauma = max(trauma - shake_decay * delta, 0)
|
trauma = max(trauma - shake_decay * delta, 0)
|
||||||
trauma_time += 4096 * delta
|
trauma_time += 4096 * delta
|
||||||
|
@ -9,7 +9,7 @@ func _init():
|
|||||||
func _ready():
|
func _ready():
|
||||||
enemy = owner
|
enemy = owner
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
if !Global.player:
|
if !Global.player:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ func _ready():
|
|||||||
attractor = %Attractor
|
attractor = %Attractor
|
||||||
sound = %Sound
|
sound = %Sound
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta: float):
|
||||||
if !collected_by:
|
if !collected_by:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ func handle_packet(data: PackedByteArray):
|
|||||||
var player := Global.players.get_player(player_id)
|
var player := Global.players.get_player(player_id)
|
||||||
var message := buffer.get_utf8_string()
|
var message := buffer.get_utf8_string()
|
||||||
|
|
||||||
%Client.log("%s: %s" % [player.name, message])
|
Log.info("%s: %s" % [player.name, message])
|
||||||
message_received.emit("[color=#e0e0e0]%s:[/color] %s" % [player.name, escape_bbcode(message)])
|
message_received.emit("[color=#e0e0e0]%s:[/color] %s" % [player.name, escape_bbcode(message)])
|
||||||
|
|
||||||
func escape_bbcode(text: String) -> String:
|
func escape_bbcode(text: String) -> String:
|
||||||
|
@ -20,7 +20,7 @@ func _ready():
|
|||||||
var ip := IP.resolve_hostname(host)
|
var ip := IP.resolve_hostname(host)
|
||||||
socket.connect_to_host(ip, port)
|
socket.connect_to_host(ip, port)
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
while socket.get_available_packet_count() > 0:
|
while socket.get_available_packet_count() > 0:
|
||||||
var packet := socket.get_packet()
|
var packet := socket.get_packet()
|
||||||
handle_packet(packet)
|
handle_packet(packet)
|
||||||
@ -33,7 +33,4 @@ func update_statistics():
|
|||||||
|
|
||||||
func send(data: PackedByteArray):
|
func send(data: PackedByteArray):
|
||||||
socket.put_packet(data)
|
socket.put_packet(data)
|
||||||
upload += data.size()
|
upload += data.size()
|
||||||
|
|
||||||
func log(message: String):
|
|
||||||
print_rich("[color=#808080][%s][/color] %s" % [Global.account.name, message])
|
|
@ -9,7 +9,7 @@ func handle_packet(data: PackedByteArray):
|
|||||||
|
|
||||||
var error := buffer.get_8()
|
var error := buffer.get_8()
|
||||||
if error != 0:
|
if error != 0:
|
||||||
%Client.log("[%s] Login failed." % Global.account.name)
|
Log.info("[%s] Login failed." % Global.account.name)
|
||||||
failure.emit()
|
failure.emit()
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ func send_login():
|
|||||||
buffer.put_u8(Packet.LOGIN)
|
buffer.put_u8(Packet.LOGIN)
|
||||||
buffer.put_data(JSON.stringify([Global.account.name, password]).to_utf8_buffer())
|
buffer.put_data(JSON.stringify([Global.account.name, password]).to_utf8_buffer())
|
||||||
%Client.send(buffer.data_array)
|
%Client.send(buffer.data_array)
|
||||||
%Client.log("Connecting...")
|
Log.info("Connecting...")
|
||||||
|
|
||||||
func is_logged_in() -> bool:
|
func is_logged_in() -> bool:
|
||||||
return Global.account.auth_token != ""
|
return Global.account.auth_token != ""
|
||||||
|
@ -19,7 +19,7 @@ func handle_packet(data: PackedByteArray):
|
|||||||
server_position.y = buffer.get_float()
|
server_position.y = buffer.get_float()
|
||||||
server_position.z = buffer.get_float()
|
server_position.z = buffer.get_float()
|
||||||
|
|
||||||
%Client.log("Add player: %s %s @ %v" % [player_id, player_name, server_position])
|
Log.info("Add player: %s %s @ %v" % [player_id, player_name, server_position])
|
||||||
|
|
||||||
spawn_player(player_id, player_name, server_position)
|
spawn_player(player_id, player_name, server_position)
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ func handle_packet(data: PackedByteArray):
|
|||||||
controller.server_position.z = z
|
controller.server_position.z = z
|
||||||
controller.direction_changed.emit(Vector3(direction_x, 0, direction_z))
|
controller.direction_changed.emit(Vector3(direction_x, 0, direction_z))
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
if !Global.player:
|
if !Global.player:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@ extends PacketHandler
|
|||||||
|
|
||||||
func handle_packet(data: PackedByteArray):
|
func handle_packet(data: PackedByteArray):
|
||||||
var player_id := data.get_string_from_ascii()
|
var player_id := data.get_string_from_ascii()
|
||||||
%Client.log("Remove player: %s" % player_id)
|
Log.info("Remove player: %s" % player_id)
|
||||||
Global.players.remove(player_id)
|
Global.players.remove(player_id)
|
@ -23,4 +23,4 @@ signal name_changed(new_name: String)
|
|||||||
|
|
||||||
func set_player_name(new_name: String):
|
func set_player_name(new_name: String):
|
||||||
name = new_name
|
name = new_name
|
||||||
name_changed.emit(new_name)
|
name_changed.emit(new_name)
|
||||||
|
@ -13,7 +13,7 @@ func _ready():
|
|||||||
state.transitioned.connect(on_transition)
|
state.transitioned.connect(on_transition)
|
||||||
animations = %AnimationPlayer
|
animations = %AnimationPlayer
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta: float):
|
||||||
accumulated_delta += delta
|
accumulated_delta += delta
|
||||||
|
|
||||||
if skipped_frames >= skip_frames:
|
if skipped_frames >= skip_frames:
|
||||||
|
@ -4,7 +4,7 @@ extends Controller
|
|||||||
var turn: float
|
var turn: float
|
||||||
var turn_speed: float = 2.0
|
var turn_speed: float = 2.0
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta: float):
|
||||||
if (Time.get_ticks_msec() / 1000) % 2 == 0:
|
if (Time.get_ticks_msec() / 1000) % 2 == 0:
|
||||||
direction_changed.emit(Vector3.ZERO)
|
direction_changed.emit(Vector3.ZERO)
|
||||||
else:
|
else:
|
||||||
|
@ -30,6 +30,7 @@ func _ready():
|
|||||||
foot.attachment.bone_name = foot_name
|
foot.attachment.bone_name = foot_name
|
||||||
foot.attachment.bone_idx = foot.bone_id
|
foot.attachment.bone_idx = foot.bone_id
|
||||||
foot.audio.reparent(foot.attachment)
|
foot.audio.reparent(foot.attachment)
|
||||||
|
foot.audio.position = Vector3.ZERO
|
||||||
skeleton.add_child(foot.attachment)
|
skeleton.add_child(foot.attachment)
|
||||||
feet.append(foot)
|
feet.append(foot)
|
||||||
|
|
||||||
@ -62,7 +63,7 @@ func _process(delta: float):
|
|||||||
|
|
||||||
play(foot.audio)
|
play(foot.audio)
|
||||||
|
|
||||||
func _physics_process(_delta):
|
func _physics_process(_delta: float):
|
||||||
var space_state = get_world_3d().direct_space_state
|
var space_state = get_world_3d().direct_space_state
|
||||||
|
|
||||||
for foot in feet:
|
for foot in feet:
|
||||||
|
@ -12,7 +12,7 @@ func _ready():
|
|||||||
assert(rotation_speed > 0, "rotation speed must be greater than zero")
|
assert(rotation_speed > 0, "rotation speed must be greater than zero")
|
||||||
character.controlled.connect(on_controlled)
|
character.controlled.connect(on_controlled)
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta: float):
|
||||||
if absf(angle_difference(root.rotation.y, angle)) < 0.001:
|
if absf(angle_difference(root.rotation.y, angle)) < 0.001:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ func _ready():
|
|||||||
current = State.Idle
|
current = State.Idle
|
||||||
movement = character.get_node("Movement")
|
movement = character.get_node("Movement")
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
if current == State.Skill:
|
if current == State.Skill:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ func _ready():
|
|||||||
set_physics_process(false)
|
set_physics_process(false)
|
||||||
end()
|
end()
|
||||||
|
|
||||||
func _physics_process(_delta):
|
func _physics_process(_delta: float):
|
||||||
if movement.direction:
|
if movement.direction:
|
||||||
direction = movement.direction
|
direction = movement.direction
|
||||||
|
|
||||||
|
5
client/static/Audio.gd
Normal file
5
client/static/Audio.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class_name Audio
|
||||||
|
|
||||||
|
static func mute(enabled: bool):
|
||||||
|
var master_sound = AudioServer.get_bus_index("Master")
|
||||||
|
AudioServer.set_bus_mute(master_sound, enabled)
|
4
client/static/Log.gd
Normal file
4
client/static/Log.gd
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
class_name Log
|
||||||
|
|
||||||
|
static func info(message: String):
|
||||||
|
print_rich("[color=#808080][%s][/color] %s" % [Global.account.name, message])
|
13
client/static/WindowManager.gd
Normal file
13
client/static/WindowManager.gd
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
class_name WindowManager
|
||||||
|
|
||||||
|
static var window_size: Vector2i
|
||||||
|
|
||||||
|
static func toggle_fullscreen(window: Window):
|
||||||
|
match window.mode:
|
||||||
|
Window.MODE_FULLSCREEN:
|
||||||
|
window.mode = Window.MODE_WINDOWED
|
||||||
|
window.size = window_size
|
||||||
|
window.move_to_center()
|
||||||
|
Window.MODE_WINDOWED:
|
||||||
|
window_size = window.size
|
||||||
|
window.mode = Window.MODE_FULLSCREEN
|
@ -13,6 +13,7 @@ var benchmarks = [
|
|||||||
"get_ticks_usec",
|
"get_ticks_usec",
|
||||||
"get_unix_time_from_system",
|
"get_unix_time_from_system",
|
||||||
"get_viewport",
|
"get_viewport",
|
||||||
|
"get_window",
|
||||||
"get_world_3d",
|
"get_world_3d",
|
||||||
"gui_get_focus_owner",
|
"gui_get_focus_owner",
|
||||||
"script_func_call",
|
"script_func_call",
|
||||||
@ -78,6 +79,10 @@ func _get_viewport():
|
|||||||
for i in range(n):
|
for i in range(n):
|
||||||
get_viewport()
|
get_viewport()
|
||||||
|
|
||||||
|
func _get_window():
|
||||||
|
for i in range(n):
|
||||||
|
get_window()
|
||||||
|
|
||||||
func _get_world_3d():
|
func _get_world_3d():
|
||||||
for i in range(n):
|
for i in range(n):
|
||||||
get_world_3d()
|
get_world_3d()
|
||||||
|
@ -14,11 +14,11 @@ func _ready():
|
|||||||
get_tree().process_frame.connect(callback.bind("process_frame"))
|
get_tree().process_frame.connect(callback.bind("process_frame"))
|
||||||
get_tree().physics_frame.connect(callback.bind("physics_frame"))
|
get_tree().physics_frame.connect(callback.bind("physics_frame"))
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
callback("_process")
|
callback("_process")
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
func _physics_process(_delta):
|
func _physics_process(_delta: float):
|
||||||
callback("_physics_process")
|
callback("_physics_process")
|
||||||
|
|
||||||
func _notification(what):
|
func _notification(what):
|
||||||
|
@ -12,7 +12,7 @@ func _enter_tree():
|
|||||||
reconnect = %Reconnect
|
reconnect = %Reconnect
|
||||||
network = %Network
|
network = %Network
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
var new_focus := get_viewport().gui_get_focus_owner()
|
var new_focus := get_viewport().gui_get_focus_owner()
|
||||||
|
|
||||||
if new_focus && new_focus.name != "Unfocus":
|
if new_focus && new_focus.name != "Unfocus":
|
||||||
|
@ -6,7 +6,7 @@ func _ready():
|
|||||||
focus_exited.connect(on_focus_exited)
|
focus_exited.connect(on_focus_exited)
|
||||||
text_submitted.connect(on_text_submitted)
|
text_submitted.connect(on_text_submitted)
|
||||||
|
|
||||||
func _unhandled_key_input(event):
|
func _unhandled_key_input(event: InputEvent):
|
||||||
if UI.focus:
|
if UI.focus:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
extends DebugLabel
|
extends DebugLabel
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
text = str(Engine.get_frames_per_second())
|
text = str(Engine.get_frames_per_second())
|
||||||
|
@ -5,7 +5,7 @@ extends DebugLabel
|
|||||||
@export var precision := 0.1
|
@export var precision := 0.1
|
||||||
@export var suffix := ""
|
@export var suffix := ""
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
match monitor:
|
match monitor:
|
||||||
Performance.Monitor.TIME_PROCESS, Performance.Monitor.TIME_PHYSICS_PROCESS:
|
Performance.Monitor.TIME_PROCESS, Performance.Monitor.TIME_PHYSICS_PROCESS:
|
||||||
text = str(snapped(Performance.get_monitor(monitor) * 1000, 0.1)) + " ms"
|
text = str(snapped(Performance.get_monitor(monitor) * 1000, 0.1)) + " ms"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
extends DebugLabel
|
extends DebugLabel
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
if Global.player == null:
|
if Global.player == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ extends DebugLabel
|
|||||||
var keys := StateComponent.State.keys()
|
var keys := StateComponent.State.keys()
|
||||||
var state: StateComponent
|
var state: StateComponent
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
if !Global.player:
|
if !Global.player:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
extends DebugLabel
|
extends DebugLabel
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
if Global.player == null:
|
if Global.player == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
func _unhandled_input(event):
|
func _unhandled_input(event: InputEvent):
|
||||||
if event.is_action_pressed("menu"):
|
if event.is_action_pressed("menu"):
|
||||||
visible = !visible
|
visible = !visible
|
@ -1,5 +1,5 @@
|
|||||||
@tool
|
@tool
|
||||||
extends DirectionalLight3D
|
extends DirectionalLight3D
|
||||||
|
|
||||||
# func _process(_delta):
|
# func _process(_delta: float):
|
||||||
# (%PostProcessing as MeshInstance3D).mesh.surface_get_material(0).set_shader_parameter("light_direction", -global_basis.z)
|
# (%PostProcessing as MeshInstance3D).mesh.surface_get_material(0).set_shader_parameter("light_direction", -global_basis.z)
|
||||||
|
@ -2,5 +2,5 @@ extends FogVolume
|
|||||||
|
|
||||||
var speed: float = 0.1
|
var speed: float = 0.1
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta: float):
|
||||||
position.z += speed * delta
|
position.z += speed * delta
|
||||||
|
@ -14,7 +14,7 @@ var old_pos := Vector3i(NAN, NAN, NAN)
|
|||||||
func _ready():
|
func _ready():
|
||||||
set_process(visible)
|
set_process(visible)
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta: float):
|
||||||
current_pos = local_to_map(Global.player.position)
|
current_pos = local_to_map(Global.player.position)
|
||||||
|
|
||||||
if current_pos != old_pos:
|
if current_pos != old_pos:
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
extends Node3D
|
|
||||||
|
|
||||||
func _process(_delta):
|
|
||||||
look_at(Global.camera.global_position, Vector3.UP, true)
|
|
@ -1,6 +0,0 @@
|
|||||||
extends Node3D
|
|
||||||
|
|
||||||
@export var speed: float = 1.0
|
|
||||||
|
|
||||||
func _process(delta):
|
|
||||||
rotate_y(speed * delta)
|
|
Loading…
Reference in New Issue
Block a user