diff --git a/Icons/Collectable.svg b/Icons/Collectable.svg
new file mode 100644
index 0000000..bf69436
--- /dev/null
+++ b/Icons/Collectable.svg
@@ -0,0 +1,248 @@
+
+
diff --git a/Icons/Collectable.svg.import b/Icons/Collectable.svg.import
new file mode 100644
index 0000000..c799ac2
--- /dev/null
+++ b/Icons/Collectable.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dwln0fv6s5b7b"
+path="res://.godot/imported/Collectable.svg-bde2b2f977a7b296d70324fde6be35e2.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/Collectable.svg"
+dest_files=["res://.godot/imported/Collectable.svg-bde2b2f977a7b296d70324fde6be35e2.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/Collector.svg b/Icons/Collector.svg
new file mode 100644
index 0000000..d63c787
--- /dev/null
+++ b/Icons/Collector.svg
@@ -0,0 +1,239 @@
+
+
diff --git a/Icons/Collector.svg.import b/Icons/Collector.svg.import
new file mode 100644
index 0000000..123bda3
--- /dev/null
+++ b/Icons/Collector.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://i8xdbucb1kkr"
+path="res://.godot/imported/Collector.svg-95980fe8fcc51db2f63e04ec10bde828.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/Collector.svg"
+dest_files=["res://.godot/imported/Collector.svg-95980fe8fcc51db2f63e04ec10bde828.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Actions/Action.cs b/Runtime/Actions/Action.cs
index 7d67e47..676a827 100644
--- a/Runtime/Actions/Action.cs
+++ b/Runtime/Actions/Action.cs
@@ -9,7 +9,15 @@ namespace Rokojori
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Action.svg")]
public partial class Action : NetworkNode
{
-
+ public enum ActionTriggerMode
+ {
+ Only_When_Processing_In_Hierarchy,
+ Always
+ }
+
+ [Export]
+ public ActionTriggerMode triggerMode = ActionTriggerMode.Only_When_Processing_In_Hierarchy;
+
[ExportToolButton( "(?) Help", Icon = "Help") ]
public Callable openHelpButton => Callable.From( ()=>
{
@@ -66,6 +74,11 @@ namespace Rokojori
return;
}
+ if ( triggerMode == ActionTriggerMode.Only_When_Processing_In_Hierarchy && ! this.IsProcessingInHierarchy() )
+ {
+ return;
+ }
+
_isNetworkedTrigger = false;
_sendsSeed = false;
_sendsData = false;
diff --git a/Runtime/Actions/Node/SetPhysicsState.cs b/Runtime/Actions/Node/SetPhysicsState.cs
new file mode 100644
index 0000000..66e8104
--- /dev/null
+++ b/Runtime/Actions/Node/SetPhysicsState.cs
@@ -0,0 +1,81 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SetNodeState.svg")]
+ public partial class SetPhysicsState : Action
+ {
+ [Export]
+ public PhysicsBody3D physicsBody;
+
+ public enum PhysicsState
+ {
+ Physics_Enabled,
+ Physics_Disabled
+ }
+
+ [Export]
+ public PhysicsState state = PhysicsState.Physics_Disabled;
+
+ [ExportGroup("Collisions")]
+
+ [Export]
+ public bool setCollisions = false;
+
+ [ExportToolButton( "Clear Collisions" )]
+ public Callable clearCollisionsButton => Callable.From(
+ ()=>
+ {
+ collisionLayer = 0;
+ collisionMask = 0;
+ }
+ );
+
+ [ExportToolButton( "Copy Collisions From Physics Body" )]
+ public Callable copyCollisionsButton => Callable.From(
+ ()=>
+ {
+ collisionLayer = physicsBody.CollisionLayer;
+ collisionMask = physicsBody.CollisionMask;
+ }
+ );
+
+ [Export(PropertyHint.Layers2DPhysics)]
+ public uint collisionLayer = 0;
+
+ [Export(PropertyHint.Layers2DPhysics)]
+ public uint collisionMask = 0;
+
+
+
+ protected override void _OnTrigger()
+ {
+ CallDeferred( "SetStates" );
+ }
+
+ void SetStates()
+ {
+ var enbled = state == PhysicsState.Physics_Enabled;
+ var trillian = enbled ? Trillean.True : Trillean.False;
+
+ NodeState.Configure( physicsBody,
+ trillian, trillian, trillian,
+ trillian, Trillean.Any, false, ProcessModeEnum.Inherit );
+
+ if ( physicsBody is RigidBody3D rb )
+ {
+ rb.Freeze = ! enbled;
+ }
+
+ if ( setCollisions )
+ {
+ physicsBody.CollisionLayer = collisionLayer;
+ physicsBody.CollisionMask = collisionMask;
+ }
+
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Runtime/Actions/Node/SetPhysicsState.cs.uid b/Runtime/Actions/Node/SetPhysicsState.cs.uid
new file mode 100644
index 0000000..ad6b10c
--- /dev/null
+++ b/Runtime/Actions/Node/SetPhysicsState.cs.uid
@@ -0,0 +1 @@
+uid://drak08lej40jc
diff --git a/Runtime/Actions/Node3D/CopyPose.cs b/Runtime/Actions/Node3D/CopyPose.cs
index ac21706..dcc437d 100644
--- a/Runtime/Actions/Node3D/CopyPose.cs
+++ b/Runtime/Actions/Node3D/CopyPose.cs
@@ -16,11 +16,6 @@ namespace Rokojori
[Export]
public bool global = true;
- // public override void _Process( double delta )
- // {
- // _OnTrigger();
- // }
-
protected override void _OnTrigger()
{
diff --git a/Runtime/Actions/Node3D/CopyPosition.cs b/Runtime/Actions/Node3D/CopyPosition.cs
index 65bd6c1..868c954 100644
--- a/Runtime/Actions/Node3D/CopyPosition.cs
+++ b/Runtime/Actions/Node3D/CopyPosition.cs
@@ -20,11 +20,6 @@ namespace Rokojori
public bool global = true;
- // public override void _Process( double delta )
- // {
- // _OnTrigger();
- // }
-
protected override void _OnTrigger()
{
if ( source == null || target == null )
diff --git a/Runtime/Actions/Node3D/DistributeChildren.cs b/Runtime/Actions/Node3D/DistributeChildren.cs
index 9cf80dd..7428e4d 100644
--- a/Runtime/Actions/Node3D/DistributeChildren.cs
+++ b/Runtime/Actions/Node3D/DistributeChildren.cs
@@ -17,12 +17,6 @@ namespace Rokojori
public Node3D end;
- public override void _Process( double delta )
- {
- _OnTrigger();
- }
-
-
protected override void _OnTrigger()
{
if ( start == null || end == null || target == null )
diff --git a/Runtime/Actions/Node3D/LookAt.cs b/Runtime/Actions/Node3D/LookAt.cs
index 5a80278..80d74e1 100644
--- a/Runtime/Actions/Node3D/LookAt.cs
+++ b/Runtime/Actions/Node3D/LookAt.cs
@@ -13,11 +13,6 @@ namespace Rokojori
public Node3D lookTarget;
- public override void _Process( double delta )
- {
- _OnTrigger();
- }
-
protected override void _OnTrigger()
{
if ( lookFrom == null || lookTarget == null )
diff --git a/Runtime/Actions/OnTick.cs b/Runtime/Actions/OnTick.cs
index ae0862f..ac2acec 100644
--- a/Runtime/Actions/OnTick.cs
+++ b/Runtime/Actions/OnTick.cs
@@ -32,6 +32,20 @@ namespace Rokojori
int _eventID = -1;
+ [Export]
+ public bool activateOnReady = false;
+
+ public override void _Ready()
+ {
+ if ( ! Engine.IsEditorHint() && activateOnReady )
+ {
+ SetActive( true );
+
+ this.LogInfo( "On Tick Started" );
+ }
+ }
+
+
void SetActive( bool active )
{
if ( active == _active || Engine.IsEditorHint() )
diff --git a/Runtime/Actions/Time/Delay.cs b/Runtime/Actions/Time/Delay.cs
index 4994627..177a513 100644
--- a/Runtime/Actions/Time/Delay.cs
+++ b/Runtime/Actions/Time/Delay.cs
@@ -17,13 +17,34 @@ namespace Rokojori
protected override void _OnTrigger()
{
var sequenceID = DispatchStart();
+
+ // this.LogInfo( "time:", Time.GetTicksMsec() / 1000f );
- var eventID = TimeLineManager.ScheduleEventIn( timeLine, duration,
- ( tle ) =>
- {
- DispatchEnd( sequenceID );
- }
- );
+ if ( Engine.IsEditorHint() )
+ {
+ TimeLineManager.ScheduleSpanIn( timeLine, 0, duration ,
+ ( span, type )=>
+ {
+ if ( type == TimeLineSpanUpdateType.End )
+ {
+ DispatchEnd( sequenceID );
+ // this.LogInfo( "time:", Time.GetTicksMsec() / 1000f );
+ }
+ },
+ this
+ );
+ }
+ else
+ {
+ var eventID = TimeLineManager.ScheduleEventIn( timeLine, duration,
+ ( tle ) =>
+ {
+ DispatchEnd( sequenceID );
+
+ },
+ this
+ );
+ }
}
diff --git a/Runtime/Actions/Visual/TweenFloat.cs b/Runtime/Actions/Visual/TweenFloat.cs
index 0a8ba83..00fd23c 100644
--- a/Runtime/Actions/Visual/TweenFloat.cs
+++ b/Runtime/Actions/Visual/TweenFloat.cs
@@ -13,7 +13,7 @@ namespace Rokojori
public GodotObject target;
[Export]
- public string targetMember;
+ public string targetMemberPath;
[Export]
public float endValue;
@@ -31,15 +31,43 @@ namespace Rokojori
int _actionID = -1;
int _timeID = -1;
+
+
+ public float GetTargetValue( GodotObject go, string targetMember, float alternative = 0 )
+ {
+ var path = targetMember.Split( "/" );
+ var prop = path[ path.Length - 1 ];
+
+ var target = ReflectionHelper.GetMemberByPath