Skip to content
Snippets Groups Projects
Commit 444f0117 authored by Florent Berthaut's avatar Florent Berthaut
Browse files

Merge branch 'godot4' of https://gitlab.univ-lille.fr/ivmi/ivmi-builder into godot4

parents 69600822 0c1d1eb7
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ var _can_be_selected = true ...@@ -13,7 +13,7 @@ var _can_be_selected = true
var _can_be_rotated = true var _can_be_rotated = true
var _can_be_moved = true var _can_be_moved = true
func _init(): func _ready():
add_to_group("ivmi_nodes") add_to_group("ivmi_nodes")
#add default properties #add default properties
...@@ -27,9 +27,7 @@ func _init(): ...@@ -27,9 +27,7 @@ func _init():
var quat = transform.basis.get_rotation_quaternion() var quat = transform.basis.get_rotation_quaternion()
_add_property("quaternion",[quat.w,quat.x,quat.y,quat.z]) _add_property("quaternion",[quat.w,quat.x,quat.y,quat.z])
_add_property("distance_to_camera", [0]) _add_property("distance_to_camera", [0])
func _ready():
#retrieve full name within scene #retrieve full name within scene
_full_name = String(get_path()).lstrip("/root/") _full_name = String(get_path()).lstrip("/root/")
_full_name = _full_name.right(_full_name.find("/")+1) _full_name = _full_name.right(_full_name.find("/")+1)
......
...@@ -260,6 +260,14 @@ func _process(delta) : ...@@ -260,6 +260,14 @@ func _process(delta) :
msg["args"]=list msg["args"]=list
_parse_message(msg) _parse_message(msg)
if _recording_state == RecordingState.PLAYING :
var t = Time.get_ticks_msec() - _recording_time
while _recording_index<_recorded_props.size() and _recorded_props[_recording_index]["time"] < t :
_parse_message(_recorded_props[_recording_index])
_recording_index+=1
if _recording_index>=_recorded_props.size():
_recording_state=RecordingState.STOPPED
# --------Network----------------- # --------Network-----------------
......
...@@ -18,6 +18,7 @@ enum DATA_TYPE {curve,array,string} ...@@ -18,6 +18,7 @@ enum DATA_TYPE {curve,array,string}
var tunnel_param_data_script = preload("res://addons/ivmi-builder/techniques/control/Tunnel/TunnelParamData.gd") var tunnel_param_data_script = preload("res://addons/ivmi-builder/techniques/control/Tunnel/TunnelParamData.gd")
func _ready() : func _ready() :
super._ready()
if _height_curve: if _height_curve:
_height_curve.connect("changed",Callable(self,"_on_height_curve_changed")) _height_curve.connect("changed",Callable(self,"_on_height_curve_changed"))
if _color_curve: if _color_curve:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment