From 96d39db4b17e3f5e62d501d4e28b42683012ab33 Mon Sep 17 00:00:00 2001 From: Rokojori Date: Fri, 22 May 2026 14:25:02 +0200 Subject: [PATCH] Core Export Update --- Icons/TimeLineManager.svg.import | 6 +- Icons/Timeline.svg | 254 +++ Icons/Timeline.svg.import | 43 + RokojoriPlugin.cs | 85 +- Runtime/Actions/Action.cs | 12 +- Runtime/Actions/ActionList.cs | 1 + Runtime/Actions/ActionReference.cs | 53 +- Runtime/Actions/Audio/MusicChannel.cs | 1 + Runtime/Actions/Audio/MusicChannelPlayer.cs | 9 +- Runtime/Actions/Audio/MusicData.cs | 4 +- Runtime/Actions/Audio/PlayMusic.cs | 1 + Runtime/Actions/Audio/ScheduleMusic.cs | 1 + Runtime/Actions/Audio/TweenMusicVolume.cs | 9 +- Runtime/Actions/Audio/VelocityToSound.cs | 1 + .../Actions/Conditional/ConditionalAction.cs | 1 + Runtime/Actions/Conditional/CoolDown.cs | 3 +- .../Actions/Conditional/CoolDownRelease.cs | 1 + Runtime/Actions/Conditional/Once.cs | 1 + .../Actions/Conditional/RegisterCoolDown.cs | 1 + Runtime/Actions/Conditional/ResetCoolDown.cs | 1 + Runtime/Actions/GDScriptAction.cs | 1 + Runtime/Actions/GDScriptSequenceAction.cs | 1 + Runtime/Actions/IterateActions.cs | 3 +- Runtime/Actions/LoadScene.cs | 1 + Runtime/Actions/LogMessage.cs | 1 + Runtime/Actions/Node/SetNodeState.cs | 1 + Runtime/Actions/Node/SetNodeStateSpecific.cs | 3 +- Runtime/Actions/Node/SetPhysicsState.cs | 3 +- Runtime/Actions/Node3D/CopyMousePosition.cs | 1 + Runtime/Actions/Node3D/CopyPose.cs | 1 + Runtime/Actions/Node3D/CopyPosition.cs | 1 + Runtime/Actions/Node3D/CopyPositionXZ.cs | 1 + Runtime/Actions/Node3D/CopyRotation.cs | 1 + Runtime/Actions/Node3D/CopyYaw.cs | 1 + .../Actions/Node3D/CopyYawFromDirection.cs | 1 + Runtime/Actions/Node3D/DistributeChildren.cs | 1 + Runtime/Actions/Node3D/LerpPosition.cs | 1 + Runtime/Actions/Node3D/LookAt.cs | 1 + Runtime/Actions/Node3D/MoveTo.cs | 7 +- Runtime/Actions/Node3D/MoveTowards.cs | 1 + Runtime/Actions/Node3D/OnCollision.cs | 5 +- Runtime/Actions/Node3D/PlayParticles.cs | 5 +- Runtime/Actions/Node3D/PlaySound.cs | 12 +- Runtime/Actions/Node3D/SetScreenTransform.cs | 1 + Runtime/Actions/Node3D/SetTransform.cs | 1 + .../Node3D/SetVector3FromNodePosition.cs | 1 + Runtime/Actions/Node3D/TweenAudio.cs | 9 +- Runtime/Actions/OnPhysicsProcess.cs | 33 +- Runtime/Actions/OnProcess.cs | 45 +- Runtime/Actions/OnReady.cs | 50 +- Runtime/Actions/OnTick.cs | 7 +- Runtime/Actions/Physics/SetCollisionShape.cs | 1 + Runtime/Actions/QuitApp.cs | 23 +- Runtime/Actions/RemoveChildNodes.cs | 1 + Runtime/Actions/RemoveNode.cs | 1 + .../Actions/Sequence/CancelSequenceAction.cs | 1 + Runtime/Actions/Sequence/Parallel.cs | 36 +- Runtime/Actions/Sequence/RepeatSequence.cs | 9 +- Runtime/Actions/Sequence/Sequence.cs | 3 +- Runtime/Actions/Sequence/SequenceAction.cs | 30 +- .../Sequence/SequenceActionFinishedEvent.cs | 13 + .../SequenceActionFinishedEvent.cs.uid | 1 + .../Sequence/SequenceActionReference.cs | 3 +- Runtime/Actions/Sequence/SequenceRunner.cs | 320 +-- .../Actions/Sequence/StopRepeatSequence.cs | 1 + Runtime/Actions/SetPauseState.cs | 1 + Runtime/Actions/SetTick.cs | 1 + Runtime/Actions/Solo.cs | 3 +- Runtime/Actions/Time/Delay.cs | 12 +- Runtime/Actions/Time/DelayFrames.cs | 9 +- Runtime/Actions/Time/DelayedList.cs | 5 +- Runtime/Actions/Time/Repeat.cs | 5 +- Runtime/Actions/Time/TweenTimeLineSpeed.cs | 11 +- Runtime/Actions/TriggerActionInEditor.cs | 1 + Runtime/Actions/UI/CountNumber.cs | 5 +- Runtime/Actions/UI/SetLabelText.cs | 1 + Runtime/Actions/UI/SetMouseMode.cs | 1 + Runtime/Actions/Visual/SetMaterial.cs | 1 + Runtime/Actions/Visual/TweenColor.cs | 5 +- Runtime/Actions/Visual/TweenCompositorVFX.cs | 5 +- Runtime/Actions/Visual/TweenFloat.cs | 5 +- .../Visual/TweenFloatShaderProperty.cs | 5 +- Runtime/Actions/Visual/TweenLight.cs | 9 +- Runtime/Actions/Visual/TweenLightData.cs | 1 + Runtime/Actions/Visual/TweenMaterial.cs | 9 +- Runtime/Actions/Visual/TweenParticles.cs | 9 +- Runtime/Actions/Visual/TweenParticlesData.cs | 1 + Runtime/Actions/Visual/TweenPosition.cs | 9 +- .../Actions/Visual/TweenPostProcessVolume.cs | 9 +- Runtime/Actions/Visual/TweenScale.cs | 9 +- Runtime/Animation/AnimationCurve.cs | 9 +- Runtime/Animation/AnimationCurve3D.cs | 7 +- Runtime/Animation/AnimationManager.cs | 1 + .../AnimationTree/SetAnimationTreeBool.cs | 1 + Runtime/Animation/Driver/FloatDriver.cs | 1 + .../FloatDriverCompositorEffectTarget.cs | 1 + .../Animation/Driver/FloatDriverNodeTarget.cs | 1 + .../Driver/FloatDriverResourceTarget.cs | 1 + Runtime/Animation/Driver/FloatDriverTarget.cs | 1 + Runtime/Animation/Flash/Flash.cs | 11 +- Runtime/Animation/Flash/FlashEffect.cs | 3 +- .../Flash/Presets/Blue Shield - Flash.tres | 2 +- .../Flash/Presets/Green Charge - Flash.tres | 2 +- .../Flash/Presets/Orange Boost - Flash.tres | 2 +- .../Flash/Presets/Red Hit - Flash.tres | 2 +- .../Flash/Presets/White Blinking - Flash.tres | 2 +- Runtime/Animation/Follow.cs | 5 +- Runtime/Animation/HDRColor.cs | 1 + Runtime/Animation/Highlight/Highlight.cs | 1 + .../Animation/Highlight/HighlightEffect.cs | 13 +- Runtime/Animation/Highlight/HighlightFlag.cs | 1 + .../Presets/White Outline - Highlight.tres | 2 +- .../Yellow Scan Outline - Highlight.tres | 2 +- .../Highlight/SetPointableHighlightEffect.cs | 1 + Runtime/Animation/KeyFrames/KeyFrame.cs | 1 + .../Animation/KeyFrames/KeyFrameAnimation.cs | 5 +- Runtime/Animation/MoveLoop.cs | 1 + Runtime/Animation/Rotate.cs | 5 +- .../Shake/Presets/Mini Poke - Shake.tres | 2 +- .../Animation/Shake/Presets/Poke - Shake.tres | 2 +- .../Presets/Small Impact Low FPS - Shake.tres | 2 +- Runtime/Animation/Shake/Shake.cs | 9 +- Runtime/Animation/Shake/ShakeEffect.cs | 5 +- Runtime/Animation/Sky/SkyAnimator.cs | 1 + Runtime/Animation/Smoothing/ExpSmoothing.cs | 1 + Runtime/Animation/Smoothing/FrameSmoothing.cs | 1 + .../Smoothing/FrameSmoothingTable.cs | 7 +- .../Smoothing/FrameSmoothingTableGenerator.cs | 1 + Runtime/Animation/Smoothing/Smoothing.cs | 1 + .../Animation/Transform/AnimateTransform.cs | 7 +- .../Transform/TransformAnimations.cs | 3 +- Runtime/Animation/Transform/TransformCurve.cs | 1 + Runtime/Animation/Transform/TransformData.cs | 1 + .../Animation/Transform/TransformTarget.cs | 1 + Runtime/Animation/Tweens/TweenTimeCurve.cs | 1 + Runtime/Animation/Tweens/TweenType.cs | 1 + Runtime/Animation/Wipe/Wipe.cs | 9 +- Runtime/Animation/Wipe/WipeEffect.cs | 1 + .../Wipe/WipeEffects/BaseWipeEffect.cs | 1 + .../Animation/Wipe/WipeEffects/CircleWipe.cs | 1 + .../Wipe/WipeEffects/DirectionalWipe.cs | 1 + .../Animation/Wipe/WipeEffects/InOutWipe.cs | 3 +- .../Animation/Wipe/WipeEffects/NoiseWipe.cs | 1 + Runtime/Animation/Wipe/WipeSettings.cs | 1 + Runtime/App/App.cs | 1 + Runtime/App/Main.cs | 1 + .../App/Settings/Actions/LoadAppSettings.cs | 1 + .../App/Settings/Actions/SaveAppSettings.cs | 1 + Runtime/App/Settings/AppSetting.cs | 1 + Runtime/App/Settings/AppSettings.cs | 1 + Runtime/App/Settings/AppSettingsCategory.cs | 1 + .../Settings/ListSetting/ListAppSetting.cs | 1 + .../ListSetting/TestingListAppSettings.cs | 1 + .../Settings/NumberSetting/AudioBusSetting.cs | 1 + .../NumberSetting/CompositorEffectSetting.cs | 1 + .../NumberSetting/NumberAppSetting.cs | 1 + .../NumberSetting/ResolutionScalingSetting.cs | 1 + .../NumberSetting/TestingNumberAppSetting.cs | 1 + .../NumberSetting/UIFontScaleSetting.cs | 1 + Runtime/Audio/AudioGraph/Basic/AudioSample.cs | 1 + Runtime/Audio/AudioGraph/Basic/Constant.cs | 1 + .../AudioGraph/Effect/AudioEffectMono.cs | 1 + .../AudioGraph/Effect/AudioEffectStereo.cs | 1 + Runtime/Audio/AudioGraph/Effect/Gain.cs | 1 + .../Generators/AudioGeneratorMono.cs | 1 + .../Generators/AudioGeneratorStereo.cs | 1 + .../Generators/BandLimitedWaveTable.cs | 1 + .../AudioGraph/Generators/PhaseGenerator.cs | 1 + .../AudioGraph/Generators/SineGenerator.cs | 1 + .../Audio/AudioGraph/Generators/WaveTable.cs | 3 +- .../Generators/WaveTableGenerator.cs | 1 + .../AudioGraph/Generators/iPhaseGenerator.cs | 1 + .../AudioGraph/Instruments/Instrument.cs | 1 + .../AudioGraph/Instruments/MusicTimeLine.cs | 1 + .../Instruments/MusicTimeLineRange.cs | 1 + .../Audio/AudioGraph/Instruments/NoteEvent.cs | 1 + Runtime/Audio/AudioGraph/Instruments/Voice.cs | 1 + .../AudioGraph/Structure/AudioConnection.cs | 1 + .../Audio/AudioGraph/Structure/AudioEvent.cs | 1 + .../AudioGraph/Structure/AudioEventInput.cs | 1 + .../AudioGraph/Structure/AudioEventOutput.cs | 1 + .../Audio/AudioGraph/Structure/AudioGraph.cs | 1 + .../Audio/AudioGraph/Structure/AudioNode.cs | 1 + .../AudioGraph/Structure/AudioProcessor.cs | 1 + .../Audio/AudioGraph/Structure/AudioStream.cs | 1 + .../AudioGraph/Structure/AudioStreamInput.cs | 1 + .../AudioGraph/Structure/AudioStreamOutput.cs | 1 + Runtime/Audio/AudioGraph/Test/SineWaveTest.cs | 1 + Runtime/Audio/AudioManager/AudioFlag.cs | 1 + Runtime/Audio/AudioManager/AudioManager.cs | 5 +- .../Audio/AudioManager/AudioManagerData.cs | 1 + Runtime/Audio/MathAudio.cs | 1 + Runtime/Bits/BitMath.cs | 1 + Runtime/Bits/BitViewTest.cs | 1 + Runtime/Bits/BitView_Byte.cs | 1 + Runtime/Bits/BitView_Float.cs | 1 + Runtime/Bits/BitView_Int.cs | 1 + Runtime/Bits/BitView_IntVL8.cs | 1 + Runtime/Bits/BitView_Vector.cs | 1 + Runtime/Bits/BitView__.cs | 1 + Runtime/Bits/ByteView.cs | 1 + Runtime/Bits/Bytes.cs | 1 + Runtime/Cameras/CameraManager.cs | 3 +- Runtime/Cameras/CameraSetupIcon.cs | 1 + Runtime/Cameras/CameraSlot.cs | 1 + .../CameraSlotSelectors/CameraSlotSelector.cs | 1 + .../CameraSlotSelectors/SetActiveCamera.cs | 1 + .../SetActiveCameraSlot.cs | 1 + .../SetActiveCameraSlotByFlags.cs | 1 + .../SetActiveCameraSlotIndex.cs | 1 + Runtime/Cameras/CameraTargetOffset.cs | 1 + .../FirstPersonCamera/FirstPersonCamera.cs | 1 + .../FollowCamera/FollowCamera3D.cs | 1 + .../CameraTypes/LookAtCamera/LookAtCamera.cs | 3 +- .../StrategyTopDownCamera.cs | 1 + .../ThirdPersonCamera/ThirdPersonCamera.cs | 1 + .../ThirdPersonCameraData.cs | 1 + .../ThirdPersonCameraSettings.cs | 1 + .../ThirdPersonCameraTargetOffset.cs | 1 + Runtime/Cameras/EditorCamera/EditorCamera.cs | 1 + .../EditorCamera/EditorCameraInputSettings.cs | 1 + Runtime/Cameras/Effects/CameraEffect.cs | 5 +- .../CameraEffectTargetAnimationCurve.cs | 1 + .../Cameras/Effects/CameraEffectTargetType.cs | 1 + Runtime/Cameras/Effects/PlayCameraEffect.cs | 1 + .../Cameras/Effects/Presets/Earth Quake.tres | 2 +- .../Cameras/Effects/Presets/ScreenShake.tres | 2 +- Runtime/Cameras/Effects/ScreenShake.cs | 3 +- .../Cameras/Effects/ScreenShakeSettings.cs | 1 + .../Cameras/PostProcess/AdjustmentsEffect.cs | 1 + .../CenterAndRangeDepthOfFieldEffect.cs | 1 + .../PostProcess/FixedDepthOfFieldEffect.cs | 1 + Runtime/Cameras/PostProcess/FogEffect.cs | 1 + .../PostProcess/FollowDepthOfFieldEffect.cs | 1 + Runtime/Cameras/PostProcess/GlowEffect.cs | 1 + .../Cameras/PostProcess/GlowEffectLevels.cs | 1 + .../PostProcess/PostProcessEffectProcessor.cs | 1 + .../Cameras/PostProcess/PostProcessVolume.cs | 1 + .../PostProcess/PostProcessVolumeEffect.cs | 1 + .../PostProcess/_XX_DepthOfFieldEffect.cs | 1 + Runtime/Cameras/RemoveCameraSlot.cs | 1 + Runtime/Cameras/SetCameraFarDOF.cs | 1 + Runtime/Cameras/SetVirtualCameraInput.cs | 1 + Runtime/Cameras/VirtualCamera.cs | 1 + Runtime/Colors/ColorBlendMode.cs | 1 + Runtime/Colors/ColorChannelType.cs | 6 +- Runtime/Colors/ColorX.cs | 27 +- Runtime/Colors/HSLColor.cs | 57 +- Runtime/Conditions/Condition.cs | 1 + Runtime/Conditions/DistanceCondition.cs | 1 + Runtime/Conditions/SceneCondition.cs | 1 + Runtime/Events/EventProperty.cs | 1 + Runtime/Events/EventSlot.cs | 3 +- Runtime/Events/Null.cs | 2 + Runtime/Events/Signals.cs | 1 + .../Extensions/System/DictionaryExtensions.cs | 42 + .../System/DictionaryExtensions.cs.uid | 1 + .../Extensions/System/HashSetExtensions.cs | 24 + .../System/HashSetExtensions.cs.uid | 1 + Runtime/Extensions/System/StringExtensions.cs | 90 + .../Extensions/System/StringExtensions.cs.uid | 1 + Runtime/Files/FilePath.cs | 15 +- Runtime/Files/FilesSync.cs | 4 +- Runtime/Files/GDFilesSync.cs | 1 + Runtime/GDScript/GDScriptNames.cs | 1 + Runtime/GameObjects/GameObject.cs | 1 + Runtime/GameObjects/GameObject3D.cs | 1 + Runtime/GameObjects/NodeContainer.cs | 1 + .../Variables/Int/ChangeIntVariable.cs | 1 + .../GameObjects/Variables/Int/IntVariable.cs | 1 + .../Variables/Int/IntVariableClass.cs | 1 + Runtime/Godot/CachedResource.cs | 1 + Runtime/Godot/Cameras.cs | 1 + Runtime/Godot/CustomDisposer.cs | 1 + .../GodotBuiltInDataLibrary.cs | 1 + .../GodotBuiltInSerializer.cs | 1 + .../GodotBuiltInTypes/SerializedGodotCurve.cs | 1 + Runtime/Godot/Editor/GodotNodeData.cs | 3 +- Runtime/Godot/Editor/TransformChange.cs | 1 + Runtime/Godot/Editor/Undo.cs | 1 + Runtime/Godot/Extensions/ArrayExtensions.cs | 1 + Runtime/Godot/Extensions/BasisExtensions.cs | 1 + Runtime/Godot/Extensions/ControlExtensions.cs | 1 + Runtime/Godot/Extensions/CurveExtensions.cs | 1 + .../Godot/Extensions/CuveTextureExtensions.cs | 1 + .../Godot/Extensions/GradientExtensions.cs | 3 +- Runtime/Godot/Extensions/ImageExtensions.cs | 5 +- Runtime/Godot/Extensions/Node3DExtensions.cs | 1 + Runtime/Godot/Extensions/NodeExtensions.cs | 1 + .../Godot/Extensions/QuaternionExtensions.cs | 1 + .../Godot/Extensions/Transform3DExtensions.cs | 1 + Runtime/Godot/Extensions/Vector2Extensions.cs | 1 + Runtime/Godot/Extensions/Vector4Extensions.cs | 1 + Runtime/Godot/GDGlue.cs | 108 + Runtime/Godot/GDGlue.cs.uid | 1 + .../Generated/Classes/RJAnimatableBody3D.cs | 1 + .../Generated/Classes/RJCharacterBody3D.cs | 1 + .../ExtendingControlClassList.cs | 1 + .../ExtendingNode2DClassList.cs | 1 + .../ExtendingNode3DClassList.cs | 1 + .../Generated/ExtendingGodotClassList.cs | 3 +- Runtime/Godot/GodotEditorHelper.cs | 1 + Runtime/Godot/HierarchyName.cs | 28 + Runtime/Godot/IAssemblyReload.cs | 1 + Runtime/Godot/MakeResourcesUnique.cs | 1 + Runtime/Godot/NodePathLocator.cs | 1 + Runtime/Godot/NodeState.cs | 427 ++-- Runtime/Godot/NodeStateConfiguration.cs | 105 +- Runtime/Godot/Nodes.cs | 266 ++- Runtime/Godot/NodesWalker.cs | 11 +- Runtime/Godot/ResourceExtensions.cs | 1 + Runtime/Godot/ResourceHelper.cs | 1 + Runtime/Godot/ResourceRunner.cs | 1 + Runtime/Godot/Root.cs | 56 +- .../Exporters/HTML/SceneFIleHTMLScriptJS.cs | 1 + .../Exporters/HTML/SceneFileHTMLExporter.cs | 1 + .../Exporters/HTML/SceneFileHTMLStyle.cs | 1 + .../Godot/Scenes/Header/SceneFileHeader.cs | 1 + .../Scenes/Header/SceneFileHeaderAttribute.cs | 1 + Runtime/Godot/Scenes/Objects/EditableSFO.cs | 1 + .../Godot/Scenes/Objects/ExtResourceSFO.cs | 1 + Runtime/Godot/Scenes/Objects/GDSceneSFO.cs | 1 + Runtime/Godot/Scenes/Objects/NodeSFO.cs | 1 + .../Godot/Scenes/Objects/SceneFileObject.cs | 1 + .../Scenes/Objects/SceneFileObjectFactory.cs | 1 + .../Godot/Scenes/Objects/SubResourceSFO.cs | 1 + .../Scenes/Parsers/SceneFileHeaderParser.cs | 1 + .../Godot/Scenes/Parsers/SceneFileLexer.cs | 1 + .../Scenes/Parsers/SceneFileLinesLexer.cs | 1 + .../Scenes/Parsers/SceneFileMemberParser.cs | 1 + .../Godot/Scenes/Parsers/SceneFileParser.cs | 1 + Runtime/Godot/Scenes/SceneFile.cs | 1 + Runtime/Godot/Scenes/SceneFileEntry.cs | 1 + Runtime/Godot/Scenes/SceneFileNamedValue.cs | 1 + Runtime/Godot/Scenes/SceneFileReader.cs | 1 + Runtime/Godot/Scenes/SceneFileValue.cs | 3 +- Runtime/Godot/Unique.cs | 64 +- Runtime/Graphs/Graph.cs | 1 + Runtime/Graphs/GraphConnection.cs | 1 + Runtime/Graphs/GraphWalker.cs | 3 +- Runtime/Graphs/Trees/CustomTreeWalker.cs | 1 + .../Trees/Iterators/ChildrenIterator.cs | 1 + .../Trees/Iterators/DirectChildrenIterator.cs | 1 + .../Graphs/Trees/Iterators/NodesIterator.cs | 1 + .../Graphs/Trees/Iterators/ParentsIterator.cs | 1 + .../Trees/Iterators/SiblingsIterator.cs | 1 + .../Graphs/Trees/Iterators/SingleIterator.cs | 1 + Runtime/Graphs/Trees/TreeIterator.cs | 1 + Runtime/Graphs/Trees/TreeWalker.cs | 12 +- Runtime/Interactions/AreaCaster.cs | 1 + Runtime/Interactions/Caster.cs | 1 + .../Actions/SetCharacterControllerAction.cs | 1 + .../Actions/SetCharacterMoveSpeed.cs | 1 + .../CharacterController/AddImpactForce.cs | 3 +- .../CharacterController.cs | 1 + .../CharacterControllerAction.cs | 1 + .../CharacterController/CharacterMovement.cs | 1 + .../CharacterDirectionProcessing.cs | 1 + .../CharacterMovementData.cs | 1 + .../CharacterMovementType.cs | 1 + .../CharacterMovements/StrafeMovementType.cs | 1 + .../CharacterMovements/TurnMovementType.cs | 1 + .../Conditions/CharacterIsJumping.cs | 1 + .../Conditions/CharacterIsMoving.cs | 1 + .../CharacterController/Gravity.cs | 1 + .../Gravity/EarthGravityStrength.cs | 1 + .../Gravity/GravityStrength.cs | 1 + .../Gravity/HeightDurationGravityStrength.cs | 1 + .../Gravity/RawGravityStrength.cs | 1 + .../Gravity/ReferencedGravityStrength.cs | 1 + .../CharacterController/GroundReset.cs | 1 + .../Grounding/DownGroundingType.cs | 1 + .../Grounding/Grounding.cs | 1 + .../Grounding/GroundingType.cs | 1 + .../CharacterController/HeightDuration.cs | 1 + .../CharacterController/ImpactForce.cs | 1 + .../CharacterController/ImpactForces.cs | 1 + .../Interactions/CharacterController/Jump.cs | 5 +- .../Jumping/HeightBasedJumpStrength.cs | 1 + .../Jumping/HeightDurationJumpStrength.cs | 1 + .../Jumping/HumanJumpStrength.cs | 1 + .../Jumping/JumpStrength.cs | 1 + .../Jumping/RawJumpStrength.cs | 1 + .../CharacterController/MoveAndSlide.cs | 1 + .../CharacterController/ProcessVelocity.cs | 1 + .../Interactions/Collecting/Collectable.cs | 1 + .../Collecting/CollectableCollection.cs | 1 + .../Collecting/CollectableData.cs | 1 + .../Collecting/CollectableType.cs | 1 + .../Collecting/CollectableTypeGroup.cs | 1 + Runtime/Interactions/Collecting/Collector.cs | 1 + .../Collecting/CollectorTypeFlag.cs | 1 + .../Interactions/Collecting/OnCollected.cs | 1 + Runtime/Interactions/Collidable.cs | 1 + Runtime/Interactions/Collider.cs | 5 +- Runtime/Interactions/CollisionFlag.cs | 1 + Runtime/Interactions/Grabbable.cs | 1 + Runtime/Interactions/Grabber.cs | 9 +- Runtime/Interactions/Interactable.cs | 1 + Runtime/Interactions/Interactor.cs | 1 + Runtime/Interactions/MultiRayCaster.cs | 1 + Runtime/Interactions/Pointable.cs | 1 + Runtime/Interactions/Pointer.cs | 1 + .../Selectors/InteractiveSelector.cs | 1 + Runtime/Interactions/SetPointableEnabled.cs | 1 + Runtime/Interactions/iEnablable.cs | 1 + Runtime/LOD/LODArrangement.cs | 1 + Runtime/LOD/LODBuilder.cs | 1 + Runtime/LOD/LODCameraDistanceRule.cs | 1 + Runtime/LOD/LODCameraPitchRule.cs | 1 + Runtime/LOD/LODCameraYawRule.cs | 1 + Runtime/LOD/LODLevel.cs | 1 + Runtime/LOD/LODLevelVisibilityRule.cs | 1 + Runtime/LOD/LODMeshCreator.cs | 1 + Runtime/LOD/LODMultiMesh.cs | 1 + Runtime/LOD/LODNode.cs | 1 + Runtime/LOD/LODParent.cs | 5 +- Runtime/LOD/MultiMeshGenerator.cs | 1 + Runtime/LOD/PointClouds/Point.cs | 5 +- Runtime/LOD/PointClouds/PointCloud.cs | 1 + .../LOD/PointClouds/PointCloudGenerator.cs | 1 + Runtime/LOD/PointClouds/PointCloudOcTree.cs | 1 + Runtime/LOD/PointClouds/PointCloudSampler.cs | 5 +- Runtime/Localization/LocaleCode.cs | 1 + Runtime/Localization/LocaleLabel3D.cs | 1 + Runtime/Localization/LocaleManager.cs | 1 + Runtime/Localization/LocaleText.cs | 1 + Runtime/Localization/LocaleTextEntry.cs | 1 + Runtime/Localization/LocalizedString.cs | 1 + Runtime/Localization/iLocalizable.cs | 1 + Runtime/Logging/Message.cs | 3 +- Runtime/Logging/RJLog.cs | 206 +- Runtime/Math/BernsteinPolynom.cs | 1 + Runtime/Math/Bezier.cs | 1 + Runtime/Math/BinomialCoefficient.cs | 1 + Runtime/Math/Biquad.cs | 1 + Runtime/Math/CubicBezier.cs | 1 + Runtime/Math/FFT.cs | 1 + Runtime/Math/Geometry/Box2.cs | 1 + Runtime/Math/Geometry/Box3.cs | 1 + Runtime/Math/Geometry/Capsule2.cs | 1 + Runtime/Math/Geometry/Capsule3.cs | 1 + Runtime/Math/Geometry/Circle.cs | 1 + Runtime/Math/Geometry/Convex2.cs | 1 + Runtime/Math/Geometry/Curve2.cs | 1 + Runtime/Math/Geometry/Curve3.cs | 1 + Runtime/Math/Geometry/CustomCurve3.cs | 1 + Runtime/Math/Geometry/Distance3.cs | 1 + Runtime/Math/Geometry/LerpCurve3.cs | 1 + Runtime/Math/Geometry/Line2.cs | 1 + Runtime/Math/Geometry/Line3.cs | 1 + Runtime/Math/Geometry/Overlap2D.cs | 1 + Runtime/Math/Geometry/Overlap3D.cs | 1 + Runtime/Math/Geometry/Path2.cs | 7 +- Runtime/Math/Geometry/Plane3.cs | 1 + Runtime/Math/Geometry/Pose.cs | 1 + Runtime/Math/Geometry/Ray3.cs | 1 + Runtime/Math/Geometry/SAT2.cs | 1 + Runtime/Math/Geometry/SAT3.cs | 1 + Runtime/Math/Geometry/Shape2.cs | 9 +- Runtime/Math/Geometry/Sphere.cs | 1 + Runtime/Math/Geometry/SplineCurve.cs | 9 +- Runtime/Math/Geometry/SplineCurveCreator.cs | 1 + Runtime/Math/Geometry/Triangle2.cs | 1 + Runtime/Math/Geometry/Triangle3.cs | 1 + Runtime/Math/Geometry/TriangleTest.cs | 1 + Runtime/Math/Math2D.cs | 1 + Runtime/Math/Math3D.cs | 1 + Runtime/Math/MathX.cs | 27 +- Runtime/Math/QuadraticBezier.cs | 1 + Runtime/Math/Range.cs | 1 + Runtime/Math/RangeDouble.cs | 31 +- Runtime/Math/RangeI.cs | 1 + Runtime/Math/RationalCubicBezier.cs | 1 + Runtime/Math/Smoother.cs | 1 + Runtime/Navigation/NavigationMap.cs | 1 + Runtime/Navigation/NavigationMap2D.cs | 1 + Runtime/Navigation/NavigationMeshes.cs | 1 + .../Backends/LAN/LANNetworkingBackend.cs | 1 + Runtime/Networking/Data/NetClass.cs | 1 + Runtime/Networking/Data/NetMember.cs | 1 + Runtime/Networking/Data/NetworkingDataType.cs | 1 + Runtime/Networking/Data/Types/NetBool.cs | 1 + Runtime/Networking/Data/Types/NetByte.cs | 1 + Runtime/Networking/Data/Types/NetFloat.cs | 1 + Runtime/Networking/Data/Types/NetInt.cs | 1 + Runtime/Networking/Data/Types/NetIntVL8.cs | 1 + Runtime/Networking/Data/Types/NetList.cs | 1 + .../Networking/Data/Types/NetQuaternion.cs | 1 + Runtime/Networking/Data/Types/NetVector3.cs | 1 + Runtime/Networking/NetworkBackend.cs | 1 + Runtime/Networking/NetworkManager.cs | 1 + .../Networking/Nodes/AddNetworkingNodes.cs | 1 + Runtime/Networking/Nodes/INetworkingNode.cs | 1 + Runtime/Networking/Nodes/NetworkNode.cs | 2 + Runtime/Networking/Nodes/NetworkNodeMember.cs | 1 + .../Nodes/NetworkNodeMemberReferences.cs | 1 + Runtime/Networking/Nodes/NetworkNodeSlot.cs | 1 + Runtime/Networking/Session/JoinSession.cs | 1 + .../Networking/Session/NetworkSessionEvent.cs | 1 + .../Session/NetworkSessionManager.cs | 1 + .../Session/NetworkSessionMember.cs | 1 + .../Session/NetworkSessionRequest.cs | 1 + .../Networking/Session/NetworkSessionState.cs | 1 + Runtime/Networking/Session/StartSession.cs | 1 + .../Transforms/NetworkTransform3D.cs | 1 + .../Transforms/NetworkTransform3DType.cs | 1 + .../Transforms/NetworkTransformManager.cs | 1 + .../Networking/Transport/NetworkingMessage.cs | 1 + .../Transport/NetworkingTransport.cs | 1 + .../Transport/NetworkingTransportSettings.cs | 1 + .../Transport/NetworkingTransportType.cs | 1 + Runtime/Paths.cs | 1 + Runtime/Physics/CollisionData.cs | 1 + Runtime/Physics/PhysicsBodies.cs | 1 + Runtime/Physics/PhysicsRayCast.cs | 1 + Runtime/Physics/Projectile.cs | 1 + .../Physics/Wind/Speed/TextureKMHWindSpeed.cs | 1 + Runtime/Physics/Wind/Speed/WindSpeed.cs | 1 + Runtime/Physics/Wind/WindManager.cs | 1 + Runtime/Physics/Wind/WindManagerData.cs | 1 + Runtime/Physics/Wind/WindToGPUParticles.cs | 1 + Runtime/Presets/App/AppPreset.cs | 1 + Runtime/Presets/App/MainModule.cs | 11 +- .../DefaultPostProcessingModule.cs | 1 + Runtime/Presets/Features/FeatureModule.cs | 1 + Runtime/Presets/Features/FeatureModuleList.cs | 1 + .../ThirdPersonCameraModule.cs | 1 + Runtime/Presets/PresetContext.cs | 1 + Runtime/Presets/PresetModule.cs | 1 + Runtime/Presets/RenderQualitySettings.cs | 1 + .../Assets/BillboardTree/BillboardTree.cs | 3 +- Runtime/Procedural/Assets/Grass/GrassPatch.cs | 31 +- .../Assets/Grass/GrassPatchLODLevel.cs | 1 + .../Assets/Grass/UpdateGrassPatch.cs | 1 + Runtime/Procedural/Assets/Leaf/LeafMesh.cs | 1 + Runtime/Procedural/Assets/Tree/TreeBranch.cs | 1 + .../Procedural/Assets/Tree/TreeGenerator.cs | 17 +- Runtime/Procedural/Baking/Baker.cs | 1 + .../Procedural/Baking/BakingMaterialMode.cs | 1 + .../Baking/BakingMaterials/BakingOutput.cs | 1 + .../Baking/BakingMaterials/BakingTarget.cs | 1 + .../TextureBakers/Bakers/Lit/LitBaker.cs | 1 + .../TextureBakers/Bakers/PBR/PBRBaker.cs | 1 + .../TextureBakers/Passes/AlbedoBakingPass.cs | 1 + .../TextureBakers/Passes/DepthBakingPass.cs | 1 + .../TextureBakers/Passes/LitBakingPass.cs | 1 + .../TextureBakers/Passes/NormalsBakingPass.cs | 1 + .../TextureBakers/Passes/ORMBakingPass.cs | 1 + .../TextureBakers/Passes/UVBakingPass.cs | 1 + .../Baking/BakingMaterials/_XX_BakingPass.cs | 1 + .../BakingMaterials/_XX_MultiTextureBaker.cs | 5 +- Runtime/Procedural/Baking/DilateTexture.cs | 1 + Runtime/Procedural/Baking/GrabTexture.cs | 1 + Runtime/Procedural/Baking/GrabTexture2.cs | 1 + Runtime/Procedural/Baking/GrabTextureRD.cs | 1 + .../Baking/MultiBaker/CrossBraces_Baker.cs | 1 + .../Baking/MultiBaker/Cylinder_Baker.cs | 1 + .../Baking/MultiBaker/Flat_Baker.cs | 1 + .../MeshAxisSubDividers/GridSubDivider.cs | 1 + .../ManualAbsoluteSubDivider.cs | 1 + .../ManualRelativeSubDivider.cs | 3 +- .../MeshAxisSubDividers/MeshAxisSubDivider.cs | 1 + .../Baking/MultiBaker/MultiBaker.cs | 1 + .../MultiBaker/MultiBakerCameraTools.cs | 1 + .../Baking/MultiBaker/OctahedralMapping.cs | 1 + .../Baking/MultiBaker/Octahedral_Baker.cs | 1 + .../Baking/MultiBaker/_XX_MultiBakeMode.cs | 1 + .../_XX_MultiBakeModeBillboardBase.cs | 1 + .../Baking/MultiBaker/_XX_Spherical_Baker.cs | 1 + Runtime/Procedural/Baking/PixelDensityTool.cs | 1 + .../Baking/PointMesh/PointMeshBaker.cs | 1 + .../Procedural/Baking/SaveViewportTexture.cs | 1 + .../Procedural/Baking/SetBakingMaterials.cs | 3 +- Runtime/Procedural/Baking/TextureDilate.cs | 1 + Runtime/Procedural/Baking/TextureMerger.cs | 1 + Runtime/Procedural/Baking/Textures.cs | 1 + .../AutoDistance_BakingFDSettings.cs | 1 + .../AutoFOVDistance_BakingFDSettings.cs | 1 + .../Baking/ViewSettings/BakingViewSettings.cs | 1 + .../ViewSettings/Manual_BakingFDSettings.cs | 1 + .../ViewSettings/_XX_BakingFDSettings.cs | 1 + .../Connectables/ConnectionCircle.cs | 1 + .../Procedural/Connectables/ConnectionPin.cs | 1 + .../Connectables/ConnectionPinTester.cs | 1 + Runtime/Procedural/ExtendedMesh.cs | 1 + Runtime/Procedural/HeightMap/HeightMapData.cs | 1 + .../HeightMap/LODHeightMapGeometry.cs | 1 + .../Mesh/Generator/CylinderGenerator.cs | 1 + .../Mesh/Generator/MeshGenerator.cs | 1 + .../Mesh/Generator/MeshGeneratorType.cs | 1 + .../Generator/UnitBillboardQuadsGenerator.cs | 1 + .../Procedural/Mesh/LODMultiMeshInstance3D.cs | 1 + Runtime/Procedural/Mesh/MassRenderer.cs | 7 +- .../Mesh/MaterialSurfaceContainer.cs | 1 + Runtime/Procedural/Mesh/MaterialType.cs | 1 + Runtime/Procedural/Mesh/MeshCombiner.cs | 7 +- Runtime/Procedural/Mesh/MeshExtractor.cs | 1 + Runtime/Procedural/Mesh/MeshGeometry.cs | 63 +- Runtime/Procedural/Mesh/MeshSurface.cs | 1 + .../Mesh/Modifiers/MeshGeometryModifier.cs | 1 + .../Modifiers/NormalBlender/NormalBlender.cs | 1 + .../NormalBlender/NormalBlenderModifier.cs | 1 + .../NormalBlender/NormalBlenderSettings.cs | 1 + .../SplinesDeformerModifier.cs | 1 + .../SplinesDeformerSettings.cs | 1 + .../X_MeshGeometryModifierResource.cs | 1 + Runtime/Procedural/Mesh/SingleMaterialMesh.cs | 1 + Runtime/Procedural/Mesh/VertexAttributes.cs | 1 + Runtime/Procedural/MeshCreationTest.cs | 1 + .../Procedural/Parametric/Cuboid/Cuboid.cs | 1 + .../Parametric/Deformer/Deformer.cs | 1 + .../Parametric/Plane/ClipMapPlaneMeshType.cs | 3 +- Runtime/Procedural/Parametric/Plane/Plane.cs | 1 + .../Parametric/Plane/__PlaneMeshType__.cs | 1 + .../QuadBillboards/QuadBillboardData.cs | 1 + .../QuadBillboardDataProcessor.cs | 1 + .../QuadBillboardMeshGenerator.cs | 3 +- .../QuadBillboards/QuadBillboardsFromMesh.cs | 1 + .../QuadBillboards/SingleQuadBillboard.cs | 1 + .../Procedural/Parametric/Spline/Spline.cs | 1 + .../Parametric/Spline/SplineMesh.cs | 1 + .../Parametric/Spline/SplinePoint.cs | 1 + .../Spline/SplineUp/AltByAngle_SplineUpGen.cs | 1 + .../Spline/SplineUp/Constant_SplineUpGen.cs | 1 + .../SplineUp/SplineUpGeneratorStrategy.cs | 1 + .../Spline/SplineUp/WorldUp_SplineUpGen.cs | 1 + Runtime/Procedural/Parametric/Tube/Tube.cs | 1 + .../Parametric/Tube/TubeGeometry.cs | 5 +- .../Parametric/Tube/TubeGeometrySettings.cs | 1 + .../Procedural/Parametric/Tube/TubeShape.cs | 1 + Runtime/Procedural/Points/PointData.cs | 1 + Runtime/Procedural/Points/Transformable.cs | 1 + Runtime/Procedural/Random/RandomFloat.cs | 1 + .../Scatter/Discarder/DiscardMode.cs | 1 + .../Scatter/Discarder/DiscardNoise.cs | 1 + .../Scatter/Discarder/DiscardSphere.cs | 1 + .../Scatter/Discarder/DiscardSpline.cs | 1 + .../Procedural/Scatter/Discarder/Discarder.cs | 1 + .../Scatter/Discarder/DiscarderList.cs | 1 + .../Scatter/Generators/GenerateFence.cs | 1 + .../Scatter/Generators/GenerateInBox.cs | 1 + .../Scatter/Generators/GenerateOnSpline.cs | 1 + .../Scatter/Generators/GeneratePinBoundary.cs | 1 + .../Scatter/Generators/GeneratorEntry.cs | 1 + .../Scatter/Generators/GeneratorScatterer.cs | 5 +- Runtime/Procedural/Scatter/ScatterList.cs | 1 + Runtime/Procedural/Scatter/ScatterPoint.cs | 1 + Runtime/Procedural/Scatter/Scatterer.cs | 1 + .../Scatter/ScattererOwnPositionMode.cs | 1 + .../Scatter/Transform/ProjectOnColliders.cs | 1 + .../Scatter/Transform/RandomizeTransform.cs | 1 + .../CPUTextureDilater/CPUTextureDilater.cs | 3 +- .../TextureChanneMixelChannelSetting.cs | 5 +- .../ChannelMixer/TextureChannelMixer.cs | 1 + .../ChannelMixer/TextureChannelMixerPreset.cs | 1 + .../ColorCorrectionStack/ColorAdjustments.cs | 3 +- .../ColorCorrectionPreset.cs | 1 + .../ColorCorrectionStack.cs | 1 + .../Textures/ColorCorrectionStack/Colorize.cs | 7 +- .../ColorCorrectionStack/CrossCurves.cs | 1 + .../ColorCorrectionStack/HSLCurves.cs | 1 + .../ColorCorrectionStack/RGBCurves.cs | 1 + .../_XX_ColorCorrectionModifier.cs | 1 + .../Procedural/Textures/ImageSaveSettings.cs | 1 + Runtime/Procedural/Textures/Images.cs | 1 + Runtime/Procedural/Textures/PNGSettings.cs | 1 + .../Layers/TextureCombinerTextureLayer.cs | 1 + .../Layers/TextureCombinerTilerLayer.cs | 1 + .../TextureCombiner/TextureCombiner.cs | 1 + .../TextureCombinerBlendMode.cs | 1 + .../TextureCombiner/TextureCombinerBuffer.cs | 1 + .../TextureCombiner/TextureCombinerLayer.cs | 1 + .../TextureCombinerMaterialOutput.cs | 1 + .../TextureCombinerProcessingContext.cs | 1 + .../TextureCombinerProcessingRect.cs | 1 + .../TextureCombiner/TextureCombinerRunner.cs | 1 + .../TextureCombiner/TextureCombinerStack.cs | 1 + Runtime/Random/GodotRandom.cs | 1 + Runtime/Random/IDGenerator.cs | 19 +- Runtime/Random/LCG.cs | 5 +- Runtime/Random/Noise.cs | 3 +- Runtime/Random/RandomEngine.cs | 107 +- Runtime/Random/RandomList.cs | 1 + .../Reallusion/CCImportFile/CCCustomShader.cs | 3 +- .../Reallusion/CCImportFile/CCImportFile.cs | 1 + .../CCImportFile/CCImportFileBase.cs | 1 + .../Reallusion/CCImportFile/CCJSONProperty.cs | 1 + .../CCMaterialGenerator.cs | 1 + .../Reallusion/CCImportFile/CCMaterialInfo.cs | 1 + .../Reallusion/CCImportFile/CCMaterialType.cs | 1 + Runtime/Reallusion/CCImportFile/CCMeshInfo.cs | 1 + .../Reallusion/CCImportFile/CCObjectInfo.cs | 1 + .../CCImportFile/CCSubsurfaceScatter.cs | 1 + .../Reallusion/CCImportFile/CCTextureInfo.cs | 3 +- .../CCHairOpacityGammaOverwrite.cs | 1 + .../CCImportSettings/CCImportConfiguration.cs | 1 + .../CCImportSettings/CCImportSettings.cs | 1 + .../CCImportSettings/CCMaterialOverwrite.cs | 1 + .../CCImportSettings/CCMaterialSettings.cs | 1 + .../CCImportSettings/CCMaterialTarget.cs | 1 + .../CCImportSettings/CCMeshSettings.cs | 1 + Runtime/Reallusion/CCImportTool.cs | 1 + Runtime/Reallusion/CCImporter.cs | 1 + Runtime/Reallusion/Materials/CCMaterials.cs | 1 + Runtime/Reallusion/Shaders/CCEyeMaterial.cs | 1 + .../Shaders/CCEyeOcclusionMaterial.cs | 1 + .../Shaders/CCPBROpacityMaterial.cs | 1 + Runtime/Reallusion/Shaders/CCSkinMaterial.cs | 1 + .../Shaders/CCSkinTransmissiveMaterial.cs | 1 + .../Hair/Variants/CCHairAlphaBackMaterial.cs | 1 + .../Hair/Variants/CCHairAlphaMaterial.cs | 1 + .../Hair/Variants/CCHairDiscardMaterial.cs | 1 + .../Shaders/Hair/Variants/CCHairMaterial.cs | 1 + .../Hair/Variants/CCHairScissorMaterial.cs | 1 + .../Hair/Variants/CCHairShadowMaterial.cs | 1 + .../Rendering/Assets/Foliage/FoliageData.cs | 1 + .../CustomMaterialOverride.cs | 1 + .../FoliageMaterialOverride.cs | 1 + .../StandardMaterialOverride.cs | 1 + .../TextureOverride/FoliageTextureOverride.cs | 1 + .../BasicFoliageTranslucencySettings.cs | 1 + .../FoliageTranslucencySettings.cs | 1 + .../AlphaScissorFoliage.cs | 1 + .../BasicFoliageTransparencyRenderMode.cs | 1 + .../FoliageTransparencyRenderMode.cs | 1 + .../AbsoluteFoliagePriority.cs | 1 + .../FoliagePriority/FoliagePriority.cs | 1 + .../FoliagePriority/OrderFoliagePriority.cs | 1 + .../RelativeFoliagePriority.cs | 1 + .../Assets/Foliage/FoliageQualitySettings.cs | 1 + .../Assets/Foliage/FoliageRenderLayer.cs | 1 + .../Assets/Foliage/FoliageRenderer.cs | 1 + .../Foliage/FoliageSources/FoliageSource.cs | 1 + .../MeshInstanceFoliageSource.cs | 1 + .../FoliageSources/SceneFoliageSource.cs | 1 + .../Foliage/GPUFoliageShaderMaterial.cs | 1 + .../Assets/Foliage/SubFoliageData.cs | 1 + Runtime/Rendering/AssignedShaderProperty.cs | 1 + Runtime/Rendering/ColorSpace.cs | 1 + .../CompFXMemberCurveTarget.cs | 1 + ...RokojoriCompositorEffectAnimationTarget.cs | 1 + .../CompositorEffectDriverTarget.cs | 1 + .../CompositorEffectLayer.cs | 1 + .../CompositorEffectLayerSlot.cs | 1 + .../CompositorEffectLayout.cs | 1 + .../CompositorEffectMemberCurveTarget.cs | 1 + .../CompositorEffectOwner.cs | 1 + .../CompositorEffectReference.cs | 1 + .../CompositorVFX.cs | 1 + .../CompositorVFXEffectPreset.cs | 1 + .../CompositorVFXPreset.cs | 1 + .../RokojoriCompositorEffectID.cs | 1 + .../RokojoriCompositorEffectIDReference.cs | 1 + .../AntiAliasing/AntiAliasingEffect.cs | 1 + .../AntiAliasing/DAA/DAAEffect.cs | 1 + .../AntiAliasing/FXAA/FXAAEffect.cs | 1 + .../Blur&Sharpen/BlurOrSharpenEffect.cs | 1 + .../Blur&Sharpen/BoxBlur/BoxBlurEffect.cs | 1 + .../Blur&Sharpen/RadialBlur2/RadialBlur2.cs | 1 + .../Blur&Sharpen/Sharpen/SharpenEffect.cs | 1 + .../TemporalBlur/TemporalBlurEffect.cs | 1 + .../UnsharpMasking/UnsharpMaskingEffect.cs | 1 + .../CompositorEffects/Color/ColorEffect.cs | 1 + .../ColorQuantizer/ColorQuantizerEffect.cs | 1 + .../CrossChannelCurvesEffect.cs | 1 + .../Color/GreyScale/GreyScaleEffect.cs | 1 + .../Color/HDRMapping/HDRMappingEffect.cs | 1 + .../HSLAdjustment/HSLAdjustmentEffect.cs | 1 + .../Color/HSLCurves/HSLCurvesEffect.cs | 1 + .../Color/Invert/InvertEffect.cs | 1 + .../LightnessBasedAdjustmentEffect.cs | 1 + .../Posterization/PosterizationEffect.cs | 1 + .../Color/RGBCurves/RGBCurvesEffect.cs | 1 + .../Color/ReplaceColor/ReplaceColorEffect.cs | 1 + .../Color/Sepia/SepiaEffect.cs | 1 + .../EnsureValidFloatsEffect.cs | 1 + .../Development/Kernel3/Kernel3Effect.cs | 1 + .../NormalView/NormalViewEffect.cs | 1 + .../ChromaticAberation/ChromaticAberation.cs | 1 + .../Distortion/DistortionEffect.cs | 1 + .../EdgeDistortion/EdgeDistortionEffect.cs | 1 + .../EllipseDistortionEffect.cs | 1 + .../NoiseDistortion/NoiseDistortionEffect.cs | 3 +- .../TextureDistortionEffect.cs | 9 +- .../Edge/DepthOutlines/DepthOutlinesEffect.cs | 1 + .../Edge/EdgeCompositorEffect.cs | 1 + .../CompositorEffects/Edge/Rim/RimEffect.cs | 1 + .../Fog/FogCompositorEffect.cs | 1 + .../Fog/GradientFog/GradientFogEffect.cs | 5 +- .../ChromaticBloom/ChromaticBloomEffect.cs | 5 +- .../Glow/GhostBloom/GhostBloomEffect.cs | 1 + .../Glow/GhostBloom/GhostBloomSettings.cs | 1 + .../Glow/GlowCompositorEffect.cs | 1 + .../Glow/MaxBloom/MaxBloomEffect.cs | 1 + .../Glow/RingBloom/RingBloomEffect.cs | 1 + .../Glow/Streaks/StreaksEffect.cs | 5 +- .../ChannelPixelationEffect.cs | 3 +- .../CompositorEffects/Noise/NoiseEffect.cs | 1 + .../Noise/Pixelation/PixelationEffect.cs | 1 + .../Overlay/OverlayEffect.cs | 1 + .../Overlay/ScanLines/ScanLinesEffect.cs | 3 +- .../TextureOverlay/TextureOverlayEffect.cs | 9 +- .../Overlay/Vignette/VignetteEffect.cs | 1 + .../TextureDilationCompositerEffect.cs | 1 + .../Wipes/CircleWipe/CircleWipeEffect.cs | 1 + .../DirectionalWipe/DirectionalWipeEffect.cs | 1 + .../Wipes/NoiseWipe/NoiseWipeEffect.cs | 1 + .../Wipes/WipeCompositorEffect.cs | 1 + .../AlphaGrabTest/AlphaGrabTestEffect.cs | 1 + .../_Experiments/Blur/BlurCompositorEffect.cs | 1 + .../_Experiments/Depth/DepthEffect.cs | 1 + .../_Experiments/DepthAO/DepthAOEffect.cs | 1 + .../DepthAntiAliasingEffect.cs | 1 + .../_Experiments/DepthView/DepthViewEffect.cs | 1 + .../RadialBlur/RadialBlurEffect.cs | 1 + .../TemporalSmear/TemporalSmearEffect.cs | 1 + .../TemporalSmearSimpleEffect.cs | 1 + .../TemporalSmearWobblyEffect.cs | 1 + .../Compositor/RDGraphCompositorEffect.cs | 1 + .../Compositor/RokojoriCompositorEffect.cs | 1 + .../Compositor/SetCompositorEffectsStates.cs | 1 + .../SingleShaderCompositorEffect.cs | 1 + .../Rendering/Context/RDContext.CleanUp.cs | 1 + Runtime/Rendering/Context/RDContext.Create.cs | 1 + .../Rendering/Context/RDContext.Messages.cs | 1 + Runtime/Rendering/Context/RDContext.cs | 1 + Runtime/Rendering/DefaultRenderAssets.cs | 1 + Runtime/Rendering/FontFX/FontCreator.cs | 1 + Runtime/Rendering/FontFX/FontDefinition.cs | 1 + Runtime/Rendering/FontFX/FontFX.cs | 1 + Runtime/Rendering/FontFX/FontFXLayouter.cs | 1 + Runtime/Rendering/FontFX/FontGlyph.cs | 1 + Runtime/Rendering/FontFX/FontKerningPair.cs | 1 + Runtime/Rendering/Objects/RDComputeList.cs | 1 + Runtime/Rendering/Objects/RDFrameBuffer.cs | 1 + .../Rendering/Objects/RDFrameBufferFormat.cs | 1 + Runtime/Rendering/Objects/RDObject.cs | 1 + Runtime/Rendering/Objects/RDPipeline.cs | 1 + Runtime/Rendering/Objects/RDProgram.cs | 1 + Runtime/Rendering/Objects/RDPushConstants.cs | 1 + .../Objects/RDRenderPipelineSetup.cs | 1 + Runtime/Rendering/Objects/RDSampler.cs | 1 + Runtime/Rendering/Objects/RDShader.cs | 1 + Runtime/Rendering/Objects/RDTexture.cs | 3 +- Runtime/Rendering/Objects/RDTextureFormats.cs | 1 + Runtime/Rendering/Objects/RDUniformSet.cs | 1 + Runtime/Rendering/Objects/RDVertexFormat.cs | 1 + .../Processors/AntiAliasing/DAA/RG_DAA.cs | 1 + .../Processors/AntiAliasing/FXAA/RG_FXAA.cs | 1 + .../BlendMode_Alpha/RG_BlendMode_Alpha.cs | 1 + .../BlendMode_Color/RG_BlendMode_Color.cs | 1 + .../BlendMode_Screen/RG_BlendMode_Screen.cs | 1 + .../Nodes/Processors/Blend/RG_BlendModes.cs | 1 + .../Processors/Blurs/BoxBlur/RG_BoxBlur.cs | 1 + .../Blurs/GaussBlur/RG_GaussBlur.cs | 1 + .../Blurs/MaxBlur/RG_FadedMaxBlur.cs | 1 + .../Processors/Blurs/MaxBlur/RG_MaxBlur.cs | 1 + .../Blurs/RadialBlur/RG_RadialBlur.cs | 1 + .../Blurs/TemporalBlur/RG_TemporalBlur.cs | 1 + .../RG_AlphaColorDilation.cs | 1 + .../RG_ChromaticAberation.cs | 1 + .../Color/ColorQuantizer/RG_ColorQuantizer.cs | 1 + .../RG_CrossChannelCurves.cs | 1 + .../Color/HDRMapping/RG_HDRMapping.cs | 1 + .../Color/HSLAdjustment/RG_HSLAdjustment.cs | 1 + .../Color/HSLCurves/RG_HSLCurves.cs | 1 + .../Processors/Color/Invert/RG_Invert.cs | 1 + .../RG_LightnessBasedAdjustment.cs | 1 + .../Color/Posterization/RG_Posterization.cs | 1 + .../Color/RGBCurves/RG_RGBCurves.cs | 1 + .../Color/ReplaceColor/RG_ReplaceColor.cs | 1 + .../Nodes/Processors/Color/Sepia/RG_Sepia.cs | 1 + .../Nodes/Processors/Copy/RG_Copy.cs | 1 + .../Nodes/Processors/Copy/RG_Fill.cs | 1 + .../Nodes/Processors/Copy/RG_Resize.cs | 1 + .../Depth/GenerateViewZ/RG_GenerateViewZ.cs | 1 + .../EdgeDistortion/RG_EdgeDistortion.cs | 1 + .../EllipseDistortion/RG_EllipseDistortion.cs | 1 + .../NoiseDistortion/RG_NoiseDistortion.cs | 1 + .../Distortion/ScanLines/RG_ScanLines.cs | 1 + .../TextureDistortion/RG_TextureDistortion.cs | 1 + .../Fog/GradientFog/RG_GradientFog.cs | 1 + .../Processors/Generic/RG_BlendModeBase.cs | 1 + .../Processors/Generic/RG_BufferTexture.cs | 1 + .../Processors/Generic/RG_ImageProcessor.cs | 1 + .../Processors/Generic/RG_ImageTexture.cs | 1 + .../Generic/RG_ScreenColorTexture.cs | 1 + .../Generic/RG_ScreenDepthTexture.cs | 1 + .../RG_ScreenNormalRoughnessTexture.cs | 1 + .../Glow/ChromaticBloom/RG_ChromaticBloom.cs | 1 + .../Glow/ExtractGlow/RG_ExtractGlow.cs | 1 + .../Glow/ExtractGlow/RG_ExtractGlowPartial.cs | 1 + .../ExtractGlowLine/RG_ExtractGlowLine.cs | 1 + .../Glow/GhostBloom/RG_GhostBloom.cs | 1 + .../Processors/Glow/GlowAdd/RG_GlowAdd.cs | 1 + .../Processors/Glow/MaxBloom/RG_ApplyLuma.cs | 1 + .../Processors/Glow/MaxBloom/RG_MaxBloom.cs | 1 + .../Processors/Glow/RingBloom/RG_RingBloom.cs | 1 + .../Processors/Glow/Streaks/RG_Streaks.cs | 1 + .../Nodes/Processors/JFA/RG_JFAAssign.cs | 1 + .../Nodes/Processors/JFA/RG_JFAInitialize.cs | 1 + .../Nodes/Processors/JFA/RG_JFAIterate.cs | 1 + .../Processors/Kernels/Kernel3/RG_Kernel3.cs | 1 + .../Nodes/Processors/Logic/RG_SwapRepeat.cs | 1 + .../ChannelPixelation/RG_ChannelPixelation.cs | 1 + .../Noise/Pixelation/RG_Pixelation.cs | 1 + .../Nodes/Processors/Outlines/Rim/RG_Rim.cs | 1 + .../Outlines/ZOutlines/RG_ZOutlines.cs | 1 + .../Overlays/Vignette/RG_Vignette.cs | 1 + .../Sharpeners/Sharpen/RG_Sharpen.cs | 1 + .../Wipes/CircleWipe/RG_CircleWipe.cs | 1 + .../DirectionalWipe/RG_DirectionalWipe.cs | 1 + .../Wipes/NoiseWipe/RG_NoiseWipe.cs | 1 + Runtime/Rendering/RenderGraph/RDGraph.cs | 1 + .../RenderGraph/RDGraphConnection.cs | 1 + Runtime/Rendering/RenderGraph/RDGraphNode.cs | 1 + .../Rendering/RenderGraph/RDGraphProcessor.cs | 1 + .../RenderGraph/RDGraphTextureSlot.cs | 1 + .../RenderGraph/RDShaderProcessor.cs | 1 + Runtime/Rendering/RenderingManager.cs | 1 + Runtime/Rendering/RenderingManagerData.cs | 1 + Runtime/Rendering/RenderingPriority.cs | 1 + Runtime/Rendering/StencilLayer.cs | 1 + .../AnimateTextureAttributeChannel.cs | 7 +- .../AssignTextureAttributesTexture.cs | 1 + .../SetTextureAttributeChannel.cs | 1 + .../TextureAttributes/TextureAttributes.cs | 1 + Runtime/Scenes/SceneReference.cs | 1 + Runtime/Scenes/Serializer/MemberData.cs | 1 + Runtime/Scenes/Serializer/SerializeScene.cs | 1 + Runtime/Scenes/Serializer/SerializedBase.cs | 1 + Runtime/Scenes/Serializer/SerializedNode.cs | 1 + .../Scenes/Serializer/SerializedResource.cs | 1 + Runtime/Scenes/Serializer/SerializedScene.cs | 1 + Runtime/Selectors/EvaluateSelector.cs | 1 + Runtime/Selectors/FlagSelector.cs | 1 + Runtime/Selectors/Selectable.cs | 1 + Runtime/Selectors/Selector.cs | 1 + Runtime/Selectors/SelectorFlag.cs | 1 + Runtime/Selectors/Selectors.cs | 1 + Runtime/Sensors/CombineSensor.cs | 3 +- .../DefaultSensorDeviceSelector.cs | 1 + Runtime/Sensors/DeviceFilters/DeviceFilter.cs | 1 + .../DeviceFilters/LastActiveDeviceFilter.cs | 1 + .../DeviceFilters/SensorDeviceSelector.cs | 1 + Runtime/Sensors/Devices/GamePadDevice.cs | 1 + Runtime/Sensors/Devices/KeyboardDevice.cs | 1 + Runtime/Sensors/Devices/MouseDevice.cs | 1 + Runtime/Sensors/Devices/MultiSensorDevice.cs | 1 + Runtime/Sensors/Devices/SensorDevice.cs | 1 + Runtime/Sensors/GamePadAxisSensor.cs | 1 + Runtime/Sensors/GamePadAxisType.cs | 1 + Runtime/Sensors/GamePadButtonSensor.cs | 1 + Runtime/Sensors/HoldSensor.cs | 3 +- .../Definitions/CombinedIconsDefinition.cs | 5 +- .../Definitions/CombinedInputIconsTexture.cs | 11 +- .../Definitions/DefaultInputIconDefinition.cs | 1 + .../DirectionalInputIconDefinition.cs | 1 + .../InputIcons/Definitions/IconElement.cs | 1 + .../Definitions/InputIconDefinition.cs | 1 + .../InputIcons/Definitions/InputIconLocale.cs | 1 + .../Definitions/MouseInputIconDefinition.cs | 1 + .../Sensors/InputIcons/InputIconsLibrary.cs | 3 +- .../Sensors/InputIcons/Types/CombinedIcon.cs | 1 + .../InputIcons/Types/GamePadAxisIcon.cs | 1 + .../InputIcons/Types/GamePadButtonIcon.cs | 1 + .../Types/GamePadButtonIconSymbolsMap.cs | 1 + Runtime/Sensors/InputIcons/Types/InputIcon.cs | 1 + Runtime/Sensors/InputIcons/Types/KeyIcon.cs | 1 + .../InputIcons/Types/KeyIconSymbolsMap.cs | 1 + .../InputIcons/Types/MouseInputIcon.cs | 1 + .../Sensors/InputIcons/Types/SensorIcon.cs | 1 + Runtime/Sensors/InputMapActionSensor.cs | 3 +- Runtime/Sensors/KeySensor.cs | 3 +- Runtime/Sensors/MouseButtonSensor.cs | 1 + Runtime/Sensors/MouseMotionDelta.cs | 1 + Runtime/Sensors/MouseScreenRelative.cs | 1 + Runtime/Sensors/OnSensor.cs | 3 +- Runtime/Sensors/Sensor.cs | 3 +- Runtime/Sensors/SensorEvent.cs | 1 + Runtime/Sensors/SensorGroup.cs | 1 + Runtime/Sensors/SensorInputHandler.cs | 1 + Runtime/Sensors/SensorManager.cs | 3 +- Runtime/Sensors/SensorManagerSetup.cs | 1 + Runtime/Sensors/SensorRunner.cs | 1 + Runtime/Sensors/SensorViewer.cs | 1 + Runtime/Sensors/Sensors.cs | 1 + Runtime/Sensors/TriggerOnSensor.cs | 1 + Runtime/Sensors/iOnInputSensor.cs | 1 + .../Generators/Data/Vector2Modifier.cs | 1 + .../Generators/Data/Vector3Modifier.cs | 1 + .../Shading/Generators/Generic/ShaderCode.cs | 1 + .../Generators/Generic/ShaderCodeStage.cs | 1 + .../Generators/Generic/ShaderCodeVariable.cs | 1 + .../Generic/ShaderCodeVariableOccurance.cs | 1 + .../Generic/ShaderGenerationContext.cs | 1 + .../Generic/ShaderGenerationModule.cs | 9 +- .../Generators/Generic/ShaderGenerator.cs | 1 + .../Generators/Generic/ShaderPhases.cs | 1 + .../Generators/Generic/ShaderRawModule.cs | 1 + .../Generators/Generic/ShaderVariant.cs | 3 +- .../Generators/Shapes/ShaderShapes3D.cs | 1 + .../Generators/Spatial/Albedo/AlbedoModule.cs | 1 + .../Spatial/Albedo/AlbedoOverlayLayer.cs | 1 + .../Generators/Spatial/Alpha/AlphaFade.cs | 1 + .../Generators/Spatial/Alpha/AlphaModule.cs | 1 + .../Spatial/Backlight/BacklightModule.cs | 1 + .../Spatial/Emission/EmissionModule.cs | 1 + .../Spatial/Emission/EmissionOverlayLayer.cs | 1 + .../CameraDistance/CameraDistanceFading.cs | 1 + .../DepthProximity/DepthPromixityFading.cs | 1 + .../Spatial/Fading/Dissolve/DissolveFading.cs | 1 + .../Spatial/Fading/FadingModifier.cs | 1 + .../Generators/Spatial/Fading/FadingModule.cs | 1 + .../Spatial/Fading/Fresnel/FresnelFading.cs | 1 + .../Spatial/Fading/Line/LineFading.cs | 1 + .../GeometryBillboardBending.cs | 1 + .../Spatial/Geometry/GeometryModifier.cs | 1 + .../Spatial/Geometry/GeometryModule.cs | 3 +- .../NormalOffset/GeometryNormalOffset.cs | 1 + .../ShapeDeformer/GeometryShapeDeformer.cs | 1 + .../TerrainOffset/GeometryTerrainOffset.cs | 1 + .../Spatial/Geometry/VertexSwizzleType.cs | 1 + .../Spatial/Geometry/VertexTransformSpace.cs | 1 + .../Geometry/Wind/GeometryGlobalWind.cs | 1 + .../Spatial/Geometry/Wind/GeometryWind.cs | 1 + .../Generators/Spatial/Masks/AxisMask.cs | 1 + .../Generators/Spatial/Masks/ConstantMask.cs | 1 + .../Generators/Spatial/Masks/FresnelMask.cs | 1 + .../Spatial/Masks/MaskFormulaType.cs | 1 + .../Generators/Spatial/Masks/MaskReference.cs | 1 + .../Generators/Spatial/Masks/SpatialMask.cs | 1 + .../Spatial/Masks/SpatialMaskVariable.cs | 1 + .../Spatial/Masks/SpatialMasksModule.cs | 1 + .../Generators/Spatial/Masks/TextureMask.cs | 1 + .../Generators/Spatial/Masks/ValueMask.cs | 1 + .../Generators/Spatial/Masks/VaryingMask.cs | 1 + .../Spatial/Metallic/MetallicModule.cs | 1 + .../Spatial/NormalMap/NormalMapModule.cs | 1 + .../Spatial/Occlusion/OcclusionModule.cs | 1 + .../Spatial/Overlays/SpatialOverlayLayer.cs | 1 + .../Spatial/Roughness/RoughnessModule.cs | 1 + .../Spatial/Shading/ShadingModule.cs | 1 + .../Generators/Spatial/SpatialShaderData.cs | 1 + .../Spatial/SpatialShaderGenerator.cs | 1 + .../Spatial/Specular/SpecularModule.cs | 1 + .../Spatial/Stencil/StencilBaseReference.cs | 1 + .../Stencil/StencilCustomConfiguration.cs | 1 + .../Spatial/Stencil/StencilIndexReference.cs | 1 + .../Spatial/Stencil/StencilLayerReference.cs | 1 + .../Generators/Spatial/Stencil/StencilMode.cs | 1 + .../Spatial/Stencil/StencilModule.cs | 1 + .../Spatial/Stencil/StencilReadMask.cs | 1 + .../Spatial/Stencil/StencilReference.cs | 1 + .../Spatial/Stencil/StencilWriteMask.cs | 1 + .../SubsurfaceScatteringModule.cs | 1 + .../Generators/Spatial/TextureModule.cs | 1 + .../Transparency/TransparencyModule.cs | 3 +- .../Generators/Spatial/UV/UVChannel.cs | 1 + .../Generators/Spatial/UV/UVModifier.cs | 1 + .../Shading/Generators/Spatial/UV/UVModule.cs | 1 + .../Generators/Spatial/UV/UVScaleOffset.cs | 3 +- .../Spatial/UV/UVSource/MeshUVSource.cs | 1 + .../Spatial/UV/UVSource/UVSource.cs | 1 + .../Spatial/UV/UVSource/VertexUVSource.cs | 1 + .../Spatial/Varyings/MeshAttributVarying.cs | 1 + .../Spatial/Varyings/SpatialVariyngSource.cs | 1 + .../Spatial/Varyings/SpatialVarying.cs | 1 + .../Varyings/SpatialVaryingVariable.cs | 1 + Runtime/Shading/Materials/CustomMaterial.cs | 1 + .../Materials/CustomMaterialProperty.cs | 1 + Runtime/Shading/Materials/MaterialDelta.cs | 1 + Runtime/Shading/Materials/MaterialTransfer.cs | 3 +- Runtime/Shading/Materials/Materials.cs | 1 + .../Shading/Materials/SubMaterialTransfer.cs | 1 + .../Transfers/BoolPropertyTransfer.cs | 1 + .../Transfers/ColorPropertyTransfer.cs | 1 + .../Materials/Transfers/CustomTransfer.cs | 1 + .../Transfers/FloatPropertyTransfer.cs | 1 + .../Transfers/IntPropertyTransfer.cs | 1 + .../Transfers/Texture2DPropertyTransfer.cs | 1 + .../TextureChannelToVector4Transfer.cs | 1 + .../Transfers/Vector2PropertyTransfer.cs | 1 + .../Transfers/Vector3PropertyTransfer.cs | 1 + .../Transfers/Vector4PropertyTransfer.cs | 1 + .../Shading/Meshes/SphericalParticleMesh.cs | 1 + .../Shading/Properties/BoolPropertyName.cs | 1 + .../Shading/Properties/ColorPropertyName.cs | 1 + .../Enums/TextureChannelPropertyName.cs | 1 + .../Shading/Properties/FloatPropertyName.cs | 1 + Runtime/Shading/Properties/IntPropertyName.cs | 1 + .../Properties/Properties/ColorProperty.cs | 1 + .../Properties/Properties/FloatProperty.cs | 1 + .../Properties/Sampler2DProperty.cs | 1 + .../SetGlobalVector3PropertyFromNode.cs | 5 +- .../Properties/SetVector3PropertyFromNode.cs | 1 + .../Properties/Properties/ShaderProperty.cs | 1 + .../Properties/ShaderPropertyBlock.cs | 1 + .../Properties/Properties/Vector2Property.cs | 1 + .../Properties/Properties/Vector3Property.cs | 1 + .../Properties/Properties/Vector4Property.cs | 1 + .../Properties/Sampler2DPropertyName.cs | 1 + .../Shading/Properties/ShaderPropertyName.cs | 1 + .../Properties/Vector2IPropertyName.cs | 1 + .../Shading/Properties/Vector2PropertyName.cs | 1 + .../Shading/Properties/Vector3PropertyName.cs | 1 + .../Shading/Properties/Vector4PropertyName.cs | 1 + Runtime/Shading/ShaderTransformSpace.cs | 1 + .../Shaders/Baking/DilationDrawerMaterial.cs | 1 + .../QuadBillboard/QuadBillboardMaterial.cs | 1 + .../FancyOutline/FancyOutlineMaterial.cs | 1 + .../FresnelOverlay/FresnelOverlayMaterial.cs | 1 + .../Effects/Outline/OutlineMaterial.cs | 1 + .../Effects/Overlay/OverlayMaterial.cs | 1 + .../ScanGradient/ScanGradientMaterial.cs | 1 + .../TriPlanarOverlayMaterial.cs | 1 + .../Flares/BaseFlare/BaseFlareMaterial.cs | 1 + .../EllipseFlare/EllipseFlareAddMaterial.cs | 1 + .../EllipseFlare/EllipseFlareMixMaterial.cs | 1 + .../Variants/EllipseTypeFlareAddMaterial.cs | 1 + .../Variants/EllipseTypeFlareMixMaterial.cs | 1 + .../EllipseTypeFlareMultiplyMaterial.cs | 1 + .../EllipseTypeFlareSubtractMaterial.cs | 1 + .../Shaders/Flares/FlareSuperBaseMaterial.cs | 1 + .../Variants/SDFTypeFlareAddMaterial.cs | 1 + .../Variants/SDFTypeFlareMixMaterial.cs | 1 + .../Variants/SDFTypeFlareMultiplyMaterial.cs | 1 + .../Variants/SDFTypeFlareSubtractMaterial.cs | 1 + .../Variants/StarTypeFlareAddMaterial.cs | 1 + .../Variants/StarTypeFlareMixMaterial.cs | 1 + .../Variants/StarTypeFlareMultiplyMaterial.cs | 1 + .../Variants/StarTypeFlareSubtractMaterial.cs | 1 + .../Variants/TextureTypeFlareAddMaterial.cs | 1 + .../Variants/TextureTypeFlareMixMaterial.cs | 1 + .../TextureTypeFlareMultiplyMaterial.cs | 1 + .../TextureTypeFlareSubtractMaterial.cs | 1 + Runtime/Shading/Shaders/Shaders.cs | 15 +- Runtime/Shading/Shaders/UniformMember.cs | 1 + .../Wipes/FadeWipe/FadeWipeMaterial.cs | 1 + .../CSShaderClassGenerator.cs | 9 +- .../CSShaderClassTemplate.txt | 1 + .../CSShaderClassGenerator/CSShaderVariant.cs | 1 + .../CSShaderReplacementChange.cs | 1 + .../VariantChanges/CSShaderVariantChange.cs | 1 + Runtime/Sorting/MinMaxSearch.cs | 1 + Runtime/Sorting/MultiValueSorter.cs | 1 + Runtime/Sorting/ValueSorter.cs | 1 + Runtime/Structures/Map.cs | 1 + Runtime/Structures/MapList.cs | 1 + Runtime/Structures/MultiMap.cs | 1 + Runtime/Structures/MultiMap3.cs | 1 + Runtime/Structures/QueueList.cs | 10 +- Runtime/Structures/Spatial/Grid2D/Grid2D.cs | 1 + Runtime/Structures/Spatial/OcTree/OcTree.cs | 3 +- .../Structures/Spatial/OcTree/OcTreeCell.cs | 1 + .../Structures/Spatial/OcTree/OcTreeNode.cs | 1 + .../Structures/Spatial/OcTree/OcTreeWalker.cs | 1 + .../Structures/Spatial/QuadTree/QuadTree.cs | 3 +- .../Spatial/QuadTree/QuadTreeCell.cs | 1 + .../Spatial/QuadTree/QuadTreeNode.cs | 1 + .../Spatial/QuadTree/QuadTreeWalker.cs | 1 + .../Structures/Spatial/Voronoi/Voronoi2D.cs | 1 + Runtime/Testing/CheckTransforms.cs | 1 + Runtime/Testing/CheckWarnings.cs | 1 + Runtime/Testing/DebugAction.cs | 1 + Runtime/Testing/DebugMessage.cs | 1 + Runtime/Testing/GDScriptExportTest.cs | 55 +- .../FindUniqueTestObject.cs | 21 + .../FindUniqueTestObject.cs.uid | 1 + .../RokojoriActionCore/UniqueTestObject.cs | 16 + .../UniqueTestObject.cs.uid | 1 + Runtime/Text/JSON/JSON.cs | 1 + Runtime/Text/JSON/JSONArray.cs | 3 +- Runtime/Text/JSON/JSONData.cs | 1 + Runtime/Text/JSON/JSONLexer.cs | 1 + Runtime/Text/JSON/JSONObject.cs | 1 + Runtime/Text/JSON/JSONParser.cs | 5 +- Runtime/Text/JSON/JSONStringConverter.cs | 9 + Runtime/Text/JSON/JSONValue.cs | 1 + .../JSON/Serializers/BigIntegerSerializer.cs | 1 + .../Text/JSON/Serializers/ColorSerializer.cs | 1 + .../Text/JSON/Serializers/CustomSerializer.cs | 1 + .../JSON/Serializers/DateTimeSerializer.cs | 1 + .../JSON/Serializers/JSONAlwaysProcessable.cs | 1 + .../Text/JSON/Serializers/JSONDeserializer.cs | 1 + .../Text/JSON/Serializers/JSONSerializer.cs | 1 + .../Serializers/JSONSerializiationSettings.cs | 1 + Runtime/Text/JSON/Serializers/Reference.cs | 1 + Runtime/Text/Levenshtein.cs | 101 + Runtime/Text/Levenshtein.cs.uid | 1 + Runtime/Text/Lexing/Lexer.cs | 1 + Runtime/Text/Lexing/LexerEvent.cs | 1 + Runtime/Text/Lexing/LexerLibrary/CSLexer.cs | 1 + .../Text/Lexing/LexerLibrary/GDShaderLexer.cs | 1 + .../Lexing/LexerLibrary/UIExpressionLexer.cs | 1 + Runtime/Text/Lexing/LexerLibrary/WordLexer.cs | 1 + Runtime/Text/Lexing/LexerLibrary/XMLLexer.cs | 1 + .../Lexing/LexerLibrary/XMLRegexExtension.cs | 1 + Runtime/Text/Lexing/LexerList.cs | 1 + Runtime/Text/Lexing/LexerMatcher.cs | 1 + Runtime/Text/Lexing/LexerMatcherLibrary.cs | 1 + .../Lexing/Selectors/LexerEventSelector.cs | 1 + .../Text/Lexing/Selectors/SelectsAnyType.cs | 1 + Runtime/Text/Lexing/Selectors/SelectsMatch.cs | 1 + .../Text/Lexing/Selectors/SelectsMatchType.cs | 1 + Runtime/Text/Lexing/Selectors/SelectsType.cs | 1 + Runtime/Text/Parsing/AST/ASTFileRoot.cs | 1 + Runtime/Text/Parsing/AST/ASTNode.cs | 1 + Runtime/Text/Parsing/AST/ASTNodeList.cs | 1 + Runtime/Text/Parsing/AST/ASTWalker.cs | 1 + .../Parsing/AST/Debug/ASTViewAttribute.cs | 1 + .../Parsing/AST/Debug/ASTViewBracketToken.cs | 1 + .../Parsing/AST/Debug/ASTViewConstantToken.cs | 1 + .../Text/Parsing/AST/Debug/ASTViewContext.cs | 1 + .../Text/Parsing/AST/Debug/ASTViewElement.cs | 1 + .../Parsing/AST/Debug/ASTViewExpression.cs | 1 + .../Parsing/AST/Debug/ASTViewIgnoreToken.cs | 1 + .../Parsing/AST/Debug/ASTViewLogicToken.cs | 1 + .../Text/Parsing/AST/Debug/ASTViewMember.cs | 1 + Runtime/Text/Parsing/AST/Debug/ASTViewNode.cs | 1 + .../Parsing/AST/Debug/ASTViewNodeReference.cs | 1 + .../Text/Parsing/AST/Debug/ASTViewObject.cs | 1 + .../Parsing/AST/Debug/ASTViewOperatorToken.cs | 1 + Runtime/Text/Parsing/AST/Debug/ASTViewRoot.cs | 1 + .../Parsing/AST/Debug/ASTViewStatement.cs | 1 + .../Text/Parsing/AST/Debug/ASTViewToken.cs | 1 + .../Parsing/AST/Debug/ASTViewWordToken.cs | 1 + .../Text/Parsing/AST/EnumValueDeclaration.cs | 1 + Runtime/Text/Parsing/AST/ImportDeclaration.cs | 1 + .../Parsing/AST/Matchers/ASTMatchResult.cs | 1 + .../Text/Parsing/AST/Matchers/ASTMatcher.cs | 1 + .../AST/Matchers/BracketBlockASTMatcher.cs | 1 + .../AST/Matchers/CombinedASTMatcher.cs | 1 + .../Parsing/AST/Matchers/LambdaASTMatcher.cs | 1 + .../AST/Matchers/MultiTriggerASTMatcher.cs | 1 + .../AST/Matchers/NotIgnoreNodeMatcher.cs | 1 + .../Text/Parsing/AST/Matchers/TokenMatcher.cs | 1 + .../Matchers/TokenRepeatSequenceASTMatcher.cs | 1 + .../AST/Matchers/TokenSequenceASTMatcher.cs | 1 + .../AST/Matchers/TokenWordASTMatcher.cs | 1 + Runtime/Text/Parsing/AST/MemberDeclaration.cs | 1 + Runtime/Text/Parsing/AST/NamespaceBlock.cs | 1 + .../Text/Parsing/AST/NamespaceDeclaration.cs | 1 + .../AST/ObjectTypes/ClassDeclaration.cs | 1 + .../AST/ObjectTypes/EnumDeclaration.cs | 1 + .../AST/ObjectTypes/InterfaceDeclaration.cs | 1 + .../Text/Parsing/AST/ParameterDeclaration.cs | 1 + Runtime/Text/Parsing/AST/ResolvableASTNode.cs | 1 + .../AST/Resolver/ASTMatcherResolver.cs | 1 + .../Text/Parsing/AST/Resolver/ASTParser.cs | 1 + .../Text/Parsing/AST/Resolver/ASTResolver.cs | 1 + Runtime/Text/Parsing/AST/Token.cs | 1 + .../Text/Parsing/AST/TokenPredicateData.cs | 1 + .../Evaluator/ExpressionContext.cs | 1 + .../Evaluator/ExpressionEvaluator.cs | 1 + .../Expressions/Evaluator/ExpressionResult.cs | 1 + .../Parsing/Expressions/ExpressionParser.cs | 1 + .../Expressions/Operators/ArrayExpression.cs | 1 + .../Expressions/Operators/ArrayOperator.cs | 1 + .../Expressions/Operators/BinaryExpression.cs | 1 + .../Expressions/Operators/BinaryOperator.cs | 1 + .../Operators/ConstantExpression.cs | 1 + .../Expressions/Operators/ConstantOperator.cs | 1 + .../Operators/ExpressionOperator.cs | 1 + .../Operators/FunctionExpression.cs | 1 + .../Expressions/Operators/FunctionOperator.cs | 1 + .../Operators/GenericFunctionExpression.cs | 1 + .../Operators/GenericFunctionOperator.cs | 1 + .../Expressions/Operators/GroupExpression.cs | 1 + .../Expressions/Operators/GroupOperator.cs | 1 + .../Operators/OperatorExpression.cs | 1 + .../Operators/SeparatedSequenceExpression.cs | 1 + .../Operators/SeparatedSequenceOperator.cs | 1 + .../Operators/TernaryExpression.cs | 1 + .../Expressions/Operators/TernaryOperator.cs | 1 + .../Expressions/Operators/UnaryExpression.cs | 1 + .../Expressions/Operators/UnaryOperator.cs | 1 + .../Operators/VariableExpression.cs | 1 + .../Expressions/Operators/VariableOperator.cs | 1 + .../Parsing/Expressions/PrecedenceLevel.cs | 1 + Runtime/Text/Parsing/Parser/ASTParserPhase.cs | 1 + Runtime/Text/Parsing/Parser/LexerPhase.cs | 1 + Runtime/Text/Parsing/Parser/Parser.cs | 1 + Runtime/Text/Parsing/Parser/ParserMessage.cs | 1 + Runtime/Text/Parsing/Parser/ParserPhase.cs | 1 + .../ParserLibrary/CSharp/CSCommentGrabber.cs | 1 + .../Parsing/ParserLibrary/CSharp/CSParser.cs | 1 + .../ParserLibrary/CSharp/CSParserTest.cs | 1 + .../ParserLibrary/CSharp/Nodes/CSFileRoot.cs | 1 + .../CSharp/Nodes/CSImportDeclaration.cs | 1 + .../CSharp/Nodes/CSNamespaceBlock.cs | 1 + .../CSharp/Nodes/CSNamespaceDeclaration.cs | 1 + .../CSharp/Nodes/CSTypeDefinition.cs | 1 + .../CSEnumValueDeclaration.cs | 1 + .../MemberDeclarations/CSFieldDeclaration.cs | 1 + .../MemberDeclarations/CSMemberDeclaration.cs | 1 + .../CSMethodMemberDeclaration.cs | 1 + .../CSParameterDeclaration.cs | 1 + .../CSPropertyDeclaration.cs | 1 + .../ObjectDeclarations/CSClassDeclaration.cs | 1 + .../ObjectDeclarations/CSEnumDeclaration.cs | 1 + .../CSInterfaceDeclaration.cs | 1 + .../ObjectDeclarations/CSObjectDeclaration.cs | 1 + .../CSObjectDeclarationTail.cs | 1 + .../ObjectDeclarations/CSObjectDependency.cs | 1 + .../ObjectDeclarations/CSStructDeclaration.cs | 1 + .../ParserLibrary/CSharp/Nodes/SquareBlock.cs | 1 + .../CSExpressions/CSExpressionParser.cs | 1 + .../CSharp/Parsers/CSMemberResolver.cs | 1 + .../Parsers/CSModifierAttributesParser.cs | 1 + .../CSharp/Parsers/CSObjectParser.cs | 1 + .../Parsers/CSPreProcessor/CSPreProcessor.cs | 1 + .../CSPreProcessorConditionalEvaluator.cs | 1 + .../CSPreProcessor/CSPreProcessorContext.cs | 1 + .../CSPreProcessorExpressionParser.cs | 1 + .../CSPreProcessor/CSPreProcessorStack.cs | 1 + .../CSharp/Parsers/CSRootFileParser.cs | 1 + .../CSStatements/CSBlockStatementResolver.cs | 1 + .../CSStatements/CSElseIfStatementResolver.cs | 1 + .../CSExpressionStatementResolver.cs | 1 + .../CSForEachStatementResolver.cs | 1 + .../CSStatements/CSForStatementResolver.cs | 1 + .../CSStatements/CSStatementResolver.cs | 1 + .../CSStatements/CSStatementsParser.cs | 1 + .../CSStatements/CSStopStatementResolver.cs | 1 + .../Text/Parsing/Statements/ASTStatement.cs | 1 + Runtime/Text/RegexBuilder.cs | 3 +- Runtime/Text/RegexExtensions.cs | 1 + Runtime/Text/RegexMatches.cs | 1 + Runtime/Text/RegexUtility.cs | 1774 +++++++++-------- Runtime/Text/Text.cs | 185 +- Runtime/Text/TextAnchor.cs | 1 + Runtime/Text/TextLine.cs | 3 +- Runtime/Text/TextLinesMapper.cs | 3 +- Runtime/Text/TextSelection.cs | 1 + Runtime/Time/DateTime/DateMath.cs | 1 + Runtime/Time/DateTime/ISOTimeStamp.cs | 1 + Runtime/Time/Duration/BeatsDuration.cs | 1 + Runtime/Time/Duration/Duration.cs | 5 +- Runtime/Time/Duration/SecondsDuration.cs | 3 +- Runtime/Time/ModulateTimeLineSpeed.cs | 7 +- Runtime/Time/ModulateTimeLineSpeed.cs.uid | 2 +- Runtime/Time/SetTimeLineSpeed.cs | 7 +- Runtime/Time/SetTimeLineSpeed.cs.uid | 2 +- Runtime/Time/TImeLineManager_Scheduling.cs | 65 +- .../Time/TImeLineManager_Scheduling.cs.uid | 2 +- Runtime/Time/TimeLine.cs | 41 +- Runtime/Time/TimeLine.cs.uid | 2 +- Runtime/Time/TimeLineCallback.cs | 7 +- Runtime/Time/TimeLineCallback.cs.uid | 2 +- Runtime/Time/TimeLineEvent.cs | 7 +- Runtime/Time/TimeLineEvent.cs.uid | 2 +- Runtime/Time/TimeLineManager.cs | 386 ++-- Runtime/Time/TimeLineManager.cs.uid | 2 +- Runtime/Time/TimeLineRunner.cs | 537 ++--- Runtime/Time/TimeLineRunner.cs.uid | 2 +- Runtime/Time/TimeLineSpan.cs | 9 +- Runtime/Time/TimeLineSpan.cs.uid | 2 +- Runtime/Time/TimeLines/GameTime.tres | 7 - Runtime/Time/TimeLines/RealTime.tres | 7 - Runtime/Time/TimeLines/UITime.tres | 7 - Runtime/Time/TimeTool.cs | 35 + Runtime/Time/TimeTool.cs.uid | 1 + Runtime/Time/Timelines/Game Time.tres | 7 + Runtime/Time/Timelines/Real Time.tres | 8 + Runtime/Time/Timelines/UI Time.tres | 8 + Runtime/Tools/Arrays.cs | 428 ++-- Runtime/Tools/Async.cs | 36 +- Runtime/Tools/BooleanLogic.cs | 1 + Runtime/Tools/Boxed/BoxedColorValue.cs | 1 + Runtime/Tools/Boxed/BoxedFloatValue.cs | 1 + Runtime/Tools/Boxed/ColorValue.cs | 1 + .../Tools/Boxed/FloatRanges/BoolFloatValue.cs | 1 + .../Tools/Boxed/FloatRanges/Float16Value.cs | 1 + .../Tools/Boxed/FloatRanges/Float256Value.cs | 1 + .../Tools/Boxed/FloatRanges/Float2Value.cs | 1 + .../Tools/Boxed/FloatRanges/Float4Value.cs | 1 + .../Tools/Boxed/FloatRanges/Float8Value.cs | 1 + .../Boxed/FloatRanges/FloatDOFDistance.cs | 1 + .../FloatRanges/FloatDOFTransitionValue.cs | 1 + .../Tools/Boxed/FloatRanges/Polar1024Value.cs | 1 + .../Tools/Boxed/FloatRanges/Polar16Value.cs | 1 + .../Tools/Boxed/FloatRanges/Polar2Value.cs | 1 + Runtime/Tools/Boxed/FloatRanges/PolarValue.cs | 1 + Runtime/Tools/Boxed/FloatValue.cs | 1 + Runtime/Tools/Boxed/NormalizedValue.cs | 1 + Runtime/Tools/Boxed/PowerValue.cs | 1 + Runtime/Tools/Dictionaries.cs | 1 + Runtime/Tools/ListExtensions.cs | 1348 +++++++++++++ .../{Lists.cs.uid => ListExtensions.cs.uid} | 0 Runtime/Tools/Lists.cs | 1240 ------------ Runtime/Tools/ReflectionHelper.cs | 5 +- Runtime/Tools/Safe.cs | 1 + Runtime/Tools/Singleton.cs | 1 + Runtime/Tools/TestNode.cs | 1 + Runtime/Tools/TestResource.cs | 1 + Runtime/Tools/Trillean.cs | 78 +- Runtime/Tools/TypeTools.cs | 93 + Runtime/Tools/TypeTools.cs.uid | 1 + Runtime/UI/Actions/SetFocusedControl.cs | 1 + Runtime/UI/Actions/SetUIElementActiveState.cs | 1 + Runtime/UI/Actions/SetUIStyle.cs | 1 + Runtime/UI/Actions/SetUIText.cs | 1 + Runtime/UI/Components/OldUISlider.cs | 1 + Runtime/UI/Components/UIDragging.cs | 1 + Runtime/UI/Layouts/UIFlowLayout.cs | 1 + Runtime/UI/Layouts/UILayout.cs | 1 + Runtime/UI/Layouts/UILayouting.cs | 1 + Runtime/UI/MouseModeTool.cs | 1 + Runtime/UI/Nodes/Image/UIImage.cs | 1 + .../UIImageTypes/NinePatchUIImageType.cs | 1 + .../RoundedRectangleUIImageType.cs | 1 + .../Image/UIImageTypes/SliderUIImageType.cs | 1 + .../Nodes/Image/UIImageTypes/UIImageType.cs | 1 + .../ListSelection/ChangeUIListSelection.cs | 3 +- .../ListSelection/UIListSelection.cs | 1 + .../Sliders/ScrollSlider/UIScrollSlider.cs | 1 + Runtime/UI/Nodes/Sliders/UISlider.cs | 1 + .../Sliders/ValueSlider/UIFloatValueMode.cs | 1 + .../ValueSlider/UIResolutionScaleMode.cs | 1 + .../Sliders/ValueSlider/UIValueSlider.cs | 1 + .../Sliders/ValueSlider/UIValueSliderMode.cs | 1 + Runtime/UI/Nodes/UIBreak.cs | 1 + Runtime/UI/Nodes/UIFocusProcessor.cs | 1 + Runtime/UI/Nodes/UIHolder.cs | 1 + Runtime/UI/Nodes/UIHoverable.cs | 1 + Runtime/UI/Nodes/UIInputInfo.cs | 381 ++-- Runtime/UI/Nodes/UIRegion.cs | 1442 +++++++------- Runtime/UI/Nodes/UISpace.cs | 1 + Runtime/UI/Nodes/UIText.cs | 1 + Runtime/UI/Nodes/UIWrapper.cs | 1 + Runtime/UI/OnSliderValueChange.cs | 1 + Runtime/UI/Optimization/CachedUIColor.cs | 1 + Runtime/UI/Optimization/CachedUINumber.cs | 1 + Runtime/UI/Optimization/RedrawCue.cs | 1 + Runtime/UI/ShaderProperties/ShaderUIColor.cs | 1 + Runtime/UI/ShaderProperties/ShaderUINumber.cs | 1 + .../UI/ShaderProperties/UIShaderProperties.cs | 1 + .../Shaders/NinePatch/UINinePatchMaterial.cs | 1 + .../RoundedRectangleMaterial.cs | 1 + Runtime/UI/Shaders/Slider/SliderMaterial.cs | 1 + Runtime/UI/Sound/UISoundData.cs | 1 + Runtime/UI/Styling/UIColor.cs | 3 +- Runtime/UI/Styling/UICursor.cs | 1 + Runtime/UI/Styling/UILineWrap.cs | 1 + Runtime/UI/Styling/UINumber.cs | 5 +- Runtime/UI/Styling/UINumberVariable.cs | 1 + Runtime/UI/Styling/UIPosition.cs | 1 + Runtime/UI/Styling/UIRule.cs | 1 + Runtime/UI/Styling/UISelector.cs | 1 + Runtime/UI/Styling/UISelectorFlag.cs | 1 + Runtime/UI/Styling/UISelectorFlagEntry.cs | 1 + Runtime/UI/Styling/UIStyle.cs | 1 + Runtime/UI/Styling/UIStyleProperty.cs | 1 + .../UI/Styling/UIStylePropertyContainer.cs | 1 + Runtime/UI/Styling/UIStyling.cs | 1 + .../UI/Transitions/ActiveStyleTransition.cs | 3 +- Runtime/UI/Transitions/TransitionSettings.cs | 3 +- .../UI/Transitions/TransitionSettingsAll.cs | 1 + Runtime/UI/Transitions/UIColorTransition.cs | 1 + Runtime/UI/Transitions/UINumberTransition.cs | 1 + Runtime/UI/UI-Settings-Default.tres | 2 +- Runtime/UI/UI.cs | 9 +- .../MinimalisticBackgroundGenerator.cs | 1 + .../UIAppSettingsBackgroundGenerator.cs | 1 + .../MinimalisticCategoryPagesGenerator.cs | 5 +- .../UIAppSettingsCategoryPage.cs | 1 + .../UIAppSettingsCategoryPageGenerator.cs | 1 + .../Handlers/UIAppSettingHandler.cs | 1 + .../Handlers/UIListAppSettingHandler.cs | 1 + .../Handlers/UINumberAppSettingHandler.cs | 1 + .../Headers/MinimalisticHeaderGenerator.cs | 1 + .../Headers/SelectSettingsPage.cs | 1 + .../Headers/SetFocusedUIAppSettings.cs | 1 + .../Headers/UIAppSettingsHeader.cs | 1 + .../Headers/UIAppSettingsHeaderGenerator.cs | 1 + .../UIAppSettings/InitializeUIAppSettings.cs | 1 + .../UI/UIAppSettings/SetUIAppSettingsReady.cs | 1 + Runtime/UI/UIAppSettings/UIAppSettings.cs | 3 +- .../UIAppSettings/UIAppSettingsGenerator.cs | 1 + Runtime/UI/UIRuleSet.cs | 1 + Runtime/UI/UISettings.cs | 3 +- .../FlareVFX/FlareBlendMode/FlareBlendMode.cs | 1 + .../DirectionalFlareChromaticAberation.cs | 1 + .../FlareChromaticAberation.cs | 1 + .../OrientatedFlareChromaticAberation.cs | 1 + .../FlareVFX/FlareFading/EdgeFlareFading.cs | 1 + .../VFX/FlareVFX/FlareFading/FlareFading.cs | 1 + .../FlareFading/ParametricFlareFading.cs | 1 + .../FlareFading/TextureFlareFading.cs | 1 + Runtime/VFX/FlareVFX/FlareLayer.cs | 1 + .../FlareOcclusion/FadingFlareOcclusion.cs | 1 + .../FlareVFX/FlareOcclusion/FlareOcclusion.cs | 1 + Runtime/VFX/FlareVFX/FlarePreset.cs | 1 + .../FlareStencilMode/FlareStencilMode.cs | 1 + .../FlareVFX/FlareType/EllipseFlareType.cs | 1 + Runtime/VFX/FlareVFX/FlareType/FlareType.cs | 1 + .../FlareVFX/FlareType/SDFShapeFlareType.cs | 1 + .../VFX/FlareVFX/FlareType/StarFlareType.cs | 1 + .../FlareVFX/FlareType/TextureFlareType.cs | 1 + Runtime/VFX/FlareVFX/FlareVFX.cs | 1 + Runtime/VFX/FlashVFX/FlashPreset.cs | 1 + .../CustomFlashType/CustomFlashPosition.cs | 1 + .../CustomFlashType/CustomFlashType.cs | 1 + Runtime/VFX/FlashVFX/FlashTypes/FlashType.cs | 1 + .../FlashTypes/FlatFlashType/FlatFlashType.cs | 1 + .../FresnelFlashType/FresnelFlashType.cs | 1 + Runtime/VFX/FlashVFX/FlashVFX.cs | 13 +- .../VFX/GradientGenerator/CustomGradient.cs | 1 + .../GradientGenerator/GradientGenerator.cs | 1 + .../VFX/GradientGenerator/RainbowGradient.cs | 1 + .../GradientGenerator/TemperatureGradient.cs | 1 + .../LineMaterial/CustomLineMaterialPreset.cs | 1 + .../LineMaterial/LineMaterialPreset.cs | 1 + .../LineVFXShaderPointProperties.cs | 1 + .../LineMaterial/LineVFXShaderSetup.cs | 1 + .../LineMeshGenerator/CustomMeshGenerator.cs | 1 + .../CylinderMeshGenerator.cs | 1 + .../LineMeshGenerator/LineMeshGenerator.cs | 1 + .../LineMeshGenerator/RandomLineMeshEntry.cs | 1 + .../RandomLineMeshGenerator.cs | 1 + .../LinePoint/AutoLine/AutoLinePointData.cs | 1 + .../LinePoint/AutoLine/AutoLinePointList.cs | 1 + .../LinePoint/AutoLine/AutoLineVFXData.cs | 1 + .../ChildPositionsAutoLine.cs | 1 + .../CustomLine/CustomLinePointData.cs | 1 + .../CustomLine/CustomLinePointList.cs | 1 + .../LinePoint/CustomLine/CustomLineVFXData.cs | 1 + .../FollowAutoLine/FollowAutoLine.cs | 1 + .../FollowAutoLine/SetFollowAutoLine.cs | 1 + .../VFX/LineVFX/LinePoint/LinePointData.cs | 1 + .../LinePoint/LinePointDataGenerator.cs | 1 + .../VFX/LineVFX/LinePoint/LineVFXPointData.cs | 1 + .../ManualAutoLine/ManualAutoLine.cs | 1 + Runtime/VFX/LineVFX/LinePreset.cs | 1 + Runtime/VFX/LineVFX/LineVFX.cs | 1 + Runtime/VFX/LineVFX/SetPositionOnLineVFX.cs | 3 +- Runtime/VFX/VFXTools.cs | 1 + Runtime/Viewports/CopyViewportSize.cs | 1 + .../WorldMap/Layers/Grid/GridWorldMapLayer.cs | 3 +- .../WorldMap/Layers/Grid/GridWorldRegion.cs | 1 + Runtime/WorldMap/Layers/WorldMapLayer.cs | 1 + Runtime/WorldMap/Layers/WorldMapLayerType.cs | 1 + Runtime/WorldMap/Streamers/WorldStreamer.cs | 1 + Runtime/WorldMap/WorldMap.cs | 1 + Runtime/WorldMap/WorldMapDefinition.cs | 1 + Runtime/XML/HTML/HTMLElementName.cs | 1 + Runtime/XML/Nodes/XMLAttributeNode.cs | 1 + Runtime/XML/Nodes/XMLCDataSectionNode.cs | 1 + Runtime/XML/Nodes/XMLCommentNode.cs | 1 + Runtime/XML/Nodes/XMLDocument.cs | 1 + Runtime/XML/Nodes/XMLDocumentFragmentNode.cs | 1 + Runtime/XML/Nodes/XMLDocumentTypeNode.cs | 1 + Runtime/XML/Nodes/XMLElementNode.cs | 1 + .../XML/Nodes/XMLProcessingInstructionNode.cs | 1 + Runtime/XML/Nodes/XMLTextNode.cs | 1 + Runtime/XML/SVG/Inkscape.cs | 1 + Runtime/XML/SVG/SVGArc.cs | 1 + Runtime/XML/SVG/SVGAttributeName.cs | 1 + Runtime/XML/SVG/SVGElementName.cs | 1 + Runtime/XML/SVG/SVGInkscapeLayerSeperator.cs | 3 +- Runtime/XML/SVG/SVGPathCommand.cs | 7 +- Runtime/XML/SVG/SVGPathExtractor.cs | 1 + Runtime/XML/SVG/SVGPathInstruction.cs | 1 + Runtime/XML/SVG/SVGPathParser.cs | 1 + Runtime/XML/XMLAttributeName.cs | 1 + Runtime/XML/XMLElementNodeName.cs | 1 + Runtime/XML/XMLElementSelector.cs | 1 + Runtime/XML/XMLNode.cs | 1 + Runtime/XML/XMLQuery.cs | 1 + Runtime/XML/XMLReader.cs | 7 +- Runtime/XML/XMLReaderTest.cs | 1 + Runtime/XML/XMLSerializer.cs | 1 + Runtime/XML/XMLWalker.cs | 1 + Tools/FFmpeg/FFmpeg.cs | 1 + Tools/Git/Git.cs | 1 + Tools/Messages/Idle Font Style.tres | 2 +- Tools/Messages/Messages.tscn | 2 +- Tools/Messages/Vertical-Slider.tres | 4 +- Tools/blender/Blender.cs | 1 + .../RokojoriActionCoreExport.cs | 1 + .../RokojoriActionCoreExportCustom.cs | 1 + .../RokojoriActionCoreFlatten.cs | 13 + .../RokojoriActionCoreFlatten.cs.uid | 1 + .../RokojoriActionCoreGDIgnore.cs | 8 + .../RokojoriActionCoreGDIgnore.cs.uid | 1 + .../RokojoriActionCoreGenericAsString.cs | 18 + .../RokojoriActionCoreGenericAsString.cs.uid | 1 + ...erator.cs => RokojoriActionCoreSymbols.cs} | 19 +- ...s.uid => RokojoriActionCoreSymbols.cs.uid} | 0 Tools/docs/ClassDocEditing/ClassDocEditor.cs | 1 + Tools/docs/ClassDocEditing/ClassDocMember.cs | 1 + Tools/docs/ClassDocEditing/ClassDocParser.cs | 3 +- Tools/docs/ClassDocGenerator.cs | 25 +- Tools/docs/CreateDoc.cs | 5 +- Tools/docs/GetDocsType.cs | 5 +- Tools/docs/ShaderDocGenerator.cs | 1 + Tools/gd-only-generator/GDLibraryGenerator.cs | 3 +- Tools/gltf-export/GLTFExport.cs | 8 +- 1600 files changed, 8257 insertions(+), 5229 deletions(-) create mode 100644 Icons/Timeline.svg create mode 100644 Icons/Timeline.svg.import create mode 100644 Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs create mode 100644 Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs.uid create mode 100644 Runtime/Extensions/System/DictionaryExtensions.cs create mode 100644 Runtime/Extensions/System/DictionaryExtensions.cs.uid create mode 100644 Runtime/Extensions/System/HashSetExtensions.cs create mode 100644 Runtime/Extensions/System/HashSetExtensions.cs.uid create mode 100644 Runtime/Extensions/System/StringExtensions.cs create mode 100644 Runtime/Extensions/System/StringExtensions.cs.uid create mode 100644 Runtime/Godot/GDGlue.cs create mode 100644 Runtime/Godot/GDGlue.cs.uid create mode 100644 Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs create mode 100644 Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs.uid create mode 100644 Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs create mode 100644 Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs.uid create mode 100644 Runtime/Text/Levenshtein.cs create mode 100644 Runtime/Text/Levenshtein.cs.uid delete mode 100644 Runtime/Time/TimeLines/GameTime.tres delete mode 100644 Runtime/Time/TimeLines/RealTime.tres delete mode 100644 Runtime/Time/TimeLines/UITime.tres create mode 100644 Runtime/Time/TimeTool.cs create mode 100644 Runtime/Time/TimeTool.cs.uid create mode 100644 Runtime/Time/Timelines/Game Time.tres create mode 100644 Runtime/Time/Timelines/Real Time.tres create mode 100644 Runtime/Time/Timelines/UI Time.tres create mode 100644 Runtime/Tools/ListExtensions.cs rename Runtime/Tools/{Lists.cs.uid => ListExtensions.cs.uid} (100%) delete mode 100644 Runtime/Tools/Lists.cs create mode 100644 Runtime/Tools/TypeTools.cs create mode 100644 Runtime/Tools/TypeTools.cs.uid create mode 100644 Tools/core-generation/RokojoriActionCoreFlatten.cs create mode 100644 Tools/core-generation/RokojoriActionCoreFlatten.cs.uid create mode 100644 Tools/core-generation/RokojoriActionCoreGDIgnore.cs create mode 100644 Tools/core-generation/RokojoriActionCoreGDIgnore.cs.uid create mode 100644 Tools/core-generation/RokojoriActionCoreGenericAsString.cs create mode 100644 Tools/core-generation/RokojoriActionCoreGenericAsString.cs.uid rename Tools/core-generation/{RokojoriActionCoreGenerator.cs => RokojoriActionCoreSymbols.cs} (51%) rename Tools/core-generation/{RokojoriActionCoreGenerator.cs.uid => RokojoriActionCoreSymbols.cs.uid} (100%) diff --git a/Icons/TimeLineManager.svg.import b/Icons/TimeLineManager.svg.import index 902e9fa..853a575 100644 --- a/Icons/TimeLineManager.svg.import +++ b/Icons/TimeLineManager.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bujyx7ltsi40k" -path="res://.godot/imported/TimeLineManager.svg-dd6b4ada11f698cccbfe51b895d69a3b.ctex" +path="res://.godot/imported/TimelineManager.svg-deb996f134b015aad25457e6b0de530f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://addons/rokojori_action_library/Icons/TimeLineManager.svg" -dest_files=["res://.godot/imported/TimeLineManager.svg-dd6b4ada11f698cccbfe51b895d69a3b.ctex"] +source_file="res://addons/rokojori_action_library/Icons/TimelineManager.svg" +dest_files=["res://.godot/imported/TimelineManager.svg-deb996f134b015aad25457e6b0de530f.ctex"] [params] diff --git a/Icons/Timeline.svg b/Icons/Timeline.svg new file mode 100644 index 0000000..d8666bb --- /dev/null +++ b/Icons/Timeline.svg @@ -0,0 +1,254 @@ + + diff --git a/Icons/Timeline.svg.import b/Icons/Timeline.svg.import new file mode 100644 index 0000000..f29dd52 --- /dev/null +++ b/Icons/Timeline.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dghmmuwu5hr8e" +path="res://.godot/imported/Timeline.svg-f58e429fe74f50d9853fd6498e486130.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/rokojori_action_library/Icons/Timeline.svg" +dest_files=["res://.godot/imported/Timeline.svg-f58e429fe74f50d9853fd6498e486130.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/RokojoriPlugin.cs b/RokojoriPlugin.cs index ad84a82..fc01528 100644 --- a/RokojoriPlugin.cs +++ b/RokojoriPlugin.cs @@ -5,17 +5,58 @@ using System.Collections.Generic; using System.Globalization; using System; using System.Data; + +#if ! ROKOJORI_ACTION_CORE using Rokojori.Tools; +#endif namespace Rokojori { #if ! TOOLS - [Tool] - public partial class RokojoriPlugin:Node - { + + #if ROKOJORI_ACTION_CORE + [Tool][RokojoriActionCoreExport] + public partial class RokojoriPlugin:EditorPlugin + { + #if ROKOJORI_ACTION_CORE_GD + public static readonly string _path = "res://addons/rokojori_action_code_gd"; + #else + public static readonly string _path = "res://addons/rokojori_action_code_cs"; + #endif - } - #else + public static string Path( string path ) + { + return RokojoriPlugin._path + "/" + path; + } + + public static string GlobalizedPath( string path ) + { + return ProjectSettings.GlobalizePath( Path( path ) ); + } + + static readonly string RokojoriRootAutoLoad = "RokojoriRootAutoLoad"; + + #if ROKOJORI_ACTION_CORE_GD + public static readonly string RokojoriRootAutoLoadPath = Path( "Runtime/Godot/RJ_Root.cs" ); + #else + public static readonly string RokojoriRootAutoLoadPath = Path( "Runtime/Godot/Root.cs" ); + #endif + + + public override void _EnablePlugin() + { + AddAutoloadSingleton( RokojoriRootAutoLoad, RokojoriRootAutoLoadPath ); + } + + public override void _DisablePlugin() + { + RemoveAutoloadSingleton( RokojoriRootAutoLoad ); + } + + } + #endif + + #elif ! ROKOJORI_ACTION_CORE [Tool] public partial class RokojoriPlugin: EditorPlugin { @@ -109,12 +150,9 @@ namespace Rokojori } - static readonly string ProblemsExplorerPath = "res://addons/rokojori_action_library/Tools/Messages/Messages.tscn"; - static Control messages; public override void _EnterTree() { - // _instance = this; EnsureHiddenProjectPath( RokojoriProjectInternalPath ); EnsureHiddenProjectPath( RokojoriSettingsPath ); @@ -126,39 +164,12 @@ namespace Rokojori inspectorTools.rokojoriPlugin = this; inspectorTools.AddPlugins(); - // var pePackedScene = GD.Load( ProblemsExplorerPath ); - - // if ( pePackedScene != null ) - // { - // // this.LogInfo( "Problems Explorer found: ", pePackedScene ); - - // messages = ((PackedScene)pePackedScene).Instantiate(); - - // var ui = messages.Get(); - // ui.BindOwnChildren(); - - - - // var shortCut = new Shortcut(); - // shortCut.Events = [ new InputEventKey{ CtrlPressed = true, Keycode = Key.U } ]; - - // AddControlToDock( DockSlot.RightBr, messages, shortCut ); - // } - // else - // { - // this.LogInfo( "Problems Explorer not found: ", ProblemsExplorerPath ); - // } } public override void _ExitTree() { this.LogInfo(); - if ( messages != null ) - { - RemoveControlFromDocks( messages ); - } - RemoveNode3DGizmoPlugin( gizmoDrawerPlugin ); inspectorTools.rokojoriPlugin = this; @@ -234,10 +245,6 @@ namespace Rokojori editingScene.ForEach( ar => ar.OnAssemblyReloaded() ); - if ( messages != null ) - { - messages.ForEach( ar => ar.OnAssemblyReloaded() ); - } } } diff --git a/Runtime/Actions/Action.cs b/Runtime/Actions/Action.cs index af365d1..c5898b6 100644 --- a/Runtime/Actions/Action.cs +++ b/Runtime/Actions/Action.cs @@ -3,13 +3,19 @@ using Godot; using System.Collections.Generic; using System.IO; +using Rokojori.Extensions; namespace Rokojori; [Tool] [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Action.svg")] [RokojoriActionCoreExport] -public partial class Action : NetworkNode +public abstract partial class Action : NetworkNode { + #if ROKOJORI_ACTION_CORE + protected int networkSeed => 0; + + #endif + public enum ActionTriggerMode { Only_When_Processing_In_Hierarchy, @@ -33,7 +39,7 @@ public partial class Action : NetworkNode #endif [ExportToolButton( "Trigger Action in Editor")] - public Callable TriggerActionButton => Callable.From( ()=> Trigger() ); + public Callable triggerActionButton => Callable.From( ()=> Trigger() ); #if !ROKOJORI_ACTION_CORE @@ -194,7 +200,7 @@ public partial class Action : NetworkNode return _sendingNetworkSeed; } - _sendingNetworkSeed = GodotRandom.Get().IntegerExclusive( 0, maxNetworkSeed ); + _sendingNetworkSeed = GodotRandom.Get().IntegerExclusiveInRange( 0, maxNetworkSeed ); _sendsSeed = true; return _sendingNetworkSeed; diff --git a/Runtime/Actions/ActionList.cs b/Runtime/Actions/ActionList.cs index 4815d1e..3af77a2 100644 --- a/Runtime/Actions/ActionList.cs +++ b/Runtime/Actions/ActionList.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Actions/ActionReference.cs b/Runtime/Actions/ActionReference.cs index 3c09989..a283908 100644 --- a/Runtime/Actions/ActionReference.cs +++ b/Runtime/Actions/ActionReference.cs @@ -2,33 +2,34 @@ using Godot; -namespace Rokojori -{ - [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/ActionReference.svg")] - public partial class ActionReference : Action - { - [Export] - public Action referencedAction; +using Rokojori.Extensions; +namespace Rokojori; - [ExportToolButton( "Set Reference Name" )] - public Callable setReferencedNameButton => Callable.From( - ()=> - { - if ( referencedAction == null ) - { - this.Name = "* (nothing)"; - } - else - { - this.Name = "* " + referencedAction.Name; - } +[RokojoriActionCoreExport] +[Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/ActionReference.svg")] +public partial class ActionReference : Action +{ + [Export] + public Action referencedAction; + + [ExportToolButton( "Set Reference Name" )] + public Callable setReferencedNameButton => Callable.From( + ()=> + { + if ( referencedAction == null ) + { + this.Name = "* (nothing)"; + } + else + { + this.Name = "* " + referencedAction.Name; } - ); - - protected override void _OnTrigger() - { - Action.TriggerSafe( referencedAction ); } - } + ); + + protected override void _OnTrigger() + { + Action.TriggerSafe( referencedAction ); + } +} -} \ No newline at end of file diff --git a/Runtime/Actions/Audio/MusicChannel.cs b/Runtime/Actions/Audio/MusicChannel.cs index 3ab0cd8..68e96e9 100644 --- a/Runtime/Actions/Audio/MusicChannel.cs +++ b/Runtime/Actions/Audio/MusicChannel.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/Actions/Audio/MusicChannelPlayer.cs b/Runtime/Actions/Audio/MusicChannelPlayer.cs index 0693e0c..eefe754 100644 --- a/Runtime/Actions/Audio/MusicChannelPlayer.cs +++ b/Runtime/Actions/Audio/MusicChannelPlayer.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -19,11 +20,11 @@ public partial class MusicChannelPlayer:Node public void TweenVolume( AudioStreamPlayer target, float duration, float toVolume, bool clear, System.Action onReady = null ) { - var tl = TimeLineManager.Ensure( null ); + var tl = TimelineManager.Ensure( null ); var start = tl.position; var fromVolume = target.VolumeLinear; - TimeLineManager.ScheduleSpanIn( tl, 0, duration, + TimelineManager.ScheduleSpanIn( tl, 0, duration, ( span, type )=> { if ( ! GodotObject.IsInstanceValid( target ) ) @@ -34,7 +35,7 @@ public partial class MusicChannelPlayer:Node var lerpedVolume = Mathf.Lerp( fromVolume, toVolume, span.phase ); target.VolumeLinear = lerpedVolume; - if ( type == TimeLineSpanUpdateType.End && clear ) + if ( type == TimelineSpanUpdateType.End && clear ) { if ( clear ) { @@ -71,7 +72,7 @@ public partial class MusicChannelPlayer:Node this.LogInfo( "Playing:", nextMusic ); - var name = FilePath.Absolute( nextMusic.audio.ResourcePath ).fileName; + var name = nextMusic.audio.ResourcePath.ExtractFileName(); var nextPlayer = this.CreateChild( "Player " + name ); nextPlayer.VolumeLinear = 0f; nextPlayer.Stream = nextMusic.audio; diff --git a/Runtime/Actions/Audio/MusicData.cs b/Runtime/Actions/Audio/MusicData.cs index f23b550..4dd700b 100644 --- a/Runtime/Actions/Audio/MusicData.cs +++ b/Runtime/Actions/Audio/MusicData.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -19,7 +20,8 @@ public partial class MusicData: Resource public override string ToString() { var prefix = pitchSemitonesOffset == 0 ? "+/-" : pitchSemitonesOffset > 0 ? "+" : ""; - return "MusicData: " + (100 * volume)._FF() + "% (" + prefix + pitchSemitonesOffset + " st) " + audio.ResourcePath; + var volumeString = ( int) ( 100 * volume); + return "MusicData: " + volumeString+ "% (" + prefix + pitchSemitonesOffset + " st) " + audio.ResourcePath; } } diff --git a/Runtime/Actions/Audio/PlayMusic.cs b/Runtime/Actions/Audio/PlayMusic.cs index 5f1090d..453fef1 100644 --- a/Runtime/Actions/Audio/PlayMusic.cs +++ b/Runtime/Actions/Audio/PlayMusic.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Actions/Audio/ScheduleMusic.cs b/Runtime/Actions/Audio/ScheduleMusic.cs index e726bad..aec71cf 100644 --- a/Runtime/Actions/Audio/ScheduleMusic.cs +++ b/Runtime/Actions/Audio/ScheduleMusic.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/Actions/Audio/TweenMusicVolume.cs b/Runtime/Actions/Audio/TweenMusicVolume.cs index 21b56ce..15ba4cf 100644 --- a/Runtime/Actions/Audio/TweenMusicVolume.cs +++ b/Runtime/Actions/Audio/TweenMusicVolume.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -31,7 +32,7 @@ namespace Rokojori public bool cacheEndPositionOnStart = true; [Export] - public TimeLine timeLine; + public Timeline timeLine; protected override void _OnTrigger() @@ -41,7 +42,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -57,7 +58,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { if ( ! GodotObject.IsInstanceValid( target ) ) @@ -80,7 +81,7 @@ namespace Rokojori target.VolumeDb = lerpedVolume; - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); } diff --git a/Runtime/Actions/Audio/VelocityToSound.cs b/Runtime/Actions/Audio/VelocityToSound.cs index 61f9994..94b7066 100644 --- a/Runtime/Actions/Audio/VelocityToSound.cs +++ b/Runtime/Actions/Audio/VelocityToSound.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Actions/Conditional/ConditionalAction.cs b/Runtime/Actions/Conditional/ConditionalAction.cs index f3f528f..855de2a 100644 --- a/Runtime/Actions/Conditional/ConditionalAction.cs +++ b/Runtime/Actions/Conditional/ConditionalAction.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Conditional/CoolDown.cs b/Runtime/Actions/Conditional/CoolDown.cs index 8fba6e0..4cfff5f 100644 --- a/Runtime/Actions/Conditional/CoolDown.cs +++ b/Runtime/Actions/Conditional/CoolDown.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -35,7 +36,7 @@ namespace Rokojori { _isCoolingDown = coolDownDuration != null; - var te = TimeLineManager.ScheduleEventIn( + var te = TimelineManager.ScheduleEventIn( coolDownDuration.timeLine, coolDownDuration.GetDurationInSeconds(), ev => diff --git a/Runtime/Actions/Conditional/CoolDownRelease.cs b/Runtime/Actions/Conditional/CoolDownRelease.cs index 52e6a19..395c1c2 100644 --- a/Runtime/Actions/Conditional/CoolDownRelease.cs +++ b/Runtime/Actions/Conditional/CoolDownRelease.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/Actions/Conditional/Once.cs b/Runtime/Actions/Conditional/Once.cs index c1758e7..ce5f07d 100644 --- a/Runtime/Actions/Conditional/Once.cs +++ b/Runtime/Actions/Conditional/Once.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Conditional/RegisterCoolDown.cs b/Runtime/Actions/Conditional/RegisterCoolDown.cs index 4603b54..52c0df8 100644 --- a/Runtime/Actions/Conditional/RegisterCoolDown.cs +++ b/Runtime/Actions/Conditional/RegisterCoolDown.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Conditional/ResetCoolDown.cs b/Runtime/Actions/Conditional/ResetCoolDown.cs index e2d75c2..cd8e32f 100644 --- a/Runtime/Actions/Conditional/ResetCoolDown.cs +++ b/Runtime/Actions/Conditional/ResetCoolDown.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/GDScriptAction.cs b/Runtime/Actions/GDScriptAction.cs index edf47e4..626bd7d 100644 --- a/Runtime/Actions/GDScriptAction.cs +++ b/Runtime/Actions/GDScriptAction.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/GDScriptSequenceAction.cs b/Runtime/Actions/GDScriptSequenceAction.cs index 6dff0bd..d1bdf09 100644 --- a/Runtime/Actions/GDScriptSequenceAction.cs +++ b/Runtime/Actions/GDScriptSequenceAction.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/IterateActions.cs b/Runtime/Actions/IterateActions.cs index 9d0eb92..9777732 100644 --- a/Runtime/Actions/IterateActions.cs +++ b/Runtime/Actions/IterateActions.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] @@ -21,7 +22,7 @@ namespace Rokojori return; } - iterationIndex = MathX.Repeat( iterationIndex, num ); + iterationIndex = MathX.RepeatInt( iterationIndex, num ); Action.TriggerSafe( this.GetNthDirectChild( iterationIndex ) ); diff --git a/Runtime/Actions/LoadScene.cs b/Runtime/Actions/LoadScene.cs index 110fb61..f703b9f 100644 --- a/Runtime/Actions/LoadScene.cs +++ b/Runtime/Actions/LoadScene.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Actions/LogMessage.cs b/Runtime/Actions/LogMessage.cs index ebccdf3..2844178 100644 --- a/Runtime/Actions/LogMessage.cs +++ b/Runtime/Actions/LogMessage.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Node/SetNodeState.cs b/Runtime/Actions/Node/SetNodeState.cs index 9bb46f9..d5028c8 100644 --- a/Runtime/Actions/Node/SetNodeState.cs +++ b/Runtime/Actions/Node/SetNodeState.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SetNodeState.svg")] diff --git a/Runtime/Actions/Node/SetNodeStateSpecific.cs b/Runtime/Actions/Node/SetNodeStateSpecific.cs index b877358..d182ca2 100644 --- a/Runtime/Actions/Node/SetNodeStateSpecific.cs +++ b/Runtime/Actions/Node/SetNodeStateSpecific.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SetNodeState.svg")] @@ -20,7 +21,7 @@ namespace Rokojori void SetNodeState() { - NodeState.Configure( target, configuration ); + NodeState.ConfigureWith( target, configuration ); } } diff --git a/Runtime/Actions/Node/SetPhysicsState.cs b/Runtime/Actions/Node/SetPhysicsState.cs index 66e8104..af2e740 100644 --- a/Runtime/Actions/Node/SetPhysicsState.cs +++ b/Runtime/Actions/Node/SetPhysicsState.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SetNodeState.svg")] @@ -60,7 +61,7 @@ namespace Rokojori var enbled = state == PhysicsState.Physics_Enabled; var trillian = enbled ? Trillean.True : Trillean.False; - NodeState.Configure( physicsBody, + NodeState.PartialConfigure( physicsBody, trillian, trillian, trillian, trillian, Trillean.Any, false, ProcessModeEnum.Inherit ); diff --git a/Runtime/Actions/Node3D/CopyMousePosition.cs b/Runtime/Actions/Node3D/CopyMousePosition.cs index d474a4b..207e901 100644 --- a/Runtime/Actions/Node3D/CopyMousePosition.cs +++ b/Runtime/Actions/Node3D/CopyMousePosition.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Node3D/CopyPose.cs b/Runtime/Actions/Node3D/CopyPose.cs index dcc437d..f9b8f3a 100644 --- a/Runtime/Actions/Node3D/CopyPose.cs +++ b/Runtime/Actions/Node3D/CopyPose.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Node3D/CopyPosition.cs b/Runtime/Actions/Node3D/CopyPosition.cs index 868c954..e4977f9 100644 --- a/Runtime/Actions/Node3D/CopyPosition.cs +++ b/Runtime/Actions/Node3D/CopyPosition.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass, Tool ] diff --git a/Runtime/Actions/Node3D/CopyPositionXZ.cs b/Runtime/Actions/Node3D/CopyPositionXZ.cs index fcc073c..b6e7aa7 100644 --- a/Runtime/Actions/Node3D/CopyPositionXZ.cs +++ b/Runtime/Actions/Node3D/CopyPositionXZ.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass, Tool ] diff --git a/Runtime/Actions/Node3D/CopyRotation.cs b/Runtime/Actions/Node3D/CopyRotation.cs index c8a9068..6683db0 100644 --- a/Runtime/Actions/Node3D/CopyRotation.cs +++ b/Runtime/Actions/Node3D/CopyRotation.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass, Tool ] diff --git a/Runtime/Actions/Node3D/CopyYaw.cs b/Runtime/Actions/Node3D/CopyYaw.cs index 4eaf05c..8422c81 100644 --- a/Runtime/Actions/Node3D/CopyYaw.cs +++ b/Runtime/Actions/Node3D/CopyYaw.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Node3D/CopyYawFromDirection.cs b/Runtime/Actions/Node3D/CopyYawFromDirection.cs index fe0ee91..f7a536c 100644 --- a/Runtime/Actions/Node3D/CopyYawFromDirection.cs +++ b/Runtime/Actions/Node3D/CopyYawFromDirection.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Node3D/DistributeChildren.cs b/Runtime/Actions/Node3D/DistributeChildren.cs index 7428e4d..1e3e585 100644 --- a/Runtime/Actions/Node3D/DistributeChildren.cs +++ b/Runtime/Actions/Node3D/DistributeChildren.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass, Tool ] diff --git a/Runtime/Actions/Node3D/LerpPosition.cs b/Runtime/Actions/Node3D/LerpPosition.cs index ace1046..9b7def8 100644 --- a/Runtime/Actions/Node3D/LerpPosition.cs +++ b/Runtime/Actions/Node3D/LerpPosition.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Node3D/LookAt.cs b/Runtime/Actions/Node3D/LookAt.cs index 80d74e1..8de554b 100644 --- a/Runtime/Actions/Node3D/LookAt.cs +++ b/Runtime/Actions/Node3D/LookAt.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass, Tool ] diff --git a/Runtime/Actions/Node3D/MoveTo.cs b/Runtime/Actions/Node3D/MoveTo.cs index df2203e..67d5b85 100644 --- a/Runtime/Actions/Node3D/MoveTo.cs +++ b/Runtime/Actions/Node3D/MoveTo.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] @@ -36,8 +37,8 @@ namespace Rokojori var startPosition = target.GlobalPosition; - _currentSpanAnimationID = TimeLineManager.ScheduleSpanIn( duration.timeLine, 0, duration.GetDurationInSeconds(), - ( TimeLineSpan span, TimeLineSpanUpdateType type )=> + _currentSpanAnimationID = TimelineManager.ScheduleSpanIn( duration.timeLine, 0, duration.GetDurationInSeconds(), + ( TimelineSpan span, TimelineSpanUpdateType type )=> { if ( span.id != _currentSpanAnimationID ) { @@ -52,7 +53,7 @@ namespace Rokojori target.GlobalPosition = startPosition.Lerp( goal.GlobalPosition, span.phase );; - if ( TimeLineSpanUpdateType.End == type ) + if ( TimelineSpanUpdateType.End == type ) { AnimationManager.EndAnimation( this, target, AnimationMember.Position ); diff --git a/Runtime/Actions/Node3D/MoveTowards.cs b/Runtime/Actions/Node3D/MoveTowards.cs index d97f9d4..d6b2a89 100644 --- a/Runtime/Actions/Node3D/MoveTowards.cs +++ b/Runtime/Actions/Node3D/MoveTowards.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Node3D/OnCollision.cs b/Runtime/Actions/Node3D/OnCollision.cs index 6a6d42e..e368e15 100644 --- a/Runtime/Actions/Node3D/OnCollision.cs +++ b/Runtime/Actions/Node3D/OnCollision.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -93,7 +94,7 @@ namespace Rokojori return; } - var tm = Unique.Get(); + var tm = Unique.Get(); if ( tm == null ) { @@ -129,7 +130,7 @@ namespace Rokojori return; } - var tm = Unique.Get(); + var tm = Unique.Get(); if ( tm == null ) { diff --git a/Runtime/Actions/Node3D/PlayParticles.cs b/Runtime/Actions/Node3D/PlayParticles.cs index 6104cb0..61efdbc 100644 --- a/Runtime/Actions/Node3D/PlayParticles.cs +++ b/Runtime/Actions/Node3D/PlayParticles.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/PlayParticles.svg")] @@ -17,7 +18,7 @@ namespace Rokojori public float godotFinishedReporingBugOffset = 0.2f; [Export] - public TimeLine timeLine; + public Timeline timeLine; List _pool = new List(); List _emitting = new List(); @@ -60,7 +61,7 @@ namespace Rokojori return; } - TimeLineManager.ScheduleEventIn( + TimelineManager.ScheduleEventIn( timeLine, godotFinishedReporingBugOffset, t => _emitting[ index ] = false diff --git a/Runtime/Actions/Node3D/PlaySound.cs b/Runtime/Actions/Node3D/PlaySound.cs index 48f693e..14eb702 100644 --- a/Runtime/Actions/Node3D/PlaySound.cs +++ b/Runtime/Actions/Node3D/PlaySound.cs @@ -2,8 +2,10 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { + [RokojoriActionCoreExport] [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/PlaySound.svg")] public partial class PlaySound:Action { @@ -48,7 +50,7 @@ namespace Rokojori public bool generatePools = true; - List players = new List(); + List players = []; AudioStreamPlayer3D _cached = null; @@ -126,7 +128,7 @@ namespace Rokojori var length = player.Stream.GetLength(); var numOffsets = Mathf.FloorToInt( length / durationPerSound.GetDurationInSeconds() ); - var randomIndex = random.IntegerExclusive( numOffsets ); + var randomIndex = random.IntegerExclusivePositive( numOffsets ); offset = randomIndex * durationPerSound.GetDurationInSeconds(); // this.LogInfo( "Offset", numOffsets, randomIndex, offset ); @@ -143,12 +145,12 @@ namespace Rokojori if ( audioManager != null && randomizePlaybackPosition ) { - var tl = TimeLineManager.Ensure( durationPerSound.timeLine ); + var tl = TimelineManager.Ensure( durationPerSound.timeLine ); var start = tl.position; var stopDuration = ( durationPerSound.GetDurationInSeconds() - audioManager.data.bufferCutDuration * cutBufferLengths ) / player.PitchScale; - TimeLineManager.ScheduleSpanIn( durationPerSound.timeLine, 0, stopDuration, + TimelineManager.ScheduleSpanIn( durationPerSound.timeLine, 0, stopDuration, ( span, type )=> { var timeNow = tl.position; @@ -156,7 +158,7 @@ namespace Rokojori var phase = span.phase; - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { player.Stop(); player.Playing = false; diff --git a/Runtime/Actions/Node3D/SetScreenTransform.cs b/Runtime/Actions/Node3D/SetScreenTransform.cs index 8d10e8e..39efbbf 100644 --- a/Runtime/Actions/Node3D/SetScreenTransform.cs +++ b/Runtime/Actions/Node3D/SetScreenTransform.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Node3D/SetTransform.cs b/Runtime/Actions/Node3D/SetTransform.cs index f97a98e..ae13b6f 100644 --- a/Runtime/Actions/Node3D/SetTransform.cs +++ b/Runtime/Actions/Node3D/SetTransform.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass, Tool ] diff --git a/Runtime/Actions/Node3D/SetVector3FromNodePosition.cs b/Runtime/Actions/Node3D/SetVector3FromNodePosition.cs index 6d1aad7..ade560f 100644 --- a/Runtime/Actions/Node3D/SetVector3FromNodePosition.cs +++ b/Runtime/Actions/Node3D/SetVector3FromNodePosition.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass, Tool ] diff --git a/Runtime/Actions/Node3D/TweenAudio.cs b/Runtime/Actions/Node3D/TweenAudio.cs index d614a97..c9095e6 100644 --- a/Runtime/Actions/Node3D/TweenAudio.cs +++ b/Runtime/Actions/Node3D/TweenAudio.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -33,7 +34,7 @@ namespace Rokojori public bool cacheEndVolumeOnStart = true; [Export] - public TimeLine timeLine; + public Timeline timeLine; public void OnAnimatorStart(){} @@ -69,7 +70,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -95,7 +96,7 @@ namespace Rokojori AnimationManager.StartAnimation( this, target, AnimationMember.VolumeDB ); - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { if ( ! AnimationManager.IsAnimating( this, target, AnimationMember.VolumeDB ) ) @@ -119,7 +120,7 @@ namespace Rokojori // this.LogInfo( "Volume", lerpedVolume ); - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); diff --git a/Runtime/Actions/OnPhysicsProcess.cs b/Runtime/Actions/OnPhysicsProcess.cs index ddb1a0c..917b215 100644 --- a/Runtime/Actions/OnPhysicsProcess.cs +++ b/Runtime/Actions/OnPhysicsProcess.cs @@ -2,22 +2,23 @@ using Godot; -namespace Rokojori -{ - [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] - public partial class OnPhysicsProcess : Node - { - /** Actions to execute*/ - [Export] - public Action[] actions = new Action[ 0 ]; +using Rokojori.Extensions; +namespace Rokojori; - /** Whether to execute Action child nodes*/ - [Export] - public bool triggerDirectChildren = true; +[RokojoriActionCoreExport] +[Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] +public partial class OnPhysicsProcess : Node +{ + /** Actions to execute*/ + [Export] + public Action[] actions = new Action[ 0 ]; - public override void _PhysicsProcess( double delta ) - { - Action.TriggerAllActions( actions, this, triggerDirectChildren ); - } + /** Whether to execute Action child nodes*/ + [Export] + public bool triggerDirectChildren = true; + + public override void _PhysicsProcess( double delta ) + { + Action.TriggerAllActions( actions, this, triggerDirectChildren ); } -} \ No newline at end of file +} diff --git a/Runtime/Actions/OnProcess.cs b/Runtime/Actions/OnProcess.cs index 7377c86..ce48cec 100644 --- a/Runtime/Actions/OnProcess.cs +++ b/Runtime/Actions/OnProcess.cs @@ -2,30 +2,31 @@ using Godot; -namespace Rokojori -{ - [GlobalClass, Tool, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] - public partial class OnProcess : Node - { - /** Actions to execute*/ - [Export] - public Action[] actions = new Action[ 0 ]; +using Rokojori.Extensions; +namespace Rokojori; - /** Whether to execute Action child nodes*/ - [Export] - public bool triggerDirectChildren = true; - - [Export] - public bool executeInEditor = false; +[RokojoriActionCoreExport] +[GlobalClass, Tool, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] +public partial class OnProcess : Node +{ + /** Actions to execute*/ + [Export] + public Action[] actions = new Action[ 0 ]; - public override void _Process( double delta ) - { - if ( Engine.IsEditorHint() && ! executeInEditor ) - { - return; - } + /** Whether to execute Action child nodes*/ + [Export] + public bool triggerDirectChildren = true; + + [Export] + public bool executeInEditor = false; - Action.TriggerAllActions( actions, this, triggerDirectChildren ); + public override void _Process( double delta ) + { + if ( Engine.IsEditorHint() && ! executeInEditor ) + { + return; } + + Action.TriggerAllActions( actions, this, triggerDirectChildren ); } -} \ No newline at end of file +} diff --git a/Runtime/Actions/OnReady.cs b/Runtime/Actions/OnReady.cs index f58b6a5..68eaaf7 100644 --- a/Runtime/Actions/OnReady.cs +++ b/Runtime/Actions/OnReady.cs @@ -2,30 +2,38 @@ using Godot; -namespace Rokojori -{ - [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] - public partial class OnReady : Node - { - /** Actions to execute*/ - [Export] - public Action[] actions = new Action[ 0 ]; +using Rokojori.Extensions; +namespace Rokojori; - /** Whether to execute Action child nodes*/ - [Export] - public bool triggerDirectChildren = true; +[RokojoriActionCoreExport] +[Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] +public partial class OnReady : Node +{ + /** Actions to execute*/ + [Export] + public Action[] actions = new Action[ 0 ]; - [Export] - public bool triggerInsideEditor = false; + /** Whether to execute Action child nodes*/ + [Export] + public bool triggerDirectChildren = true; - public override void _Ready() - { - if ( Engine.IsEditorHint() && ! triggerInsideEditor ) - { - return; - } + [Export] + public bool triggerInsideEditor = false; - Action.TriggerAllActions( actions, this, triggerDirectChildren ); + public Action.ActionTriggerMode additionalMode = Action.ActionTriggerMode.Always; + public Trillean someTrillean = Trillean.False; + + public override void _Ready() + { + additionalMode = Action.ActionTriggerMode.Only_When_Processing_In_Hierarchy; + + var nas = Trillean.Any; + + if ( Engine.IsEditorHint() && ! triggerInsideEditor ) + { + return; } + + Action.TriggerAllActions( actions, this, triggerDirectChildren ); } -} \ No newline at end of file +} diff --git a/Runtime/Actions/OnTick.cs b/Runtime/Actions/OnTick.cs index 9e3ea04..0cce0cb 100644 --- a/Runtime/Actions/OnTick.cs +++ b/Runtime/Actions/OnTick.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -66,10 +67,10 @@ namespace Rokojori if ( _eventID != -1 ) { - TimeLineManager.RemoveEvent( timeLine, _eventID ); + TimelineManager.RemoveEvent( timeLine, _eventID ); } - var tle = TimeLineManager.ScheduleLoopEvent( timeLine, duration, offset, tle => Action.TriggerSafe( action ) ); + var tle = TimelineManager.ScheduleLoopEvent( timeLine, duration, offset, tle => Action.TriggerSafe( action ) ); _eventID = tle.id; } @@ -83,7 +84,7 @@ namespace Rokojori } - TimeLineManager.RemoveEvent( timeLine, _eventID ); + TimelineManager.RemoveEvent( timeLine, _eventID ); _eventID = -1; diff --git a/Runtime/Actions/Physics/SetCollisionShape.cs b/Runtime/Actions/Physics/SetCollisionShape.cs index f2e6478..d67487d 100644 --- a/Runtime/Actions/Physics/SetCollisionShape.cs +++ b/Runtime/Actions/Physics/SetCollisionShape.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass,Tool] diff --git a/Runtime/Actions/QuitApp.cs b/Runtime/Actions/QuitApp.cs index 50d9a05..6d786d9 100644 --- a/Runtime/Actions/QuitApp.cs +++ b/Runtime/Actions/QuitApp.cs @@ -2,15 +2,16 @@ using Godot; -namespace Rokojori -{ - [Tool][GlobalClass] - public partial class QuitApp : Action - { - protected override void _OnTrigger() - { - this.LogInfo( "Quitting" ); - GetTree().Quit(); - } +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +[Tool][GlobalClass] +public partial class QuitApp : Action +{ + protected override void _OnTrigger() + { + this.LogInfo( "Quitting" ); + GetTree().Quit(); } -} \ No newline at end of file +} diff --git a/Runtime/Actions/RemoveChildNodes.cs b/Runtime/Actions/RemoveChildNodes.cs index 2febb23..4fed9d2 100644 --- a/Runtime/Actions/RemoveChildNodes.cs +++ b/Runtime/Actions/RemoveChildNodes.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Actions/RemoveNode.cs b/Runtime/Actions/RemoveNode.cs index 6fa7b57..7c65754 100644 --- a/Runtime/Actions/RemoveNode.cs +++ b/Runtime/Actions/RemoveNode.cs @@ -2,6 +2,7 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/RemoveNode.svg")] diff --git a/Runtime/Actions/Sequence/CancelSequenceAction.cs b/Runtime/Actions/Sequence/CancelSequenceAction.cs index fe0718f..6d28cff 100644 --- a/Runtime/Actions/Sequence/CancelSequenceAction.cs +++ b/Runtime/Actions/Sequence/CancelSequenceAction.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/Sequence/Parallel.cs b/Runtime/Actions/Sequence/Parallel.cs index 337eac7..4bea2d1 100644 --- a/Runtime/Actions/Sequence/Parallel.cs +++ b/Runtime/Actions/Sequence/Parallel.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Parallel.svg") ] @@ -30,31 +31,36 @@ namespace Rokojori public bool errorsCountAsFinished = false; + Dictionary numFinished = new Dictionary(); + Dictionary running = new Dictionary(); + protected override void _OnTrigger() { - var actions = new List( this.actions ); + var allActions = new List( this.actions ); if ( triggerDirectChildren ) { - Nodes.ForEachDirectChild( this, a => actions.Add( a ) ); + Nodes.ForEachDirectChild( this, a => allActions.Add( a ) ); } - var sequenceActions = Lists.FilterAndMap( actions, ( a, i ) => a is SequenceAction, a => (SequenceAction) a ); + var sequenceActions = ListExtensions.FilterType( allActions); var sequenceID = DispatchStart(); - if ( ! ignoreNonSequenceActions && sequenceActions.Count != actions.Count && Mode.First_Finishes_Sequence == mode ) + if ( ! ignoreNonSequenceActions && sequenceActions.Count != allActions.Count && Mode.First_Finishes_Sequence == mode ) { - actions.ForEach( a => Action.TriggerSafe( a ) ); + allActions.ForEach( a => Action.TriggerSafe( a ) ); DispatchEnd( sequenceID ); return; } - - var numFinished = 0; - var running = true; + numFinished[ sequenceID ] = 0; + running[ sequenceID ] = true; + + // var numFinished = 0; + // var running = true; sequenceActions.ForEach( sa => @@ -64,27 +70,27 @@ namespace Rokojori { // this.LogInfo( "Sequence Action finished:", HierarchyName.Of( sa ) ); - if ( ! running ) + if ( ! running.ContainsKey( sequenceID ) ) { return; } if ( fe.success || errorsCountAsFinished ) { - numFinished ++; + numFinished[ sequenceID ] = numFinished[ sequenceID ] + 1; if ( Mode.First_Finishes_Sequence == mode ) { - running = false; + running.Remove( sequenceID ); // this.LogInfo( "DispatchEnd for First_Finishes_Sequence" ); DispatchEnd( sequenceID ); } else if ( Mode.Wait_For_All_To_Finish == mode ) { - if ( numFinished == sequenceActions.Count ) + if ( numFinished[ sequenceID ] == sequenceActions.Count ) { - running = false; + running.Remove( sequenceID ); // this.LogInfo( "DispatchEnd for Wait_For_All_To_Finish" ); DispatchEnd( sequenceID ); } @@ -92,7 +98,7 @@ namespace Rokojori } else { - running = false; + running.Remove( sequenceID ); // this.LogInfo( "DispatchCancelled for Wait_For_All_To_Finish" ); DispatchCancelled( sequenceID ); } @@ -101,7 +107,7 @@ namespace Rokojori } ); - actions.ForEach( a => Action.TriggerSafe( a ) ); + allActions.ForEach( a => Action.TriggerSafe( a ) ); } } } \ No newline at end of file diff --git a/Runtime/Actions/Sequence/RepeatSequence.cs b/Runtime/Actions/Sequence/RepeatSequence.cs index ead825e..f68c05b 100644 --- a/Runtime/Actions/Sequence/RepeatSequence.cs +++ b/Runtime/Actions/Sequence/RepeatSequence.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { @@ -19,7 +20,7 @@ namespace Rokojori public float maxRepeatDuration = 60; [Export] - public TimeLine timeLine; + public Timeline timeLine; bool stopSignal = false; @@ -43,7 +44,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); if ( maxNumRepeats <= 0 && ( tl == null || maxRepeatDuration <= 0 ) ) { @@ -63,7 +64,7 @@ namespace Rokojori public class RepeatSequenceRunner { public RepeatSequence repeatSequence; - public TimeLine timeLine; + public Timeline timeLine; public int sequenceID; public int maxRepeats = 0; public int started = 0; @@ -74,7 +75,7 @@ namespace Rokojori { this.repeatSequence = repeatSequence; this.sequenceID = id; - timeLine = TimeLineManager.Ensure( repeatSequence.timeLine ); + timeLine = TimelineManager.Ensure( repeatSequence.timeLine ); startTime = timeLine.position; endTime = startTime + repeatSequence.maxRepeatDuration; maxRepeats = repeatSequence.maxNumRepeats; diff --git a/Runtime/Actions/Sequence/Sequence.cs b/Runtime/Actions/Sequence/Sequence.cs index b6e6cfb..ce8259e 100644 --- a/Runtime/Actions/Sequence/Sequence.cs +++ b/Runtime/Actions/Sequence/Sequence.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { @@ -227,7 +228,7 @@ namespace Rokojori Nodes.ForEachDirectChild( this, a => run.actions.Add( a ) ); } - run.sequencables = Lists.FilterType( run.actions ); + run.sequencables = ListExtensions.FilterType( run.actions ); diff --git a/Runtime/Actions/Sequence/SequenceAction.cs b/Runtime/Actions/Sequence/SequenceAction.cs index 8c62da0..d3658ae 100644 --- a/Runtime/Actions/Sequence/SequenceAction.cs +++ b/Runtime/Actions/Sequence/SequenceAction.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { @@ -10,13 +11,7 @@ namespace Rokojori [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SequenceAction.svg")] [RokojoriActionCoreExport] public abstract partial class SequenceAction : Action - { - public class FinishedEvent - { - public int id; - public bool success; - } - + { [ExportGroup("Debugging")] [ExportToolButton("Clear Listeners")] public Callable clearListeners => Callable.From( @@ -41,10 +36,13 @@ namespace Rokojori return _dispatchCounter; } - public readonly EventSlot onSequenceDone = new EventSlot(); + public readonly EventSlot onSequenceDone = new EventSlot(); + + public int DispatchStart() { + _dispatchCounter ++; if ( showRunningSequences ) @@ -61,7 +59,7 @@ namespace Rokojori { _running.Remove( id ); - var ev = new SequenceAction.FinishedEvent{ id = id, success = true }; + var ev = new SequenceActionFinishedEvent{ id = id, success = true }; onSequenceDone.DispatchEvent( ev ); if ( showRunningSequences ) @@ -76,7 +74,7 @@ namespace Rokojori { _running.Remove( id ); - var ev = new SequenceAction.FinishedEvent{ id = id, success = true }; + var ev = new SequenceActionFinishedEvent{ id = id, success = true }; onSequenceDone.DispatchEvent( ev ); if ( showRunningSequences ) @@ -89,14 +87,10 @@ namespace Rokojori public virtual void CancelAllRunning() { - var runningList = _running.ToArray(); - - runningList.ForEach( - ( id )=> - { - CancelAction( id ); - } - ); + foreach ( var r in _running ) + { + CancelAction( r ); + } } public virtual void CancelAction( int id ) diff --git a/Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs b/Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs new file mode 100644 index 0000000..03bc631 --- /dev/null +++ b/Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs @@ -0,0 +1,13 @@ + +using Godot; +using System.Collections.Generic; +using System.Linq; + +using Rokojori.Extensions; +namespace Rokojori; + +public class SequenceActionFinishedEvent +{ + public int id; + public bool success; +} \ No newline at end of file diff --git a/Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs.uid b/Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs.uid new file mode 100644 index 0000000..957d817 --- /dev/null +++ b/Runtime/Actions/Sequence/SequenceActionFinishedEvent.cs.uid @@ -0,0 +1 @@ +uid://k3685pvc4n6h diff --git a/Runtime/Actions/Sequence/SequenceActionReference.cs b/Runtime/Actions/Sequence/SequenceActionReference.cs index ccfd189..5f390cc 100644 --- a/Runtime/Actions/Sequence/SequenceActionReference.cs +++ b/Runtime/Actions/Sequence/SequenceActionReference.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SequenceActionReference.svg")] @@ -35,7 +36,7 @@ namespace Rokojori var ownID = DispatchStart(); var referenceID = -1; - System.Action callback = ( se )=> + System.Action callback = ( se )=> { if ( se.id != referenceID ) { diff --git a/Runtime/Actions/Sequence/SequenceRunner.cs b/Runtime/Actions/Sequence/SequenceRunner.cs index 6befde1..adef28d 100644 --- a/Runtime/Actions/Sequence/SequenceRunner.cs +++ b/Runtime/Actions/Sequence/SequenceRunner.cs @@ -6,187 +6,187 @@ using System; using Godot; -namespace Rokojori -{ - public class SequenceRunner +using Rokojori.Extensions; +namespace Rokojori; + +public class SequenceRunner +{ + public Sequence sequence; + public List actions; + public List sequencables; + public int sequencablesIndex = 0; + bool cancelled = false; + bool cancelledSequence = false; + + + int _runID = -1; + + SequenceAction _runningAction; + int _runningActionID = -1; + + public void Cancel() { - public Sequence sequence; - public List actions; - public List sequencables; - public int sequencablesIndex = 0; - bool cancelled = false; - bool cancelledSequence = false; - - - int _runID = -1; - - SequenceAction _runningAction; - int _runningActionID = -1; - - public void Cancel() + if ( cancelled || _runningAction == null ) { - if ( cancelled || _runningAction == null ) - { - return; - } + return; + } + cancelled = true; + _runningAction.CancelAction( _runningActionID ); + } + + void CancelRun() + { + if ( cancelledSequence ) + { + return; + } + + if ( ! cancelled ) + { cancelled = true; - _runningAction.CancelAction( _runningActionID ); } - void CancelRun() + cancelledSequence = true; + sequence.DispatchCancelled( _runID ); + sequence.ClearRun( this ); + } + + + public void ProcessNext() + { + // RJLog.Log( "@" + sequence.Name, "Index:", sequencablesIndex ); + + if ( sequencablesIndex == 0 ) { - if ( cancelledSequence ) + _runID = sequence.DispatchStart(); + + if ( sequencables.Count == 0 ) { - return; - } - - if ( ! cancelled ) - { - cancelled = true; - } - - cancelledSequence = true; - sequence.DispatchCancelled( _runID ); - sequence.ClearRun( this ); - } - - - public void ProcessNext() - { - // RJLog.Log( "@" + sequence.Name, "Index:", sequencablesIndex ); - - if ( sequencablesIndex == 0 ) - { - _runID = sequence.DispatchStart(); - - if ( sequencables.Count == 0 ) - { - actions.ForEach( a => Action.TriggerSafe( a ) ); - sequence.DispatchEnd( _runID ); - sequence.ClearRun( this ); - return; - } - } - - if ( sequencablesIndex >= sequencables.Count ) - { - TriggerAllAfter( sequencables[ sequencables.Count -1 ] ); + actions.ForEach( a => Action.TriggerSafe( a ) ); sequence.DispatchEnd( _runID ); sequence.ClearRun( this ); return; } + } - if ( cancelled ) + if ( sequencablesIndex >= sequencables.Count ) + { + TriggerAllAfter( sequencables[ sequencables.Count -1 ] ); + sequence.DispatchEnd( _runID ); + sequence.ClearRun( this ); + return; + } + + if ( cancelled ) + { + CancelRun(); + return; + } + + + var sequenceAction = sequencables[ sequencablesIndex ]; + StartAction( sequenceAction ); + } + + Dictionary> callbacks = + new Dictionary>(); + + void StartAction( SequenceAction action ) + { + var capturedAction = action; + + System.Action callback = + ( SequenceActionFinishedEvent ev ) => + { + + + //RJLog.Log( "On Done", id, success ); + + if ( ev.id != _runningActionID ) + { + // RJLog.Error( "Invalid ID", id, "!=", _runningActionID ); + return; + } + + _runningActionID = -1; + + if ( ev.success ) + { + sequencablesIndex ++; + ProcessNext(); + } + else + { + sequence.DispatchCancelled( _runID ); + sequence.ClearRun( this ); + } + + var callbackReference = callbacks[ capturedAction ]; + capturedAction.onSequenceDone.RemoveAction( callbackReference ); + + callbacks.Remove( capturedAction ); + }; + + RunNext( action, callback ); + + /* + _runningAction = action; + callbacks[ _runningAction ] = callback; + _runningAction.OnSequenceDone += callback; + TriggerAllBefore( _runningAction ); + Action.Trigger( _runningAction ); + _runningActionID = _runningAction.GetLastSequenceActionID(); + */ + } + + void RunNext( SequenceAction action, System.Action callback ) + { + _runningAction = action; + callbacks[ _runningAction ] = callback; + _runningAction.onSequenceDone.AddAction( callback ); + + + TriggerAllBefore( _runningAction ); + Action.TriggerSafe( _runningAction ); + _runningActionID = _runningAction.GetLastSequenceActionID(); + } + + void TriggerAllBefore( SequenceAction action ) + { + var actionIndex = actions.IndexOf( action ); + + for ( int i = actionIndex - 1; i >= 0; i -- ) + { + if ( TypeTools.IsOfType( actions[ i ] ) ) { - CancelRun(); return; - } - - - var sequenceAction = sequencables[ sequencablesIndex ]; - StartAction( sequenceAction ); - } - - Dictionary> callbacks = - new Dictionary>(); - - void StartAction( SequenceAction action ) - { - var capturedAction = action; - - System.Action callback = - ( SequenceAction.FinishedEvent ev ) => - { - - - //RJLog.Log( "On Done", id, success ); - - if ( ev.id != _runningActionID ) - { - // RJLog.Error( "Invalid ID", id, "!=", _runningActionID ); - return; - } - - _runningActionID = -1; - - if ( ev.success ) - { - sequencablesIndex ++; - ProcessNext(); - } - else - { - sequence.DispatchCancelled( _runID ); - sequence.ClearRun( this ); - } - - var callbackReference = callbacks[ capturedAction ]; - capturedAction.onSequenceDone.RemoveAction( callbackReference ); - - callbacks.Remove( capturedAction ); - }; - - RunNext( action, callback ); - - /* - _runningAction = action; - callbacks[ _runningAction ] = callback; - _runningAction.OnSequenceDone += callback; - TriggerAllBefore( _runningAction ); - Action.Trigger( _runningAction ); - _runningActionID = _runningAction.GetLastSequenceActionID(); - */ - } - - void RunNext( SequenceAction action, System.Action callback ) - { - _runningAction = action; - callbacks[ _runningAction ] = callback; - _runningAction.onSequenceDone.AddAction( callback ); - - - TriggerAllBefore( _runningAction ); - Action.TriggerSafe( _runningAction ); - _runningActionID = _runningAction.GetLastSequenceActionID(); - } - - void TriggerAllBefore( SequenceAction action ) - { - var actionIndex = actions.IndexOf( action ); - - for ( int i = actionIndex - 1; i >= 0; i -- ) - { - if ( typeof( SequenceAction ).IsAssignableFrom( actions[ i ].GetType() ) ) - { - return; - } - - // RJLog.Log( _runID, "Triggering Actions Before", i, actions[ i ].Name, HierarchyName.Of( action ) ); - - Action.TriggerSafe( actions[ i ] ); } - + + // RJLog.Log( _runID, "Triggering Actions Before", i, actions[ i ].Name, HierarchyName.Of( action ) ); + + Action.TriggerSafe( actions[ i ] ); } + + } - void TriggerAllAfter( SequenceAction action ) - { - var actionIndex = actions.IndexOf( action ); + void TriggerAllAfter( SequenceAction action ) + { + var actionIndex = actions.IndexOf( action ); - for ( int i = actionIndex + 1; i < actions.Count; i ++ ) - { - if ( typeof( SequenceAction ).IsAssignableFrom( actions[ i ].GetType() ) ) - { - return; - } - - // RJLog.Log( "Triggering Action", actions[ i ].Name ); - Action.TriggerSafe( actions[ i ] ); + for ( int i = actionIndex + 1; i < actions.Count; i ++ ) + { + if ( TypeTools.IsOfType( actions[ i ] ) ) + { + return; } - + + // RJLog.Log( "Triggering Action", actions[ i ].Name ); + Action.TriggerSafe( actions[ i ] ); } + + } - } +} -} \ No newline at end of file diff --git a/Runtime/Actions/Sequence/StopRepeatSequence.cs b/Runtime/Actions/Sequence/StopRepeatSequence.cs index 66232f6..7282c3d 100644 --- a/Runtime/Actions/Sequence/StopRepeatSequence.cs +++ b/Runtime/Actions/Sequence/StopRepeatSequence.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Parallel.svg") ] diff --git a/Runtime/Actions/SetPauseState.cs b/Runtime/Actions/SetPauseState.cs index 81dc082..7b478fc 100644 --- a/Runtime/Actions/SetPauseState.cs +++ b/Runtime/Actions/SetPauseState.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] diff --git a/Runtime/Actions/SetTick.cs b/Runtime/Actions/SetTick.cs index 747b2f5..e1de07f 100644 --- a/Runtime/Actions/SetTick.cs +++ b/Runtime/Actions/SetTick.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Solo.cs b/Runtime/Actions/Solo.cs index 35b45ce..a98affb 100644 --- a/Runtime/Actions/Solo.cs +++ b/Runtime/Actions/Solo.cs @@ -3,6 +3,7 @@ using System.Linq; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] @@ -38,7 +39,7 @@ namespace Rokojori } var configuration = soloNode == n ? soloConfig : muteConfig; - NodeState.Configure( n, configuration ); + NodeState.ConfigureWith( n, configuration ); } ); } diff --git a/Runtime/Actions/Time/Delay.cs b/Runtime/Actions/Time/Delay.cs index 5f39401..cf1bc76 100644 --- a/Runtime/Actions/Time/Delay.cs +++ b/Runtime/Actions/Time/Delay.cs @@ -2,8 +2,10 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { + [RokojoriActionCoreExport] [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Delay.svg")] public partial class Delay : SequenceAction { @@ -11,7 +13,7 @@ namespace Rokojori public float duration; [Export] - public TimeLine timeLine; + public Timeline timeLine; protected override void _OnTrigger() @@ -22,13 +24,13 @@ namespace Rokojori if ( Engine.IsEditorHint() ) { - TimeLineManager.ScheduleSpanIn( timeLine, 0, duration , + TimelineManager.ScheduleSpanIn(timeLine, 0, duration, ( span, type )=> { - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); - this.LogInfo( "time:", Time.GetTicksMsec() / 1000f ); + this.LogInfo( "time:", Godot.Time.GetTicksMsec() / 1000f ); } }, this @@ -36,7 +38,7 @@ namespace Rokojori } else { - var eventID = TimeLineManager.ScheduleEventIn( timeLine, duration, + var eventID = TimelineManager.ScheduleEventIn( timeLine, duration, ( tle ) => { DispatchEnd( sequenceID ); diff --git a/Runtime/Actions/Time/DelayFrames.cs b/Runtime/Actions/Time/DelayFrames.cs index 9b1ddbf..2981a19 100644 --- a/Runtime/Actions/Time/DelayFrames.cs +++ b/Runtime/Actions/Time/DelayFrames.cs @@ -2,6 +2,7 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Delay.svg")] @@ -18,15 +19,15 @@ namespace Rokojori if ( Engine.IsEditorHint() ) { - var timeLine = TimeLineManager.Ensure( null ); + var timeLine = TimelineManager.Ensure( null ); - TimeLineManager.ScheduleSpanIn( timeLine, 0, numFrames * 1f/60f , + TimelineManager.ScheduleSpanIn( timeLine, 0, numFrames * 1f/60f , ( span, type )=> { - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); - this.LogInfo( "time:", Time.GetTicksMsec() / 1000f ); + this.LogInfo( "time:", Godot.Time.GetTicksMsec() / 1000f ); } }, this diff --git a/Runtime/Actions/Time/DelayedList.cs b/Runtime/Actions/Time/DelayedList.cs index b2a3714..a51b290 100644 --- a/Runtime/Actions/Time/DelayedList.cs +++ b/Runtime/Actions/Time/DelayedList.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -16,7 +17,7 @@ namespace Rokojori public float growDuration = 0.0f; [Export] - public TimeLine timeLine; + public Timeline timeLine; [Export] public Action[] actions = new Action[ 0 ]; @@ -41,7 +42,7 @@ namespace Rokojori for ( int i = 0; i < list.Count; i++ ) { - TimeLineManager.ScheduleEventIn( timeLine, offset, + TimelineManager.ScheduleEventIn( timeLine, offset, id => { Action.TriggerSafe( list[ i ] ); diff --git a/Runtime/Actions/Time/Repeat.cs b/Runtime/Actions/Time/Repeat.cs index ff77475..bedf1d4 100644 --- a/Runtime/Actions/Time/Repeat.cs +++ b/Runtime/Actions/Time/Repeat.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -16,7 +17,7 @@ namespace Rokojori public int numRepeats; [Export] - public TimeLine timeLine; + public Timeline timeLine; [Export] public Action action; @@ -32,7 +33,7 @@ namespace Rokojori { for ( int i = 0; i < numRepeats; i++ ) { - TimeLineManager.ScheduleEventIn( timeLine, i * duration, + TimelineManager.ScheduleEventIn( timeLine, i * duration, id => { if ( i == 0 ) diff --git a/Runtime/Actions/Time/TweenTimeLineSpeed.cs b/Runtime/Actions/Time/TweenTimeLineSpeed.cs index d51e1f7..c4e59a5 100644 --- a/Runtime/Actions/Time/TweenTimeLineSpeed.cs +++ b/Runtime/Actions/Time/TweenTimeLineSpeed.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -10,7 +11,7 @@ namespace Rokojori public partial class TweenTimeLineSpeed:SequenceAction { [Export] - public TimeLine targetTimeLine; + public Timeline targetTimeLine; [Export] public float timeLineSpeed; @@ -22,7 +23,7 @@ namespace Rokojori public bool cacheSpeedOnStart = true; [Export] - public TimeLine tweenTimeLine; + public Timeline tweenTimeLine; protected override void _OnTrigger() { @@ -31,7 +32,7 @@ namespace Rokojori return; } - var tl = tweenTimeLine == null ? TimeLineManager.Get().realtimeTimeline : tweenTimeLine; + var tl = tweenTimeLine == null ? TimelineManager.Get().realtimeTimeline : tweenTimeLine; var start = targetTimeLine.position; @@ -48,7 +49,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { var timeNow = tl.position; @@ -65,7 +66,7 @@ namespace Rokojori targetTimeLine.runner.speed = lerpedSpeed; - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); } diff --git a/Runtime/Actions/TriggerActionInEditor.cs b/Runtime/Actions/TriggerActionInEditor.cs index 03ddc93..daae95e 100644 --- a/Runtime/Actions/TriggerActionInEditor.cs +++ b/Runtime/Actions/TriggerActionInEditor.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/UI/CountNumber.cs b/Runtime/Actions/UI/CountNumber.cs index f4fc546..e5f71be 100644 --- a/Runtime/Actions/UI/CountNumber.cs +++ b/Runtime/Actions/UI/CountNumber.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -40,7 +41,7 @@ namespace Rokojori _actionID = _id; - _animationID = TimeLineManager.ScheduleSpanWith( duration, + _animationID = TimelineManager.ScheduleSpanWith( duration, ( s, t ) => { if ( _animationID != s.id ) @@ -53,7 +54,7 @@ namespace Rokojori target.Set( intNumber + "" ); - if ( TimeLineSpanUpdateType.End == t ) + if ( TimelineSpanUpdateType.End == t ) { target.Set( endValue + "" ); DispatchEnd( _id ); diff --git a/Runtime/Actions/UI/SetLabelText.cs b/Runtime/Actions/UI/SetLabelText.cs index 190b19a..2ebace0 100644 --- a/Runtime/Actions/UI/SetLabelText.cs +++ b/Runtime/Actions/UI/SetLabelText.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/UI/SetMouseMode.cs b/Runtime/Actions/UI/SetMouseMode.cs index 7a878fd..7e1a55c 100644 --- a/Runtime/Actions/UI/SetMouseMode.cs +++ b/Runtime/Actions/UI/SetMouseMode.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Visual/SetMaterial.cs b/Runtime/Actions/Visual/SetMaterial.cs index ddf4661..1bcf559 100644 --- a/Runtime/Actions/Visual/SetMaterial.cs +++ b/Runtime/Actions/Visual/SetMaterial.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Visual/TweenColor.cs b/Runtime/Actions/Visual/TweenColor.cs index de69bb3..e279708 100644 --- a/Runtime/Actions/Visual/TweenColor.cs +++ b/Runtime/Actions/Visual/TweenColor.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -83,7 +84,7 @@ namespace Rokojori this.LogInfo( "Start Value Float Tween", HierarchyName.OfAny( target ), target.GetType().Name, targetMemberPath, ">>", startValue ); - _timeID = TimeLineManager.ScheduleSpanWith( duration, + _timeID = TimelineManager.ScheduleSpanWith( duration, ( span, type )=> { @@ -113,7 +114,7 @@ namespace Rokojori // target._Set( targetMember, value ); SetTargetValue( target, targetMemberPath, value ); - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { // this.LogInfo( "End Float Tween", endValue ); diff --git a/Runtime/Actions/Visual/TweenCompositorVFX.cs b/Runtime/Actions/Visual/TweenCompositorVFX.cs index 08a09c1..816a41d 100644 --- a/Runtime/Actions/Visual/TweenCompositorVFX.cs +++ b/Runtime/Actions/Visual/TweenCompositorVFX.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -67,7 +68,7 @@ namespace Rokojori AnimationManager.StartAnimation( this, compositorVFX, "driverValue" ); - _timeID = TimeLineManager.ScheduleSpanWith( duration, + _timeID = TimelineManager.ScheduleSpanWith( duration, ( span, type )=> { @@ -93,7 +94,7 @@ namespace Rokojori compositorVFX.driverValue = value; - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { compositorVFX.driverValue = value; AnimationManager.EndAnimation( this, compositorVFX, "driverValue" ); diff --git a/Runtime/Actions/Visual/TweenFloat.cs b/Runtime/Actions/Visual/TweenFloat.cs index ae75c81..9cbd103 100644 --- a/Runtime/Actions/Visual/TweenFloat.cs +++ b/Runtime/Actions/Visual/TweenFloat.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -120,7 +121,7 @@ namespace Rokojori this.LogInfo( "Start Value Float Tween", HierarchyName.OfAny( target ), target.GetType().Name, targetMemberPath, ">>", startValue ); - _timeID = TimeLineManager.ScheduleSpanWith( duration, + _timeID = TimelineManager.ScheduleSpanWith( duration, ( span, type )=> { @@ -150,7 +151,7 @@ namespace Rokojori // target._Set( targetMember, value ); SetTargetValue( target, targetMemberPath, value ); - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { // this.LogInfo( "End Float Tween", endValue ); diff --git a/Runtime/Actions/Visual/TweenFloatShaderProperty.cs b/Runtime/Actions/Visual/TweenFloatShaderProperty.cs index 2b2f79b..7e3e05a 100644 --- a/Runtime/Actions/Visual/TweenFloatShaderProperty.cs +++ b/Runtime/Actions/Visual/TweenFloatShaderProperty.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -109,7 +110,7 @@ namespace Rokojori // this.LogInfo( "Get Float Tween", startValue ); - _timeID = TimeLineManager.ScheduleSpanWith( duration, + _timeID = TimelineManager.ScheduleSpanWith( duration, ( span, type )=> { @@ -138,7 +139,7 @@ namespace Rokojori propertyName.Set( material, value ); // ReflectionHelper.SetValue( material, propertyName , value ); - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { // this.LogInfo( "End Float Tween", endValue ); diff --git a/Runtime/Actions/Visual/TweenLight.cs b/Runtime/Actions/Visual/TweenLight.cs index d1e507e..9616da0 100644 --- a/Runtime/Actions/Visual/TweenLight.cs +++ b/Runtime/Actions/Visual/TweenLight.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -19,7 +20,7 @@ namespace Rokojori public TweenType tweenType = new TweenTimeCurve(); [Export] - public TimeLine timeLine; + public Timeline timeLine; protected override void _OnTrigger() @@ -34,7 +35,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -51,7 +52,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { if ( ! GodotObject.IsInstanceValid( light3D ) ) @@ -69,7 +70,7 @@ namespace Rokojori lerpData.CopyTo( light3D ); - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); } diff --git a/Runtime/Actions/Visual/TweenLightData.cs b/Runtime/Actions/Visual/TweenLightData.cs index b244e88..442a4fa 100644 --- a/Runtime/Actions/Visual/TweenLightData.cs +++ b/Runtime/Actions/Visual/TweenLightData.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Visual/TweenMaterial.cs b/Runtime/Actions/Visual/TweenMaterial.cs index 767a1bd..0e2fa71 100644 --- a/Runtime/Actions/Visual/TweenMaterial.cs +++ b/Runtime/Actions/Visual/TweenMaterial.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -23,7 +24,7 @@ namespace Rokojori public TweenType tweenType = new TweenTimeCurve(); [Export] - public TimeLine timeLine; + public Timeline timeLine; ColorProperty[] colors = []; @@ -90,7 +91,7 @@ namespace Rokojori SetAssignedMaterial( fromMaterial ); - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -136,7 +137,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { var timeNow = tl.position; @@ -167,7 +168,7 @@ namespace Rokojori elementIndex ++; } - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { foreach ( var c in colors ) { diff --git a/Runtime/Actions/Visual/TweenParticles.cs b/Runtime/Actions/Visual/TweenParticles.cs index 17a3f82..182354b 100644 --- a/Runtime/Actions/Visual/TweenParticles.cs +++ b/Runtime/Actions/Visual/TweenParticles.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -19,7 +20,7 @@ namespace Rokojori public TweenType tweenType = new TweenTimeCurve(); [Export] - public TimeLine timeLine; + public Timeline timeLine; protected override void _OnTrigger() @@ -34,7 +35,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -51,7 +52,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { if ( ! GodotObject.IsInstanceValid( particles3D ) ) @@ -69,7 +70,7 @@ namespace Rokojori lerpData.CopyTo( particles3D ); - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); } diff --git a/Runtime/Actions/Visual/TweenParticlesData.cs b/Runtime/Actions/Visual/TweenParticlesData.cs index cf6c36f..d63203e 100644 --- a/Runtime/Actions/Visual/TweenParticlesData.cs +++ b/Runtime/Actions/Visual/TweenParticlesData.cs @@ -2,6 +2,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Actions/Visual/TweenPosition.cs b/Runtime/Actions/Visual/TweenPosition.cs index 8b9f6ce..37a552f 100644 --- a/Runtime/Actions/Visual/TweenPosition.cs +++ b/Runtime/Actions/Visual/TweenPosition.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -39,7 +40,7 @@ namespace Rokojori public bool cacheEndPositionOnStart = true; [Export] - public TimeLine timeLine; + public Timeline timeLine; Vector3 GetToPosition() @@ -63,7 +64,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -79,7 +80,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { if ( ! GodotObject.IsInstanceValid( target ) ) @@ -109,7 +110,7 @@ namespace Rokojori target.Position = lerpedPosition; } - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); } diff --git a/Runtime/Actions/Visual/TweenPostProcessVolume.cs b/Runtime/Actions/Visual/TweenPostProcessVolume.cs index f4dfbad..02f57c2 100644 --- a/Runtime/Actions/Visual/TweenPostProcessVolume.cs +++ b/Runtime/Actions/Visual/TweenPostProcessVolume.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -22,7 +23,7 @@ namespace Rokojori public bool cacheEndPositionOnStart = true; [Export] - public TimeLine timeLine; + public Timeline timeLine; protected override void _OnTrigger() @@ -32,7 +33,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -48,7 +49,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { if ( ! GodotObject.IsInstanceValid( activeVolume ) ) @@ -71,7 +72,7 @@ namespace Rokojori activeVolume.weight = lerpedWeight; - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); } diff --git a/Runtime/Actions/Visual/TweenScale.cs b/Runtime/Actions/Visual/TweenScale.cs index 58d19a2..ac0584e 100644 --- a/Runtime/Actions/Visual/TweenScale.cs +++ b/Runtime/Actions/Visual/TweenScale.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -25,7 +26,7 @@ namespace Rokojori public bool cacheEndPositionOnStart = true; [Export] - public TimeLine timeLine; + public Timeline timeLine; protected override void _OnTrigger() @@ -35,7 +36,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var start = tl.position; @@ -51,7 +52,7 @@ namespace Rokojori tweenType = TweenTimeCurve.defaultCurve; } - TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + TimelineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { if ( ! GodotObject.IsInstanceValid( target ) ) @@ -74,7 +75,7 @@ namespace Rokojori target.Scale = lerpedScale; - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { DispatchEnd( sequenceID ); } diff --git a/Runtime/Animation/AnimationCurve.cs b/Runtime/Animation/AnimationCurve.cs index 5f2fffe..27d4451 100644 --- a/Runtime/Animation/AnimationCurve.cs +++ b/Runtime/Animation/AnimationCurve.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -57,9 +58,9 @@ namespace Rokojori random = random == null ? GodotRandom.Get() : random; return new Vector3( - random.Polar() * durationRandomRange, - random.Polar() * delayRandomRange, - random.Polar() * scaleRandomRange + random.Polar1() * durationRandomRange, + random.Polar1() * delayRandomRange, + random.Polar1() * scaleRandomRange ); } @@ -72,7 +73,7 @@ namespace Rokojori return curve.Sample( phase ) * ( scaleY + scaleOffset ); } - public float Sample( float time, Vector3 randomization ) + public float SampleRandomized( float time, Vector3 randomization ) { return Sample( time, randomization.X, randomization.Y, randomization.Z ); } diff --git a/Runtime/Animation/AnimationCurve3D.cs b/Runtime/Animation/AnimationCurve3D.cs index 3c24991..4c2f5e7 100644 --- a/Runtime/Animation/AnimationCurve3D.cs +++ b/Runtime/Animation/AnimationCurve3D.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -64,9 +65,9 @@ namespace Rokojori random = random == null ? GodotRandom.Get() : random; return new Vector3( - random.Polar() * durationRandomRange, - random.Polar() * delayRandomRange, - random.Polar() * scaleAllRandomRange + random.Polar1() * durationRandomRange, + random.Polar1() * delayRandomRange, + random.Polar1() * scaleAllRandomRange ); } diff --git a/Runtime/Animation/AnimationManager.cs b/Runtime/Animation/AnimationManager.cs index ab5043d..0601933 100644 --- a/Runtime/Animation/AnimationManager.cs +++ b/Runtime/Animation/AnimationManager.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { public interface Animator diff --git a/Runtime/Animation/AnimationTree/SetAnimationTreeBool.cs b/Runtime/Animation/AnimationTree/SetAnimationTreeBool.cs index 8e8e81d..78d3e83 100644 --- a/Runtime/Animation/AnimationTree/SetAnimationTreeBool.cs +++ b/Runtime/Animation/AnimationTree/SetAnimationTreeBool.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Driver/FloatDriver.cs b/Runtime/Animation/Driver/FloatDriver.cs index 0b05c9e..2720aa2 100644 --- a/Runtime/Animation/Driver/FloatDriver.cs +++ b/Runtime/Animation/Driver/FloatDriver.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { public interface IFloatDriver diff --git a/Runtime/Animation/Driver/FloatDriverCompositorEffectTarget.cs b/Runtime/Animation/Driver/FloatDriverCompositorEffectTarget.cs index 8b89bc1..022f0b8 100644 --- a/Runtime/Animation/Driver/FloatDriverCompositorEffectTarget.cs +++ b/Runtime/Animation/Driver/FloatDriverCompositorEffectTarget.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Driver/FloatDriverNodeTarget.cs b/Runtime/Animation/Driver/FloatDriverNodeTarget.cs index 958d472..35b0231 100644 --- a/Runtime/Animation/Driver/FloatDriverNodeTarget.cs +++ b/Runtime/Animation/Driver/FloatDriverNodeTarget.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Driver/FloatDriverResourceTarget.cs b/Runtime/Animation/Driver/FloatDriverResourceTarget.cs index 43bb166..d875957 100644 --- a/Runtime/Animation/Driver/FloatDriverResourceTarget.cs +++ b/Runtime/Animation/Driver/FloatDriverResourceTarget.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Driver/FloatDriverTarget.cs b/Runtime/Animation/Driver/FloatDriverTarget.cs index 4c40126..7781a8a 100644 --- a/Runtime/Animation/Driver/FloatDriverTarget.cs +++ b/Runtime/Animation/Driver/FloatDriverTarget.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Flash/Flash.cs b/Runtime/Animation/Flash/Flash.cs index 7e0817f..b8b70a1 100644 --- a/Runtime/Animation/Flash/Flash.cs +++ b/Runtime/Animation/Flash/Flash.cs @@ -5,6 +5,7 @@ using System.Text; using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -127,7 +128,7 @@ namespace Rokojori allTargets.AddRange( targets ); } - allTargets = Lists.Filter( Lists.From( allTargets ), t => t as GeometryInstance3D != null ); + allTargets = ListExtensions.Filter( ListExtensions.From( allTargets ), t => t as GeometryInstance3D != null ); return allTargets; } @@ -164,7 +165,7 @@ namespace Rokojori var flashCurve = flashEffect.flashCurve; var color = flashEffect.color.GetHDRColor(); - var timeline = TimeLineManager.Ensure( flashEffect.timeline ); + var timeline = TimelineManager.Ensure( flashEffect.timeline ); runner.randomization = flashCurve.Randomize( random ); var duration = flashCurve.GetRandomizedDuration( runner.randomization ); @@ -257,8 +258,8 @@ namespace Rokojori - runner.animationID = TimeLineManager.ScheduleSpanIn( timeline, 0, duration, - ( TimeLineSpan span, TimeLineSpanUpdateType type )=> + runner.animationID = TimelineManager.ScheduleSpanIn( timeline, 0, duration, + ( TimelineSpan span, TimelineSpanUpdateType type )=> { // debugProcessIndicator.Position = debugProcessIndicatorFull * span.phase; @@ -325,7 +326,7 @@ namespace Rokojori ); - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { if ( runner.light != null ) { diff --git a/Runtime/Animation/Flash/FlashEffect.cs b/Runtime/Animation/Flash/FlashEffect.cs index 8992f49..89bb96d 100644 --- a/Runtime/Animation/Flash/FlashEffect.cs +++ b/Runtime/Animation/Flash/FlashEffect.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -16,7 +17,7 @@ namespace Rokojori public AnimationCurve flashCurve; [Export] - public TimeLine timeline; + public Timeline timeline; [Export] diff --git a/Runtime/Animation/Flash/Presets/Blue Shield - Flash.tres b/Runtime/Animation/Flash/Presets/Blue Shield - Flash.tres index 8739126..216b8c2 100644 --- a/Runtime/Animation/Flash/Presets/Blue Shield - Flash.tres +++ b/Runtime/Animation/Flash/Presets/Blue Shield - Flash.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://dncqth3uf3tb3" path="res://addons/rokojori_action_library/Runtime/Animation/HDRColor.cs" id="1_ejko8"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_3i2og"] [ext_resource type="Script" uid="uid://cupnq55n3nimc" path="res://addons/rokojori_action_library/Runtime/Animation/Flash/FlashEffect.cs" id="3_65ipm"] -[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/GameTime.tres" id="4_nyaof"] +[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Game Time.tres" id="4_nyaof"] [sub_resource type="Resource" id="Resource_54hj8"] script = ExtResource("1_ejko8") diff --git a/Runtime/Animation/Flash/Presets/Green Charge - Flash.tres b/Runtime/Animation/Flash/Presets/Green Charge - Flash.tres index 43b057f..db76b0a 100644 --- a/Runtime/Animation/Flash/Presets/Green Charge - Flash.tres +++ b/Runtime/Animation/Flash/Presets/Green Charge - Flash.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://dncqth3uf3tb3" path="res://addons/rokojori_action_library/Runtime/Animation/HDRColor.cs" id="1_yrhv1"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_cdv3p"] [ext_resource type="Script" uid="uid://cupnq55n3nimc" path="res://addons/rokojori_action_library/Runtime/Animation/Flash/FlashEffect.cs" id="3_87ql1"] -[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/GameTime.tres" id="4_2na64"] +[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Game Time.tres" id="4_2na64"] [sub_resource type="Resource" id="Resource_54hj8"] script = ExtResource("1_yrhv1") diff --git a/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres b/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres index b2d6777..7458816 100644 --- a/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres +++ b/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://dncqth3uf3tb3" path="res://addons/rokojori_action_library/Runtime/Animation/HDRColor.cs" id="1_c8lnw"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_w323b"] [ext_resource type="Script" uid="uid://cupnq55n3nimc" path="res://addons/rokojori_action_library/Runtime/Animation/Flash/FlashEffect.cs" id="3_eqd4c"] -[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/GameTime.tres" id="4_cs6ks"] +[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Game Time.tres" id="4_cs6ks"] [sub_resource type="Resource" id="Resource_ny3sx"] script = ExtResource("1_c8lnw") diff --git a/Runtime/Animation/Flash/Presets/Red Hit - Flash.tres b/Runtime/Animation/Flash/Presets/Red Hit - Flash.tres index d11bbc3..2a4b627 100644 --- a/Runtime/Animation/Flash/Presets/Red Hit - Flash.tres +++ b/Runtime/Animation/Flash/Presets/Red Hit - Flash.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://dncqth3uf3tb3" path="res://addons/rokojori_action_library/Runtime/Animation/HDRColor.cs" id="1_nmdum"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_0sgd7"] [ext_resource type="Script" uid="uid://cupnq55n3nimc" path="res://addons/rokojori_action_library/Runtime/Animation/Flash/FlashEffect.cs" id="3_7qcuh"] -[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/GameTime.tres" id="4_rkq1j"] +[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Game Time.tres" id="4_rkq1j"] [sub_resource type="Resource" id="Resource_54hj8"] script = ExtResource("1_nmdum") diff --git a/Runtime/Animation/Flash/Presets/White Blinking - Flash.tres b/Runtime/Animation/Flash/Presets/White Blinking - Flash.tres index 6392dad..4b4bb2d 100644 --- a/Runtime/Animation/Flash/Presets/White Blinking - Flash.tres +++ b/Runtime/Animation/Flash/Presets/White Blinking - Flash.tres @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://dncqth3uf3tb3" path="res://addons/rokojori_action_library/Runtime/Animation/HDRColor.cs" id="1_pp4qy"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_f6f0o"] [ext_resource type="Script" uid="uid://cupnq55n3nimc" path="res://addons/rokojori_action_library/Runtime/Animation/Flash/FlashEffect.cs" id="3_dq1j1"] -[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/GameTime.tres" id="4_d6hj6"] +[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Game Time.tres" id="4_d6hj6"] [sub_resource type="Resource" id="Resource_ny3sx"] script = ExtResource("1_pp4qy") diff --git a/Runtime/Animation/Follow.cs b/Runtime/Animation/Follow.cs index a98d1e0..c456e2a 100644 --- a/Runtime/Animation/Follow.cs +++ b/Runtime/Animation/Follow.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -20,7 +21,7 @@ namespace Rokojori public Smoothing positionSmoothing; [Export] - public TimeLine timeline; + public Timeline timeline; float _lastCoefficient = 0; int _lastFrames = -1; @@ -63,7 +64,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeline ); + var tl = TimelineManager.Ensure( timeline ); target.GlobalPosition = Smoothing.Apply( positionSmoothing, source.GlobalPosition, tl.delta ); } } diff --git a/Runtime/Animation/HDRColor.cs b/Runtime/Animation/HDRColor.cs index 73fecb6..c3f28b9 100644 --- a/Runtime/Animation/HDRColor.cs +++ b/Runtime/Animation/HDRColor.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Highlight/Highlight.cs b/Runtime/Animation/Highlight/Highlight.cs index 871a4fb..82526bd 100644 --- a/Runtime/Animation/Highlight/Highlight.cs +++ b/Runtime/Animation/Highlight/Highlight.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Animation/Highlight/HighlightEffect.cs b/Runtime/Animation/Highlight/HighlightEffect.cs index 45422f7..b1cdc82 100644 --- a/Runtime/Animation/Highlight/HighlightEffect.cs +++ b/Runtime/Animation/Highlight/HighlightEffect.cs @@ -5,6 +5,7 @@ using System.Text; using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { @@ -30,7 +31,7 @@ namespace Rokojori public partial class HighlightEffect:Resource { [Export] - public TimeLine timeline; + public Timeline timeline; [ExportGroup( "Transition")] @@ -177,7 +178,7 @@ namespace Rokojori RJLog.Log( "Removed animations", numRemoved ); - Lists.RemoveList( animations, removals ); + ListExtensions.RemoveList( animations, removals ); } @@ -292,7 +293,7 @@ namespace Rokojori var startPhase = animation.phase; - animation.tweenID = TimeLineManager.ScheduleSpanIn( timeline, 0, inDuration, + animation.tweenID = TimelineManager.ScheduleSpanIn( timeline, 0, inDuration, ( span, type )=> { @@ -325,7 +326,7 @@ namespace Rokojori var tweenColor = ColorX.Fade( hdrColor, p ); - if ( TimeLineSpanUpdateType.End == type ) + if ( TimelineSpanUpdateType.End == type ) { tweenColor = hdrColor; animation.phase = 1; @@ -393,7 +394,7 @@ namespace Rokojori var hdrColor = ColorX.Fade( color.GetHDRColor(), startPhase ); var colorTransparent = ColorX.Fade( hdrColor, 0 ); - animation.tweenID = TimeLineManager.ScheduleSpanIn( timeline, 0, outDuration, + animation.tweenID = TimelineManager.ScheduleSpanIn( timeline, 0, outDuration, ( span, type )=> { @@ -422,7 +423,7 @@ namespace Rokojori var tweenColor = ColorX.Fade( hdrColor, p ); - if ( TimeLineSpanUpdateType.End == type ) + if ( TimelineSpanUpdateType.End == type ) { tweenColor = colorTransparent; animation.phase = 0; diff --git a/Runtime/Animation/Highlight/HighlightFlag.cs b/Runtime/Animation/Highlight/HighlightFlag.cs index 68630ea..3f41ee8 100644 --- a/Runtime/Animation/Highlight/HighlightFlag.cs +++ b/Runtime/Animation/Highlight/HighlightFlag.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Highlight/Presets/White Outline - Highlight.tres b/Runtime/Animation/Highlight/Presets/White Outline - Highlight.tres index 2469c31..e1f7fcd 100644 --- a/Runtime/Animation/Highlight/Presets/White Outline - Highlight.tres +++ b/Runtime/Animation/Highlight/Presets/White Outline - Highlight.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://dncqth3uf3tb3" path="res://addons/rokojori_action_library/Runtime/Animation/HDRColor.cs" id="1_sk831"] [ext_resource type="Script" uid="uid://dkbln8rf5p0pu" path="res://addons/rokojori_action_library/Runtime/Animation/Highlight/HighlightEffect.cs" id="2_pq63c"] -[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/RealTime.tres" id="3_8mahg"] +[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Real Time.tres" id="3_8mahg"] [sub_resource type="Resource" id="Resource_27v41"] script = ExtResource("1_sk831") diff --git a/Runtime/Animation/Highlight/Presets/Yellow Scan Outline - Highlight.tres b/Runtime/Animation/Highlight/Presets/Yellow Scan Outline - Highlight.tres index 1a56d1a..859fb0f 100644 --- a/Runtime/Animation/Highlight/Presets/Yellow Scan Outline - Highlight.tres +++ b/Runtime/Animation/Highlight/Presets/Yellow Scan Outline - Highlight.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://dncqth3uf3tb3" path="res://addons/rokojori_action_library/Runtime/Animation/HDRColor.cs" id="1_3edxo"] [ext_resource type="Script" uid="uid://dkbln8rf5p0pu" path="res://addons/rokojori_action_library/Runtime/Animation/Highlight/HighlightEffect.cs" id="2_itc7c"] -[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/RealTime.tres" id="3_ttsky"] +[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Real Time.tres" id="3_ttsky"] [sub_resource type="Resource" id="Resource_27v41"] script = ExtResource("1_3edxo") diff --git a/Runtime/Animation/Highlight/SetPointableHighlightEffect.cs b/Runtime/Animation/Highlight/SetPointableHighlightEffect.cs index 2f63d2a..2a4c614 100644 --- a/Runtime/Animation/Highlight/SetPointableHighlightEffect.cs +++ b/Runtime/Animation/Highlight/SetPointableHighlightEffect.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Animation/KeyFrames/KeyFrame.cs b/Runtime/Animation/KeyFrames/KeyFrame.cs index 87de6e1..5838c4a 100644 --- a/Runtime/Animation/KeyFrames/KeyFrame.cs +++ b/Runtime/Animation/KeyFrames/KeyFrame.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class KeyFrame diff --git a/Runtime/Animation/KeyFrames/KeyFrameAnimation.cs b/Runtime/Animation/KeyFrames/KeyFrameAnimation.cs index 547ad32..a051b8c 100644 --- a/Runtime/Animation/KeyFrames/KeyFrameAnimation.cs +++ b/Runtime/Animation/KeyFrames/KeyFrameAnimation.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class KeyFrameAnimation @@ -48,7 +49,7 @@ namespace Rokojori public T GetLerpedValueAt( float time, System.Func lerper ) { - var lerped = Lists.Lerp>( keyFrames, time, ( kf ) => kf.time, + var lerped = ListExtensions.Lerp>( keyFrames, time, ( kf ) => kf.time, ( result )=> { var keyFrameA = keyFrames[ result.closestIndex ]; @@ -99,7 +100,7 @@ namespace Rokojori return _currentIndex; } - _currentIndex = MathX.SafeIndex( _currentIndex, keyFrames ); + _currentIndex = MathX.SafeIndexFor( _currentIndex, keyFrames ); var kf = keyFrames[ _currentIndex ]; diff --git a/Runtime/Animation/MoveLoop.cs b/Runtime/Animation/MoveLoop.cs index 649d4a7..d98c99a 100644 --- a/Runtime/Animation/MoveLoop.cs +++ b/Runtime/Animation/MoveLoop.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Rotate.cs b/Runtime/Animation/Rotate.cs index 67956f3..d0104e0 100644 --- a/Runtime/Animation/Rotate.cs +++ b/Runtime/Animation/Rotate.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -17,7 +18,7 @@ namespace Rokojori public Node3D target; [Export] - public TimeLine timeline; + public Timeline timeline; public override void _Process( double delta ) { @@ -26,7 +27,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeline ); + var tl = TimelineManager.Ensure( timeline ); var rotation = target.GlobalQuaternion() * Quaternion.FromEuler( eulerRotation * (float)tl.delta ); target.SetGlobalQuaternion( rotation ); } diff --git a/Runtime/Animation/Shake/Presets/Mini Poke - Shake.tres b/Runtime/Animation/Shake/Presets/Mini Poke - Shake.tres index e39aff1..f449725 100644 --- a/Runtime/Animation/Shake/Presets/Mini Poke - Shake.tres +++ b/Runtime/Animation/Shake/Presets/Mini Poke - Shake.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://bec6skfqkb2ci" path="res://addons/rokojori_action_library/Runtime/Animation/Shake/ShakeEffect.cs" id="1_gbi52"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_g6huw"] -[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/RealTime.tres" id="3_pgufg"] +[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Real Time.tres" id="3_pgufg"] [sub_resource type="Curve" id="Curve_j2uji"] _data = [Vector2(0, 1), 0.0, -10.6006, 0, 0, Vector2(0.136364, 0.260804), -1.02995, -1.02995, 0, 0, Vector2(1, 0), -0.00696731, 0.0, 0, 0] diff --git a/Runtime/Animation/Shake/Presets/Poke - Shake.tres b/Runtime/Animation/Shake/Presets/Poke - Shake.tres index 11e3f92..c96bac0 100644 --- a/Runtime/Animation/Shake/Presets/Poke - Shake.tres +++ b/Runtime/Animation/Shake/Presets/Poke - Shake.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://bec6skfqkb2ci" path="res://addons/rokojori_action_library/Runtime/Animation/Shake/ShakeEffect.cs" id="1_grbkn"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_825l5"] -[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/RealTime.tres" id="3_h78cr"] +[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Real Time.tres" id="3_h78cr"] [sub_resource type="Curve" id="Curve_63bh3"] _data = [Vector2(0, 1), 0.0, -1.3770282, 0, 0, Vector2(1, 0), -0.00696731, 0.0, 0, 0] diff --git a/Runtime/Animation/Shake/Presets/Small Impact Low FPS - Shake.tres b/Runtime/Animation/Shake/Presets/Small Impact Low FPS - Shake.tres index e06554b..31ce12e 100644 --- a/Runtime/Animation/Shake/Presets/Small Impact Low FPS - Shake.tres +++ b/Runtime/Animation/Shake/Presets/Small Impact Low FPS - Shake.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://bec6skfqkb2ci" path="res://addons/rokojori_action_library/Runtime/Animation/Shake/ShakeEffect.cs" id="1_68es8"] [ext_resource type="Script" uid="uid://c5tm02yj1bhhx" path="res://addons/rokojori_action_library/Runtime/Animation/AnimationCurve.cs" id="2_wfmv2"] -[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/GameTime.tres" id="3_udbmo"] +[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Game Time.tres" id="3_udbmo"] [sub_resource type="Curve" id="Curve_j2uji"] _data = [Vector2(0, 1), 0.0, 0.0355988, 0, 0, Vector2(1, 0), -0.101636, 0.0, 0, 0] diff --git a/Runtime/Animation/Shake/Shake.cs b/Runtime/Animation/Shake/Shake.cs index 844f811..adbcd89 100644 --- a/Runtime/Animation/Shake/Shake.cs +++ b/Runtime/Animation/Shake/Shake.cs @@ -5,6 +5,7 @@ using System.Text; using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -92,13 +93,13 @@ namespace Rokojori if ( _targetValues == null || _targetValues.Count == 0 ) { - _targetValues = Lists.Map( targets, t => TransformData.From( t, shakeEffect.globalPosition, shakeEffect.globalRotation ) ); + _targetValues = ListExtensions.Map( targets, t => TransformData.From( t, shakeEffect.globalPosition, shakeEffect.globalRotation ) ); } - _currentSpanAnimationID = TimeLineManager.ScheduleSpanIn( timeline, 0, duration, - ( TimeLineSpan span, TimeLineSpanUpdateType type )=> + _currentSpanAnimationID = TimelineManager.ScheduleSpanIn( timeline, 0, duration, + ( TimelineSpan span, TimelineSpanUpdateType type )=> { if ( span.id != _currentSpanAnimationID ) { @@ -111,7 +112,7 @@ namespace Rokojori } - if ( TimeLineSpanUpdateType.End == type ) + if ( TimelineSpanUpdateType.End == type ) { AnimationManager.EndAnimation( this, targets, AnimationMember.Transform ); diff --git a/Runtime/Animation/Shake/ShakeEffect.cs b/Runtime/Animation/Shake/ShakeEffect.cs index c95babb..2dd5194 100644 --- a/Runtime/Animation/Shake/ShakeEffect.cs +++ b/Runtime/Animation/Shake/ShakeEffect.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -21,7 +22,7 @@ namespace Rokojori public AnimationCurve shakeChangeFPSRandomCurve; [Export] - public TimeLine timeline; + public Timeline timeline; [Export] public bool smooth = true; @@ -59,7 +60,7 @@ namespace Rokojori { random = RandomEngine.CreateIfNull( random ); - var shakeAmount = shakeAmountCurve.Sample( time, curveRandomization ); + var shakeAmount = shakeAmountCurve.SampleRandomized( time, curveRandomization ); var transformData = new TransformData(); transformData.position = random.IndividualBetween( -positionShake, positionShake ) * shakeAmount; diff --git a/Runtime/Animation/Sky/SkyAnimator.cs b/Runtime/Animation/Sky/SkyAnimator.cs index a200b0e..fb0e497 100644 --- a/Runtime/Animation/Sky/SkyAnimator.cs +++ b/Runtime/Animation/Sky/SkyAnimator.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Smoothing/ExpSmoothing.cs b/Runtime/Animation/Smoothing/ExpSmoothing.cs index 377b413..e0df22e 100644 --- a/Runtime/Animation/Smoothing/ExpSmoothing.cs +++ b/Runtime/Animation/Smoothing/ExpSmoothing.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Smoothing/FrameSmoothing.cs b/Runtime/Animation/Smoothing/FrameSmoothing.cs index 48271f8..ade77fc 100644 --- a/Runtime/Animation/Smoothing/FrameSmoothing.cs +++ b/Runtime/Animation/Smoothing/FrameSmoothing.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Smoothing/FrameSmoothingTable.cs b/Runtime/Animation/Smoothing/FrameSmoothingTable.cs index 82d04da..b11e161 100644 --- a/Runtime/Animation/Smoothing/FrameSmoothingTable.cs +++ b/Runtime/Animation/Smoothing/FrameSmoothingTable.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class FrameSmoothingTable @@ -24,7 +25,7 @@ namespace Rokojori computed[ i ] = ExpSmoothing.ComputeCoefficientForFramesAdaptiveTreshold( i ); } - FilesSync.SaveUTF8( path, Lists.Join( Lists.From( computed ), "f,\n" ) ); + FilesSync.SaveUTF8( path, ListExtensions.Join( ListExtensions.From( computed ), "f,\n" ) ); } public async static Task ComputeAndSaveTable( Node node, string path, int range = 0 ) @@ -45,7 +46,7 @@ namespace Rokojori var computed = new float[ range ]; - var filePath = directoryPath.MakeRelative( j + "-" + ( j + range ) + ".txt" ); + var filePath = directoryPath.MakeRelativeFromPath( j + "-" + ( j + range ) + ".txt" ); if ( FilesSync.FileExists( filePath.fullPath ) ) { @@ -78,7 +79,7 @@ namespace Rokojori } - FilesSync.SaveUTF8( filePath.fullPath, Lists.Join( Lists.From( computed ), "f,\n" ) ); + FilesSync.SaveUTF8( filePath.fullPath, ListExtensions.Join( ListExtensions.From( computed ), "f,\n" ) ); } diff --git a/Runtime/Animation/Smoothing/FrameSmoothingTableGenerator.cs b/Runtime/Animation/Smoothing/FrameSmoothingTableGenerator.cs index a3338f8..623799a 100644 --- a/Runtime/Animation/Smoothing/FrameSmoothingTableGenerator.cs +++ b/Runtime/Animation/Smoothing/FrameSmoothingTableGenerator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Smoothing/Smoothing.cs b/Runtime/Animation/Smoothing/Smoothing.cs index a1bf9f2..a9f47d4 100644 --- a/Runtime/Animation/Smoothing/Smoothing.cs +++ b/Runtime/Animation/Smoothing/Smoothing.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Transform/AnimateTransform.cs b/Runtime/Animation/Transform/AnimateTransform.cs index d3dc2ab..ea23f90 100644 --- a/Runtime/Animation/Transform/AnimateTransform.cs +++ b/Runtime/Animation/Transform/AnimateTransform.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -45,7 +46,7 @@ namespace Rokojori _randomizations.Add( curve.Randomize() ); } - var timeline = TimeLineManager.Ensure( animations.timeline ); + var timeline = TimelineManager.Ensure( animations.timeline ); var duration = animations.GetMaxDuration( _randomizations ); var start = timeline.position; @@ -60,7 +61,7 @@ namespace Rokojori AnimationManager.StartAnimation( c, target, c.animationMember ); } - TimeLineManager.ScheduleSpanIn( timeline, 0, duration, + TimelineManager.ScheduleSpanIn( timeline, 0, duration, ( span, type )=> { if ( actionID == -1 ) @@ -91,7 +92,7 @@ namespace Rokojori index ++; } - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { foreach ( var c in animations.curves ) { diff --git a/Runtime/Animation/Transform/TransformAnimations.cs b/Runtime/Animation/Transform/TransformAnimations.cs index a39c464..bafc5ea 100644 --- a/Runtime/Animation/Transform/TransformAnimations.cs +++ b/Runtime/Animation/Transform/TransformAnimations.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -14,7 +15,7 @@ namespace Rokojori public TransformCurve[] curves = new TransformCurve[ 0 ]; [Export] - public TimeLine timeline; + public Timeline timeline; public float GetMaxDuration( List randomizations ) { diff --git a/Runtime/Animation/Transform/TransformCurve.cs b/Runtime/Animation/Transform/TransformCurve.cs index f7d8227..c32e425 100644 --- a/Runtime/Animation/Transform/TransformCurve.cs +++ b/Runtime/Animation/Transform/TransformCurve.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Animation/Transform/TransformData.cs b/Runtime/Animation/Transform/TransformData.cs index 7c2f29e..c145c45 100644 --- a/Runtime/Animation/Transform/TransformData.cs +++ b/Runtime/Animation/Transform/TransformData.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class TransformData diff --git a/Runtime/Animation/Transform/TransformTarget.cs b/Runtime/Animation/Transform/TransformTarget.cs index d18d793..432525f 100644 --- a/Runtime/Animation/Transform/TransformTarget.cs +++ b/Runtime/Animation/Transform/TransformTarget.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum TransformTarget diff --git a/Runtime/Animation/Tweens/TweenTimeCurve.cs b/Runtime/Animation/Tweens/TweenTimeCurve.cs index e177daf..13ca5b3 100644 --- a/Runtime/Animation/Tweens/TweenTimeCurve.cs +++ b/Runtime/Animation/Tweens/TweenTimeCurve.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Tweens/TweenType.cs b/Runtime/Animation/Tweens/TweenType.cs index b0a7d9b..064030d 100644 --- a/Runtime/Animation/Tweens/TweenType.cs +++ b/Runtime/Animation/Tweens/TweenType.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Wipe/Wipe.cs b/Runtime/Animation/Wipe/Wipe.cs index 5c9d8a8..9ec1f2f 100644 --- a/Runtime/Animation/Wipe/Wipe.cs +++ b/Runtime/Animation/Wipe/Wipe.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -30,9 +31,9 @@ namespace Rokojori var wipeEffect = wipeSettings.wipeEffect; var compositor = wipeSettings.compositor; - var tm = TimeLineManager.Get(); + var tm = TimelineManager.Get(); - var d = duration != null ? duration : SecondsDuration.Create( 1, TimeLineManager.Ensure( null ) ); + var d = duration != null ? duration : SecondsDuration.Create( 1, TimelineManager.Ensure( null ) ); var actionID = DispatchStart(); @@ -46,7 +47,7 @@ namespace Rokojori // this.LogInfo( "Start:", Time.GetTicksMsec() ); - TimeLineManager.ScheduleSpanIn( d.timeLine, 0, d.GetDurationInSeconds() , + TimelineManager.ScheduleSpanIn( d.timeLine, 0, d.GetDurationInSeconds() , ( span, type )=> { if ( actionID == -1 ) @@ -65,7 +66,7 @@ namespace Rokojori // this.LogInfo( "Wipe[" + i + "]", "value:", value ); } - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { if ( Direction.Out == direction ) { diff --git a/Runtime/Animation/Wipe/WipeEffect.cs b/Runtime/Animation/Wipe/WipeEffect.cs index 15d4b6d..e628480 100644 --- a/Runtime/Animation/Wipe/WipeEffect.cs +++ b/Runtime/Animation/Wipe/WipeEffect.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Wipe/WipeEffects/BaseWipeEffect.cs b/Runtime/Animation/Wipe/WipeEffects/BaseWipeEffect.cs index 30f77a0..d5a8b9a 100644 --- a/Runtime/Animation/Wipe/WipeEffects/BaseWipeEffect.cs +++ b/Runtime/Animation/Wipe/WipeEffects/BaseWipeEffect.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Wipe/WipeEffects/CircleWipe.cs b/Runtime/Animation/Wipe/WipeEffects/CircleWipe.cs index 1775ca0..a9f6e39 100644 --- a/Runtime/Animation/Wipe/WipeEffects/CircleWipe.cs +++ b/Runtime/Animation/Wipe/WipeEffects/CircleWipe.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Wipe/WipeEffects/DirectionalWipe.cs b/Runtime/Animation/Wipe/WipeEffects/DirectionalWipe.cs index ccd4511..490b280 100644 --- a/Runtime/Animation/Wipe/WipeEffects/DirectionalWipe.cs +++ b/Runtime/Animation/Wipe/WipeEffects/DirectionalWipe.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Wipe/WipeEffects/InOutWipe.cs b/Runtime/Animation/Wipe/WipeEffects/InOutWipe.cs index 1eccb2c..48903c0 100644 --- a/Runtime/Animation/Wipe/WipeEffects/InOutWipe.cs +++ b/Runtime/Animation/Wipe/WipeEffects/InOutWipe.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -44,7 +45,7 @@ namespace Rokojori // this.LogInfo( "EFFECTS: Num Ins:", wipeInEffects.Count, "Num Outs:", wipeOutEffects.Count ); // this.LogInfo( "ACTIVE: Num Ins:", wipeIn.activeEffects.Count, "Num Outs:", wipeOut.activeEffects.Count ); - return Lists.FromLists( wipeInEffects, wipeOutEffects ); + return ListExtensions.FromLists( wipeInEffects, wipeOutEffects ); } public override List> GetWipeAnimations( Wipe.Direction direction ) diff --git a/Runtime/Animation/Wipe/WipeEffects/NoiseWipe.cs b/Runtime/Animation/Wipe/WipeEffects/NoiseWipe.cs index 428819b..b83c001 100644 --- a/Runtime/Animation/Wipe/WipeEffects/NoiseWipe.cs +++ b/Runtime/Animation/Wipe/WipeEffects/NoiseWipe.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Animation/Wipe/WipeSettings.cs b/Runtime/Animation/Wipe/WipeSettings.cs index c43e582..3b4961a 100644 --- a/Runtime/Animation/Wipe/WipeSettings.cs +++ b/Runtime/Animation/Wipe/WipeSettings.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/App.cs b/Runtime/App/App.cs index 0c59ad4..d634ce1 100644 --- a/Runtime/App/App.cs +++ b/Runtime/App/App.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum AppPlatformOS diff --git a/Runtime/App/Main.cs b/Runtime/App/Main.cs index 28756e7..70339fb 100644 --- a/Runtime/App/Main.cs +++ b/Runtime/App/Main.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/Actions/LoadAppSettings.cs b/Runtime/App/Settings/Actions/LoadAppSettings.cs index 63abe86..95cf249 100644 --- a/Runtime/App/Settings/Actions/LoadAppSettings.cs +++ b/Runtime/App/Settings/Actions/LoadAppSettings.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/Actions/SaveAppSettings.cs b/Runtime/App/Settings/Actions/SaveAppSettings.cs index ff123d8..1de283c 100644 --- a/Runtime/App/Settings/Actions/SaveAppSettings.cs +++ b/Runtime/App/Settings/Actions/SaveAppSettings.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/AppSetting.cs b/Runtime/App/Settings/AppSetting.cs index 3ea6cc1..4afa6df 100644 --- a/Runtime/App/Settings/AppSetting.cs +++ b/Runtime/App/Settings/AppSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/AppSettings.cs b/Runtime/App/Settings/AppSettings.cs index 16aa652..1711de7 100644 --- a/Runtime/App/Settings/AppSettings.cs +++ b/Runtime/App/Settings/AppSettings.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/AppSettingsCategory.cs b/Runtime/App/Settings/AppSettingsCategory.cs index 823fe10..5362962 100644 --- a/Runtime/App/Settings/AppSettingsCategory.cs +++ b/Runtime/App/Settings/AppSettingsCategory.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/ListSetting/ListAppSetting.cs b/Runtime/App/Settings/ListSetting/ListAppSetting.cs index ade25d8..b0008ad 100644 --- a/Runtime/App/Settings/ListSetting/ListAppSetting.cs +++ b/Runtime/App/Settings/ListSetting/ListAppSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/ListSetting/TestingListAppSettings.cs b/Runtime/App/Settings/ListSetting/TestingListAppSettings.cs index f5564b8..4e8a429 100644 --- a/Runtime/App/Settings/ListSetting/TestingListAppSettings.cs +++ b/Runtime/App/Settings/ListSetting/TestingListAppSettings.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs b/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs index 2f73a67..3dcab38 100644 --- a/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs +++ b/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/NumberSetting/CompositorEffectSetting.cs b/Runtime/App/Settings/NumberSetting/CompositorEffectSetting.cs index 3965ed6..aec2ff0 100644 --- a/Runtime/App/Settings/NumberSetting/CompositorEffectSetting.cs +++ b/Runtime/App/Settings/NumberSetting/CompositorEffectSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/NumberSetting/NumberAppSetting.cs b/Runtime/App/Settings/NumberSetting/NumberAppSetting.cs index 202b2a7..52fe98c 100644 --- a/Runtime/App/Settings/NumberSetting/NumberAppSetting.cs +++ b/Runtime/App/Settings/NumberSetting/NumberAppSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/NumberSetting/ResolutionScalingSetting.cs b/Runtime/App/Settings/NumberSetting/ResolutionScalingSetting.cs index cb17349..22af860 100644 --- a/Runtime/App/Settings/NumberSetting/ResolutionScalingSetting.cs +++ b/Runtime/App/Settings/NumberSetting/ResolutionScalingSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/NumberSetting/TestingNumberAppSetting.cs b/Runtime/App/Settings/NumberSetting/TestingNumberAppSetting.cs index d0d943f..cb996b8 100644 --- a/Runtime/App/Settings/NumberSetting/TestingNumberAppSetting.cs +++ b/Runtime/App/Settings/NumberSetting/TestingNumberAppSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/App/Settings/NumberSetting/UIFontScaleSetting.cs b/Runtime/App/Settings/NumberSetting/UIFontScaleSetting.cs index c0561e1..09785cd 100644 --- a/Runtime/App/Settings/NumberSetting/UIFontScaleSetting.cs +++ b/Runtime/App/Settings/NumberSetting/UIFontScaleSetting.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Audio/AudioGraph/Basic/AudioSample.cs b/Runtime/Audio/AudioGraph/Basic/AudioSample.cs index 7feb68e..e61c930 100644 --- a/Runtime/Audio/AudioGraph/Basic/AudioSample.cs +++ b/Runtime/Audio/AudioGraph/Basic/AudioSample.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioSample diff --git a/Runtime/Audio/AudioGraph/Basic/Constant.cs b/Runtime/Audio/AudioGraph/Basic/Constant.cs index 20732e7..4e360ff 100644 --- a/Runtime/Audio/AudioGraph/Basic/Constant.cs +++ b/Runtime/Audio/AudioGraph/Basic/Constant.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class Constant:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Effect/AudioEffectMono.cs b/Runtime/Audio/AudioGraph/Effect/AudioEffectMono.cs index 0f869fa..b4ca7fa 100644 --- a/Runtime/Audio/AudioGraph/Effect/AudioEffectMono.cs +++ b/Runtime/Audio/AudioGraph/Effect/AudioEffectMono.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public abstract class AudioEffectMono:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Effect/AudioEffectStereo.cs b/Runtime/Audio/AudioGraph/Effect/AudioEffectStereo.cs index 3afb4df..e59aa74 100644 --- a/Runtime/Audio/AudioGraph/Effect/AudioEffectStereo.cs +++ b/Runtime/Audio/AudioGraph/Effect/AudioEffectStereo.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public abstract class AudioEffectStereo:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Effect/Gain.cs b/Runtime/Audio/AudioGraph/Effect/Gain.cs index 5b20d65..be43889 100644 --- a/Runtime/Audio/AudioGraph/Effect/Gain.cs +++ b/Runtime/Audio/AudioGraph/Effect/Gain.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class Gain:AudioEffectMono diff --git a/Runtime/Audio/AudioGraph/Generators/AudioGeneratorMono.cs b/Runtime/Audio/AudioGraph/Generators/AudioGeneratorMono.cs index b08e238..7c4b35b 100644 --- a/Runtime/Audio/AudioGraph/Generators/AudioGeneratorMono.cs +++ b/Runtime/Audio/AudioGraph/Generators/AudioGeneratorMono.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public abstract class AudioGeneratorMono:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Generators/AudioGeneratorStereo.cs b/Runtime/Audio/AudioGraph/Generators/AudioGeneratorStereo.cs index d241171..b2c25ec 100644 --- a/Runtime/Audio/AudioGraph/Generators/AudioGeneratorStereo.cs +++ b/Runtime/Audio/AudioGraph/Generators/AudioGeneratorStereo.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public abstract class AudioGeneratorStereo:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs b/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs index 223392e..1895d5e 100644 --- a/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs +++ b/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class DuoWaveTable diff --git a/Runtime/Audio/AudioGraph/Generators/PhaseGenerator.cs b/Runtime/Audio/AudioGraph/Generators/PhaseGenerator.cs index 987ba7a..8d06e02 100644 --- a/Runtime/Audio/AudioGraph/Generators/PhaseGenerator.cs +++ b/Runtime/Audio/AudioGraph/Generators/PhaseGenerator.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class PhaseGenerator:AudioGeneratorMono diff --git a/Runtime/Audio/AudioGraph/Generators/SineGenerator.cs b/Runtime/Audio/AudioGraph/Generators/SineGenerator.cs index 30b7b48..aa9cb4c 100644 --- a/Runtime/Audio/AudioGraph/Generators/SineGenerator.cs +++ b/Runtime/Audio/AudioGraph/Generators/SineGenerator.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class SineGenerator:AudioGeneratorMono diff --git a/Runtime/Audio/AudioGraph/Generators/WaveTable.cs b/Runtime/Audio/AudioGraph/Generators/WaveTable.cs index 5acfbfe..c9abf41 100644 --- a/Runtime/Audio/AudioGraph/Generators/WaveTable.cs +++ b/Runtime/Audio/AudioGraph/Generators/WaveTable.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class WaveTable:iPhaseGenerator @@ -22,7 +23,7 @@ namespace Rokojori samplePosition = MathX.Repeat( samplePosition, _samples.Length ); var l = (int) samplePosition; - var h = MathX.Repeat( l + 1, _samples.Length ); + var h = MathX.RepeatInt( l + 1, _samples.Length ); var lerp = samplePosition - l; diff --git a/Runtime/Audio/AudioGraph/Generators/WaveTableGenerator.cs b/Runtime/Audio/AudioGraph/Generators/WaveTableGenerator.cs index 0f0b6a8..94b328d 100644 --- a/Runtime/Audio/AudioGraph/Generators/WaveTableGenerator.cs +++ b/Runtime/Audio/AudioGraph/Generators/WaveTableGenerator.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class WaveTableGenerator:AudioGeneratorMono diff --git a/Runtime/Audio/AudioGraph/Generators/iPhaseGenerator.cs b/Runtime/Audio/AudioGraph/Generators/iPhaseGenerator.cs index 0694c69..e00e34b 100644 --- a/Runtime/Audio/AudioGraph/Generators/iPhaseGenerator.cs +++ b/Runtime/Audio/AudioGraph/Generators/iPhaseGenerator.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public interface iPhaseGenerator diff --git a/Runtime/Audio/AudioGraph/Instruments/Instrument.cs b/Runtime/Audio/AudioGraph/Instruments/Instrument.cs index cbb38de..fe40bf6 100644 --- a/Runtime/Audio/AudioGraph/Instruments/Instrument.cs +++ b/Runtime/Audio/AudioGraph/Instruments/Instrument.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class Instrument:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Instruments/MusicTimeLine.cs b/Runtime/Audio/AudioGraph/Instruments/MusicTimeLine.cs index 4a82deb..917ae05 100644 --- a/Runtime/Audio/AudioGraph/Instruments/MusicTimeLine.cs +++ b/Runtime/Audio/AudioGraph/Instruments/MusicTimeLine.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class MusicTimeLine:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Instruments/MusicTimeLineRange.cs b/Runtime/Audio/AudioGraph/Instruments/MusicTimeLineRange.cs index 5c69a19..89b8901 100644 --- a/Runtime/Audio/AudioGraph/Instruments/MusicTimeLineRange.cs +++ b/Runtime/Audio/AudioGraph/Instruments/MusicTimeLineRange.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class MusicTimeLineRange diff --git a/Runtime/Audio/AudioGraph/Instruments/NoteEvent.cs b/Runtime/Audio/AudioGraph/Instruments/NoteEvent.cs index 48639f8..f61cfc8 100644 --- a/Runtime/Audio/AudioGraph/Instruments/NoteEvent.cs +++ b/Runtime/Audio/AudioGraph/Instruments/NoteEvent.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class NoteEvent diff --git a/Runtime/Audio/AudioGraph/Instruments/Voice.cs b/Runtime/Audio/AudioGraph/Instruments/Voice.cs index 897ba8a..a3f3487 100644 --- a/Runtime/Audio/AudioGraph/Instruments/Voice.cs +++ b/Runtime/Audio/AudioGraph/Instruments/Voice.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public abstract class Voice diff --git a/Runtime/Audio/AudioGraph/Structure/AudioConnection.cs b/Runtime/Audio/AudioGraph/Structure/AudioConnection.cs index 97c8c59..2db9305 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioConnection.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioConnection.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioConnection : AudioNode diff --git a/Runtime/Audio/AudioGraph/Structure/AudioEvent.cs b/Runtime/Audio/AudioGraph/Structure/AudioEvent.cs index b22b6fd..ba49b99 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioEvent.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioEvent.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public abstract class AudioEvent : AudioConnection diff --git a/Runtime/Audio/AudioGraph/Structure/AudioEventInput.cs b/Runtime/Audio/AudioGraph/Structure/AudioEventInput.cs index 682d7cd..463b6ea 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioEventInput.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioEventInput.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public class AudioEventInput : AudioEvent diff --git a/Runtime/Audio/AudioGraph/Structure/AudioEventOutput.cs b/Runtime/Audio/AudioGraph/Structure/AudioEventOutput.cs index f8314e9..6740ed6 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioEventOutput.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioEventOutput.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioEventOutput : AudioEvent diff --git a/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs b/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs index cd9064c..eb85e6f 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioGraph:AudioProcessor diff --git a/Runtime/Audio/AudioGraph/Structure/AudioNode.cs b/Runtime/Audio/AudioGraph/Structure/AudioNode.cs index e87f950..181fc1a 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioNode.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioNode.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioNode diff --git a/Runtime/Audio/AudioGraph/Structure/AudioProcessor.cs b/Runtime/Audio/AudioGraph/Structure/AudioProcessor.cs index a6f324e..fef29f7 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioProcessor.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioProcessor.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioProcessor:AudioNode diff --git a/Runtime/Audio/AudioGraph/Structure/AudioStream.cs b/Runtime/Audio/AudioGraph/Structure/AudioStream.cs index 419776a..b8ff039 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioStream.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioStream.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioStream : AudioConnection diff --git a/Runtime/Audio/AudioGraph/Structure/AudioStreamInput.cs b/Runtime/Audio/AudioGraph/Structure/AudioStreamInput.cs index 47c1fff..50556c9 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioStreamInput.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioStreamInput.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public class AudioStreamInput : AudioStream diff --git a/Runtime/Audio/AudioGraph/Structure/AudioStreamOutput.cs b/Runtime/Audio/AudioGraph/Structure/AudioStreamOutput.cs index ad113d3..c1abf3e 100644 --- a/Runtime/Audio/AudioGraph/Structure/AudioStreamOutput.cs +++ b/Runtime/Audio/AudioGraph/Structure/AudioStreamOutput.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class AudioStreamOutput : AudioStream diff --git a/Runtime/Audio/AudioGraph/Test/SineWaveTest.cs b/Runtime/Audio/AudioGraph/Test/SineWaveTest.cs index 0f5afbe..01d0e55 100644 --- a/Runtime/Audio/AudioGraph/Test/SineWaveTest.cs +++ b/Runtime/Audio/AudioGraph/Test/SineWaveTest.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Audio/AudioManager/AudioFlag.cs b/Runtime/Audio/AudioManager/AudioFlag.cs index e572067..66b7a07 100644 --- a/Runtime/Audio/AudioManager/AudioFlag.cs +++ b/Runtime/Audio/AudioManager/AudioFlag.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass,Tool] diff --git a/Runtime/Audio/AudioManager/AudioManager.cs b/Runtime/Audio/AudioManager/AudioManager.cs index 2d1110d..f3fed9b 100644 --- a/Runtime/Audio/AudioManager/AudioManager.cs +++ b/Runtime/Audio/AudioManager/AudioManager.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass,Tool, Icon("res://addons/rokojori_action_library/Icons/AudioManager.svg") ] @@ -42,7 +43,7 @@ namespace Rokojori public void RecordSoundPlaying( AudioFlag selectorFlag ) { - _lastPlayTime[ selectorFlag ] = TimeLine.osTime; + _lastPlayTime[ selectorFlag ] = Timeline.osTime; } public bool CanPlay( AudioFlag selectorFlag, float blockDuration ) @@ -52,7 +53,7 @@ namespace Rokojori return true; } - return ( TimeLine.osTime - _lastPlayTime[ selectorFlag ] ) > blockDuration; + return ( Timeline.osTime - _lastPlayTime[ selectorFlag ] ) > blockDuration; } } diff --git a/Runtime/Audio/AudioManager/AudioManagerData.cs b/Runtime/Audio/AudioManager/AudioManagerData.cs index d92f34f..f441190 100644 --- a/Runtime/Audio/AudioManager/AudioManagerData.cs +++ b/Runtime/Audio/AudioManager/AudioManagerData.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass,Tool, Icon("res://addons/rokojori_action_library/Icons/AudioManager.svg") ] diff --git a/Runtime/Audio/MathAudio.cs b/Runtime/Audio/MathAudio.cs index 8a76207..6a156d1 100644 --- a/Runtime/Audio/MathAudio.cs +++ b/Runtime/Audio/MathAudio.cs @@ -4,6 +4,7 @@ using Godot; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public class MathAudio diff --git a/Runtime/Bits/BitMath.cs b/Runtime/Bits/BitMath.cs index 3a498f5..e9c6d0f 100644 --- a/Runtime/Bits/BitMath.cs +++ b/Runtime/Bits/BitMath.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class BitMath diff --git a/Runtime/Bits/BitViewTest.cs b/Runtime/Bits/BitViewTest.cs index d711696..509cc87 100644 --- a/Runtime/Bits/BitViewTest.cs +++ b/Runtime/Bits/BitViewTest.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class NetTransform: NetClassDefinition diff --git a/Runtime/Bits/BitView_Byte.cs b/Runtime/Bits/BitView_Byte.cs index 597ddb3..eaaf1b8 100644 --- a/Runtime/Bits/BitView_Byte.cs +++ b/Runtime/Bits/BitView_Byte.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public partial class BitView diff --git a/Runtime/Bits/BitView_Float.cs b/Runtime/Bits/BitView_Float.cs index d387df7..fae3412 100644 --- a/Runtime/Bits/BitView_Float.cs +++ b/Runtime/Bits/BitView_Float.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public partial class BitView diff --git a/Runtime/Bits/BitView_Int.cs b/Runtime/Bits/BitView_Int.cs index 2923e23..a3240e4 100644 --- a/Runtime/Bits/BitView_Int.cs +++ b/Runtime/Bits/BitView_Int.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public partial class BitView diff --git a/Runtime/Bits/BitView_IntVL8.cs b/Runtime/Bits/BitView_IntVL8.cs index e01a633..512f185 100644 --- a/Runtime/Bits/BitView_IntVL8.cs +++ b/Runtime/Bits/BitView_IntVL8.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public partial class BitView diff --git a/Runtime/Bits/BitView_Vector.cs b/Runtime/Bits/BitView_Vector.cs index 141c8b3..4a47bd3 100644 --- a/Runtime/Bits/BitView_Vector.cs +++ b/Runtime/Bits/BitView_Vector.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public partial class BitView diff --git a/Runtime/Bits/BitView__.cs b/Runtime/Bits/BitView__.cs index e58474e..b9982a4 100644 --- a/Runtime/Bits/BitView__.cs +++ b/Runtime/Bits/BitView__.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public partial class BitView diff --git a/Runtime/Bits/ByteView.cs b/Runtime/Bits/ByteView.cs index b5d4ff1..3090ce9 100644 --- a/Runtime/Bits/ByteView.cs +++ b/Runtime/Bits/ByteView.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class ByteView diff --git a/Runtime/Bits/Bytes.cs b/Runtime/Bits/Bytes.cs index 6b7ee67..1ec60f0 100644 --- a/Runtime/Bits/Bytes.cs +++ b/Runtime/Bits/Bytes.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Bytes diff --git a/Runtime/Cameras/CameraManager.cs b/Runtime/Cameras/CameraManager.cs index 5a269d0..99850dc 100644 --- a/Runtime/Cameras/CameraManager.cs +++ b/Runtime/Cameras/CameraManager.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -52,7 +53,7 @@ namespace Rokojori { get { - return Lists.GetWithHighestValue( _cameraSlots, c => c.priority ); + return ListExtensions.GetWithHighestValue( _cameraSlots, c => c.priority ); } } diff --git a/Runtime/Cameras/CameraSetupIcon.cs b/Runtime/Cameras/CameraSetupIcon.cs index 97b7581..cedf9d9 100644 --- a/Runtime/Cameras/CameraSetupIcon.cs +++ b/Runtime/Cameras/CameraSetupIcon.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraSlot.cs b/Runtime/Cameras/CameraSlot.cs index 505cce3..7e9a31e 100644 --- a/Runtime/Cameras/CameraSlot.cs +++ b/Runtime/Cameras/CameraSlot.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraSlotSelectors/CameraSlotSelector.cs b/Runtime/Cameras/CameraSlotSelectors/CameraSlotSelector.cs index 39d0784..a26e914 100644 --- a/Runtime/Cameras/CameraSlotSelectors/CameraSlotSelector.cs +++ b/Runtime/Cameras/CameraSlotSelectors/CameraSlotSelector.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraSlotSelectors/SetActiveCamera.cs b/Runtime/Cameras/CameraSlotSelectors/SetActiveCamera.cs index 6e682e5..3e182f6 100644 --- a/Runtime/Cameras/CameraSlotSelectors/SetActiveCamera.cs +++ b/Runtime/Cameras/CameraSlotSelectors/SetActiveCamera.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlot.cs b/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlot.cs index dfcad86..bd378e6 100644 --- a/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlot.cs +++ b/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlot.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotByFlags.cs b/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotByFlags.cs index c0ed6ef..6dbda94 100644 --- a/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotByFlags.cs +++ b/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotByFlags.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotIndex.cs b/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotIndex.cs index 0490458..c51aa6d 100644 --- a/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotIndex.cs +++ b/Runtime/Cameras/CameraSlotSelectors/SetActiveCameraSlotIndex.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTargetOffset.cs b/Runtime/Cameras/CameraTargetOffset.cs index f4a60b8..82bdb89 100644 --- a/Runtime/Cameras/CameraTargetOffset.cs +++ b/Runtime/Cameras/CameraTargetOffset.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTypes/FirstPersonCamera/FirstPersonCamera.cs b/Runtime/Cameras/CameraTypes/FirstPersonCamera/FirstPersonCamera.cs index 0ddd7cd..58458ca 100644 --- a/Runtime/Cameras/CameraTypes/FirstPersonCamera/FirstPersonCamera.cs +++ b/Runtime/Cameras/CameraTypes/FirstPersonCamera/FirstPersonCamera.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTypes/FollowCamera/FollowCamera3D.cs b/Runtime/Cameras/CameraTypes/FollowCamera/FollowCamera3D.cs index 033dc0c..3e6322d 100644 --- a/Runtime/Cameras/CameraTypes/FollowCamera/FollowCamera3D.cs +++ b/Runtime/Cameras/CameraTypes/FollowCamera/FollowCamera3D.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTypes/LookAtCamera/LookAtCamera.cs b/Runtime/Cameras/CameraTypes/LookAtCamera/LookAtCamera.cs index 2128658..7d77074 100644 --- a/Runtime/Cameras/CameraTypes/LookAtCamera/LookAtCamera.cs +++ b/Runtime/Cameras/CameraTypes/LookAtCamera/LookAtCamera.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -27,7 +28,7 @@ namespace Rokojori public Smoothing smoothing; [Export] - public TimeLine timeLine; + public Timeline timeLine; [ExportToolButton( "Copy Camera Pose With Target")] diff --git a/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs b/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs index d034d68..e0faeb3 100644 --- a/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs +++ b/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCamera.cs b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCamera.cs index 15889d8..b3a8320 100644 --- a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCamera.cs +++ b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCamera.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraData.cs b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraData.cs index 4a07fb9..2cf8b48 100644 --- a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraData.cs +++ b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraData.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraSettings.cs b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraSettings.cs index b41b1c7..e84a618 100644 --- a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraSettings.cs +++ b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraSettings.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraTargetOffset.cs b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraTargetOffset.cs index 28fadf5..5ba24c4 100644 --- a/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraTargetOffset.cs +++ b/Runtime/Cameras/CameraTypes/ThirdPersonCamera/ThirdPersonCameraTargetOffset.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/EditorCamera/EditorCamera.cs b/Runtime/Cameras/EditorCamera/EditorCamera.cs index b472a8e..4b1509f 100644 --- a/Runtime/Cameras/EditorCamera/EditorCamera.cs +++ b/Runtime/Cameras/EditorCamera/EditorCamera.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/EditorCamera/EditorCameraInputSettings.cs b/Runtime/Cameras/EditorCamera/EditorCameraInputSettings.cs index c3fb791..c3690a6 100644 --- a/Runtime/Cameras/EditorCamera/EditorCameraInputSettings.cs +++ b/Runtime/Cameras/EditorCamera/EditorCameraInputSettings.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/Effects/CameraEffect.cs b/Runtime/Cameras/Effects/CameraEffect.cs index 93e14c7..70553ed 100644 --- a/Runtime/Cameras/Effects/CameraEffect.cs +++ b/Runtime/Cameras/Effects/CameraEffect.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -16,7 +17,7 @@ namespace Rokojori public CameraEffectTargetAnimationCurve[] animations = new CameraEffectTargetAnimationCurve[ 0 ]; [Export] - public TimeLine timeline; + public Timeline timeline; public float maxDuration { @@ -79,7 +80,7 @@ namespace Rokojori void Apply( CameraEffectTargetAnimationCurve curve, int index ) { - var value = curve.Sample( timePosition, randomOffsets[ index ] ); + var value = curve.SampleRandomized( timePosition, randomOffsets[ index ] ); if ( curve.flipScaleYRandomly && GodotRandom.Get().FlipCoin() ) { diff --git a/Runtime/Cameras/Effects/CameraEffectTargetAnimationCurve.cs b/Runtime/Cameras/Effects/CameraEffectTargetAnimationCurve.cs index 2f30147..b5ce7fc 100644 --- a/Runtime/Cameras/Effects/CameraEffectTargetAnimationCurve.cs +++ b/Runtime/Cameras/Effects/CameraEffectTargetAnimationCurve.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/Effects/CameraEffectTargetType.cs b/Runtime/Cameras/Effects/CameraEffectTargetType.cs index f84f2c6..bfa0d85 100644 --- a/Runtime/Cameras/Effects/CameraEffectTargetType.cs +++ b/Runtime/Cameras/Effects/CameraEffectTargetType.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum CameraEffectTargetType diff --git a/Runtime/Cameras/Effects/PlayCameraEffect.cs b/Runtime/Cameras/Effects/PlayCameraEffect.cs index 7d68c70..145b79e 100644 --- a/Runtime/Cameras/Effects/PlayCameraEffect.cs +++ b/Runtime/Cameras/Effects/PlayCameraEffect.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/Effects/Presets/Earth Quake.tres b/Runtime/Cameras/Effects/Presets/Earth Quake.tres index 6617c24..c3f1520 100644 --- a/Runtime/Cameras/Effects/Presets/Earth Quake.tres +++ b/Runtime/Cameras/Effects/Presets/Earth Quake.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://bw7kbgl2vbeoh" path="res://addons/rokojori_action_library/Runtime/Cameras/Effects/CameraEffectTargetAnimationCurve.cs" id="1_m7t4k"] [ext_resource type="Script" uid="uid://bmcpy4cqv1lmr" path="res://addons/rokojori_action_library/Runtime/Cameras/Effects/CameraEffect.cs" id="2_ahqbp"] -[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/RealTime.tres" id="3_iffro"] +[ext_resource type="Resource" uid="uid://h6oi6vkj4c2m" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Real Time.tres" id="3_iffro"] [sub_resource type="Curve" id="Curve_62jxv"] _limits = [-1.0, 1.0, 0.0, 1.0] diff --git a/Runtime/Cameras/Effects/Presets/ScreenShake.tres b/Runtime/Cameras/Effects/Presets/ScreenShake.tres index 962cd43..a53dbc5 100644 --- a/Runtime/Cameras/Effects/Presets/ScreenShake.tres +++ b/Runtime/Cameras/Effects/Presets/ScreenShake.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://bmcpy4cqv1lmr" path="res://addons/rokojori_action_library/Runtime/Cameras/Effects/CameraEffect.cs" id="1_5l6xm"] [ext_resource type="Script" uid="uid://bw7kbgl2vbeoh" path="res://addons/rokojori_action_library/Runtime/Cameras/Effects/CameraEffectTargetAnimationCurve.cs" id="1_x21rf"] -[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/GameTime.tres" id="3_lfgu3"] +[ext_resource type="Resource" uid="uid://ch5nsa6yafs5l" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/Game Time.tres" id="3_lfgu3"] [sub_resource type="Curve" id="Curve_62jxv"] _limits = [-1.0, 1.0, 0.0, 1.0] diff --git a/Runtime/Cameras/Effects/ScreenShake.cs b/Runtime/Cameras/Effects/ScreenShake.cs index 0cc2ffc..1de4477 100644 --- a/Runtime/Cameras/Effects/ScreenShake.cs +++ b/Runtime/Cameras/Effects/ScreenShake.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -64,7 +65,7 @@ namespace Rokojori // this.LogInfo( "Camera slot found" ); var cameraEffect = new CameraEffect(); - cameraEffect.timeline = TimeLineManager.Ensure( settings.duration.timeLine ); + cameraEffect.timeline = TimelineManager.Ensure( settings.duration.timeLine ); resolvedSlot.SetCameraEffect( cameraEffect ); } diff --git a/Runtime/Cameras/Effects/ScreenShakeSettings.cs b/Runtime/Cameras/Effects/ScreenShakeSettings.cs index e942c2a..125c5b0 100644 --- a/Runtime/Cameras/Effects/ScreenShakeSettings.cs +++ b/Runtime/Cameras/Effects/ScreenShakeSettings.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/AdjustmentsEffect.cs b/Runtime/Cameras/PostProcess/AdjustmentsEffect.cs index d182051..854bb7b 100644 --- a/Runtime/Cameras/PostProcess/AdjustmentsEffect.cs +++ b/Runtime/Cameras/PostProcess/AdjustmentsEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/CenterAndRangeDepthOfFieldEffect.cs b/Runtime/Cameras/PostProcess/CenterAndRangeDepthOfFieldEffect.cs index bd1c3ab..c179359 100644 --- a/Runtime/Cameras/PostProcess/CenterAndRangeDepthOfFieldEffect.cs +++ b/Runtime/Cameras/PostProcess/CenterAndRangeDepthOfFieldEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/FixedDepthOfFieldEffect.cs b/Runtime/Cameras/PostProcess/FixedDepthOfFieldEffect.cs index 25c5df6..96e3757 100644 --- a/Runtime/Cameras/PostProcess/FixedDepthOfFieldEffect.cs +++ b/Runtime/Cameras/PostProcess/FixedDepthOfFieldEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/FogEffect.cs b/Runtime/Cameras/PostProcess/FogEffect.cs index 0a24e8f..e6aedf5 100644 --- a/Runtime/Cameras/PostProcess/FogEffect.cs +++ b/Runtime/Cameras/PostProcess/FogEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/FollowDepthOfFieldEffect.cs b/Runtime/Cameras/PostProcess/FollowDepthOfFieldEffect.cs index 3ef45df..aeaf886 100644 --- a/Runtime/Cameras/PostProcess/FollowDepthOfFieldEffect.cs +++ b/Runtime/Cameras/PostProcess/FollowDepthOfFieldEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/GlowEffect.cs b/Runtime/Cameras/PostProcess/GlowEffect.cs index 8494803..de06f7c 100644 --- a/Runtime/Cameras/PostProcess/GlowEffect.cs +++ b/Runtime/Cameras/PostProcess/GlowEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/GlowEffectLevels.cs b/Runtime/Cameras/PostProcess/GlowEffectLevels.cs index 3c8d23f..eb4d165 100644 --- a/Runtime/Cameras/PostProcess/GlowEffectLevels.cs +++ b/Runtime/Cameras/PostProcess/GlowEffectLevels.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/PostProcessEffectProcessor.cs b/Runtime/Cameras/PostProcess/PostProcessEffectProcessor.cs index 9232fcc..8f5e0ed 100644 --- a/Runtime/Cameras/PostProcess/PostProcessEffectProcessor.cs +++ b/Runtime/Cameras/PostProcess/PostProcessEffectProcessor.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public interface IPostProcessEffectProcessor diff --git a/Runtime/Cameras/PostProcess/PostProcessVolume.cs b/Runtime/Cameras/PostProcess/PostProcessVolume.cs index 26967b5..f84138a 100644 --- a/Runtime/Cameras/PostProcess/PostProcessVolume.cs +++ b/Runtime/Cameras/PostProcess/PostProcessVolume.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/PostProcessVolumeEffect.cs b/Runtime/Cameras/PostProcess/PostProcessVolumeEffect.cs index c7e61cc..9b8782b 100644 --- a/Runtime/Cameras/PostProcess/PostProcessVolumeEffect.cs +++ b/Runtime/Cameras/PostProcess/PostProcessVolumeEffect.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/PostProcess/_XX_DepthOfFieldEffect.cs b/Runtime/Cameras/PostProcess/_XX_DepthOfFieldEffect.cs index 3b24a15..667a29b 100644 --- a/Runtime/Cameras/PostProcess/_XX_DepthOfFieldEffect.cs +++ b/Runtime/Cameras/PostProcess/_XX_DepthOfFieldEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/RemoveCameraSlot.cs b/Runtime/Cameras/RemoveCameraSlot.cs index ed4113b..81ddb03 100644 --- a/Runtime/Cameras/RemoveCameraSlot.cs +++ b/Runtime/Cameras/RemoveCameraSlot.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/SetCameraFarDOF.cs b/Runtime/Cameras/SetCameraFarDOF.cs index 20f700d..a087d72 100644 --- a/Runtime/Cameras/SetCameraFarDOF.cs +++ b/Runtime/Cameras/SetCameraFarDOF.cs @@ -3,6 +3,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/SetVirtualCameraInput.cs b/Runtime/Cameras/SetVirtualCameraInput.cs index 473f939..75ae92c 100644 --- a/Runtime/Cameras/SetVirtualCameraInput.cs +++ b/Runtime/Cameras/SetVirtualCameraInput.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Cameras/VirtualCamera.cs b/Runtime/Cameras/VirtualCamera.cs index 11406b9..b25419f 100644 --- a/Runtime/Cameras/VirtualCamera.cs +++ b/Runtime/Cameras/VirtualCamera.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Colors/ColorBlendMode.cs b/Runtime/Colors/ColorBlendMode.cs index 0cde749..a5d1c4a 100644 --- a/Runtime/Colors/ColorBlendMode.cs +++ b/Runtime/Colors/ColorBlendMode.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum ColorBlendModeType diff --git a/Runtime/Colors/ColorChannelType.cs b/Runtime/Colors/ColorChannelType.cs index 1617dd3..dbcbf36 100644 --- a/Runtime/Colors/ColorChannelType.cs +++ b/Runtime/Colors/ColorChannelType.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum ColorChannelType @@ -43,6 +44,8 @@ namespace Rokojori public static string ToGLSLMember( string source, ColorChannelType colorChannelType ) { + #if ! ROKOJORI_ACTION_CORE_GD + if ( ColorChannelType.Red == colorChannelType ) { return $"{source}.r"; @@ -79,7 +82,8 @@ namespace Rokojori return $"RGBtoHSL( {source} ).u"; } - return null; + #endif + return ""; } } } diff --git a/Runtime/Colors/ColorX.cs b/Runtime/Colors/ColorX.cs index 3966d2b..9910458 100644 --- a/Runtime/Colors/ColorX.cs +++ b/Runtime/Colors/ColorX.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public static class ColorX @@ -130,7 +131,7 @@ namespace Rokojori } - public static float SRGBtoLinear( float value ) + public static float SRGBtoLinearValue( float value ) { return value < 0.04045f ? value * ( 1.0f / 12.92f ) : Mathf.Pow( ( value + 0.055f) * ( 1f / ( 1f + 0.055f ) ), 2.4f ); @@ -139,14 +140,14 @@ namespace Rokojori public static Color SRGBtoLinear( this Color color ) { return new Color( - SRGBtoLinear( color.R ), - SRGBtoLinear( color.G ), - SRGBtoLinear( color.B ), + SRGBtoLinearValue( color.R ), + SRGBtoLinearValue( color.G ), + SRGBtoLinearValue( color.B ), color.A ); } - public static float LinearToSRGB( float value ) + public static float LinearToSRGBValue( float value ) { return value < 0.0031308f ? 12.92f * value : ( 1.0f + 0.055f ) * Mathf.Pow( value, 1.0f / 2.4f ) - 0.055f; @@ -155,9 +156,9 @@ namespace Rokojori public static Color LinearToSRGB( this Color color ) { return new Color( - LinearToSRGB( color.R ), - LinearToSRGB( color.G ), - LinearToSRGB( color.B ), + LinearToSRGBValue( color.R ), + LinearToSRGBValue( color.G ), + LinearToSRGBValue( color.B ), color.A ); } @@ -258,22 +259,22 @@ namespace Rokojori return new Vector4( color.R, color.G, color.B, color.A ); } - public static Color ToColor( this Vector4 color ) + public static Color ToColorFromVec4( this Vector4 color ) { return new Color( color.X, color.Y, color.Z, color.W ); } - public static Color ToColor( this Vector3 color ) + public static Color ToColorFromVec3( this Vector3 color ) { return new Color( color.X, color.Y, color.Z, 1f ); } - public static Color ToColor( this Vector3 vec, float alpha = 1 ) + public static Color ToColorFromVec3A( this Vector3 vec, float alpha = 1 ) { return new Color( vec.X, vec.Y, vec.Z, alpha); } - public static Color ToColor( this Vector2 vec, float b = 0, float alpha = 1 ) + public static Color ToColorFromVec2BA( this Vector2 vec, float b = 0, float alpha = 1 ) { return new Color( vec.X, vec.Y, b, alpha); } @@ -370,7 +371,7 @@ namespace Rokojori var hslBottom = HSLColor.FromRGBA( bottom ); var hslTop = HSLColor.FromRGBA( top ); - var combined = bottom.A == 0 ? bottom : (Color)( new HSLColor( hslTop.h, hslTop.s, hslBottom.l, top.A ) ); + var combined = bottom.A == 0 ? bottom : new HSLColor( hslTop.h, hslTop.s, hslBottom.l, top.A ).ToRGBA() ; return ColorX.Blend( bottom, combined ); } diff --git a/Runtime/Colors/HSLColor.cs b/Runtime/Colors/HSLColor.cs index 8093c2a..d83b15e 100644 --- a/Runtime/Colors/HSLColor.cs +++ b/Runtime/Colors/HSLColor.cs @@ -1,15 +1,16 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public struct HSLColor { - public static readonly HSLColor white = new HSLColor( new Color( 1, 1, 1, 1 ) ); - public static readonly HSLColor red = new HSLColor( new Color( 1, 0, 0, 1 ) ); - public static readonly HSLColor green = new HSLColor( new Color( 0, 1, 0, 1 ) ); - public static readonly HSLColor blue = new HSLColor( new Color( 0, 0, 1, 1 ) ); - public static readonly HSLColor black = new HSLColor( new Color( 0, 0, 0, 1 ) ); + public static readonly HSLColor white = FromRGBA( new Color( 1, 1, 1, 1 ) ); + public static readonly HSLColor red = FromRGBA( new Color( 1, 0, 0, 1 ) ); + public static readonly HSLColor green = FromRGBA( new Color( 0, 1, 0, 1 ) ); + public static readonly HSLColor blue = FromRGBA( new Color( 0, 0, 1, 1 ) ); + public static readonly HSLColor black = FromRGBA( new Color( 0, 0, 0, 1 ) ); // hue in degrees 0 - 360 public float h; @@ -21,21 +22,13 @@ namespace Rokojori public float a; - public HSLColor( float h, float s, float l, float a ) + public HSLColor( float h, float s, float l, float a = 1f ) { this.h = h; this.s = s; this.l = l; this.a = a; } - - public HSLColor( float h, float s, float l ) - { - this.h = h; - this.s = s; - this.l = l; - this.a = 1f; - } public float lumaBT601 { @@ -70,14 +63,14 @@ namespace Rokojori get { return h / 360f;} } - public HSLColor( Color c ) - { - HSLColor temp = FromRGBA( c ); - h = temp.h; - s = temp.s; - l = temp.l; - a = temp.a; - } + // public HSLColor( Color c ) + // { + // HSLColor temp = FromRGBA( c ); + // h = temp.h; + // s = temp.s; + // l = temp.l; + // a = temp.a; + // } public void ClampToLimits() { @@ -134,12 +127,12 @@ namespace Rokojori return new HSLColor( h, s, l, a ); } - public static HSLColor Lerp( HSLColor x, HSLColor y, float t ) + public static HSLColor HSLLerp( HSLColor x, HSLColor y, float t ) { - return Lerp( x, y, Vector4.One * t ); + return HSLLerpIndividually( x, y, Vector4.One * t ); } - public static HSLColor Lerp( HSLColor x, HSLColor y, Vector4 t ) + public static HSLColor HSLLerpIndividually( HSLColor x, HSLColor y, Vector4 t ) { float h = MathX.LerpAngleDegrees( x.h, y.h, t.X ); float s = Mathf.Lerp( x.s, y.s, t.Y ); @@ -151,7 +144,7 @@ namespace Rokojori public static HSLColor LerpWithHueInRGB( HSLColor x, HSLColor y, float t ) { - return LerpWithHueInRGB( x, y, Vector4.One * t ); + return LerpWithHueInRGBIndividually( x, y, Vector4.One * t ); } public static float BlendHueInRGB( HSLColor x, HSLColor y, float weight ) @@ -164,7 +157,7 @@ namespace Rokojori return MathX.EnsureValidFloat( hsl.h ); } - public static HSLColor LerpWithHueInRGB( HSLColor x, HSLColor y, Vector4 v ) + public static HSLColor LerpWithHueInRGBIndividually( HSLColor x, HSLColor y, Vector4 v ) { float h = BlendHueInRGB( x, y, v.X ); float s = Mathf.Lerp( x.s, y.s, v.W ); @@ -226,10 +219,10 @@ namespace Rokojori public static Color Lerp( Color x, Color y, float t ) { - var hx = new HSLColor( x ); - var hy = new HSLColor( y ); + var hx = FromRGBA( x ); + var hy = FromRGBA( y ); - var h = Lerp( hx, hy, t ); + var h = HSLLerp( hx, hy, t ); return h.ToRGBA(); } @@ -249,7 +242,9 @@ namespace Rokojori if ( s <= 0f ) { - r = g = b = l; + r = l; + g = l; + b = l; } else { diff --git a/Runtime/Conditions/Condition.cs b/Runtime/Conditions/Condition.cs index a47569d..fdad943 100644 --- a/Runtime/Conditions/Condition.cs +++ b/Runtime/Conditions/Condition.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { interface iCondition diff --git a/Runtime/Conditions/DistanceCondition.cs b/Runtime/Conditions/DistanceCondition.cs index 46f9fd2..5ce804b 100644 --- a/Runtime/Conditions/DistanceCondition.cs +++ b/Runtime/Conditions/DistanceCondition.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Conditions/SceneCondition.cs b/Runtime/Conditions/SceneCondition.cs index f877449..379d8e9 100644 --- a/Runtime/Conditions/SceneCondition.cs +++ b/Runtime/Conditions/SceneCondition.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Events/EventProperty.cs b/Runtime/Events/EventProperty.cs index e3bee39..43dde1e 100644 --- a/Runtime/Events/EventProperty.cs +++ b/Runtime/Events/EventProperty.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Events/EventSlot.cs b/Runtime/Events/EventSlot.cs index 989ea0a..0556cc7 100644 --- a/Runtime/Events/EventSlot.cs +++ b/Runtime/Events/EventSlot.cs @@ -5,6 +5,7 @@ using System; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public class EventSlot @@ -96,7 +97,7 @@ namespace Rokojori if ( _removals.Count > 0 ) { - Lists.RemoveList( _actions, _removals ); + ListExtensions.RemoveList( _actions, _removals ); // _removals.ForEach( // r => diff --git a/Runtime/Events/Null.cs b/Runtime/Events/Null.cs index 038a736..5b38004 100644 --- a/Runtime/Events/Null.cs +++ b/Runtime/Events/Null.cs @@ -5,8 +5,10 @@ using System; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { + [RokojoriActionCoreGDIgnore] public class Null { private Null(){} diff --git a/Runtime/Events/Signals.cs b/Runtime/Events/Signals.cs index 00a079e..6777545 100644 --- a/Runtime/Events/Signals.cs +++ b/Runtime/Events/Signals.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class Signals diff --git a/Runtime/Extensions/System/DictionaryExtensions.cs b/Runtime/Extensions/System/DictionaryExtensions.cs new file mode 100644 index 0000000..e88ce3c --- /dev/null +++ b/Runtime/Extensions/System/DictionaryExtensions.cs @@ -0,0 +1,42 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + +using System; +using System.Linq; +using System.IO; +using System.Diagnostics; +using Godot; + +using Rokojori.Extensions; +namespace Rokojori.Extensions; + +public static class DictionaryExtensions +{ + public static V GetOr( this Dictionary map, K key, V orValue ) + { + if ( map.ContainsKey( key ) ) + { + return map[ key ]; + } + + return orValue; + } + + public static void ForEach( this Dictionary map, Action callback ) + { + foreach ( var item in map ) + { + callback( item.Key, item.Value ); + } + } + + public static void ForEachKey( this Dictionary map, Action callback ) + { + foreach ( var item in map ) + { + callback( item.Key ); + } + } +} diff --git a/Runtime/Extensions/System/DictionaryExtensions.cs.uid b/Runtime/Extensions/System/DictionaryExtensions.cs.uid new file mode 100644 index 0000000..c6238b9 --- /dev/null +++ b/Runtime/Extensions/System/DictionaryExtensions.cs.uid @@ -0,0 +1 @@ +uid://5ogfddlwonow diff --git a/Runtime/Extensions/System/HashSetExtensions.cs b/Runtime/Extensions/System/HashSetExtensions.cs new file mode 100644 index 0000000..e8e9a5e --- /dev/null +++ b/Runtime/Extensions/System/HashSetExtensions.cs @@ -0,0 +1,24 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + +using System; +using System.Linq; +using System.IO; +using System.Diagnostics; +using Godot; + +using Rokojori.Extensions; +namespace Rokojori.Extensions; + +public static class HashSetExtensions +{ + public static void ForEach( this HashSet set, Action callback ) + { + foreach ( var item in set ) + { + callback( item ); + } + } +} diff --git a/Runtime/Extensions/System/HashSetExtensions.cs.uid b/Runtime/Extensions/System/HashSetExtensions.cs.uid new file mode 100644 index 0000000..e3236c0 --- /dev/null +++ b/Runtime/Extensions/System/HashSetExtensions.cs.uid @@ -0,0 +1 @@ +uid://bi3bqh1f0fm0g diff --git a/Runtime/Extensions/System/StringExtensions.cs b/Runtime/Extensions/System/StringExtensions.cs new file mode 100644 index 0000000..443e19a --- /dev/null +++ b/Runtime/Extensions/System/StringExtensions.cs @@ -0,0 +1,90 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + +using System; +using System.Linq; +using System.IO; +using System.Diagnostics; +using Godot; + +using Rokojori.Extensions; +namespace Rokojori.Extensions; + +public static class StringExtensions +{ + public static bool Matches( this string value, string regex, RegexOptions options = RegexOptions.None ) + { + var match = new Regex( regex, options ).Match( value ); + return match != null && match.Success; + } + + public static List GetMatches( this string value, string regex, RegexOptions options = RegexOptions.None ) + { + var matches = Regex.Matches( value, regex, options); + + if ( matches.Count == 0 ) + { + return null; + } + + var list = new List(); + + foreach ( var m in matches ) + { + list.Add( ( m as Match ).Value ); + } + + return list; + } + + public static string GetMatch( this string value, string regex, RegexOptions options = RegexOptions.None ) + { + var matches = Regex.Matches( value, regex, options); + + if ( matches.Count == 0 ) + { + return null; + } + + foreach ( var m in matches ) + { + return ( m as Match ).Value; + } + + return null; + } + + public static string ReplaceRegex( this string value, string regex, string replacement, RegexOptions options = RegexOptions.None ) + { + return value.Replace( new Regex( regex, options ), replacement ); + } + + public static string IncrementEndNumbersIfPresent( this string value, System.Func containsName ) + { + var endingInts = $"\\d+$"; + + while ( containsName( value ) ) + { + + if ( value.Matches( endingInts ) ) + { + var number = RegexUtility.ParseInt( value.GetMatch( endingInts ) ); + + value = value.ReplaceRegex( endingInts, ( number + 1 ) + "" ); + } + else + { + value += " 2"; + } + } + + return value; + } + + public static List SplitLines( this string source ) + { + return Regex.Split( source, "\r\n|\r|\n" ).ToList(); + } +} diff --git a/Runtime/Extensions/System/StringExtensions.cs.uid b/Runtime/Extensions/System/StringExtensions.cs.uid new file mode 100644 index 0000000..0033ddc --- /dev/null +++ b/Runtime/Extensions/System/StringExtensions.cs.uid @@ -0,0 +1 @@ +uid://db1t1crf21sx2 diff --git a/Runtime/Files/FilePath.cs b/Runtime/Files/FilePath.cs index 724c888..d7e08cd 100644 --- a/Runtime/Files/FilePath.cs +++ b/Runtime/Files/FilePath.cs @@ -5,6 +5,7 @@ using System.IO; using System.Text; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public enum FilePathType @@ -107,6 +108,8 @@ namespace Rokojori } } + #if ! ROKOJORI_ACTION_CORE_GD + public T LoadJSON() where T:new() { return (T) FilesSync.LoadJSON( absolutePath ); @@ -117,6 +120,7 @@ namespace Rokojori return FilesSync.LoadUTF8( absolutePath ); } + #endif public static FilePath Create( string path, FilePathType type = FilePathType.Relative, FilePath parent = null ) { @@ -157,6 +161,11 @@ namespace Rokojori return rp; } + public override string ToString() + { + return absolutePath; + } + public string absolutePath { get @@ -208,7 +217,7 @@ namespace Rokojori } - public FilePath MakeRelative( string path ) + public FilePath MakeRelativeFromPath( string path ) { return FilePath.Create( path, FilePathType.Relative, this ); } @@ -276,7 +285,7 @@ namespace Rokojori - return MakeRelative( dirs + commonRelativeFilePath.path ); + return MakeRelativeFromPath( dirs + commonRelativeFilePath.path ); } // A/B/C @@ -286,7 +295,7 @@ namespace Rokojori relativePath = relativePath.ReplaceStart( "/" ); - return MakeRelative( relativePath ); + return MakeRelativeFromPath( relativePath ); } public FilePath MakeRelative( FilePath path ) diff --git a/Runtime/Files/FilesSync.cs b/Runtime/Files/FilesSync.cs index 0db62a6..770a654 100644 --- a/Runtime/Files/FilesSync.cs +++ b/Runtime/Files/FilesSync.cs @@ -6,8 +6,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { + [RokojoriActionCoreGDIgnore] public class FilesSync { public static void CopyTo( string fromPath, string toPath, bool overwrite = true ) @@ -158,7 +160,7 @@ namespace Rokojori { var fileName = Path.GetFileName( files[ i ] ); - var relativePath = absolutePath.MakeRelative( fileName ); + var relativePath = absolutePath.MakeRelativeFromPath( fileName ); if ( evaluator == null || evaluator( relativePath ) ) { diff --git a/Runtime/Files/GDFilesSync.cs b/Runtime/Files/GDFilesSync.cs index c3b37e0..7592d73 100644 --- a/Runtime/Files/GDFilesSync.cs +++ b/Runtime/Files/GDFilesSync.cs @@ -2,6 +2,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori; public class GDFilesSync diff --git a/Runtime/GDScript/GDScriptNames.cs b/Runtime/GDScript/GDScriptNames.cs index 197caad..9059af8 100644 --- a/Runtime/GDScript/GDScriptNames.cs +++ b/Runtime/GDScript/GDScriptNames.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public static class GDScriptNames diff --git a/Runtime/GameObjects/GameObject.cs b/Runtime/GameObjects/GameObject.cs index bc130f5..b5658e4 100644 --- a/Runtime/GameObjects/GameObject.cs +++ b/Runtime/GameObjects/GameObject.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/GameObjects/GameObject3D.cs b/Runtime/GameObjects/GameObject3D.cs index aefeaed..83ce080 100644 --- a/Runtime/GameObjects/GameObject3D.cs +++ b/Runtime/GameObjects/GameObject3D.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/GameObjects/NodeContainer.cs b/Runtime/GameObjects/NodeContainer.cs index 5e04df0..d42f10b 100644 --- a/Runtime/GameObjects/NodeContainer.cs +++ b/Runtime/GameObjects/NodeContainer.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/GameObjects/Variables/Int/ChangeIntVariable.cs b/Runtime/GameObjects/Variables/Int/ChangeIntVariable.cs index f6b148c..e44f140 100644 --- a/Runtime/GameObjects/Variables/Int/ChangeIntVariable.cs +++ b/Runtime/GameObjects/Variables/Int/ChangeIntVariable.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/GameObjects/Variables/Int/IntVariable.cs b/Runtime/GameObjects/Variables/Int/IntVariable.cs index 6e6f404..bd51665 100644 --- a/Runtime/GameObjects/Variables/Int/IntVariable.cs +++ b/Runtime/GameObjects/Variables/Int/IntVariable.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/GameObjects/Variables/Int/IntVariableClass.cs b/Runtime/GameObjects/Variables/Int/IntVariableClass.cs index 70d24f0..c59c9d1 100644 --- a/Runtime/GameObjects/Variables/Int/IntVariableClass.cs +++ b/Runtime/GameObjects/Variables/Int/IntVariableClass.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Godot/CachedResource.cs b/Runtime/Godot/CachedResource.cs index 5394ff2..ce29af4 100644 --- a/Runtime/Godot/CachedResource.cs +++ b/Runtime/Godot/CachedResource.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class CachedResource where T:Resource diff --git a/Runtime/Godot/Cameras.cs b/Runtime/Godot/Cameras.cs index 22ab686..a83ef7d 100644 --- a/Runtime/Godot/Cameras.cs +++ b/Runtime/Godot/Cameras.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Cameras diff --git a/Runtime/Godot/CustomDisposer.cs b/Runtime/Godot/CustomDisposer.cs index 711ef75..3ea68d4 100644 --- a/Runtime/Godot/CustomDisposer.cs +++ b/Runtime/Godot/CustomDisposer.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface ICustomDisposer diff --git a/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInDataLibrary.cs b/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInDataLibrary.cs index 5e36ad3..8310f9f 100644 --- a/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInDataLibrary.cs +++ b/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInDataLibrary.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class GodotBuiltInDataLibrary diff --git a/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInSerializer.cs b/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInSerializer.cs index 6990510..1d3a114 100644 --- a/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInSerializer.cs +++ b/Runtime/Godot/Editor/GodotBuiltInTypes/GodotBuiltInSerializer.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class GodotBuiltInSerializer diff --git a/Runtime/Godot/Editor/GodotBuiltInTypes/SerializedGodotCurve.cs b/Runtime/Godot/Editor/GodotBuiltInTypes/SerializedGodotCurve.cs index 5654750..de83ed0 100644 --- a/Runtime/Godot/Editor/GodotBuiltInTypes/SerializedGodotCurve.cs +++ b/Runtime/Godot/Editor/GodotBuiltInTypes/SerializedGodotCurve.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SerializedGodotCurve: GodotBuiltInSerializer diff --git a/Runtime/Godot/Editor/GodotNodeData.cs b/Runtime/Godot/Editor/GodotNodeData.cs index 56f5bf6..c6b3996 100644 --- a/Runtime/Godot/Editor/GodotNodeData.cs +++ b/Runtime/Godot/Editor/GodotNodeData.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SerializedGodotObjectMember @@ -40,7 +41,7 @@ namespace Rokojori var result = value == other.value || value.Equals( other.value ) || - Lists.AreListsAndEntriesEqual( value, other.value ) || + ListExtensions.AreListsAndEntriesEqual( value, other.value ) || Arrays.AreArraysAndEntriesEqual( value, other.value ); if ( ! result && debug ) diff --git a/Runtime/Godot/Editor/TransformChange.cs b/Runtime/Godot/Editor/TransformChange.cs index 2757d88..ffe82ad 100644 --- a/Runtime/Godot/Editor/TransformChange.cs +++ b/Runtime/Godot/Editor/TransformChange.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class TransformChange diff --git a/Runtime/Godot/Editor/Undo.cs b/Runtime/Godot/Editor/Undo.cs index 39b1796..8a80863 100644 --- a/Runtime/Godot/Editor/Undo.cs +++ b/Runtime/Godot/Editor/Undo.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class UndoGDMarker diff --git a/Runtime/Godot/Extensions/ArrayExtensions.cs b/Runtime/Godot/Extensions/ArrayExtensions.cs index 3c66ada..9a9bf8d 100644 --- a/Runtime/Godot/Extensions/ArrayExtensions.cs +++ b/Runtime/Godot/Extensions/ArrayExtensions.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public static class ArrayExtensions diff --git a/Runtime/Godot/Extensions/BasisExtensions.cs b/Runtime/Godot/Extensions/BasisExtensions.cs index f5779c9..7ebd048 100644 --- a/Runtime/Godot/Extensions/BasisExtensions.cs +++ b/Runtime/Godot/Extensions/BasisExtensions.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public static class BasisExtensions diff --git a/Runtime/Godot/Extensions/ControlExtensions.cs b/Runtime/Godot/Extensions/ControlExtensions.cs index b12664d..ae15228 100644 --- a/Runtime/Godot/Extensions/ControlExtensions.cs +++ b/Runtime/Godot/Extensions/ControlExtensions.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; using System.Reflection; +using Rokojori.Extensions; namespace Rokojori { public static class ControlExtensions diff --git a/Runtime/Godot/Extensions/CurveExtensions.cs b/Runtime/Godot/Extensions/CurveExtensions.cs index 2758600..b31a89e 100644 --- a/Runtime/Godot/Extensions/CurveExtensions.cs +++ b/Runtime/Godot/Extensions/CurveExtensions.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public static class CurveExtensions diff --git a/Runtime/Godot/Extensions/CuveTextureExtensions.cs b/Runtime/Godot/Extensions/CuveTextureExtensions.cs index 14ac87a..947f059 100644 --- a/Runtime/Godot/Extensions/CuveTextureExtensions.cs +++ b/Runtime/Godot/Extensions/CuveTextureExtensions.cs @@ -1,4 +1,5 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class CurveTextureExtensions diff --git a/Runtime/Godot/Extensions/GradientExtensions.cs b/Runtime/Godot/Extensions/GradientExtensions.cs index a3aace7..852a88d 100644 --- a/Runtime/Godot/Extensions/GradientExtensions.cs +++ b/Runtime/Godot/Extensions/GradientExtensions.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class GradientExtensions @@ -14,7 +15,7 @@ namespace Rokojori public static Gradient Create( IEnumerable colors ) { var g = new Gradient(); - g.Colors = Lists.FromAny( colors ).ToArray(); + g.Colors = ListExtensions.FromAny( colors ).ToArray(); var offsets = new List(); for ( int i = 0; i < g.Colors.Length; i++ ) diff --git a/Runtime/Godot/Extensions/ImageExtensions.cs b/Runtime/Godot/Extensions/ImageExtensions.cs index 464fd95..5f68edb 100644 --- a/Runtime/Godot/Extensions/ImageExtensions.cs +++ b/Runtime/Godot/Extensions/ImageExtensions.cs @@ -1,4 +1,5 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class ImageExtensions @@ -23,8 +24,8 @@ namespace Rokojori if ( mode == EdgeMode.Repeat ) { - x = MathX.Repeat( x, image.GetSize().X ); - y = MathX.Repeat( y, image.GetSize().Y ); + x = MathX.RepeatInt( x, image.GetSize().X ); + y = MathX.RepeatInt( y, image.GetSize().Y ); } if ( mode == EdgeMode.Clamp ) diff --git a/Runtime/Godot/Extensions/Node3DExtensions.cs b/Runtime/Godot/Extensions/Node3DExtensions.cs index 023fdb4..70d4b02 100644 --- a/Runtime/Godot/Extensions/Node3DExtensions.cs +++ b/Runtime/Godot/Extensions/Node3DExtensions.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public static class Node3DExtensions diff --git a/Runtime/Godot/Extensions/NodeExtensions.cs b/Runtime/Godot/Extensions/NodeExtensions.cs index d6dbfcb..f755aed 100644 --- a/Runtime/Godot/Extensions/NodeExtensions.cs +++ b/Runtime/Godot/Extensions/NodeExtensions.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; using System.Reflection; +using Rokojori.Extensions; namespace Rokojori { public static class NodeExtensions diff --git a/Runtime/Godot/Extensions/QuaternionExtensions.cs b/Runtime/Godot/Extensions/QuaternionExtensions.cs index 4c838c4..f7ae4ec 100644 --- a/Runtime/Godot/Extensions/QuaternionExtensions.cs +++ b/Runtime/Godot/Extensions/QuaternionExtensions.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public static class QuaternionExtensions diff --git a/Runtime/Godot/Extensions/Transform3DExtensions.cs b/Runtime/Godot/Extensions/Transform3DExtensions.cs index 6633f5b..21ad6d3 100644 --- a/Runtime/Godot/Extensions/Transform3DExtensions.cs +++ b/Runtime/Godot/Extensions/Transform3DExtensions.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public static class Transform3DExtensions diff --git a/Runtime/Godot/Extensions/Vector2Extensions.cs b/Runtime/Godot/Extensions/Vector2Extensions.cs index afc9999..f8eefcb 100644 --- a/Runtime/Godot/Extensions/Vector2Extensions.cs +++ b/Runtime/Godot/Extensions/Vector2Extensions.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public static class Vector2Extensions diff --git a/Runtime/Godot/Extensions/Vector4Extensions.cs b/Runtime/Godot/Extensions/Vector4Extensions.cs index ae14c24..05855ce 100644 --- a/Runtime/Godot/Extensions/Vector4Extensions.cs +++ b/Runtime/Godot/Extensions/Vector4Extensions.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public static class Vector4Extensions diff --git a/Runtime/Godot/GDGlue.cs b/Runtime/Godot/GDGlue.cs new file mode 100644 index 0000000..461c7fb --- /dev/null +++ b/Runtime/Godot/GDGlue.cs @@ -0,0 +1,108 @@ +using Godot; +using System.Text; +using System; +using System.Collections.Generic; +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +public class GDGlue +{ + public static void ForEach( List array, Action callback ) + { + foreach ( var item in array ) + { + callback( item ); + } + } + + public static void AddRange( List array, List other ) + { + foreach ( var item in other ) + { + array.Add( item ); + } + } + + public static int FindIndex( List array, Predicate callback ) + { + var index = 0; + + foreach ( var item in array ) + { + if ( callback( item ) ) + { + return index; + } + + index++; + } + + return -1; + } + + + public static T Find( List array, Predicate callback ) + { + foreach ( var item in array ) + { + if ( callback( item ) ) + { + return item; + } + } + + return default(T); + } + + #if ROKOJORI_ACTION_CORE_GD + public static List GetRangeOf( List array, int index, int count ) + { + GDGlue.InsertGDScript( "return array.slice( index, index + count )" ); + } + + #endif + + + public static void CommentToGD() + {} + + public static void InsertGDScript( string gdScript ) + {} + + #if ROKOJORI_ACTION_CORE_GD + public static Null ReturnNull() + { + GDGlue.InsertGDScript( "return null" ); + } + #endif + + public static int IndexOf( List array, T item ) + { + #if ROKOJORI_ACTION_CORE_GD + + GDGlue.InsertGDScript( "return array.find( item )" ); + + #else + + return 0; + + #endif + } + + [RokojoriActionCoreGenericAsString] + public static T NullOrDefault() + { + #if ROKOJORI_ACTION_CORE_GD + + GDGlue.InsertGDScript( "return null" ); + + #else + + return default(T); + + #endif + } + + +} diff --git a/Runtime/Godot/GDGlue.cs.uid b/Runtime/Godot/GDGlue.cs.uid new file mode 100644 index 0000000..4790a25 --- /dev/null +++ b/Runtime/Godot/GDGlue.cs.uid @@ -0,0 +1 @@ +uid://buibwk3cese50 diff --git a/Runtime/Godot/Generated/Classes/RJAnimatableBody3D.cs b/Runtime/Godot/Generated/Classes/RJAnimatableBody3D.cs index 9d44a24..9eca847 100644 --- a/Runtime/Godot/Generated/Classes/RJAnimatableBody3D.cs +++ b/Runtime/Godot/Generated/Classes/RJAnimatableBody3D.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Godot/Generated/Classes/RJCharacterBody3D.cs b/Runtime/Godot/Generated/Classes/RJCharacterBody3D.cs index 3023887..5c55688 100644 --- a/Runtime/Godot/Generated/Classes/RJCharacterBody3D.cs +++ b/Runtime/Godot/Generated/Classes/RJCharacterBody3D.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Godot/Generated/ExtendingClasses/ExtendingControlClassList.cs b/Runtime/Godot/Generated/ExtendingClasses/ExtendingControlClassList.cs index 25dce28..e0983dc 100644 --- a/Runtime/Godot/Generated/ExtendingClasses/ExtendingControlClassList.cs +++ b/Runtime/Godot/Generated/ExtendingClasses/ExtendingControlClassList.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { /* diff --git a/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode2DClassList.cs b/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode2DClassList.cs index 41a2656..8ac8dab 100644 --- a/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode2DClassList.cs +++ b/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode2DClassList.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode3DClassList.cs b/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode3DClassList.cs index 76ceebb..c2cf9b4 100644 --- a/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode3DClassList.cs +++ b/Runtime/Godot/Generated/ExtendingClasses/ExtendingNode3DClassList.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { /* diff --git a/Runtime/Godot/Generated/ExtendingGodotClassList.cs b/Runtime/Godot/Generated/ExtendingGodotClassList.cs index 955ec5c..c8f859b 100644 --- a/Runtime/Godot/Generated/ExtendingGodotClassList.cs +++ b/Runtime/Godot/Generated/ExtendingGodotClassList.cs @@ -2,11 +2,12 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class ExtendingGodotClassList { - public static List list = Lists.CombineAll( + public static List list = ListExtensions.CombineAll( ExtendingControlGodotClassList.list, ExtendingNode2DGodotClassList.list, ExtendingNode3DGodotClassList.list diff --git a/Runtime/Godot/GodotEditorHelper.cs b/Runtime/Godot/GodotEditorHelper.cs index 7d4e498..1364d98 100644 --- a/Runtime/Godot/GodotEditorHelper.cs +++ b/Runtime/Godot/GodotEditorHelper.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class GodotEditorHelper diff --git a/Runtime/Godot/HierarchyName.cs b/Runtime/Godot/HierarchyName.cs index 3f5a828..fb32281 100644 --- a/Runtime/Godot/HierarchyName.cs +++ b/Runtime/Godot/HierarchyName.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public class HierarchyName @@ -22,6 +23,31 @@ namespace Rokojori return RJLog.Stringify( obj ); } + #if ROKOJORI_ACTION_CORE_GD + public static string Of( object obj, string seperator = " â–¸ " ) + { + if ( obj == null ) + { + return "null"; + } + + if ( obj is Resource ) + { + return ( obj as Resource ).ResourcePath; + } + + if ( obj is Node ) + { + return ( obj as Node ).path; + } + + return ""; + } + + #endif + + #if !ROKOJORI_ACTION_CORE_GD + public static string Of( Resource resource, string seperator = " â–¸ " ) { var path = resource.ResourcePath; @@ -96,6 +122,8 @@ namespace Rokojori return sb.ToString(); } + + #endif } } diff --git a/Runtime/Godot/IAssemblyReload.cs b/Runtime/Godot/IAssemblyReload.cs index 8251003..be55fe3 100644 --- a/Runtime/Godot/IAssemblyReload.cs +++ b/Runtime/Godot/IAssemblyReload.cs @@ -3,6 +3,7 @@ using System.Text; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public interface IAssemblyReload diff --git a/Runtime/Godot/MakeResourcesUnique.cs b/Runtime/Godot/MakeResourcesUnique.cs index fbdb70b..8bf1166 100644 --- a/Runtime/Godot/MakeResourcesUnique.cs +++ b/Runtime/Godot/MakeResourcesUnique.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class MakeResourcesUnique diff --git a/Runtime/Godot/NodePathLocator.cs b/Runtime/Godot/NodePathLocator.cs index 0958259..3084f45 100644 --- a/Runtime/Godot/NodePathLocator.cs +++ b/Runtime/Godot/NodePathLocator.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum NodePathLocatorType diff --git a/Runtime/Godot/NodeState.cs b/Runtime/Godot/NodeState.cs index e6e6810..b51e2f9 100644 --- a/Runtime/Godot/NodeState.cs +++ b/Runtime/Godot/NodeState.cs @@ -3,239 +3,258 @@ using Godot; using System.Collections.Generic; using System; -namespace Rokojori -{ - public interface iNodeState +using Rokojori.Extensions; +namespace Rokojori; + + + +[RokojoriActionCoreExport] +public static class NodeState +{ + + public static bool IsVisible( this Node n ) { - public void OnNodeStateChanged(); - + if ( n is Node3D ) + { + return ( n as Node3D ).Visible; + } + + if ( n is Node2D ) + { + return ( n as Node2D ).Visible; + } + + if ( n is CanvasItem ) + { + return ( n as CanvasItem ).Visible; + } + + return false; } - public static class NodeState + public static bool IsProcessingInHierarchy( this Node n ) { - - public static bool IsVisible( this Node n ) + if ( n.ProcessMode == Node.ProcessModeEnum.Disabled ) { + return false; + } + + if ( n.ProcessMode == Node.ProcessModeEnum.Always ) + { + return true; + } + + var paused = n.GetTree().Paused; + + if ( n.ProcessMode == Node.ProcessModeEnum.Pausable ) + { + return ! paused; + } + + if ( n.ProcessMode == Node.ProcessModeEnum.WhenPaused ) + { + return paused; + } + + var p = n.GetParent(); + + if ( p == null ) + { + return ! paused; + } + + return p.IsProcessingInHierarchy(); + + } + + public static void ConfigureWith( Node target, NodeStateConfiguration configuration ) + { + PartialConfigure( target, + configuration.processEnabled, configuration.inputEnabled, configuration.physicsEnabled, + configuration.signalsEnabled, configuration.visible, configuration.setProcessMode, configuration.processMode + ); + } + + public static void SetNodeState( this Node target, NodeStateConfiguration configuration ) + { + ConfigureWith( target, configuration ); + } + + public static void SetVisibility( this Node target, bool visible ) + { + PartialConfigure( target, Trillean.Any, Trillean.Any, Trillean.Any, Trillean.Any, TrilleanLogic.FromBool( visible ), false, Node.ProcessModeEnum.Inherit ); + } + + public static void PartialConfigure( + Node target, + Trillean processEnabled, Trillean inputEnabled,Trillean physicsEnabled, + Trillean signalsEnabled,Trillean visible, bool setProcessMode, Node.ProcessModeEnum processMode + ) + { + if ( ! Node.IsInstanceValid( target ) ) + { + return; + } + + if ( Trillean.Any != processEnabled ) + { + target.SetProcess( TrilleanLogic.ToBool( processEnabled ) ); + } + + if ( Trillean.Any != inputEnabled ) + { + target.SetProcessInput( TrilleanLogic.ToBool( inputEnabled ) ); + } + + if ( Trillean.Any != physicsEnabled ) + { + target.SetPhysicsProcess( TrilleanLogic.ToBool( physicsEnabled ) ); + } + + if ( Trillean.Any != signalsEnabled ) + { + target.SetBlockSignals( ! TrilleanLogic.ToBool( signalsEnabled ) ); + } + + if ( setProcessMode ) + { + target.ProcessMode = processMode; + } + + + if ( Trillean.Any != visible ) + { + var n = target; + + var visibleFlag = TrilleanLogic.ToBool( visible ); + if ( n is Node3D ) { - return ( n as Node3D ).Visible; + ( n as Node3D ).Visible = visibleFlag; } if ( n is Node2D ) { - return ( n as Node2D ).Visible; + ( n as Node2D ).Visible = visibleFlag; } if ( n is CanvasItem ) { - return ( n as CanvasItem ).Visible; + ( n as CanvasItem ).Visible = visibleFlag; } + } - return false; + DispatchNodeStateChanged( target ); + } + + static void DispatchNodeStateChanged( Node target) + { + #if !ROKOJORI_ACTION_CORE_GD + + if ( target is iNodeState ins ) + { + ins.OnNodeStateChanged(); + } + #else + + /* + + if target.has_method( "on_node_state_changed" ): + var ins:Variant = target + ins.on_node_state_changed() + + */ + GDGlue.CommentToGD(); + #endif + } + + public static void Configure( Node n, bool processEnabled, bool inputEnabled, bool physicsEnabled, bool signalsEnabled, + Node.ProcessModeEnum processMode, bool visible ) + { + if ( n == null || ! Node.IsInstanceValid( n ) ) + { + return; } - public static bool IsProcessingInHierarchy( this Node n ) + n.SetProcess( processEnabled ); + n.SetProcessInput( inputEnabled ); + n.SetPhysicsProcess( physicsEnabled ); + n.SetBlockSignals( ! signalsEnabled ); + + n.ProcessMode = processMode; + + if ( n is Node3D n3 ) { - if ( n.ProcessMode == Node.ProcessModeEnum.Disabled ) - { - return false; - } - - if ( n.ProcessMode == Node.ProcessModeEnum.Always ) - { - return true; - } - - var paused = n.GetTree().Paused; - - if ( n.ProcessMode == Node.ProcessModeEnum.Pausable ) - { - return ! paused; - } - - if ( n.ProcessMode == Node.ProcessModeEnum.WhenPaused ) - { - return paused; - } - - var p = n.GetParent(); - - if ( p == null ) - { - return ! paused; - } - - return p.IsProcessingInHierarchy(); - + n3.Visible = visible; } - public static void Configure( Node target, NodeStateConfiguration configuration ) + if ( n is Node2D n2 ) { - Configure( target, - configuration.processEnabled, configuration.inputEnabled, configuration.physicsEnabled, - configuration.signalsEnabled, configuration.visible, configuration.setProcessMode, configuration.processMode - ); + n2.Visible = visible; } - public static void SetNodeState( this Node target, NodeStateConfiguration configuration ) + if ( n is CanvasItem ci ) { - Configure( target, configuration ); + ci.Visible = visible; + } + + DispatchNodeStateChanged( n ); + + if ( n is CollisionShape3D cs ) + { + cs.Disabled = ! physicsEnabled; } + } - public static void SetVisibility( this Node target, bool visible ) + public static void SetNode( Node n, bool enabled ) + { + Configure( n, enabled, enabled, enabled, enabled, enabled ? Node.ProcessModeEnum.Inherit : Node.ProcessModeEnum.Disabled, enabled ); + } + + public static void SetAll( Node[] nodes, bool enabled ) + { + foreach ( var n in nodes ) { - Configure( target, Trillean.Any, Trillean.Any, Trillean.Any, Trillean.Any, TrilleanLogic.FromBool( visible ), false, Node.ProcessModeEnum.Inherit ); - } - - public static void Configure( - Node target, - Trillean processEnabled, Trillean inputEnabled,Trillean physicsEnabled, - Trillean signalsEnabled,Trillean visible, bool setProcessMode, Node.ProcessModeEnum processMode - ) - { - if ( ! Node.IsInstanceValid( target ) ) - { - return; - } - - if ( Trillean.Any != processEnabled ) - { - target.SetProcess( TrilleanLogic.ToBool( processEnabled ) ); - } - - if ( Trillean.Any != inputEnabled ) - { - target.SetProcessInput( TrilleanLogic.ToBool( inputEnabled ) ); - } - - if ( Trillean.Any != physicsEnabled ) - { - target.SetPhysicsProcess( TrilleanLogic.ToBool( physicsEnabled ) ); - } - - if ( Trillean.Any != signalsEnabled ) - { - target.SetBlockSignals( ! TrilleanLogic.ToBool( signalsEnabled ) ); - } - - if ( setProcessMode ) - { - target.ProcessMode = processMode; - } - - - if ( Trillean.Any != visible ) - { - var n = target; - - var visibleFlag = TrilleanLogic.ToBool( visible ); - - if ( n is Node3D ) - { - ( n as Node3D ).Visible = visibleFlag; - } - - if ( n is Node2D ) - { - ( n as Node2D ).Visible = visibleFlag; - } - - if ( n is CanvasItem ) - { - ( n as CanvasItem ).Visible = visibleFlag; - } - } - - - if ( target is iNodeState ins ) - { - ins.OnNodeStateChanged(); - } - } - - - public static void Configure( Node n, bool processEnabled, bool inputEnabled, bool physicsEnabled, bool signalsEnabled, - Node.ProcessModeEnum processMode, bool visible ) - { - if ( n == null || ! Node.IsInstanceValid( n ) ) - { - return; - } - - n.SetProcess( processEnabled ); - n.SetProcessInput( inputEnabled ); - n.SetPhysicsProcess( physicsEnabled ); - n.SetBlockSignals( ! signalsEnabled ); - - n.ProcessMode = processMode; - - if ( n is Node3D n3 ) - { - n3.Visible = visible; - } - - if ( n is Node2D n2 ) - { - n2.Visible = visible; - } - - if ( n is CanvasItem ci ) - { - ci.Visible = visible; - } - - if ( n is iNodeState ins ) - { - ins.OnNodeStateChanged(); - } - - if ( n is CollisionShape3D cs ) - { - cs.Disabled = ! physicsEnabled; - } - } - - public static void Set( Node n, bool enabled ) - { - Configure( n, enabled, enabled, enabled, enabled, enabled ? Node.ProcessModeEnum.Inherit : Node.ProcessModeEnum.Disabled, enabled ); - } - - public static void Set( Node[] nodes, bool enabled ) - { - Arrays.ForEach( nodes, n => Set( n, enabled ) ); - } - - public static void Enable( this Node n ) - { - Set( n, true ); - } - - public static void Enable( params Node[] n ) - { - Set( n, true ); - } - - public static void Disable( this Node n ) - { - Set( n, false ); - } - - public static void Disable( params Node[] n ) - { - Set( n, false ); - } - - public static void SetEnabledState( this Node n, bool isEnabled ) - { - if ( isEnabled ) - { - n.Enable(); - } - else - { - n.Disable(); - } + SetNode( n, enabled ); } } -} \ No newline at end of file + + public static void Enable( this Node n ) + { + SetNode( n, true ); + } + + public static void EnableAll( params Node[] n ) + { + SetAll( n, true ); + } + + public static void Disable( this Node n ) + { + SetNode( n, false ); + } + + public static void DisableAll( params Node[] n ) + { + SetAll( n, false ); + } + + public static void SetEnabledState( this Node n, bool isEnabled ) + { + if ( isEnabled ) + { + n.Enable(); + } + else + { + n.Disable(); + } + } + +} + +public interface iNodeState +{ + public void OnNodeStateChanged(); +} diff --git a/Runtime/Godot/NodeStateConfiguration.cs b/Runtime/Godot/NodeStateConfiguration.cs index 0e42da1..b6a5007 100644 --- a/Runtime/Godot/NodeStateConfiguration.cs +++ b/Runtime/Godot/NodeStateConfiguration.cs @@ -3,62 +3,65 @@ using Godot; using System.Collections.Generic; using System; -namespace Rokojori -{ - [Tool,GlobalClass] - public partial class NodeStateConfiguration:Resource +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +[Tool,GlobalClass] +public partial class NodeStateConfiguration:Resource +{ + [Export] + public Trillean processEnabled = Trillean.Any; + + [Export] + public Trillean inputEnabled = Trillean.Any; + + [Export] + public Trillean physicsEnabled = Trillean.Any; + + [Export] + public Trillean signalsEnabled = Trillean.Any; + + [Export] + public Trillean visible = Trillean.Any; + + + [Export] + public bool setProcessMode = false; + + [Export] + public Node.ProcessModeEnum processMode; + + + public static NodeStateConfiguration All( Trillean value ) { - [Export] - public Trillean processEnabled = Trillean.Any; + var config = new NodeStateConfiguration(); - [Export] - public Trillean inputEnabled = Trillean.Any; + config.processEnabled = value; + config.inputEnabled = value; + config.physicsEnabled = value; + config.signalsEnabled = value; + config.visible = value; - [Export] - public Trillean physicsEnabled = Trillean.Any; + config.setProcessMode = true; - [Export] - public Trillean signalsEnabled = Trillean.Any; + config.processMode = Trillean.True == value ? Node.ProcessModeEnum.Inherit : Node.ProcessModeEnum.Disabled; - [Export] - public Trillean visible = Trillean.Any; - - - [Export] - public bool setProcessMode = false; - - [Export] - public Node.ProcessModeEnum processMode; - - - public static NodeStateConfiguration All( Trillean value ) - { - var config = new NodeStateConfiguration(); - - config.processEnabled = value; - config.inputEnabled = value; - config.physicsEnabled = value; - config.signalsEnabled = value; - config.visible = value; - - config.setProcessMode = true; - - config.processMode = Trillean.True == value ? Node.ProcessModeEnum.Inherit : Node.ProcessModeEnum.Disabled; - - return config; - } - - public static NodeStateConfiguration AllOn() - { - return All( Trillean.True ); - } - - public static NodeStateConfiguration AllOff() - { - return All( Trillean.False ); - } - - + return config; } + + public static NodeStateConfiguration AllOn() + { + return All( Trillean.True ); + } + + public static NodeStateConfiguration AllOff() + { + return All( Trillean.False ); + } + + } + + \ No newline at end of file diff --git a/Runtime/Godot/Nodes.cs b/Runtime/Godot/Nodes.cs index ba5e2b2..139889a 100644 --- a/Runtime/Godot/Nodes.cs +++ b/Runtime/Godot/Nodes.cs @@ -6,10 +6,31 @@ using System.Threading.Tasks; using System.Reflection; using Microsoft.VisualBasic; +using Rokojori.Extensions; namespace Rokojori { public static class Nodes { + static NodesWalker nodesWalker = new NodesWalker(); + + [RokojoriActionCoreGenericAsString] + public static T GetAnyChild( Node parent ) where T:Node + { + var result = nodesWalker.Find( parent, + ( n )=> + { + + return TypeTools.IsOfType( n ); + + }, + + + true ); + + return (T) result; + } + + public static void ForEachDirectChild( this Node parent, System.Action action ) where T:Node { if ( parent == null || action == null ) @@ -64,7 +85,143 @@ namespace Rokojori RJLog.Error( node, messages ); } - + public static async Task RequestNextFrame( this Node node ) + { + + #if !ROKOJORI_ACTION_CORE_GD + + await node.ToSignal( RenderingServer.Singleton, RenderingServerInstance.SignalName.FramePostDraw ); + return; + + #else + + /* + + await RenderingServer.frame_pre_draw + + + */ + GDGlue.CommentToGD(); + + #endif + + } + + public static async Task WaitFor( this Node node, double time ) + { + #if ! ROKOJORI_ACTION_CORE_GD + + await Async.WaitIfExceeded( time, node ); + + return; + + #else + + /* + + if Engine.is_editor_hint(): + await Engine.get_main_loop().create_timer( time, true, false, true ).timeout + else: + await node.get_tree().create_timer( time, true, false, true ).timeout + + + */ + GDGlue.CommentToGD(); + + + #endif + + } + + // [RokojoriActionCoreGenericAsString] + // public static T CreateChild( this Node parent, string name = null ) where T:Node,new() + // { + // return CreateChildIn( parent, name ); + // } + + [RokojoriActionCoreGenericAsString] + public static T CreateChild( this Node parent, string name = null ) where T:Node,new() + { + #if ! ROKOJORI_ACTION_CORE_GD + + var t = new T(); + + #else + + T t = null; + + /* + + var script = ProjectSettings.get_global_class_list().filter( + func( c ): return c[ "class" ] == type + ).front() + + t = load( script[ "path" ] ).new() + + */ + GDGlue.CommentToGD(); + + + #endif + parent.AddChild( t ); + + t.Owner = parent.Owner == null ? parent : parent.Owner; + + if ( name == null || name == "" ) + { + name = TypeTools.GetType( t ); + } + + t.Name = name; + + + return t; + + + } + + public static void DeleteSelf( this Node node ) + { + node.RemoveFromParent(); + node.QueueFree(); + } + + public static void RemoveFromParent( this Node node ) + { + var parent = node.GetParent(); + + if ( parent != null ) + { + parent.RemoveChild( node ); + } + } + + public static Node CreateChildFromDuplicate( this Node parent, Node nodeToDuplicate, string name = null ) + { + var t = nodeToDuplicate.Duplicate( (int)Node.DuplicateFlags.Scripts ); + parent.AddChild( t ); + + t.Owner = parent.Owner == null ? parent : parent.Owner; + + if ( name == null ) + { + name = t.GetType().Name; + } + + t.Name = name; + + + return t; + } + + + /* + ========================================================================================================= + ========================================================================================================= + ========================================================================================================= + ========================================================================================================= + */ + #if !ROKOJORI_ACTION_CORE public static void LogInfo( this Resource resource, params object[] messages ) @@ -115,7 +272,7 @@ namespace Rokojori return true; } ); - var memberNames = Lists.Map( memberInfos, m => m.Name ); + var memberNames = ListExtensions.Map( memberInfos, m => m.Name ); // RJLog.Log( "Trying to copy:", memberNames ); @@ -340,23 +497,7 @@ namespace Rokojori return GetDirectChild( parent ); } - public static T CreateChildIn( Node parent, string name = null ) where T:Node,new() - { - var t = new T(); - parent.AddChild( t ); - - t.Owner = parent.Owner == null ? parent : parent.Owner; - - if ( name == null ) - { - name = t.GetType().Name; - } - - t.Name = name; - - - return t; - } + public static Node CreateChildFromPath( this Node parent, NodePath nodePath, string name = null ) { @@ -376,23 +517,7 @@ namespace Rokojori return t; } - public static Node CreateChildFromDuplicate( this Node parent, Node nodeToDuplicate, string name = null ) - { - var t = nodeToDuplicate.Duplicate( (int)Node.DuplicateFlags.Scripts ); - parent.AddChild( t ); - - t.Owner = parent.Owner == null ? parent : parent.Owner; - - if ( name == null ) - { - name = t.GetType().Name; - } - - t.Name = name; - - - return t; - } + public static Node CreateChildInWithType( Node parent, Type type, string name = null ) { @@ -410,16 +535,7 @@ namespace Rokojori return t; } - public static async Task RequestNextFrame( this Node node ) - { - await node.ToSignal( RenderingServer.Singleton, RenderingServerInstance.SignalName.FramePostDraw ); - return; - } - - public static double StartAsyncTimer( this Node node ) - { - return Async.StartTimer(); - } + public static async Task WaitForAsyncTimer( this Node node, double time ) { @@ -427,13 +543,14 @@ namespace Rokojori return time; } - public static T CreateChild( this Node parent, string name = null ) where T:Node,new() + + public static double StartAsyncTimer( this Node node ) { - return CreateChildIn( parent, name ); + return Async.StartTimer(); } - - public static T CreateChild( this Node parent, PackedScene scene, string name = null, bool editable = true ) where T:Node,new() + + public static T CreateChildFromScene( this Node parent, PackedScene scene, string name = null, bool editable = true ) where T:Node,new() { var instance = scene.Instantiate(); @@ -467,7 +584,7 @@ namespace Rokojori public static T CreateChildLocal3D( this Node parent, Vector3 position, Quaternion? rotation, string name = null ) where T:Node3D,new() { - var c = CreateChildIn( parent, name ); + var c = CreateChild( parent, name ); c.Position = position; @@ -501,7 +618,7 @@ namespace Rokojori public static T CreateChildGlobal3D( this Node parent, Vector3 position, Quaternion? rotation, string name = null ) where T:Node3D,new() { - var c = CreateChildIn( parent, name ); + var c = CreateChild( parent, name ); c.GlobalPosition = position; @@ -670,15 +787,7 @@ namespace Rokojori nodes.ForEach( n => RemoveAndDelete( n ) ); } - public static void RemoveFromParent( this Node node ) - { - var parent = node.GetParent(); - - if ( parent != null ) - { - parent.RemoveChild( node ); - } - } + public static void SetParent( this Node node, Node parent ) { @@ -688,12 +797,7 @@ namespace Rokojori node.Owner = parent.Owner; } - public static void DeleteSelf( this Node node ) - { - node.RemoveFromParent(); - node.QueueFree(); - } - + public static void RemoveAndDeleteChildrenOfType( Node parent, bool includeInternal = false ) where T:Node @@ -803,11 +907,11 @@ namespace Rokojori public static void CallInProcess( this Node node, System.Action action ) { - var tm = TimeLineManager.Get(); + var tm = TimelineManager.Get(); if ( ! tm.inProcess ) { - TimeLineManager.ScheduleCallback( + TimelineManager.ScheduleCallback( tm.realtimeTimeline, ( cb ) => { @@ -1084,29 +1188,7 @@ namespace Rokojori return -1; } - static NodesWalker nodesWalker = new NodesWalker(); - - public static T GetAnyChild( Node parent ) where T:Node - { - var result = nodesWalker.Find( parent, - ( n )=> - { - - - var castedNode = n as T; - - // RJLog.Log( "Testing", n.UniqueNameInOwner, castedNode != null, n.GetType() ); - - return castedNode != null; - - }, - - - true ); - - return (T) result; - } - + /* public static void Enable( Node n, bool affectProcess = true, bool affectPhysicsProcess = true, bool affectInput = true ) diff --git a/Runtime/Godot/NodesWalker.cs b/Runtime/Godot/NodesWalker.cs index dc75d3b..b80a97c 100644 --- a/Runtime/Godot/NodesWalker.cs +++ b/Runtime/Godot/NodesWalker.cs @@ -1,13 +1,20 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { + [RokojoriActionCoreExport] + [RokojoriActionCoreExportFlatten] public class NodesWalker: TreeWalker { static NodesWalker _singleton = new NodesWalker(); public static NodesWalker Get() { + if ( _singleton == null ) + { + _singleton = new NodesWalker(); + } return _singleton; } @@ -44,7 +51,9 @@ namespace Rokojori } - public class InternalNodesWalker: TreeWalker + [RokojoriActionCoreExport] + [RokojoriActionCoreExportFlatten] + public class InternalNodesWalker: TreeWalker { static InternalNodesWalker _singleton = new InternalNodesWalker(); public static InternalNodesWalker Get() diff --git a/Runtime/Godot/ResourceExtensions.cs b/Runtime/Godot/ResourceExtensions.cs index b32d8db..d6f08e9 100644 --- a/Runtime/Godot/ResourceExtensions.cs +++ b/Runtime/Godot/ResourceExtensions.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using System.Reflection; using Microsoft.VisualBasic; +using Rokojori.Extensions; namespace Rokojori { public static class ResourceExtensions diff --git a/Runtime/Godot/ResourceHelper.cs b/Runtime/Godot/ResourceHelper.cs index 8fc7c50..5318463 100644 --- a/Runtime/Godot/ResourceHelper.cs +++ b/Runtime/Godot/ResourceHelper.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class ResourceHelper diff --git a/Runtime/Godot/ResourceRunner.cs b/Runtime/Godot/ResourceRunner.cs index b29764d..0dbf7d8 100644 --- a/Runtime/Godot/ResourceRunner.cs +++ b/Runtime/Godot/ResourceRunner.cs @@ -2,6 +2,7 @@ using Godot; using System.Text; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class ResourceRunner where R:Resource where P:Node diff --git a/Runtime/Godot/Root.cs b/Runtime/Godot/Root.cs index ff7e121..55fec2a 100644 --- a/Runtime/Godot/Root.cs +++ b/Runtime/Godot/Root.cs @@ -2,12 +2,13 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { - [Tool] + [Tool][RokojoriActionCoreExport] public partial class Root:Node { - private static Root _singleton; + static Root _singleton; public override void _Ready() { @@ -36,61 +37,12 @@ namespace Rokojori return tree.Root; } - static Root Get() + static Root GetRoot() { var r = Window(); return _singleton; } - - #if TOOLS - - public override void _Process( double delta ) - { - if ( ! Engine.IsEditorHint() ) - { - return; - } - - CheckWarnings(); - - } - - int step = 0; - - void CheckWarnings() - { - var walker = NodesWalker.Get(); - - for ( int i = 0; i < numNodeTests; i++ ) - { - if ( _iterationNode == null || ! IsInstanceValid( _iterationNode ) ) - { - _iterationNode = EditorInterface.Singleton.GetEditedSceneRoot(); - } - else - { - _iterationNode = walker.NextNode( _iterationNode ); - } - - UpdateWarning( _iterationNode ); - } - } - - Node _iterationNode = null; - int numNodeTests = 100; - - void UpdateWarning( Node n ) - { - if ( n == null ) - { - return; - } - - n.UpdateConfigurationWarnings(); - } - - #endif } } \ No newline at end of file diff --git a/Runtime/Godot/Scenes/Exporters/HTML/SceneFIleHTMLScriptJS.cs b/Runtime/Godot/Scenes/Exporters/HTML/SceneFIleHTMLScriptJS.cs index d747499..7e6ff1c 100644 --- a/Runtime/Godot/Scenes/Exporters/HTML/SceneFIleHTMLScriptJS.cs +++ b/Runtime/Godot/Scenes/Exporters/HTML/SceneFIleHTMLScriptJS.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileHTMLScriptJS diff --git a/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLExporter.cs b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLExporter.cs index 7665bdc..743579d 100644 --- a/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLExporter.cs +++ b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLExporter.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileHTMLExporter diff --git a/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLStyle.cs b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLStyle.cs index 151dbf5..7c95341 100644 --- a/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLStyle.cs +++ b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLStyle.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileHTMLStyle diff --git a/Runtime/Godot/Scenes/Header/SceneFileHeader.cs b/Runtime/Godot/Scenes/Header/SceneFileHeader.cs index f4a78fa..f95d06f 100644 --- a/Runtime/Godot/Scenes/Header/SceneFileHeader.cs +++ b/Runtime/Godot/Scenes/Header/SceneFileHeader.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileHeader diff --git a/Runtime/Godot/Scenes/Header/SceneFileHeaderAttribute.cs b/Runtime/Godot/Scenes/Header/SceneFileHeaderAttribute.cs index 19bb2ea..79ad9ad 100644 --- a/Runtime/Godot/Scenes/Header/SceneFileHeaderAttribute.cs +++ b/Runtime/Godot/Scenes/Header/SceneFileHeaderAttribute.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileHeaderAttribute diff --git a/Runtime/Godot/Scenes/Objects/EditableSFO.cs b/Runtime/Godot/Scenes/Objects/EditableSFO.cs index 10701f7..84a6537 100644 --- a/Runtime/Godot/Scenes/Objects/EditableSFO.cs +++ b/Runtime/Godot/Scenes/Objects/EditableSFO.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class EditableSFO:SceneFileObject diff --git a/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs b/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs index 6e98b4e..fe37527 100644 --- a/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs +++ b/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class ExtResourceSFO:SceneFileObject diff --git a/Runtime/Godot/Scenes/Objects/GDSceneSFO.cs b/Runtime/Godot/Scenes/Objects/GDSceneSFO.cs index 1944a78..1a1b1dc 100644 --- a/Runtime/Godot/Scenes/Objects/GDSceneSFO.cs +++ b/Runtime/Godot/Scenes/Objects/GDSceneSFO.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class GDSceneSFO:SceneFileObject diff --git a/Runtime/Godot/Scenes/Objects/NodeSFO.cs b/Runtime/Godot/Scenes/Objects/NodeSFO.cs index 71b8c21..6d4e107 100644 --- a/Runtime/Godot/Scenes/Objects/NodeSFO.cs +++ b/Runtime/Godot/Scenes/Objects/NodeSFO.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NodeSFO:SceneFileObject diff --git a/Runtime/Godot/Scenes/Objects/SceneFileObject.cs b/Runtime/Godot/Scenes/Objects/SceneFileObject.cs index 0850730..9ee982a 100644 --- a/Runtime/Godot/Scenes/Objects/SceneFileObject.cs +++ b/Runtime/Godot/Scenes/Objects/SceneFileObject.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileObject diff --git a/Runtime/Godot/Scenes/Objects/SceneFileObjectFactory.cs b/Runtime/Godot/Scenes/Objects/SceneFileObjectFactory.cs index c356739..de9862d 100644 --- a/Runtime/Godot/Scenes/Objects/SceneFileObjectFactory.cs +++ b/Runtime/Godot/Scenes/Objects/SceneFileObjectFactory.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileObjectFactory diff --git a/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs b/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs index 9df12fb..6caa898 100644 --- a/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs +++ b/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SubResourceSFO:SceneFileObject diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileHeaderParser.cs b/Runtime/Godot/Scenes/Parsers/SceneFileHeaderParser.cs index b2e0062..b976b3c 100644 --- a/Runtime/Godot/Scenes/Parsers/SceneFileHeaderParser.cs +++ b/Runtime/Godot/Scenes/Parsers/SceneFileHeaderParser.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileHeaderParser diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileLexer.cs b/Runtime/Godot/Scenes/Parsers/SceneFileLexer.cs index 2a0fcb4..e7c5ad1 100644 --- a/Runtime/Godot/Scenes/Parsers/SceneFileLexer.cs +++ b/Runtime/Godot/Scenes/Parsers/SceneFileLexer.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileLexer:Lexer diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs b/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs index 0ebf480..b018d11 100644 --- a/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs +++ b/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileLinesLexer:Lexer diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileMemberParser.cs b/Runtime/Godot/Scenes/Parsers/SceneFileMemberParser.cs index a99e60e..e19286b 100644 --- a/Runtime/Godot/Scenes/Parsers/SceneFileMemberParser.cs +++ b/Runtime/Godot/Scenes/Parsers/SceneFileMemberParser.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileMemberParser diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs b/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs index da0b6b9..30c6db8 100644 --- a/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs +++ b/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileParser diff --git a/Runtime/Godot/Scenes/SceneFile.cs b/Runtime/Godot/Scenes/SceneFile.cs index a1dbf51..8b2a4ea 100644 --- a/Runtime/Godot/Scenes/SceneFile.cs +++ b/Runtime/Godot/Scenes/SceneFile.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFile diff --git a/Runtime/Godot/Scenes/SceneFileEntry.cs b/Runtime/Godot/Scenes/SceneFileEntry.cs index 673f887..415b44f 100644 --- a/Runtime/Godot/Scenes/SceneFileEntry.cs +++ b/Runtime/Godot/Scenes/SceneFileEntry.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SceneFileEntry diff --git a/Runtime/Godot/Scenes/SceneFileNamedValue.cs b/Runtime/Godot/Scenes/SceneFileNamedValue.cs index 4f64f39..d0d1eb5 100644 --- a/Runtime/Godot/Scenes/SceneFileNamedValue.cs +++ b/Runtime/Godot/Scenes/SceneFileNamedValue.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Godot/Scenes/SceneFileReader.cs b/Runtime/Godot/Scenes/SceneFileReader.cs index 0bc2e9c..a999721 100644 --- a/Runtime/Godot/Scenes/SceneFileReader.cs +++ b/Runtime/Godot/Scenes/SceneFileReader.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Godot/Scenes/SceneFileValue.cs b/Runtime/Godot/Scenes/SceneFileValue.cs index c2f45a8..345c4c8 100644 --- a/Runtime/Godot/Scenes/SceneFileValue.cs +++ b/Runtime/Godot/Scenes/SceneFileValue.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum SceneFileValueType @@ -24,7 +25,7 @@ namespace Rokojori SceneFileValueType.NodePath }; - public static readonly List referenceStringTypes = Lists.Map( + public static readonly List referenceStringTypes = ListExtensions.Map( referenceTypes, ( s, i ) => s + "" ); diff --git a/Runtime/Godot/Unique.cs b/Runtime/Godot/Unique.cs index 7a1f7a9..ba312f5 100644 --- a/Runtime/Godot/Unique.cs +++ b/Runtime/Godot/Unique.cs @@ -3,11 +3,52 @@ using System.Collections.Generic; using Godot; -namespace Rokojori +using Rokojori.Extensions; +namespace Rokojori; + + +[RokojoriActionCoreExport] +[RokojoriActionCoreGenericAsString( "Prepend" )] +public class Unique where N:Node { - public class Unique where N:Node - { - private static N _singleton; + #if ROKOJORI_ACTION_CORE_GD + + static Dictionary _singletons; + + public static Node Get( Node n = null ) + { + /* + + if _singletons.has( type ): + return _singletons[ type ] + + var window = RJ_Root.window() if n == null else n + + if ( window == null ): + if ( Engine.is_editor_hint() ): + window = EditorInterface.get_edited_scene_root() + else: + return null + + var walker = RJ_NodesWalker._get_() + var uniqueNode = walker.find( window, func (n): return RJ_TypeTools.is_of_type( type, n ), true ) + + if ( uniqueNode == null ): + return null + + _singletons[ type ] = uniqueNode + + + return _singletons[ type ] + + */ + GDGlue.CommentToGD(); + + } + + #else + + static N _singleton; public static N Get( Node n = null ) { @@ -27,6 +68,8 @@ namespace Rokojori #if TOOLS rootWindow = EditorInterface.Singleton.GetEditedSceneRoot(); #endif + + } else { @@ -50,6 +93,15 @@ namespace Rokojori return _singleton; } - + #endif + + + public static void test() + { + var t = Unique.Get(); + TypeTools.IsScriptOfType( null ); } -} \ No newline at end of file + +} + + diff --git a/Runtime/Graphs/Graph.cs b/Runtime/Graphs/Graph.cs index 9e4cea0..793da37 100644 --- a/Runtime/Graphs/Graph.cs +++ b/Runtime/Graphs/Graph.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class Graph:GraphWalker where N:class diff --git a/Runtime/Graphs/GraphConnection.cs b/Runtime/Graphs/GraphConnection.cs index 1dad6d1..0cd0d98 100644 --- a/Runtime/Graphs/GraphConnection.cs +++ b/Runtime/Graphs/GraphConnection.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class GraphConnection where N:class diff --git a/Runtime/Graphs/GraphWalker.cs b/Runtime/Graphs/GraphWalker.cs index 8d04214..59276cf 100644 --- a/Runtime/Graphs/GraphWalker.cs +++ b/Runtime/Graphs/GraphWalker.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public abstract class GraphWalker where N:class @@ -34,7 +35,7 @@ namespace Rokojori while ( toDo.Count > 0 ) { - var current = Lists.RemoveFirst( toDo ); + var current = ListExtensions.RemoveFirst( toDo ); if ( processed.Contains( current ) ) { diff --git a/Runtime/Graphs/Trees/CustomTreeWalker.cs b/Runtime/Graphs/Trees/CustomTreeWalker.cs index fe22d10..fff59ad 100644 --- a/Runtime/Graphs/Trees/CustomTreeWalker.cs +++ b/Runtime/Graphs/Trees/CustomTreeWalker.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class CustomTreeWalker:TreeWalker where N:class diff --git a/Runtime/Graphs/Trees/Iterators/ChildrenIterator.cs b/Runtime/Graphs/Trees/Iterators/ChildrenIterator.cs index aef9758..1bf8a18 100644 --- a/Runtime/Graphs/Trees/Iterators/ChildrenIterator.cs +++ b/Runtime/Graphs/Trees/Iterators/ChildrenIterator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class ChildrenIterator: TreeIterator where N:class diff --git a/Runtime/Graphs/Trees/Iterators/DirectChildrenIterator.cs b/Runtime/Graphs/Trees/Iterators/DirectChildrenIterator.cs index 3032ca6..ea4553e 100644 --- a/Runtime/Graphs/Trees/Iterators/DirectChildrenIterator.cs +++ b/Runtime/Graphs/Trees/Iterators/DirectChildrenIterator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class DirectChildrenIterator: TreeIterator where N:class diff --git a/Runtime/Graphs/Trees/Iterators/NodesIterator.cs b/Runtime/Graphs/Trees/Iterators/NodesIterator.cs index 37ffe5d..017f890 100644 --- a/Runtime/Graphs/Trees/Iterators/NodesIterator.cs +++ b/Runtime/Graphs/Trees/Iterators/NodesIterator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NodesIterator: TreeIterator where N:class diff --git a/Runtime/Graphs/Trees/Iterators/ParentsIterator.cs b/Runtime/Graphs/Trees/Iterators/ParentsIterator.cs index 82099c8..d615288 100644 --- a/Runtime/Graphs/Trees/Iterators/ParentsIterator.cs +++ b/Runtime/Graphs/Trees/Iterators/ParentsIterator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class ParentsIterator: TreeIterator where N:class diff --git a/Runtime/Graphs/Trees/Iterators/SiblingsIterator.cs b/Runtime/Graphs/Trees/Iterators/SiblingsIterator.cs index f0284ef..50c37ae 100644 --- a/Runtime/Graphs/Trees/Iterators/SiblingsIterator.cs +++ b/Runtime/Graphs/Trees/Iterators/SiblingsIterator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SiblingsIterator: TreeIterator where N:class diff --git a/Runtime/Graphs/Trees/Iterators/SingleIterator.cs b/Runtime/Graphs/Trees/Iterators/SingleIterator.cs index a2a8ba2..aa5cad1 100644 --- a/Runtime/Graphs/Trees/Iterators/SingleIterator.cs +++ b/Runtime/Graphs/Trees/Iterators/SingleIterator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SingleIterator: TreeIterator where N:class diff --git a/Runtime/Graphs/Trees/TreeIterator.cs b/Runtime/Graphs/Trees/TreeIterator.cs index 168e676..7be17bd 100644 --- a/Runtime/Graphs/Trees/TreeIterator.cs +++ b/Runtime/Graphs/Trees/TreeIterator.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum TreeIteratorType diff --git a/Runtime/Graphs/Trees/TreeWalker.cs b/Runtime/Graphs/Trees/TreeWalker.cs index 721099e..37c981b 100644 --- a/Runtime/Graphs/Trees/TreeWalker.cs +++ b/Runtime/Graphs/Trees/TreeWalker.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { + [RokojoriActionCoreGDIgnore] public abstract class TreeWalker where N:class { public abstract N Parent( N node ); @@ -503,7 +505,7 @@ namespace Rokojori while ( p != null ) { - if ( p is T t ) + if ( p is T t) { return t; } @@ -672,7 +674,7 @@ namespace Rokojori return null; } - public void Filter( List list, N node, Predicate predicate, bool childrenOnly ) + public void FilterList( List list, N node, Predicate predicate, bool childrenOnly ) { Action addToList = ( N n ) => { @@ -688,11 +690,11 @@ namespace Rokojori public List Filter( N node, Predicate predicate, bool childrenOnly ) { var list = new List(); - Filter( list, node, predicate, childrenOnly ); + FilterList( list, node, predicate, childrenOnly ); return list; } - public void FilterAndMap( List list, N node, Predicate predicate, Func mapper, bool childrenOnly ) + public void FilterAndMapList( List list, N node, Predicate predicate, Func mapper, bool childrenOnly ) { Action addToList = ( N n ) => { @@ -708,7 +710,7 @@ namespace Rokojori public List FilterAndMap( N node, Predicate predicate, Func mapper, bool childrenOnly ) { var list = new List(); - FilterAndMap( list, node, predicate, mapper, childrenOnly ); + FilterAndMapList( list, node, predicate, mapper, childrenOnly ); return list; } diff --git a/Runtime/Interactions/AreaCaster.cs b/Runtime/Interactions/AreaCaster.cs index 62d1781..37c6d52 100644 --- a/Runtime/Interactions/AreaCaster.cs +++ b/Runtime/Interactions/AreaCaster.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Caster.cs b/Runtime/Interactions/Caster.cs index 14d08c2..cd80dc3 100644 --- a/Runtime/Interactions/Caster.cs +++ b/Runtime/Interactions/Caster.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Actions/SetCharacterControllerAction.cs b/Runtime/Interactions/CharacterController/Actions/SetCharacterControllerAction.cs index 70c7f9a..a53ac06 100644 --- a/Runtime/Interactions/CharacterController/Actions/SetCharacterControllerAction.cs +++ b/Runtime/Interactions/CharacterController/Actions/SetCharacterControllerAction.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Actions/SetCharacterMoveSpeed.cs b/Runtime/Interactions/CharacterController/Actions/SetCharacterMoveSpeed.cs index c2dce35..08ffacc 100644 --- a/Runtime/Interactions/CharacterController/Actions/SetCharacterMoveSpeed.cs +++ b/Runtime/Interactions/CharacterController/Actions/SetCharacterMoveSpeed.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/AddImpactForce.cs b/Runtime/Interactions/CharacterController/AddImpactForce.cs index f063cb3..f79013d 100644 --- a/Runtime/Interactions/CharacterController/AddImpactForce.cs +++ b/Runtime/Interactions/CharacterController/AddImpactForce.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -20,7 +21,7 @@ namespace Rokojori protected override void _OnTrigger() { - this.LogInfo( TimeLine.osTime ); + this.LogInfo( Timeline.osTime ); if ( target == null || impactForce == null ) { diff --git a/Runtime/Interactions/CharacterController/CharacterController.cs b/Runtime/Interactions/CharacterController/CharacterController.cs index 2ae7b35..1df352c 100644 --- a/Runtime/Interactions/CharacterController/CharacterController.cs +++ b/Runtime/Interactions/CharacterController/CharacterController.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/CharacterControllerAction.cs b/Runtime/Interactions/CharacterController/CharacterControllerAction.cs index a0691f8..4f33bf4 100644 --- a/Runtime/Interactions/CharacterController/CharacterControllerAction.cs +++ b/Runtime/Interactions/CharacterController/CharacterControllerAction.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/CharacterMovement.cs b/Runtime/Interactions/CharacterController/CharacterMovement.cs index 861e020..0157bf5 100644 --- a/Runtime/Interactions/CharacterController/CharacterMovement.cs +++ b/Runtime/Interactions/CharacterController/CharacterMovement.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/CharacterMovements/CharacterDirectionProcessing.cs b/Runtime/Interactions/CharacterController/CharacterMovements/CharacterDirectionProcessing.cs index bb0c1b7..33ccc4d 100644 --- a/Runtime/Interactions/CharacterController/CharacterMovements/CharacterDirectionProcessing.cs +++ b/Runtime/Interactions/CharacterController/CharacterMovements/CharacterDirectionProcessing.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public enum CharacterDirectionProcessing diff --git a/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementData.cs b/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementData.cs index e3ae12e..0fecffa 100644 --- a/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementData.cs +++ b/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementData.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public class CharacterMovementData diff --git a/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementType.cs b/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementType.cs index 2f4d053..25738fb 100644 --- a/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementType.cs +++ b/Runtime/Interactions/CharacterController/CharacterMovements/CharacterMovementType.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/CharacterMovements/StrafeMovementType.cs b/Runtime/Interactions/CharacterController/CharacterMovements/StrafeMovementType.cs index b13f8a8..445fc2d 100644 --- a/Runtime/Interactions/CharacterController/CharacterMovements/StrafeMovementType.cs +++ b/Runtime/Interactions/CharacterController/CharacterMovements/StrafeMovementType.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/CharacterMovements/TurnMovementType.cs b/Runtime/Interactions/CharacterController/CharacterMovements/TurnMovementType.cs index cac9251..e64ffca 100644 --- a/Runtime/Interactions/CharacterController/CharacterMovements/TurnMovementType.cs +++ b/Runtime/Interactions/CharacterController/CharacterMovements/TurnMovementType.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Conditions/CharacterIsJumping.cs b/Runtime/Interactions/CharacterController/Conditions/CharacterIsJumping.cs index a07899f..ada5982 100644 --- a/Runtime/Interactions/CharacterController/Conditions/CharacterIsJumping.cs +++ b/Runtime/Interactions/CharacterController/Conditions/CharacterIsJumping.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Conditions/CharacterIsMoving.cs b/Runtime/Interactions/CharacterController/Conditions/CharacterIsMoving.cs index 1a2eed8..978e31f 100644 --- a/Runtime/Interactions/CharacterController/Conditions/CharacterIsMoving.cs +++ b/Runtime/Interactions/CharacterController/Conditions/CharacterIsMoving.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Gravity.cs b/Runtime/Interactions/CharacterController/Gravity.cs index b0d305c..9961eef 100644 --- a/Runtime/Interactions/CharacterController/Gravity.cs +++ b/Runtime/Interactions/CharacterController/Gravity.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Gravity/EarthGravityStrength.cs b/Runtime/Interactions/CharacterController/Gravity/EarthGravityStrength.cs index 4b7f06b..1faa498 100644 --- a/Runtime/Interactions/CharacterController/Gravity/EarthGravityStrength.cs +++ b/Runtime/Interactions/CharacterController/Gravity/EarthGravityStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Gravity/GravityStrength.cs b/Runtime/Interactions/CharacterController/Gravity/GravityStrength.cs index 24edec2..31cadd3 100644 --- a/Runtime/Interactions/CharacterController/Gravity/GravityStrength.cs +++ b/Runtime/Interactions/CharacterController/Gravity/GravityStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Gravity/HeightDurationGravityStrength.cs b/Runtime/Interactions/CharacterController/Gravity/HeightDurationGravityStrength.cs index faf2b53..feb1a23 100644 --- a/Runtime/Interactions/CharacterController/Gravity/HeightDurationGravityStrength.cs +++ b/Runtime/Interactions/CharacterController/Gravity/HeightDurationGravityStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Gravity/RawGravityStrength.cs b/Runtime/Interactions/CharacterController/Gravity/RawGravityStrength.cs index 80be7dc..94c1ea1 100644 --- a/Runtime/Interactions/CharacterController/Gravity/RawGravityStrength.cs +++ b/Runtime/Interactions/CharacterController/Gravity/RawGravityStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Gravity/ReferencedGravityStrength.cs b/Runtime/Interactions/CharacterController/Gravity/ReferencedGravityStrength.cs index 50d477b..8134398 100644 --- a/Runtime/Interactions/CharacterController/Gravity/ReferencedGravityStrength.cs +++ b/Runtime/Interactions/CharacterController/Gravity/ReferencedGravityStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/GroundReset.cs b/Runtime/Interactions/CharacterController/GroundReset.cs index f0baec3..7212335 100644 --- a/Runtime/Interactions/CharacterController/GroundReset.cs +++ b/Runtime/Interactions/CharacterController/GroundReset.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Grounding/DownGroundingType.cs b/Runtime/Interactions/CharacterController/Grounding/DownGroundingType.cs index 09c3645..47c2df3 100644 --- a/Runtime/Interactions/CharacterController/Grounding/DownGroundingType.cs +++ b/Runtime/Interactions/CharacterController/Grounding/DownGroundingType.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Grounding/Grounding.cs b/Runtime/Interactions/CharacterController/Grounding/Grounding.cs index d54d2e8..cca449c 100644 --- a/Runtime/Interactions/CharacterController/Grounding/Grounding.cs +++ b/Runtime/Interactions/CharacterController/Grounding/Grounding.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Grounding/GroundingType.cs b/Runtime/Interactions/CharacterController/Grounding/GroundingType.cs index edfdf21..d6e5138 100644 --- a/Runtime/Interactions/CharacterController/Grounding/GroundingType.cs +++ b/Runtime/Interactions/CharacterController/Grounding/GroundingType.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/HeightDuration.cs b/Runtime/Interactions/CharacterController/HeightDuration.cs index c1ba30d..2200968 100644 --- a/Runtime/Interactions/CharacterController/HeightDuration.cs +++ b/Runtime/Interactions/CharacterController/HeightDuration.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/ImpactForce.cs b/Runtime/Interactions/CharacterController/ImpactForce.cs index e2bf917..4a72c2e 100644 --- a/Runtime/Interactions/CharacterController/ImpactForce.cs +++ b/Runtime/Interactions/CharacterController/ImpactForce.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/ImpactForces.cs b/Runtime/Interactions/CharacterController/ImpactForces.cs index 73736f9..514507a 100644 --- a/Runtime/Interactions/CharacterController/ImpactForces.cs +++ b/Runtime/Interactions/CharacterController/ImpactForces.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Jump.cs b/Runtime/Interactions/CharacterController/Jump.cs index f020a57..c418be4 100644 --- a/Runtime/Interactions/CharacterController/Jump.cs +++ b/Runtime/Interactions/CharacterController/Jump.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -86,7 +87,7 @@ namespace Rokojori public float GetJumpStartTime() { - return jumpStart == -1 ? 0 : ( TimeLine.osTime - jumpStart ); + return jumpStart == -1 ? 0 : ( Timeline.osTime - jumpStart ); } protected override void _OnTrigger() @@ -108,7 +109,7 @@ namespace Rokojori // jumpPressing = true; jumpedDuration = 0; jumping = true; - jumpStart = TimeLine.osTime; + jumpStart = Timeline.osTime; TriggerSafe( onJump ); diff --git a/Runtime/Interactions/CharacterController/Jumping/HeightBasedJumpStrength.cs b/Runtime/Interactions/CharacterController/Jumping/HeightBasedJumpStrength.cs index 822896a..5e43bcc 100644 --- a/Runtime/Interactions/CharacterController/Jumping/HeightBasedJumpStrength.cs +++ b/Runtime/Interactions/CharacterController/Jumping/HeightBasedJumpStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Jumping/HeightDurationJumpStrength.cs b/Runtime/Interactions/CharacterController/Jumping/HeightDurationJumpStrength.cs index 1ad6ae5..3dcf4ae 100644 --- a/Runtime/Interactions/CharacterController/Jumping/HeightDurationJumpStrength.cs +++ b/Runtime/Interactions/CharacterController/Jumping/HeightDurationJumpStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Jumping/HumanJumpStrength.cs b/Runtime/Interactions/CharacterController/Jumping/HumanJumpStrength.cs index 8c86c54..520f2a8 100644 --- a/Runtime/Interactions/CharacterController/Jumping/HumanJumpStrength.cs +++ b/Runtime/Interactions/CharacterController/Jumping/HumanJumpStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Jumping/JumpStrength.cs b/Runtime/Interactions/CharacterController/Jumping/JumpStrength.cs index 9923566..e6ba7da 100644 --- a/Runtime/Interactions/CharacterController/Jumping/JumpStrength.cs +++ b/Runtime/Interactions/CharacterController/Jumping/JumpStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/Jumping/RawJumpStrength.cs b/Runtime/Interactions/CharacterController/Jumping/RawJumpStrength.cs index 1781dd2..2162db4 100644 --- a/Runtime/Interactions/CharacterController/Jumping/RawJumpStrength.cs +++ b/Runtime/Interactions/CharacterController/Jumping/RawJumpStrength.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/MoveAndSlide.cs b/Runtime/Interactions/CharacterController/MoveAndSlide.cs index a3e8a5a..57371d5 100644 --- a/Runtime/Interactions/CharacterController/MoveAndSlide.cs +++ b/Runtime/Interactions/CharacterController/MoveAndSlide.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/CharacterController/ProcessVelocity.cs b/Runtime/Interactions/CharacterController/ProcessVelocity.cs index 1869cb4..dec457a 100644 --- a/Runtime/Interactions/CharacterController/ProcessVelocity.cs +++ b/Runtime/Interactions/CharacterController/ProcessVelocity.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/Collectable.cs b/Runtime/Interactions/Collecting/Collectable.cs index f6bc04e..831d5ac 100644 --- a/Runtime/Interactions/Collecting/Collectable.cs +++ b/Runtime/Interactions/Collecting/Collectable.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/CollectableCollection.cs b/Runtime/Interactions/Collecting/CollectableCollection.cs index eb1298f..dc7dbcc 100644 --- a/Runtime/Interactions/Collecting/CollectableCollection.cs +++ b/Runtime/Interactions/Collecting/CollectableCollection.cs @@ -5,6 +5,7 @@ using Godot.Collections; using System.Drawing; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/CollectableData.cs b/Runtime/Interactions/Collecting/CollectableData.cs index 91136e4..24838bf 100644 --- a/Runtime/Interactions/Collecting/CollectableData.cs +++ b/Runtime/Interactions/Collecting/CollectableData.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/CollectableType.cs b/Runtime/Interactions/Collecting/CollectableType.cs index 69af1ce..d2af041 100644 --- a/Runtime/Interactions/Collecting/CollectableType.cs +++ b/Runtime/Interactions/Collecting/CollectableType.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/CollectableTypeGroup.cs b/Runtime/Interactions/Collecting/CollectableTypeGroup.cs index 45898e3..09be988 100644 --- a/Runtime/Interactions/Collecting/CollectableTypeGroup.cs +++ b/Runtime/Interactions/Collecting/CollectableTypeGroup.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/Collector.cs b/Runtime/Interactions/Collecting/Collector.cs index 8bfb335..07f9234 100644 --- a/Runtime/Interactions/Collecting/Collector.cs +++ b/Runtime/Interactions/Collecting/Collector.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/CollectorTypeFlag.cs b/Runtime/Interactions/Collecting/CollectorTypeFlag.cs index 189feee..d95a91a 100644 --- a/Runtime/Interactions/Collecting/CollectorTypeFlag.cs +++ b/Runtime/Interactions/Collecting/CollectorTypeFlag.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collecting/OnCollected.cs b/Runtime/Interactions/Collecting/OnCollected.cs index a7022ec..efa2ea0 100644 --- a/Runtime/Interactions/Collecting/OnCollected.cs +++ b/Runtime/Interactions/Collecting/OnCollected.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Collidable.cs b/Runtime/Interactions/Collidable.cs index 92ae0b3..80e1aff 100644 --- a/Runtime/Interactions/Collidable.cs +++ b/Runtime/Interactions/Collidable.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public enum CollisionPhase diff --git a/Runtime/Interactions/Collider.cs b/Runtime/Interactions/Collider.cs index 817cac1..cbca6af 100644 --- a/Runtime/Interactions/Collider.cs +++ b/Runtime/Interactions/Collider.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -115,7 +116,7 @@ namespace Rokojori return; } - var tm = Unique.Get(); + var tm = Unique.Get(); if ( tm == null ) { @@ -148,7 +149,7 @@ namespace Rokojori return; } - var tm = Unique.Get(); + var tm = Unique.Get(); var callback = _inside[ collidable ]; _inside.Remove( collidable ); diff --git a/Runtime/Interactions/CollisionFlag.cs b/Runtime/Interactions/CollisionFlag.cs index 337aed1..001b093 100644 --- a/Runtime/Interactions/CollisionFlag.cs +++ b/Runtime/Interactions/CollisionFlag.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Grabbable.cs b/Runtime/Interactions/Grabbable.cs index eabd872..e87cb25 100644 --- a/Runtime/Interactions/Grabbable.cs +++ b/Runtime/Interactions/Grabbable.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Grabber.cs b/Runtime/Interactions/Grabber.cs index e03d5ce..aa38e00 100644 --- a/Runtime/Interactions/Grabber.cs +++ b/Runtime/Interactions/Grabber.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -22,7 +23,7 @@ namespace Rokojori public Action onRelease; [Export] - public TimeLine timeLine; + public Timeline timeLine; [Export] public Node3D grabOffset; @@ -54,7 +55,7 @@ namespace Rokojori SensorManager.Unregister( this, button ); } - TimeLineCallback _callback = null; + TimelineCallback _callback = null; public void _OnSensor( SensorEvent se ) { @@ -86,8 +87,8 @@ namespace Rokojori grabbable.SetGrabber( this ); - _callback = TimeLineManager.ScheduleCallback(timeLine, - (System.Action)(( cb )=> + _callback = TimelineManager.ScheduleCallback(timeLine, + (System.Action)(( cb )=> { if ( cb != _callback) { diff --git a/Runtime/Interactions/Interactable.cs b/Runtime/Interactions/Interactable.cs index b251dda..fc87121 100644 --- a/Runtime/Interactions/Interactable.cs +++ b/Runtime/Interactions/Interactable.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Interactor.cs b/Runtime/Interactions/Interactor.cs index 1b8f004..3e54d9c 100644 --- a/Runtime/Interactions/Interactor.cs +++ b/Runtime/Interactions/Interactor.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/MultiRayCaster.cs b/Runtime/Interactions/MultiRayCaster.cs index 52fff4e..cfa71ec 100644 --- a/Runtime/Interactions/MultiRayCaster.cs +++ b/Runtime/Interactions/MultiRayCaster.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Pointable.cs b/Runtime/Interactions/Pointable.cs index af513b2..d4f6e1a 100644 --- a/Runtime/Interactions/Pointable.cs +++ b/Runtime/Interactions/Pointable.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Pointer.cs b/Runtime/Interactions/Pointer.cs index 3fcafc8..1e8e827 100644 --- a/Runtime/Interactions/Pointer.cs +++ b/Runtime/Interactions/Pointer.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/Selectors/InteractiveSelector.cs b/Runtime/Interactions/Selectors/InteractiveSelector.cs index 1368d7b..c20de37 100644 --- a/Runtime/Interactions/Selectors/InteractiveSelector.cs +++ b/Runtime/Interactions/Selectors/InteractiveSelector.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System.Drawing; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/SetPointableEnabled.cs b/Runtime/Interactions/SetPointableEnabled.cs index 41b2e90..1650f97 100644 --- a/Runtime/Interactions/SetPointableEnabled.cs +++ b/Runtime/Interactions/SetPointableEnabled.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Interactions/iEnablable.cs b/Runtime/Interactions/iEnablable.cs index e348f1c..862ba79 100644 --- a/Runtime/Interactions/iEnablable.cs +++ b/Runtime/Interactions/iEnablable.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/LOD/LODArrangement.cs b/Runtime/LOD/LODArrangement.cs index 32a913a..9823fc3 100644 --- a/Runtime/LOD/LODArrangement.cs +++ b/Runtime/LOD/LODArrangement.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/LOD/LODBuilder.cs b/Runtime/LOD/LODBuilder.cs index 51ecac9..bff713e 100644 --- a/Runtime/LOD/LODBuilder.cs +++ b/Runtime/LOD/LODBuilder.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class LODCameraDistanceLevel diff --git a/Runtime/LOD/LODCameraDistanceRule.cs b/Runtime/LOD/LODCameraDistanceRule.cs index 5f3a822..26e6ed4 100644 --- a/Runtime/LOD/LODCameraDistanceRule.cs +++ b/Runtime/LOD/LODCameraDistanceRule.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public partial class LODCameraDistanceRule:LODLevelVisibilityRule diff --git a/Runtime/LOD/LODCameraPitchRule.cs b/Runtime/LOD/LODCameraPitchRule.cs index 137d430..73960d3 100644 --- a/Runtime/LOD/LODCameraPitchRule.cs +++ b/Runtime/LOD/LODCameraPitchRule.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public partial class LODCameraPitchRule:LODLevelVisibilityRule diff --git a/Runtime/LOD/LODCameraYawRule.cs b/Runtime/LOD/LODCameraYawRule.cs index 9d0c3f8..69bc659 100644 --- a/Runtime/LOD/LODCameraYawRule.cs +++ b/Runtime/LOD/LODCameraYawRule.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public partial class LODCameraYawRule:LODLevelVisibilityRule diff --git a/Runtime/LOD/LODLevel.cs b/Runtime/LOD/LODLevel.cs index 5169da3..2aa544f 100644 --- a/Runtime/LOD/LODLevel.cs +++ b/Runtime/LOD/LODLevel.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/LOD/LODLevelVisibilityRule.cs b/Runtime/LOD/LODLevelVisibilityRule.cs index cb027f5..e11d697 100644 --- a/Runtime/LOD/LODLevelVisibilityRule.cs +++ b/Runtime/LOD/LODLevelVisibilityRule.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/LOD/LODMeshCreator.cs b/Runtime/LOD/LODMeshCreator.cs index 9662eac..b6deaeb 100644 --- a/Runtime/LOD/LODMeshCreator.cs +++ b/Runtime/LOD/LODMeshCreator.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/LOD/LODMultiMesh.cs b/Runtime/LOD/LODMultiMesh.cs index d7a3df2..d9f97b9 100644 --- a/Runtime/LOD/LODMultiMesh.cs +++ b/Runtime/LOD/LODMultiMesh.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/LOD/LODNode.cs b/Runtime/LOD/LODNode.cs index a3ec591..f7c55b1 100644 --- a/Runtime/LOD/LODNode.cs +++ b/Runtime/LOD/LODNode.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/LOD/LODParent.cs b/Runtime/LOD/LODParent.cs index c7c823e..289393d 100644 --- a/Runtime/LOD/LODParent.cs +++ b/Runtime/LOD/LODParent.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -132,12 +133,12 @@ namespace Rokojori if ( selectedIndex >= lods.Length ) { - Arrays.ForEach( lods, l => NodeState.Set( l, false ) ); + Arrays.ForEach( lods, l => NodeState.SetNode( l, false ) ); } else { var selectedLOD = lods[ selectedIndex ]; - Arrays.ForEach( lods, l => NodeState.Set( l, selectedLOD == l ) ); + Arrays.ForEach( lods, l => NodeState.SetNode( l, selectedLOD == l ) ); } } diff --git a/Runtime/LOD/MultiMeshGenerator.cs b/Runtime/LOD/MultiMeshGenerator.cs index feffadb..62584ed 100644 --- a/Runtime/LOD/MultiMeshGenerator.cs +++ b/Runtime/LOD/MultiMeshGenerator.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/LOD/PointClouds/Point.cs b/Runtime/LOD/PointClouds/Point.cs index bbf7982..7ff71a8 100644 --- a/Runtime/LOD/PointClouds/Point.cs +++ b/Runtime/LOD/PointClouds/Point.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori.PointClouds { public class Point @@ -21,7 +22,7 @@ namespace Rokojori.PointClouds p.position = position.Lerp( point.position, amount ); p.normal = normal.Lerp( point.normal, amount ).Normalized(); p.uv = uv.Lerp( point.uv, amount ); - p.color = color.ToVector4().Lerp( point.color.ToVector4(), amount ).ToColor(); + p.color = color.ToVector4().Lerp( point.color.ToVector4(), amount ).ToColorFromVec4(); return p; } @@ -43,7 +44,7 @@ namespace Rokojori.PointClouds } p.normal = p.normal.Normalized(); - p.color = color.ToColor(); + p.color = color.ToColorFromVec4(); return p; } diff --git a/Runtime/LOD/PointClouds/PointCloud.cs b/Runtime/LOD/PointClouds/PointCloud.cs index 4eb1359..3bfa0c8 100644 --- a/Runtime/LOD/PointClouds/PointCloud.cs +++ b/Runtime/LOD/PointClouds/PointCloud.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori.PointClouds { public class PointCloud diff --git a/Runtime/LOD/PointClouds/PointCloudGenerator.cs b/Runtime/LOD/PointClouds/PointCloudGenerator.cs index 73accee..2531311 100644 --- a/Runtime/LOD/PointClouds/PointCloudGenerator.cs +++ b/Runtime/LOD/PointClouds/PointCloudGenerator.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori.PointClouds { [Tool] diff --git a/Runtime/LOD/PointClouds/PointCloudOcTree.cs b/Runtime/LOD/PointClouds/PointCloudOcTree.cs index 6ff1a09..8610537 100644 --- a/Runtime/LOD/PointClouds/PointCloudOcTree.cs +++ b/Runtime/LOD/PointClouds/PointCloudOcTree.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori.PointClouds { public class PointCloudOcTree:OcTree diff --git a/Runtime/LOD/PointClouds/PointCloudSampler.cs b/Runtime/LOD/PointClouds/PointCloudSampler.cs index 6a5d548..55d8623 100644 --- a/Runtime/LOD/PointClouds/PointCloudSampler.cs +++ b/Runtime/LOD/PointClouds/PointCloudSampler.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori.PointClouds { @@ -311,7 +312,7 @@ namespace Rokojori.PointClouds if ( sampleCenter ) { var point = new Point(); - point.color = ( centerColor / 3.0f ).ToColor(); + point.color = ( centerColor / 3.0f ).ToColorFromVec4(); point.position = center / 3.0f; point.normal = centerNormal / 3.0f; point.uv = centerUV / 3.0f; @@ -385,7 +386,7 @@ namespace Rokojori.PointClouds if ( sampleCenter ) { var point = new Point(); - point.color = ( centerColor / 3.0f ).ToColor(); + point.color = ( centerColor / 3.0f ).ToColorFromVec4(); point.position = center / 3.0f; point.normal = centerNormal / 3.0f; point.uv = centerUV / 3.0f; diff --git a/Runtime/Localization/LocaleCode.cs b/Runtime/Localization/LocaleCode.cs index af56f00..437a9f0 100644 --- a/Runtime/Localization/LocaleCode.cs +++ b/Runtime/Localization/LocaleCode.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public enum LocaleCode diff --git a/Runtime/Localization/LocaleLabel3D.cs b/Runtime/Localization/LocaleLabel3D.cs index 2ccb71f..2bcbc20 100644 --- a/Runtime/Localization/LocaleLabel3D.cs +++ b/Runtime/Localization/LocaleLabel3D.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Localization/LocaleManager.cs b/Runtime/Localization/LocaleManager.cs index 3ea3838..5c68d24 100644 --- a/Runtime/Localization/LocaleManager.cs +++ b/Runtime/Localization/LocaleManager.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Localization/LocaleText.cs b/Runtime/Localization/LocaleText.cs index 6d29318..6da8a0b 100644 --- a/Runtime/Localization/LocaleText.cs +++ b/Runtime/Localization/LocaleText.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Localization/LocaleTextEntry.cs b/Runtime/Localization/LocaleTextEntry.cs index 4a012c1..8404636 100644 --- a/Runtime/Localization/LocaleTextEntry.cs +++ b/Runtime/Localization/LocaleTextEntry.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Localization/LocalizedString.cs b/Runtime/Localization/LocalizedString.cs index 9f2ef41..e29b979 100644 --- a/Runtime/Localization/LocalizedString.cs +++ b/Runtime/Localization/LocalizedString.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Localization/iLocalizable.cs b/Runtime/Localization/iLocalizable.cs index d729ffe..3868638 100644 --- a/Runtime/Localization/iLocalizable.cs +++ b/Runtime/Localization/iLocalizable.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public interface iLocalizable diff --git a/Runtime/Logging/Message.cs b/Runtime/Logging/Message.cs index 7ea0cb9..26ee53b 100644 --- a/Runtime/Logging/Message.cs +++ b/Runtime/Logging/Message.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum MessageType @@ -94,7 +95,7 @@ namespace Rokojori public static List GetMessagesWithLevel( List messages, int level ) { - return Lists.Filter( messages, m => GetLevel( m.type ) >= level ); + return ListExtensions.Filter( messages, m => GetLevel( m.type ) >= level ); } public static List GetErrors( List messages) diff --git a/Runtime/Logging/RJLog.cs b/Runtime/Logging/RJLog.cs index 6c487a2..2b399c9 100644 --- a/Runtime/Logging/RJLog.cs +++ b/Runtime/Logging/RJLog.cs @@ -4,79 +4,33 @@ using System.Text; using System; using System.Linq; using Godot; +using Rokojori.Extensions; +using Rokojori.Extensions; namespace Rokojori { + [RokojoriActionCoreExport] public class RJLog { - - #if ROKOJORI_ACTION_CORE - - static void _LogObjects( object obj, params object[] values ) + #if ROKOJORI_ACTION_CORE_GD + + public static string Stringify( object obj ) { - string message = obj + ""; - - for ( int i = 0; i < values.Length; i++ ) - { - message += " " + values[ i ]; - } - - GD.Print( message ); + GDGlue.InsertGDScript( "return str( obj ) "); } - public static void Log( object obj, params object[] values ) - { - _LogObjects( obj, values ); - } - - public static void Warn( object obj, params object[] values ) - { - _LogObjects( obj, values ); - } - - public static void Error( object obj, params object[] values ) - { - _LogObjects( obj, values ); - } - - #else - public static string GetInfo( object obj, params object[] values ) - { - - if ( obj == null ) - { - return ""; - } - - var sb = new StringBuilder(); - sb.Append( obj.GetType().Name ); - sb.Append( "{ " ); - - for ( int i = 0; i < values.Length; i++ ) - { - if ( i != 0 ) - { - sb.Append( ", " ); - } - - Stringify( values[ i ], sb ); - } - - sb.Append( " }" ); - - return sb.ToString(); - } + #elif ROKOJORI_ACTION_CORE public static string Stringify( object obj ) { - var sb = new StringBuilder(); + return obj + ""; + } - Stringify( obj, sb ); - - return sb.ToString(); - } + #endif - public static void Stringify( object obj, StringBuilder output ) + #if !ROKOJORI_ACTION_CORE_GD + + public static void WriteStringified( object obj, StringBuilder output ) { if ( obj == null ) { @@ -117,7 +71,7 @@ namespace Rokojori output.Append( ", " ); } - Stringify( it, output ); + WriteStringified( it, output ); } output.Append( "ï¼½" ); @@ -145,7 +99,7 @@ namespace Rokojori } - Stringify( it, output ); + WriteStringified( it, output ); } output.Append( "ï¼½" ); @@ -156,16 +110,126 @@ namespace Rokojori output.Append( obj.ToString() ); } - public static string Stringify( params object[] objects ) + #endif + + #if ROKOJORI_ACTION_CORE + + static void _LogObjects( object obj, params object[] values ) + { + string message = obj + ""; + + for ( int i = 0; i < values.Length; i++ ) + { + message += " " + values[ i ]; + } + + GD.Print( message ); + } + + public static void Log( object obj, params object[] values ) + { + _LogObjects( obj, values ); + } + + public static void Warn( object obj, params object[] values ) + { + _LogObjects( obj, values ); + } + + public static void Error( object obj, params object[] values ) + { + _LogObjects( obj, values ); + } + + #else + + public static string GetInfo( object obj, params object[] values ) + { + + if ( obj == null ) + { + return ""; + } + + var sb = new StringBuilder(); + sb.Append( obj.GetType().Name ); + sb.Append( "{ " ); + + for ( int i = 0; i < values.Length; i++ ) + { + if ( i != 0 ) + { + sb.Append( ", " ); + } + + WriteStringified( values[ i ], sb ); + } + + sb.Append( " }" ); + + return sb.ToString(); + } + + public static string Stringify( object obj ) + { + var sb = new StringBuilder(); + + WriteStringified( obj, sb ); + + return sb.ToString(); + } + + + + public static string Stringify( params object[] objects ) { return GetLogString( objects ); } + static string counterSet = "0123456789ABCDEGFGHIJKLMNOPQRSTUVWXZ"; + + static int[] counters = [0,0,0]; + + static void IncrementCounter() + { + _IncrementCounter( 0 ); + } + + static void _IncrementCounter( int position ) + { + if ( position == 2 ) + { + counters[ 0 ] = 0; + counters[ 1 ] = 0; + counters[ 2 ] = 0; + return; + } + + counters[ position ] ++; + + if ( counters[ position ] == counterSet.Length ) + { + counters[ position ] = 0; + _IncrementCounter( position + 1 ); + } + } + + public static string GetCounterLabel() + { + + return "" + counterSet[ counters[ 2 ] ] + counterSet[ counters[ 1 ] ] + counterSet[ counters[ 0 ] ]; + } + static void LogMessage( string message, int frameIndex = 3 ) { + var counterLabel = "[color=#555555][font_size=10]" + GetCounterLabel() + "[/font_size][/color]"; + IncrementCounter(); + var trace = GetTrace( frameIndex ); - GD.PrintRich("\n[b]" + message ); - GD.PrintRich( trace ); + var printMessage = "[b]" + message; + + GD.PrintRich( counterLabel + printMessage.SplitLines().Join( "\n" + counterLabel + " ") ); + GD.PrintRich( counterLabel + trace.SplitLines().Join( "\n" + counterLabel + " ") ); } static void GDLogMessage( string message, string trace ) @@ -191,9 +255,15 @@ namespace Rokojori static void LogErrorMessage( string message, int frameIndex = 3 ) { + var counterLabelRaw = GetCounterLabel(); + var counterLabel = "[color=#555555][font_size=10]" + counterLabelRaw + "[/font_size][/color]"; + IncrementCounter(); + var trace = GetTrace( frameIndex ); - GD.PrintErr( "\n"+ message ); - GD.PrintRich( trace ); + var printMessage = "\n"+ message; + + GD.PrintErr( "\n"+ counterLabelRaw + " " +printMessage.SplitLines().Join( "\n" + counterLabelRaw + " " ) ); + GD.PrintRich( counterLabel + trace.SplitLines().Join( "\n" + counterLabel + " ") ); } static string GetFullTrace() @@ -321,7 +391,7 @@ namespace Rokojori sb.Append( " " ); } - Stringify( objects[ i ], sb ); + WriteStringified( objects[ i ], sb ); } return sb.ToString(); diff --git a/Runtime/Math/BernsteinPolynom.cs b/Runtime/Math/BernsteinPolynom.cs index c4a8550..46d6cc6 100644 --- a/Runtime/Math/BernsteinPolynom.cs +++ b/Runtime/Math/BernsteinPolynom.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Bezier.cs b/Runtime/Math/Bezier.cs index 108786e..6dff503 100644 --- a/Runtime/Math/Bezier.cs +++ b/Runtime/Math/Bezier.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Bezier diff --git a/Runtime/Math/BinomialCoefficient.cs b/Runtime/Math/BinomialCoefficient.cs index 664673c..79a2e9f 100644 --- a/Runtime/Math/BinomialCoefficient.cs +++ b/Runtime/Math/BinomialCoefficient.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Biquad.cs b/Runtime/Math/Biquad.cs index 275fdba..44c276a 100644 --- a/Runtime/Math/Biquad.cs +++ b/Runtime/Math/Biquad.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum BiquadType diff --git a/Runtime/Math/CubicBezier.cs b/Runtime/Math/CubicBezier.cs index a79ea63..a9f238c 100644 --- a/Runtime/Math/CubicBezier.cs +++ b/Runtime/Math/CubicBezier.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/FFT.cs b/Runtime/Math/FFT.cs index fac3c8d..5bcd2cc 100644 --- a/Runtime/Math/FFT.cs +++ b/Runtime/Math/FFT.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class FFT diff --git a/Runtime/Math/Geometry/Box2.cs b/Runtime/Math/Geometry/Box2.cs index d2eb488..0ad182f 100644 --- a/Runtime/Math/Geometry/Box2.cs +++ b/Runtime/Math/Geometry/Box2.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Box2 diff --git a/Runtime/Math/Geometry/Box3.cs b/Runtime/Math/Geometry/Box3.cs index 8303b8b..b5e1c6b 100644 --- a/Runtime/Math/Geometry/Box3.cs +++ b/Runtime/Math/Geometry/Box3.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Box3 diff --git a/Runtime/Math/Geometry/Capsule2.cs b/Runtime/Math/Geometry/Capsule2.cs index e3969f7..e22f492 100644 --- a/Runtime/Math/Geometry/Capsule2.cs +++ b/Runtime/Math/Geometry/Capsule2.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Capsule2 diff --git a/Runtime/Math/Geometry/Capsule3.cs b/Runtime/Math/Geometry/Capsule3.cs index a084042..ac883e6 100644 --- a/Runtime/Math/Geometry/Capsule3.cs +++ b/Runtime/Math/Geometry/Capsule3.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Capsule3 diff --git a/Runtime/Math/Geometry/Circle.cs b/Runtime/Math/Geometry/Circle.cs index 2a45141..1957b30 100644 --- a/Runtime/Math/Geometry/Circle.cs +++ b/Runtime/Math/Geometry/Circle.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Circle diff --git a/Runtime/Math/Geometry/Convex2.cs b/Runtime/Math/Geometry/Convex2.cs index 4d2a2fa..cd3e1bf 100644 --- a/Runtime/Math/Geometry/Convex2.cs +++ b/Runtime/Math/Geometry/Convex2.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Convex2Group diff --git a/Runtime/Math/Geometry/Curve2.cs b/Runtime/Math/Geometry/Curve2.cs index 09dce2c..238c2fb 100644 --- a/Runtime/Math/Geometry/Curve2.cs +++ b/Runtime/Math/Geometry/Curve2.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public abstract class Curve2 diff --git a/Runtime/Math/Geometry/Curve3.cs b/Runtime/Math/Geometry/Curve3.cs index 4e2c752..98f9e89 100644 --- a/Runtime/Math/Geometry/Curve3.cs +++ b/Runtime/Math/Geometry/Curve3.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class FresnetFrame diff --git a/Runtime/Math/Geometry/CustomCurve3.cs b/Runtime/Math/Geometry/CustomCurve3.cs index 5d8bdec..5e9b59b 100644 --- a/Runtime/Math/Geometry/CustomCurve3.cs +++ b/Runtime/Math/Geometry/CustomCurve3.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class CustomCurve3:Curve3 diff --git a/Runtime/Math/Geometry/Distance3.cs b/Runtime/Math/Geometry/Distance3.cs index 01241bc..2020eb2 100644 --- a/Runtime/Math/Geometry/Distance3.cs +++ b/Runtime/Math/Geometry/Distance3.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Distance diff --git a/Runtime/Math/Geometry/LerpCurve3.cs b/Runtime/Math/Geometry/LerpCurve3.cs index 13eefce..c463ee1 100644 --- a/Runtime/Math/Geometry/LerpCurve3.cs +++ b/Runtime/Math/Geometry/LerpCurve3.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Geometry/Line2.cs b/Runtime/Math/Geometry/Line2.cs index 43fe149..536cb55 100644 --- a/Runtime/Math/Geometry/Line2.cs +++ b/Runtime/Math/Geometry/Line2.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Line2 diff --git a/Runtime/Math/Geometry/Line3.cs b/Runtime/Math/Geometry/Line3.cs index 461d3d3..8dc6156 100644 --- a/Runtime/Math/Geometry/Line3.cs +++ b/Runtime/Math/Geometry/Line3.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Line3:Curve3 diff --git a/Runtime/Math/Geometry/Overlap2D.cs b/Runtime/Math/Geometry/Overlap2D.cs index 2c6287b..9b72741 100644 --- a/Runtime/Math/Geometry/Overlap2D.cs +++ b/Runtime/Math/Geometry/Overlap2D.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Overlap2D diff --git a/Runtime/Math/Geometry/Overlap3D.cs b/Runtime/Math/Geometry/Overlap3D.cs index da46c5a..5d8ef1a 100644 --- a/Runtime/Math/Geometry/Overlap3D.cs +++ b/Runtime/Math/Geometry/Overlap3D.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Overlap3D diff --git a/Runtime/Math/Geometry/Path2.cs b/Runtime/Math/Geometry/Path2.cs index 54e07ea..2bffa95 100644 --- a/Runtime/Math/Geometry/Path2.cs +++ b/Runtime/Math/Geometry/Path2.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum PointInPathResult @@ -430,7 +431,7 @@ namespace Rokojori pathCommands.Add( "L " + SVGPathCommand.SVGCoordinate( points[ i ] ) ); } - return Lists.Join( pathCommands, " "); + return ListExtensions.Join( pathCommands, " "); } public MeshGeometry CreateMeshGeometry() @@ -573,7 +574,7 @@ namespace Rokojori public static List ToClipperPath( Path2 path, double scale = Path2.DefaultClipperLibraryScale ) { - return Lists.Map( + return ListExtensions.Map( path.points, p => { var x = p.X * scale; @@ -586,7 +587,7 @@ namespace Rokojori public static Path2 FromClipperPath( List clipperPath, double scale = Path2.DefaultClipperLibraryScale ) { - var points = Lists.Map( + var points = ListExtensions.Map( clipperPath, p => { var x = p.X / scale; diff --git a/Runtime/Math/Geometry/Plane3.cs b/Runtime/Math/Geometry/Plane3.cs index bb62ca0..8c6a09b 100644 --- a/Runtime/Math/Geometry/Plane3.cs +++ b/Runtime/Math/Geometry/Plane3.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Plane3 diff --git a/Runtime/Math/Geometry/Pose.cs b/Runtime/Math/Geometry/Pose.cs index 7252c67..ab01f0f 100644 --- a/Runtime/Math/Geometry/Pose.cs +++ b/Runtime/Math/Geometry/Pose.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Pose diff --git a/Runtime/Math/Geometry/Ray3.cs b/Runtime/Math/Geometry/Ray3.cs index 8dcf2d9..9f6e2eb 100644 --- a/Runtime/Math/Geometry/Ray3.cs +++ b/Runtime/Math/Geometry/Ray3.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Ray3 diff --git a/Runtime/Math/Geometry/SAT2.cs b/Runtime/Math/Geometry/SAT2.cs index c45b9a1..a0c4fe2 100644 --- a/Runtime/Math/Geometry/SAT2.cs +++ b/Runtime/Math/Geometry/SAT2.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Geometry/SAT3.cs b/Runtime/Math/Geometry/SAT3.cs index 9471622..88f4b24 100644 --- a/Runtime/Math/Geometry/SAT3.cs +++ b/Runtime/Math/Geometry/SAT3.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Geometry/Shape2.cs b/Runtime/Math/Geometry/Shape2.cs index dcb75aa..147567d 100644 --- a/Runtime/Math/Geometry/Shape2.cs +++ b/Runtime/Math/Geometry/Shape2.cs @@ -8,6 +8,7 @@ using TriangleNet.Meshing; using TriangleNet.Meshing.Algorithm; #endif +using Rokojori.Extensions; namespace Rokojori { #if !ROKOJORI_ACTION_CORE @@ -38,8 +39,8 @@ namespace Rokojori public string ToSVGPath() { - var svgPaths = Lists.Map( paths, p => p.ToSVGPath() ); - return Lists.Join( svgPaths, " " ); + var svgPaths = ListExtensions.Map( paths, p => p.ToSVGPath() ); + return ListExtensions.Join( svgPaths, " " ); } @@ -196,7 +197,7 @@ namespace Rokojori if ( simplify && false ) { - var resultPaths = Lists.Map( polyPaths, p => Path2.ToClipperPath( p ) ); + var resultPaths = ListExtensions.Map( polyPaths, p => Path2.ToClipperPath( p ) ); resultPaths = ClipperLib.Clipper.SimplifyPolygons( resultPaths, ClipperLib.PolyFillType.pftEvenOdd ); @@ -222,7 +223,7 @@ namespace Rokojori polyPaths.ForEach( ( path )=> { - var vertices = Lists.Map( path.points, p => new Vertex( p.X, p.Y ) ); + var vertices = ListExtensions.Map( path.points, p => new Vertex( p.X, p.Y ) ); var center = path.center; var isClockwise = path.isClockwise; var isHole = firstIsClockWise != isClockwise; diff --git a/Runtime/Math/Geometry/Sphere.cs b/Runtime/Math/Geometry/Sphere.cs index 52333ae..8108115 100644 --- a/Runtime/Math/Geometry/Sphere.cs +++ b/Runtime/Math/Geometry/Sphere.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Sphere diff --git a/Runtime/Math/Geometry/SplineCurve.cs b/Runtime/Math/Geometry/SplineCurve.cs index c7afacb..8e3cc0a 100644 --- a/Runtime/Math/Geometry/SplineCurve.cs +++ b/Runtime/Math/Geometry/SplineCurve.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class SplineCurveTangent @@ -176,28 +177,28 @@ namespace Rokojori public SplineCurve Clone() { var splineCurve = new SplineCurve(); - splineCurve._points = Lists.Map( points, p => p.Clone() ); + splineCurve._points = ListExtensions.Map( points, p => p.Clone() ); return splineCurve; } public SplineCurve ApplyPose( Pose pose ) { var splineCurve = new SplineCurve(); - splineCurve._points = Lists.Map( points, p => p.ApplyPose( pose ) ); + splineCurve._points = ListExtensions.Map( points, p => p.ApplyPose( pose ) ); return splineCurve; } public SplineCurve CloneForXZ( float y = 0 ) { var splineCurve = new SplineCurve(); - splineCurve._points = Lists.Map( points, p => p.CloneForXZ( y ) ); + splineCurve._points = ListExtensions.Map( points, p => p.CloneForXZ( y ) ); return splineCurve; } public SplineCurve CloneForXY( float z = 0 ) { var splineCurve = new SplineCurve(); - splineCurve._points = Lists.Map( points, p => p.CloneForXY( z ) ); + splineCurve._points = ListExtensions.Map( points, p => p.CloneForXY( z ) ); return splineCurve; } diff --git a/Runtime/Math/Geometry/SplineCurveCreator.cs b/Runtime/Math/Geometry/SplineCurveCreator.cs index 4ed8f54..06031a9 100644 --- a/Runtime/Math/Geometry/SplineCurveCreator.cs +++ b/Runtime/Math/Geometry/SplineCurveCreator.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class SplineCurveCreator diff --git a/Runtime/Math/Geometry/Triangle2.cs b/Runtime/Math/Geometry/Triangle2.cs index 66608f2..9bb921b 100644 --- a/Runtime/Math/Geometry/Triangle2.cs +++ b/Runtime/Math/Geometry/Triangle2.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Triangle2 diff --git a/Runtime/Math/Geometry/Triangle3.cs b/Runtime/Math/Geometry/Triangle3.cs index 16fc06b..951a7d5 100644 --- a/Runtime/Math/Geometry/Triangle3.cs +++ b/Runtime/Math/Geometry/Triangle3.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Geometry/TriangleTest.cs b/Runtime/Math/Geometry/TriangleTest.cs index f5dda0d..4519305 100644 --- a/Runtime/Math/Geometry/TriangleTest.cs +++ b/Runtime/Math/Geometry/TriangleTest.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Math/Math2D.cs b/Runtime/Math/Math2D.cs index 135a228..c582b89 100644 --- a/Runtime/Math/Math2D.cs +++ b/Runtime/Math/Math2D.cs @@ -4,6 +4,7 @@ using Godot; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public static class Math2D diff --git a/Runtime/Math/Math3D.cs b/Runtime/Math/Math3D.cs index 45e79cc..b5d7b31 100644 --- a/Runtime/Math/Math3D.cs +++ b/Runtime/Math/Math3D.cs @@ -4,6 +4,7 @@ using Godot; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public static class Math3D diff --git a/Runtime/Math/MathX.cs b/Runtime/Math/MathX.cs index f12c662..464bb68 100644 --- a/Runtime/Math/MathX.cs +++ b/Runtime/Math/MathX.cs @@ -4,6 +4,7 @@ using Godot; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public static class MathX @@ -67,7 +68,7 @@ namespace Rokojori ( br - tr ) * uv.X * uv.Y; } - public static float Sample( + public static float Sample2D( float ba, float bb, float bc, float bd, float ta, float tb, float tc, float td, Vector3 uvw @@ -183,7 +184,7 @@ namespace Rokojori return index; } - public static int MultiIndexToFlatIndex( Vector3I indices, Vector3I sizes ) + public static int XYZIndexToFlatIndex( Vector3I indices, Vector3I sizes ) { var index = 0; @@ -193,7 +194,7 @@ namespace Rokojori return index; } - public static int MultiIndexToFlatIndex( Vector2I indices, Vector2I sizes ) + public static int XYIndexToFlatIndex( Vector2I indices, Vector2I sizes ) { var index = 0; @@ -215,7 +216,7 @@ namespace Rokojori return multiIndex; } - public static Vector3I FlatIndexToMultiIndex( int index, Vector3I sizes ) + public static Vector3I FlatIndexToXYZIndex( int index, Vector3I sizes ) { var multiIndex = Vector3I.Zero; @@ -231,7 +232,7 @@ namespace Rokojori } - public static Vector2I FlatIndexToMultiIndex( int index, Vector2I sizes ) + public static Vector2I FlatIndexToXYIndex( int index, Vector2I sizes ) { var multiIndex = Vector2I.Zero; @@ -341,14 +342,14 @@ namespace Rokojori return Mathf.CeilToInt( p ); } - public static int NextPowerOfTwoExponent( float num ) + public static int NextPowerOfTwoExponentRounded( float num ) { return NextPowerOfTwoExponent( Mathf.RoundToInt( num ) ); } public static int NextPowerOfTwo( float num ) { - var exponent = NextPowerOfTwoExponent( num ); + var exponent = NextPowerOfTwoExponentRounded( num ); return 1 << exponent; } @@ -438,21 +439,25 @@ namespace Rokojori return ( phase - phaseStart ) / ( phaseStart - phaseEnd ); } - public static int SafeIndex( int index, List elements, bool wrap = false ) + public static int SafeIndexFor( int index, List elements, bool wrap = false ) { return SafeIndex( index, elements.Count, wrap ); } + #if !ROKOJORI_ACTION_CORE_GD + public static int SafeIndex( int index, T[] elements, bool wrap = false ) { return SafeIndex( index, elements.Length, wrap ); } + #endif + public static int SafeIndex( int index, int maxElements, bool wrap = false ) { if ( wrap ) { - return MathX.Repeat( index, maxElements ); + return MathX.RepeatInt( index, maxElements ); } else { @@ -461,7 +466,7 @@ namespace Rokojori } - public static int Repeat( int value, int range ) + public static int RepeatInt( int value, int range ) { while ( value < 0 ) { @@ -532,7 +537,7 @@ namespace Rokojori return curve; } - public static Curve Curve( float y ) + public static Curve CurveFromY( float y ) { return Curve( y, y ); } diff --git a/Runtime/Math/QuadraticBezier.cs b/Runtime/Math/QuadraticBezier.cs index d6eacaf..0c529e3 100644 --- a/Runtime/Math/QuadraticBezier.cs +++ b/Runtime/Math/QuadraticBezier.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Range.cs b/Runtime/Math/Range.cs index 64a1d80..cb335f4 100644 --- a/Runtime/Math/Range.cs +++ b/Runtime/Math/Range.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Range diff --git a/Runtime/Math/RangeDouble.cs b/Runtime/Math/RangeDouble.cs index ffd4c83..30151b6 100644 --- a/Runtime/Math/RangeDouble.cs +++ b/Runtime/Math/RangeDouble.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { [System.Serializable] @@ -10,10 +11,18 @@ namespace Rokojori public double min; public double max; - public RangeDouble( double min, double max ) + // public RangeDouble( double min, double max ) + // { + // this.min = min; + // this.max = max; + // } + + public static RangeDouble Create( double min, double max ) { - this.min = min; - this.max = max; + var rd = new RangeDouble(); + rd.min = min; + rd.max = max; + return rd; } public void EnsureCorrectness() @@ -24,7 +33,7 @@ namespace Rokojori } } - public bool Contains( double value ) + public bool ContainsValue( double value ) { return min <= value && value <= max; } @@ -34,12 +43,12 @@ namespace Rokojori if ( other.max < min ) { return false; } if ( other.min > max ) { return false; } - if ( other.Contains( min ) || other.Contains( max ) ) + if ( other.ContainsValue( min ) || other.ContainsValue( max ) ) { return true; } - if ( Contains( min ) || Contains( max ) ) + if ( ContainsValue( min ) || ContainsValue( max ) ) { return true; } @@ -87,7 +96,7 @@ namespace Rokojori public RangeDouble Copy() { - return new RangeDouble( min, max ); + return Create( min, max ); } public double SampleAt( double normalized ) @@ -97,21 +106,21 @@ namespace Rokojori public static RangeDouble Of_01 { - get { return new RangeDouble( 0, 1 ); } + get { return Create( 0, 1 ); } } public static RangeDouble Of_Zero { - get { return new RangeDouble( 0, 0 ); } + get { return Create( 0, 0 ); } } public static RangeDouble Of_One { - get { return new RangeDouble( 1, 1 ); } + get { return Create( 1, 1 ); } } - public static bool Contains( double min, double max, double value ) + public static bool ContainsRange( double min, double max, double value ) { return min <= value && value <= max; } diff --git a/Runtime/Math/RangeI.cs b/Runtime/Math/RangeI.cs index dc6942d..6763c73 100644 --- a/Runtime/Math/RangeI.cs +++ b/Runtime/Math/RangeI.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RangeI diff --git a/Runtime/Math/RationalCubicBezier.cs b/Runtime/Math/RationalCubicBezier.cs index 945bd2e..3d22bca 100644 --- a/Runtime/Math/RationalCubicBezier.cs +++ b/Runtime/Math/RationalCubicBezier.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Math/Smoother.cs b/Runtime/Math/Smoother.cs index e5f537e..5d15277 100644 --- a/Runtime/Math/Smoother.cs +++ b/Runtime/Math/Smoother.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Smoother diff --git a/Runtime/Navigation/NavigationMap.cs b/Runtime/Navigation/NavigationMap.cs index eb04858..e42fc05 100644 --- a/Runtime/Navigation/NavigationMap.cs +++ b/Runtime/Navigation/NavigationMap.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class NavigationMap diff --git a/Runtime/Navigation/NavigationMap2D.cs b/Runtime/Navigation/NavigationMap2D.cs index 5d8ce2b..c2ea071 100644 --- a/Runtime/Navigation/NavigationMap2D.cs +++ b/Runtime/Navigation/NavigationMap2D.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class NavigationMap2D diff --git a/Runtime/Navigation/NavigationMeshes.cs b/Runtime/Navigation/NavigationMeshes.cs index cd69030..8549c58 100644 --- a/Runtime/Navigation/NavigationMeshes.cs +++ b/Runtime/Navigation/NavigationMeshes.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class NaviationMeshes diff --git a/Runtime/Networking/Backends/LAN/LANNetworkingBackend.cs b/Runtime/Networking/Backends/LAN/LANNetworkingBackend.cs index b9b263a..0365fab 100644 --- a/Runtime/Networking/Backends/LAN/LANNetworkingBackend.cs +++ b/Runtime/Networking/Backends/LAN/LANNetworkingBackend.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Networking/Data/NetClass.cs b/Runtime/Networking/Data/NetClass.cs index 55f23d3..bbb2cc8 100644 --- a/Runtime/Networking/Data/NetClass.cs +++ b/Runtime/Networking/Data/NetClass.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public abstract class NetClassDefinition diff --git a/Runtime/Networking/Data/NetMember.cs b/Runtime/Networking/Data/NetMember.cs index 741b852..1d33a5d 100644 --- a/Runtime/Networking/Data/NetMember.cs +++ b/Runtime/Networking/Data/NetMember.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetMember diff --git a/Runtime/Networking/Data/NetworkingDataType.cs b/Runtime/Networking/Data/NetworkingDataType.cs index 2a2f9cb..92849fa 100644 --- a/Runtime/Networking/Data/NetworkingDataType.cs +++ b/Runtime/Networking/Data/NetworkingDataType.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface NetworkDataType diff --git a/Runtime/Networking/Data/Types/NetBool.cs b/Runtime/Networking/Data/Types/NetBool.cs index c8ddd09..d9e1063 100644 --- a/Runtime/Networking/Data/Types/NetBool.cs +++ b/Runtime/Networking/Data/Types/NetBool.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetBoolType:NetworkDataType diff --git a/Runtime/Networking/Data/Types/NetByte.cs b/Runtime/Networking/Data/Types/NetByte.cs index 6c5cf4b..f222608 100644 --- a/Runtime/Networking/Data/Types/NetByte.cs +++ b/Runtime/Networking/Data/Types/NetByte.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetByteType:NetworkDataType diff --git a/Runtime/Networking/Data/Types/NetFloat.cs b/Runtime/Networking/Data/Types/NetFloat.cs index cf0b97c..ffbcff4 100644 --- a/Runtime/Networking/Data/Types/NetFloat.cs +++ b/Runtime/Networking/Data/Types/NetFloat.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetFloatType:NetworkDataType diff --git a/Runtime/Networking/Data/Types/NetInt.cs b/Runtime/Networking/Data/Types/NetInt.cs index 2ac8464..caf78dc 100644 --- a/Runtime/Networking/Data/Types/NetInt.cs +++ b/Runtime/Networking/Data/Types/NetInt.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetIntType:NetworkDataType diff --git a/Runtime/Networking/Data/Types/NetIntVL8.cs b/Runtime/Networking/Data/Types/NetIntVL8.cs index d87bfb5..4996ff6 100644 --- a/Runtime/Networking/Data/Types/NetIntVL8.cs +++ b/Runtime/Networking/Data/Types/NetIntVL8.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetIntVL8Type:NetworkDataType diff --git a/Runtime/Networking/Data/Types/NetList.cs b/Runtime/Networking/Data/Types/NetList.cs index 5a20841..7f7d95c 100644 --- a/Runtime/Networking/Data/Types/NetList.cs +++ b/Runtime/Networking/Data/Types/NetList.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetListType:NetworkDataType> diff --git a/Runtime/Networking/Data/Types/NetQuaternion.cs b/Runtime/Networking/Data/Types/NetQuaternion.cs index 03f20fc..87443bf 100644 --- a/Runtime/Networking/Data/Types/NetQuaternion.cs +++ b/Runtime/Networking/Data/Types/NetQuaternion.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetQuaternionType:NetworkDataType diff --git a/Runtime/Networking/Data/Types/NetVector3.cs b/Runtime/Networking/Data/Types/NetVector3.cs index 5dc7a16..6d2ec28 100644 --- a/Runtime/Networking/Data/Types/NetVector3.cs +++ b/Runtime/Networking/Data/Types/NetVector3.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetVector3Type:NetworkDataType diff --git a/Runtime/Networking/NetworkBackend.cs b/Runtime/Networking/NetworkBackend.cs index b251a1b..0db25b1 100644 --- a/Runtime/Networking/NetworkBackend.cs +++ b/Runtime/Networking/NetworkBackend.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public partial class NetworkBackend:Node diff --git a/Runtime/Networking/NetworkManager.cs b/Runtime/Networking/NetworkManager.cs index bfd63bf..31a774f 100644 --- a/Runtime/Networking/NetworkManager.cs +++ b/Runtime/Networking/NetworkManager.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass,Icon("res://addons/rokojori_action_library/Icons/NetworkManager.svg")] diff --git a/Runtime/Networking/Nodes/AddNetworkingNodes.cs b/Runtime/Networking/Nodes/AddNetworkingNodes.cs index efcb31d..632228a 100644 --- a/Runtime/Networking/Nodes/AddNetworkingNodes.cs +++ b/Runtime/Networking/Nodes/AddNetworkingNodes.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Networking/Nodes/INetworkingNode.cs b/Runtime/Networking/Nodes/INetworkingNode.cs index c4bb7d9..8cf763d 100644 --- a/Runtime/Networking/Nodes/INetworkingNode.cs +++ b/Runtime/Networking/Nodes/INetworkingNode.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Networking/Nodes/NetworkNode.cs b/Runtime/Networking/Nodes/NetworkNode.cs index caf61ff..53cd6ec 100644 --- a/Runtime/Networking/Nodes/NetworkNode.cs +++ b/Runtime/Networking/Nodes/NetworkNode.cs @@ -5,6 +5,7 @@ using Rokojori.Tools; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -12,6 +13,7 @@ namespace Rokojori; [RokojoriActionCoreExport] public partial class NetworkNode : Node, INetworkNode { + #if !ROKOJORI_ACTION_CORE [ExportGroup("Network Settings")] diff --git a/Runtime/Networking/Nodes/NetworkNodeMember.cs b/Runtime/Networking/Nodes/NetworkNodeMember.cs index 686245a..65abdf4 100644 --- a/Runtime/Networking/Nodes/NetworkNodeMember.cs +++ b/Runtime/Networking/Nodes/NetworkNodeMember.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Networking/Nodes/NetworkNodeMemberReferences.cs b/Runtime/Networking/Nodes/NetworkNodeMemberReferences.cs index 3931dd9..7d59b90 100644 --- a/Runtime/Networking/Nodes/NetworkNodeMemberReferences.cs +++ b/Runtime/Networking/Nodes/NetworkNodeMemberReferences.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetworkNodeMemberReferences diff --git a/Runtime/Networking/Nodes/NetworkNodeSlot.cs b/Runtime/Networking/Nodes/NetworkNodeSlot.cs index 0880469..903340f 100644 --- a/Runtime/Networking/Nodes/NetworkNodeSlot.cs +++ b/Runtime/Networking/Nodes/NetworkNodeSlot.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetworkNodeSlot:NetworkNodeMember diff --git a/Runtime/Networking/Session/JoinSession.cs b/Runtime/Networking/Session/JoinSession.cs index 17384e2..c28f8a9 100644 --- a/Runtime/Networking/Session/JoinSession.cs +++ b/Runtime/Networking/Session/JoinSession.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Networking/Session/NetworkSessionEvent.cs b/Runtime/Networking/Session/NetworkSessionEvent.cs index 18978df..6d72909 100644 --- a/Runtime/Networking/Session/NetworkSessionEvent.cs +++ b/Runtime/Networking/Session/NetworkSessionEvent.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetworkSessionEvent diff --git a/Runtime/Networking/Session/NetworkSessionManager.cs b/Runtime/Networking/Session/NetworkSessionManager.cs index 4e74413..b57c735 100644 --- a/Runtime/Networking/Session/NetworkSessionManager.cs +++ b/Runtime/Networking/Session/NetworkSessionManager.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class NetworkSessionManager diff --git a/Runtime/Networking/Session/NetworkSessionMember.cs b/Runtime/Networking/Session/NetworkSessionMember.cs index 6970ed2..f8d61ff 100644 --- a/Runtime/Networking/Session/NetworkSessionMember.cs +++ b/Runtime/Networking/Session/NetworkSessionMember.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class NetworkSessionMember diff --git a/Runtime/Networking/Session/NetworkSessionRequest.cs b/Runtime/Networking/Session/NetworkSessionRequest.cs index 43ed557..5c6e61c 100644 --- a/Runtime/Networking/Session/NetworkSessionRequest.cs +++ b/Runtime/Networking/Session/NetworkSessionRequest.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Networking/Session/NetworkSessionState.cs b/Runtime/Networking/Session/NetworkSessionState.cs index f7f7c32..0cede44 100644 --- a/Runtime/Networking/Session/NetworkSessionState.cs +++ b/Runtime/Networking/Session/NetworkSessionState.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum NetworkSessionConnectionState diff --git a/Runtime/Networking/Session/StartSession.cs b/Runtime/Networking/Session/StartSession.cs index d0ee747..713a495 100644 --- a/Runtime/Networking/Session/StartSession.cs +++ b/Runtime/Networking/Session/StartSession.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Networking/Transforms/NetworkTransform3D.cs b/Runtime/Networking/Transforms/NetworkTransform3D.cs index c34b79e..c5c0f35 100644 --- a/Runtime/Networking/Transforms/NetworkTransform3D.cs +++ b/Runtime/Networking/Transforms/NetworkTransform3D.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Networking/Transforms/NetworkTransform3DType.cs b/Runtime/Networking/Transforms/NetworkTransform3DType.cs index cfc00a1..b8f48a1 100644 --- a/Runtime/Networking/Transforms/NetworkTransform3DType.cs +++ b/Runtime/Networking/Transforms/NetworkTransform3DType.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Networking/Transforms/NetworkTransformManager.cs b/Runtime/Networking/Transforms/NetworkTransformManager.cs index dac94a4..6deefe8 100644 --- a/Runtime/Networking/Transforms/NetworkTransformManager.cs +++ b/Runtime/Networking/Transforms/NetworkTransformManager.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public partial class NetworkTransformManager:NetworkNode diff --git a/Runtime/Networking/Transport/NetworkingMessage.cs b/Runtime/Networking/Transport/NetworkingMessage.cs index 1adcdb5..f172ce4 100644 --- a/Runtime/Networking/Transport/NetworkingMessage.cs +++ b/Runtime/Networking/Transport/NetworkingMessage.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class NetworkMessage diff --git a/Runtime/Networking/Transport/NetworkingTransport.cs b/Runtime/Networking/Transport/NetworkingTransport.cs index 8f2d703..b900ad3 100644 --- a/Runtime/Networking/Transport/NetworkingTransport.cs +++ b/Runtime/Networking/Transport/NetworkingTransport.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class QueuedMessageData diff --git a/Runtime/Networking/Transport/NetworkingTransportSettings.cs b/Runtime/Networking/Transport/NetworkingTransportSettings.cs index e0a7257..fe78e17 100644 --- a/Runtime/Networking/Transport/NetworkingTransportSettings.cs +++ b/Runtime/Networking/Transport/NetworkingTransportSettings.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class NetworkTransportSettings diff --git a/Runtime/Networking/Transport/NetworkingTransportType.cs b/Runtime/Networking/Transport/NetworkingTransportType.cs index d50ace4..9534d0f 100644 --- a/Runtime/Networking/Transport/NetworkingTransportType.cs +++ b/Runtime/Networking/Transport/NetworkingTransportType.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum NetworkTransportType diff --git a/Runtime/Paths.cs b/Runtime/Paths.cs index acb015d..cdd99dc 100644 --- a/Runtime/Paths.cs +++ b/Runtime/Paths.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Paths diff --git a/Runtime/Physics/CollisionData.cs b/Runtime/Physics/CollisionData.cs index 80fd04f..c8a181e 100644 --- a/Runtime/Physics/CollisionData.cs +++ b/Runtime/Physics/CollisionData.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Godot.Collections; using System; +using Rokojori.Extensions; namespace Rokojori { public class CollisionData diff --git a/Runtime/Physics/PhysicsBodies.cs b/Runtime/Physics/PhysicsBodies.cs index eddeace..728de4f 100644 --- a/Runtime/Physics/PhysicsBodies.cs +++ b/Runtime/Physics/PhysicsBodies.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public static class PhysicsBodies diff --git a/Runtime/Physics/PhysicsRayCast.cs b/Runtime/Physics/PhysicsRayCast.cs index 5d4a739..3d32da0 100644 --- a/Runtime/Physics/PhysicsRayCast.cs +++ b/Runtime/Physics/PhysicsRayCast.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class PhysicsRayCast diff --git a/Runtime/Physics/Projectile.cs b/Runtime/Physics/Projectile.cs index dd8cff7..203e62d 100644 --- a/Runtime/Physics/Projectile.cs +++ b/Runtime/Physics/Projectile.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Physics/Wind/Speed/TextureKMHWindSpeed.cs b/Runtime/Physics/Wind/Speed/TextureKMHWindSpeed.cs index 078a042..3691daf 100644 --- a/Runtime/Physics/Wind/Speed/TextureKMHWindSpeed.cs +++ b/Runtime/Physics/Wind/Speed/TextureKMHWindSpeed.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Physics/Wind/Speed/WindSpeed.cs b/Runtime/Physics/Wind/Speed/WindSpeed.cs index 5beba0f..2c2e753 100644 --- a/Runtime/Physics/Wind/Speed/WindSpeed.cs +++ b/Runtime/Physics/Wind/Speed/WindSpeed.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Physics/Wind/WindManager.cs b/Runtime/Physics/Wind/WindManager.cs index 31fcec9..d241add 100644 --- a/Runtime/Physics/Wind/WindManager.cs +++ b/Runtime/Physics/Wind/WindManager.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Physics/Wind/WindManagerData.cs b/Runtime/Physics/Wind/WindManagerData.cs index d9640a9..1121123 100644 --- a/Runtime/Physics/Wind/WindManagerData.cs +++ b/Runtime/Physics/Wind/WindManagerData.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Physics/Wind/WindToGPUParticles.cs b/Runtime/Physics/Wind/WindToGPUParticles.cs index cae34b2..a657f99 100644 --- a/Runtime/Physics/Wind/WindToGPUParticles.cs +++ b/Runtime/Physics/Wind/WindToGPUParticles.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Presets/App/AppPreset.cs b/Runtime/Presets/App/AppPreset.cs index d4ff844..4e71cb3 100644 --- a/Runtime/Presets/App/AppPreset.cs +++ b/Runtime/Presets/App/AppPreset.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Presets/App/MainModule.cs b/Runtime/Presets/App/MainModule.cs index ae162a8..7adc798 100644 --- a/Runtime/Presets/App/MainModule.cs +++ b/Runtime/Presets/App/MainModule.cs @@ -3,6 +3,7 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -71,16 +72,16 @@ namespace Rokojori if ( timeLineManager ) { - var tm = root.CreateChild( "Timeline Manager" ); + var tm = root.CreateChild( "Timeline Manager" ); var timelinePath = "res://addons/rokojori_action_library/Runtime/Time/TimeLines/"; - var gameTime = ResourceLoader.Load( timelinePath + "GameTime.tres" ); - var realTime = ResourceLoader.Load( timelinePath + "RealTime.tres" ); + var gameTime = ResourceLoader.Load( timelinePath + "GameTime.tres" ); + var realTime = ResourceLoader.Load( timelinePath + "RealTime.tres" ); - tm.gametimeTimeline = gameTime; + tm.timeScaleTimeline = gameTime; tm.realtimeTimeline = realTime; - tm.timeLines = [ gameTime, realTime ]; + tm.timelines = [ gameTime, realTime ]; } diff --git a/Runtime/Presets/Features/DefaultPostProcessing/DefaultPostProcessingModule.cs b/Runtime/Presets/Features/DefaultPostProcessing/DefaultPostProcessingModule.cs index 505c7bb..e71ef7f 100644 --- a/Runtime/Presets/Features/DefaultPostProcessing/DefaultPostProcessingModule.cs +++ b/Runtime/Presets/Features/DefaultPostProcessing/DefaultPostProcessingModule.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Presets/Features/FeatureModule.cs b/Runtime/Presets/Features/FeatureModule.cs index 7e76e5c..7321c05 100644 --- a/Runtime/Presets/Features/FeatureModule.cs +++ b/Runtime/Presets/Features/FeatureModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Presets/Features/FeatureModuleList.cs b/Runtime/Presets/Features/FeatureModuleList.cs index 968e63f..e4f8275 100644 --- a/Runtime/Presets/Features/FeatureModuleList.cs +++ b/Runtime/Presets/Features/FeatureModuleList.cs @@ -2,6 +2,7 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Presets/Features/ThirdPersonCamera/ThirdPersonCameraModule.cs b/Runtime/Presets/Features/ThirdPersonCamera/ThirdPersonCameraModule.cs index efd3794..ca51814 100644 --- a/Runtime/Presets/Features/ThirdPersonCamera/ThirdPersonCameraModule.cs +++ b/Runtime/Presets/Features/ThirdPersonCamera/ThirdPersonCameraModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Presets/PresetContext.cs b/Runtime/Presets/PresetContext.cs index 6f33b28..badfddf 100644 --- a/Runtime/Presets/PresetContext.cs +++ b/Runtime/Presets/PresetContext.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum PresetPass diff --git a/Runtime/Presets/PresetModule.cs b/Runtime/Presets/PresetModule.cs index 63cf199..436eacd 100644 --- a/Runtime/Presets/PresetModule.cs +++ b/Runtime/Presets/PresetModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Presets/RenderQualitySettings.cs b/Runtime/Presets/RenderQualitySettings.cs index d5dd077..3b3a7e3 100644 --- a/Runtime/Presets/RenderQualitySettings.cs +++ b/Runtime/Presets/RenderQualitySettings.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Assets/BillboardTree/BillboardTree.cs b/Runtime/Procedural/Assets/BillboardTree/BillboardTree.cs index 475d0ff..099bdb2 100644 --- a/Runtime/Procedural/Assets/BillboardTree/BillboardTree.cs +++ b/Runtime/Procedural/Assets/BillboardTree/BillboardTree.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -105,7 +106,7 @@ namespace Rokojori var rowDensityValue = random.Sample( rowDensity ); var numLeaves = Mathf.Ceil( rowRadius / rowDensityValue ); - var rowAngleOffset = random.Range( 0, 360f ); + var rowAngleOffset = random.FromRange( 0, 360f ); //this.LogInfo( "index:", rowIndex, "leaves:", numLeaves ); diff --git a/Runtime/Procedural/Assets/Grass/GrassPatch.cs b/Runtime/Procedural/Assets/Grass/GrassPatch.cs index 277b009..f7a5c96 100644 --- a/Runtime/Procedural/Assets/Grass/GrassPatch.cs +++ b/Runtime/Procedural/Assets/Grass/GrassPatch.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** @@ -183,7 +184,7 @@ namespace Rokojori

*/ [Export] - public Curve uvSegmentWeightsClose = MathX.Curve( 1f ); + public Curve uvSegmentWeightsClose = MathX.CurveFromY( 1f ); /** @@ -224,19 +225,19 @@ namespace Rokojori */ [ExportGroup( "Shape")] [Export] - public Curve bladeHeight = MathX.Curve( 0.4f ); + public Curve bladeHeight = MathX.CurveFromY( 0.4f ); /** The amount the blade is continued below 0 in y. See also bladeHeight. */ [Export] - public Curve bladeInGround = MathX.Curve( 0.05f ); + public Curve bladeInGround = MathX.CurveFromY( 0.05f ); /** The width of the blade defined over its height. */ [Export] - public Curve bladeWidth = MathX.Curve( 0.05f ); + public Curve bladeWidth = MathX.CurveFromY( 0.05f ); /** Optional: A second width (as randomizer) of the blade defined over its height. @@ -252,7 +253,7 @@ namespace Rokojori [ExportGroup( "Curve")] [Export] - public Curve bladeBending = MathX.Curve( 0f ); + public Curve bladeBending = MathX.CurveFromY( 0f ); [Export] public Curve bladeBending2 = null; @@ -264,7 +265,7 @@ namespace Rokojori public Curve bladeTwisting2 = null; [Export] - public Curve rolling = MathX.Curve( 0f ); + public Curve rolling = MathX.CurveFromY( 0f ); [Export] public Curve rolling2 = null; @@ -273,26 +274,26 @@ namespace Rokojori [ExportGroup( "Offset")] [Export] - public Curve positionJitter = MathX.Curve( 0.05f ); + public Curve positionJitter = MathX.CurveFromY( 0.05f ); [Export] - public Curve positionJitterX = MathX.Curve( 0.05f ); + public Curve positionJitterX = MathX.CurveFromY( 0.05f ); [Export] - public Curve positionJitterZ = MathX.Curve( 0.05f ); + public Curve positionJitterZ = MathX.CurveFromY( 0.05f ); [ExportGroup( "Scale")] [Export] - public Curve bladeScale = MathX.Curve( 1f ); + public Curve bladeScale = MathX.CurveFromY( 1f ); [Export] - public Curve scaleByDistanceX = MathX.Curve( 1f ); + public Curve scaleByDistanceX = MathX.CurveFromY( 1f ); [Export] - public Curve scaleByDistanceZ = MathX.Curve( 1f ); + public Curve scaleByDistanceZ = MathX.CurveFromY( 1f ); [Export] public Curve xRemapper = null; @@ -340,10 +341,10 @@ namespace Rokojori [ExportGroup( "Normals")] [Export] - public Curve normalBlending = MathX.Curve( 0.5f ); + public Curve normalBlending = MathX.CurveFromY( 0.5f ); [Export] - public Curve normalBlendingAmountOverY = MathX.Curve( 1f ); + public Curve normalBlendingAmountOverY = MathX.CurveFromY( 1f ); [Export] public Vector3 normalBlendingDirection = Vector3.Up; @@ -775,7 +776,7 @@ namespace Rokojori if ( uvSegments > 1 ) { - var index = random.IntegerExclusive( uvSegments ); + var index = random.IntegerExclusivePositive( uvSegments ); if ( uvSegmentWeightsClose != null ) { diff --git a/Runtime/Procedural/Assets/Grass/GrassPatchLODLevel.cs b/Runtime/Procedural/Assets/Grass/GrassPatchLODLevel.cs index fdfb4d6..1b092a3 100644 --- a/Runtime/Procedural/Assets/Grass/GrassPatchLODLevel.cs +++ b/Runtime/Procedural/Assets/Grass/GrassPatchLODLevel.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Assets/Grass/UpdateGrassPatch.cs b/Runtime/Procedural/Assets/Grass/UpdateGrassPatch.cs index 925ec7b..79fe83c 100644 --- a/Runtime/Procedural/Assets/Grass/UpdateGrassPatch.cs +++ b/Runtime/Procedural/Assets/Grass/UpdateGrassPatch.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Assets/Leaf/LeafMesh.cs b/Runtime/Procedural/Assets/Leaf/LeafMesh.cs index 6bae5f8..d5c2f89 100644 --- a/Runtime/Procedural/Assets/Leaf/LeafMesh.cs +++ b/Runtime/Procedural/Assets/Leaf/LeafMesh.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Assets/Tree/TreeBranch.cs b/Runtime/Procedural/Assets/Tree/TreeBranch.cs index 2ac2a08..3f07589 100644 --- a/Runtime/Procedural/Assets/Tree/TreeBranch.cs +++ b/Runtime/Procedural/Assets/Tree/TreeBranch.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Assets/Tree/TreeGenerator.cs b/Runtime/Procedural/Assets/Tree/TreeGenerator.cs index b72dda7..117a941 100644 --- a/Runtime/Procedural/Assets/Tree/TreeGenerator.cs +++ b/Runtime/Procedural/Assets/Tree/TreeGenerator.cs @@ -7,6 +7,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -232,7 +233,7 @@ namespace Rokojori var t = i / ( numLeaves - 1f ); var leafGeometry = new MeshGeometry(); - var index = random.IntegerExclusive( leavesRows * leavesColumns ); + var index = random.IntegerExclusivePositive( leavesRows * leavesColumns ); var indexX = index % leavesColumns; var indexY = index / leavesColumns; @@ -241,9 +242,9 @@ namespace Rokojori var p = curve.PoseAt( t ); - var rx = random.Range( 0, 360 ); - var ry = random.Range( 0, 360 ); - var rz = random.Range( 0, 360 ); + var rx = random.FromRange( 0, 360 ); + var ry = random.FromRange( 0, 360 ); + var rz = random.FromRange( 0, 360 ); var leafSizeCurrent = leafSize * random.Sample( leafSizeScaleVariance, 1, 1 ); @@ -408,7 +409,7 @@ namespace Rokojori if ( randomizeSeed ) { - seed = GodotRandom.Get().IntegerInclusive( 0, 10000 ); + seed = GodotRandom.Get().IntegerInclusiveInRange( 0, 10000 ); } branches = []; @@ -647,7 +648,7 @@ namespace Rokojori rootPose.ApplyTwist( siblingRotation ); var rootRotationCenter = rotationPerLevel.Sample( normalizedLevel ); var rootRotationRange = rotationVariation == null ? 0 : random.Sample( rotationVariation ); - rootPose.RotateAround( Math3D.RotateXDegrees( random.Range( rootRotationCenter - rootRotationRange, rootRotationCenter + rootRotationRange ) ), rootPose.position ); + rootPose.RotateAround( Math3D.RotateXDegrees( random.FromRange( rootRotationCenter - rootRotationRange, rootRotationCenter + rootRotationRange ) ), rootPose.position ); var endPose = rootPose.Clone(); @@ -697,10 +698,10 @@ namespace Rokojori rootPose = parentCurve.PoseAt( treeBranch.branchPosition ); - rootPose.ApplyTwist( random.Range( 0, 360 ) ); + rootPose.ApplyTwist( random.FromRange( 0, 360 ) ); rootRotationCenter = rotationPerLevel.Sample( normalizedLevel ); rootRotationRange = rotationVariation == null ? 0 : random.Sample( rotationVariation ); - rootPose.RotateAround( Math3D.RotateXDegrees( random.Range( rootRotationCenter - rootRotationRange, rootRotationCenter + rootRotationRange ) ), rootPose.position ); + rootPose.RotateAround( Math3D.RotateXDegrees( random.FromRange( rootRotationCenter - rootRotationRange, rootRotationCenter + rootRotationRange ) ), rootPose.position ); endPose = rootPose.Clone(); endPose.position = rootPose.position + rootPose.forward * treeBranch.height + random.InSphere( noise ); diff --git a/Runtime/Procedural/Baking/Baker.cs b/Runtime/Procedural/Baking/Baker.cs index d69c402..122f527 100644 --- a/Runtime/Procedural/Baking/Baker.cs +++ b/Runtime/Procedural/Baking/Baker.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterialMode.cs b/Runtime/Procedural/Baking/BakingMaterialMode.cs index 11ad3e9..985ec9e 100644 --- a/Runtime/Procedural/Baking/BakingMaterialMode.cs +++ b/Runtime/Procedural/Baking/BakingMaterialMode.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum BakingMaterialMode diff --git a/Runtime/Procedural/Baking/BakingMaterials/BakingOutput.cs b/Runtime/Procedural/Baking/BakingMaterials/BakingOutput.cs index 632a0ff..15ab936 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/BakingOutput.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/BakingOutput.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/BakingTarget.cs b/Runtime/Procedural/Baking/BakingMaterials/BakingTarget.cs index 3624619..a5fbc52 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/BakingTarget.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/BakingTarget.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public enum BakingTargetType diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/Lit/LitBaker.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/Lit/LitBaker.cs index 93e6573..1c08555 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/Lit/LitBaker.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/Lit/LitBaker.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/PBR/PBRBaker.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/PBR/PBRBaker.cs index 0cda7ed..21b0631 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/PBR/PBRBaker.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Bakers/PBR/PBRBaker.cs @@ -4,6 +4,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/AlbedoBakingPass.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/AlbedoBakingPass.cs index f89d583..71145b0 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/AlbedoBakingPass.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/AlbedoBakingPass.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/DepthBakingPass.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/DepthBakingPass.cs index b80451e..7d29f58 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/DepthBakingPass.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/DepthBakingPass.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/LitBakingPass.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/LitBakingPass.cs index cfaf631..2f45432 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/LitBakingPass.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/LitBakingPass.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/NormalsBakingPass.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/NormalsBakingPass.cs index 993fdee..b67951d 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/NormalsBakingPass.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/NormalsBakingPass.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/ORMBakingPass.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/ORMBakingPass.cs index ae52dc1..76c9ea7 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/ORMBakingPass.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/ORMBakingPass.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/UVBakingPass.cs b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/UVBakingPass.cs index 5712beb..6352818 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/UVBakingPass.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/TextureBakers/Passes/UVBakingPass.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/_XX_BakingPass.cs b/Runtime/Procedural/Baking/BakingMaterials/_XX_BakingPass.cs index 7f10e3f..c8267c5 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/_XX_BakingPass.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/_XX_BakingPass.cs @@ -7,6 +7,7 @@ using System.Runtime.CompilerServices; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/BakingMaterials/_XX_MultiTextureBaker.cs b/Runtime/Procedural/Baking/BakingMaterials/_XX_MultiTextureBaker.cs index b797cc9..e9f1dc2 100644 --- a/Runtime/Procedural/Baking/BakingMaterials/_XX_MultiTextureBaker.cs +++ b/Runtime/Procedural/Baking/BakingMaterials/_XX_MultiTextureBaker.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -36,12 +37,12 @@ namespace Rokojori if ( _passes != null ) { - return Lists.Filter( _passes, p => p.isEnabled ); + return ListExtensions.Filter( _passes, p => p.isEnabled ); } _IntitializePasses(); - return Lists.Filter( _passes, p => p.isEnabled ); + return ListExtensions.Filter( _passes, p => p.isEnabled ); } } diff --git a/Runtime/Procedural/Baking/DilateTexture.cs b/Runtime/Procedural/Baking/DilateTexture.cs index 26525ee..273b595 100644 --- a/Runtime/Procedural/Baking/DilateTexture.cs +++ b/Runtime/Procedural/Baking/DilateTexture.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/GrabTexture.cs b/Runtime/Procedural/Baking/GrabTexture.cs index 899f604..167ee6c 100644 --- a/Runtime/Procedural/Baking/GrabTexture.cs +++ b/Runtime/Procedural/Baking/GrabTexture.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/GrabTexture2.cs b/Runtime/Procedural/Baking/GrabTexture2.cs index 57f9136..dd5533a 100644 --- a/Runtime/Procedural/Baking/GrabTexture2.cs +++ b/Runtime/Procedural/Baking/GrabTexture2.cs @@ -6,6 +6,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/GrabTextureRD.cs b/Runtime/Procedural/Baking/GrabTextureRD.cs index 04a1263..4b45101 100644 --- a/Runtime/Procedural/Baking/GrabTextureRD.cs +++ b/Runtime/Procedural/Baking/GrabTextureRD.cs @@ -6,6 +6,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/MultiBaker/CrossBraces_Baker.cs b/Runtime/Procedural/Baking/MultiBaker/CrossBraces_Baker.cs index 7786567..eaf8075 100644 --- a/Runtime/Procedural/Baking/MultiBaker/CrossBraces_Baker.cs +++ b/Runtime/Procedural/Baking/MultiBaker/CrossBraces_Baker.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Procedural/Baking/MultiBaker/Cylinder_Baker.cs b/Runtime/Procedural/Baking/MultiBaker/Cylinder_Baker.cs index 7f159f8..67bfacf 100644 --- a/Runtime/Procedural/Baking/MultiBaker/Cylinder_Baker.cs +++ b/Runtime/Procedural/Baking/MultiBaker/Cylinder_Baker.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Procedural/Baking/MultiBaker/Flat_Baker.cs b/Runtime/Procedural/Baking/MultiBaker/Flat_Baker.cs index 86994e2..2b887e5 100644 --- a/Runtime/Procedural/Baking/MultiBaker/Flat_Baker.cs +++ b/Runtime/Procedural/Baking/MultiBaker/Flat_Baker.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/GridSubDivider.cs b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/GridSubDivider.cs index af44ea1..a9d4fa7 100644 --- a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/GridSubDivider.cs +++ b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/GridSubDivider.cs @@ -6,6 +6,7 @@ using System; using System.Threading.Tasks; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualAbsoluteSubDivider.cs b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualAbsoluteSubDivider.cs index 38850d6..9bac1c4 100644 --- a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualAbsoluteSubDivider.cs +++ b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualAbsoluteSubDivider.cs @@ -6,6 +6,7 @@ using System; using System.Threading.Tasks; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualRelativeSubDivider.cs b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualRelativeSubDivider.cs index 7902f73..b4041cb 100644 --- a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualRelativeSubDivider.cs +++ b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/ManualRelativeSubDivider.cs @@ -6,6 +6,7 @@ using System; using System.Threading.Tasks; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -17,7 +18,7 @@ namespace Rokojori public override List GetSubDivisions( Transform3D quadTransform, Axis axis ) { - return Lists.From( subDivisions ); + return ListExtensions.From( subDivisions ); } } } \ No newline at end of file diff --git a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/MeshAxisSubDivider.cs b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/MeshAxisSubDivider.cs index 7b1b40a..19f08a5 100644 --- a/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/MeshAxisSubDivider.cs +++ b/Runtime/Procedural/Baking/MultiBaker/MeshAxisSubDividers/MeshAxisSubDivider.cs @@ -6,6 +6,7 @@ using System; using System.Threading.Tasks; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/MultiBaker/MultiBaker.cs b/Runtime/Procedural/Baking/MultiBaker/MultiBaker.cs index 9781784..5eed1fb 100644 --- a/Runtime/Procedural/Baking/MultiBaker/MultiBaker.cs +++ b/Runtime/Procedural/Baking/MultiBaker/MultiBaker.cs @@ -6,6 +6,7 @@ using System; using System.Threading.Tasks; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/MultiBaker/MultiBakerCameraTools.cs b/Runtime/Procedural/Baking/MultiBaker/MultiBakerCameraTools.cs index 384bb3a..4f97f17 100644 --- a/Runtime/Procedural/Baking/MultiBaker/MultiBakerCameraTools.cs +++ b/Runtime/Procedural/Baking/MultiBaker/MultiBakerCameraTools.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class MultiBakerCameraTools diff --git a/Runtime/Procedural/Baking/MultiBaker/OctahedralMapping.cs b/Runtime/Procedural/Baking/MultiBaker/OctahedralMapping.cs index e1abae4..48d3752 100644 --- a/Runtime/Procedural/Baking/MultiBaker/OctahedralMapping.cs +++ b/Runtime/Procedural/Baking/MultiBaker/OctahedralMapping.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class OctahedralMapping diff --git a/Runtime/Procedural/Baking/MultiBaker/Octahedral_Baker.cs b/Runtime/Procedural/Baking/MultiBaker/Octahedral_Baker.cs index 74a4fe5..e5866ad 100644 --- a/Runtime/Procedural/Baking/MultiBaker/Octahedral_Baker.cs +++ b/Runtime/Procedural/Baking/MultiBaker/Octahedral_Baker.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeMode.cs b/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeMode.cs index 1ee3710..2e27437 100644 --- a/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeMode.cs +++ b/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeMode.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeModeBillboardBase.cs b/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeModeBillboardBase.cs index ab41dac..cd77f38 100644 --- a/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeModeBillboardBase.cs +++ b/Runtime/Procedural/Baking/MultiBaker/_XX_MultiBakeModeBillboardBase.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Procedural/Baking/MultiBaker/_XX_Spherical_Baker.cs b/Runtime/Procedural/Baking/MultiBaker/_XX_Spherical_Baker.cs index 2ddb1b3..a4cf8cf 100644 --- a/Runtime/Procedural/Baking/MultiBaker/_XX_Spherical_Baker.cs +++ b/Runtime/Procedural/Baking/MultiBaker/_XX_Spherical_Baker.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/Procedural/Baking/PixelDensityTool.cs b/Runtime/Procedural/Baking/PixelDensityTool.cs index 2a27df9..7805d80 100644 --- a/Runtime/Procedural/Baking/PixelDensityTool.cs +++ b/Runtime/Procedural/Baking/PixelDensityTool.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/PointMesh/PointMeshBaker.cs b/Runtime/Procedural/Baking/PointMesh/PointMeshBaker.cs index d141b5e..de759b9 100644 --- a/Runtime/Procedural/Baking/PointMesh/PointMeshBaker.cs +++ b/Runtime/Procedural/Baking/PointMesh/PointMeshBaker.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/SaveViewportTexture.cs b/Runtime/Procedural/Baking/SaveViewportTexture.cs index a56289b..b4dc15e 100644 --- a/Runtime/Procedural/Baking/SaveViewportTexture.cs +++ b/Runtime/Procedural/Baking/SaveViewportTexture.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/SetBakingMaterials.cs b/Runtime/Procedural/Baking/SetBakingMaterials.cs index 7afc3ff..97502af 100644 --- a/Runtime/Procedural/Baking/SetBakingMaterials.cs +++ b/Runtime/Procedural/Baking/SetBakingMaterials.cs @@ -4,6 +4,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -84,7 +85,7 @@ namespace Rokojori List CreateBakingMaterials( List materials ) { - return Lists.Map( materials, m => CreateBakingMaterial( m ) ); + return ListExtensions.Map( materials, m => CreateBakingMaterial( m ) ); } Material CreateBakingMaterial( Material originalMaterial ) diff --git a/Runtime/Procedural/Baking/TextureDilate.cs b/Runtime/Procedural/Baking/TextureDilate.cs index 4700ea9..8828062 100644 --- a/Runtime/Procedural/Baking/TextureDilate.cs +++ b/Runtime/Procedural/Baking/TextureDilate.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/TextureMerger.cs b/Runtime/Procedural/Baking/TextureMerger.cs index 2d4beb0..8de4409 100644 --- a/Runtime/Procedural/Baking/TextureMerger.cs +++ b/Runtime/Procedural/Baking/TextureMerger.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/Textures.cs b/Runtime/Procedural/Baking/Textures.cs index 596b350..e307c7d 100644 --- a/Runtime/Procedural/Baking/Textures.cs +++ b/Runtime/Procedural/Baking/Textures.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public static class Textures diff --git a/Runtime/Procedural/Baking/ViewSettings/AutoDistance_BakingFDSettings.cs b/Runtime/Procedural/Baking/ViewSettings/AutoDistance_BakingFDSettings.cs index ddd5466..6401a41 100644 --- a/Runtime/Procedural/Baking/ViewSettings/AutoDistance_BakingFDSettings.cs +++ b/Runtime/Procedural/Baking/ViewSettings/AutoDistance_BakingFDSettings.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/ViewSettings/AutoFOVDistance_BakingFDSettings.cs b/Runtime/Procedural/Baking/ViewSettings/AutoFOVDistance_BakingFDSettings.cs index 44f0b1b..137ee12 100644 --- a/Runtime/Procedural/Baking/ViewSettings/AutoFOVDistance_BakingFDSettings.cs +++ b/Runtime/Procedural/Baking/ViewSettings/AutoFOVDistance_BakingFDSettings.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/ViewSettings/BakingViewSettings.cs b/Runtime/Procedural/Baking/ViewSettings/BakingViewSettings.cs index f410858..3afd835 100644 --- a/Runtime/Procedural/Baking/ViewSettings/BakingViewSettings.cs +++ b/Runtime/Procedural/Baking/ViewSettings/BakingViewSettings.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/ViewSettings/Manual_BakingFDSettings.cs b/Runtime/Procedural/Baking/ViewSettings/Manual_BakingFDSettings.cs index d768aaf..f7fe3fc 100644 --- a/Runtime/Procedural/Baking/ViewSettings/Manual_BakingFDSettings.cs +++ b/Runtime/Procedural/Baking/ViewSettings/Manual_BakingFDSettings.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Baking/ViewSettings/_XX_BakingFDSettings.cs b/Runtime/Procedural/Baking/ViewSettings/_XX_BakingFDSettings.cs index 73ee490..1719b9a 100644 --- a/Runtime/Procedural/Baking/ViewSettings/_XX_BakingFDSettings.cs +++ b/Runtime/Procedural/Baking/ViewSettings/_XX_BakingFDSettings.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Connectables/ConnectionCircle.cs b/Runtime/Procedural/Connectables/ConnectionCircle.cs index eafa2e5..b1e9263 100644 --- a/Runtime/Procedural/Connectables/ConnectionCircle.cs +++ b/Runtime/Procedural/Connectables/ConnectionCircle.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Connectables/ConnectionPin.cs b/Runtime/Procedural/Connectables/ConnectionPin.cs index 55bf851..28db391 100644 --- a/Runtime/Procedural/Connectables/ConnectionPin.cs +++ b/Runtime/Procedural/Connectables/ConnectionPin.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Connectables/ConnectionPinTester.cs b/Runtime/Procedural/Connectables/ConnectionPinTester.cs index f1ff214..a6aed78 100644 --- a/Runtime/Procedural/Connectables/ConnectionPinTester.cs +++ b/Runtime/Procedural/Connectables/ConnectionPinTester.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/ExtendedMesh.cs b/Runtime/Procedural/ExtendedMesh.cs index 5880d9b..0a37cc8 100644 --- a/Runtime/Procedural/ExtendedMesh.cs +++ b/Runtime/Procedural/ExtendedMesh.cs @@ -4,6 +4,7 @@ using Godot; using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass,Tool] diff --git a/Runtime/Procedural/HeightMap/HeightMapData.cs b/Runtime/Procedural/HeightMap/HeightMapData.cs index e0b0fcb..908cd0f 100644 --- a/Runtime/Procedural/HeightMap/HeightMapData.cs +++ b/Runtime/Procedural/HeightMap/HeightMapData.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class HeightMapData diff --git a/Runtime/Procedural/HeightMap/LODHeightMapGeometry.cs b/Runtime/Procedural/HeightMap/LODHeightMapGeometry.cs index 440afa2..dcfc8b8 100644 --- a/Runtime/Procedural/HeightMap/LODHeightMapGeometry.cs +++ b/Runtime/Procedural/HeightMap/LODHeightMapGeometry.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/Generator/CylinderGenerator.cs b/Runtime/Procedural/Mesh/Generator/CylinderGenerator.cs index 0116e25..28b2527 100644 --- a/Runtime/Procedural/Mesh/Generator/CylinderGenerator.cs +++ b/Runtime/Procedural/Mesh/Generator/CylinderGenerator.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs b/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs index 67e292d..8566696 100644 --- a/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs +++ b/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs b/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs index bd694d4..e043d0b 100644 --- a/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs +++ b/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs b/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs index 65164ca..c225116 100644 --- a/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs +++ b/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/LODMultiMeshInstance3D.cs b/Runtime/Procedural/Mesh/LODMultiMeshInstance3D.cs index df53e80..e927d07 100644 --- a/Runtime/Procedural/Mesh/LODMultiMeshInstance3D.cs +++ b/Runtime/Procedural/Mesh/LODMultiMeshInstance3D.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/MassRenderer.cs b/Runtime/Procedural/Mesh/MassRenderer.cs index 2a2fb10..e2eb915 100644 --- a/Runtime/Procedural/Mesh/MassRenderer.cs +++ b/Runtime/Procedural/Mesh/MassRenderer.cs @@ -6,6 +6,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -102,9 +103,9 @@ namespace Rokojori _queuedTransforms = RandomList.Randomize( _queuedTransforms, LCG.WithSeed( randomizeQueue ) ); } - var queuedPositions = Lists.Map( _queuedTransforms, t => t.Origin ); - var queuedRotations = Lists.Map( _queuedTransforms, t => Math3D.QuaternionToVector4( t.Basis.GetRotationQuaternion() ) ); - var queuedScales = Lists.Map( _queuedTransforms, t => t.Basis.Scale ); + var queuedPositions = ListExtensions.Map( _queuedTransforms, t => t.Origin ); + var queuedRotations = ListExtensions.Map( _queuedTransforms, t => Math3D.QuaternionToVector4( t.Basis.GetRotationQuaternion() ) ); + var queuedScales = ListExtensions.Map( _queuedTransforms, t => t.Basis.Scale ); positions = Arrays.Concat( positions, queuedPositions.ToArray() ); rotations = Arrays.Concat( rotations, queuedRotations.ToArray() ); diff --git a/Runtime/Procedural/Mesh/MaterialSurfaceContainer.cs b/Runtime/Procedural/Mesh/MaterialSurfaceContainer.cs index e2190c0..c63a0ef 100644 --- a/Runtime/Procedural/Mesh/MaterialSurfaceContainer.cs +++ b/Runtime/Procedural/Mesh/MaterialSurfaceContainer.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum MaterialSlot diff --git a/Runtime/Procedural/Mesh/MaterialType.cs b/Runtime/Procedural/Mesh/MaterialType.cs index d66d4d7..01ead76 100644 --- a/Runtime/Procedural/Mesh/MaterialType.cs +++ b/Runtime/Procedural/Mesh/MaterialType.cs @@ -4,6 +4,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Procedural/Mesh/MeshCombiner.cs b/Runtime/Procedural/Mesh/MeshCombiner.cs index f0e65ce..21049ab 100644 --- a/Runtime/Procedural/Mesh/MeshCombiner.cs +++ b/Runtime/Procedural/Mesh/MeshCombiner.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** @@ -245,7 +246,7 @@ namespace Rokojori async Task CombineStandardMaterials( List anyMaterials ) { - var materials = Lists.FilterType( anyMaterials ); + var materials = ListExtensions.FilterType( anyMaterials ); var outputMaterial = (StandardMaterial3D) materials[ 0 ].Duplicate(); @@ -295,7 +296,7 @@ namespace Rokojori var hasAlpha = hasAlebdoAlpha && t == "albedo"; var name = Sampler2DPropertyName.Create( t + "_texture" ); - var textures = Lists.Map( materials, m => name.Get( m ) ); + var textures = ListExtensions.Map( materials, m => name.Get( m ) ); var noTextures = textures.Find( t => t != null ) == null; @@ -304,7 +305,7 @@ namespace Rokojori continue; } - var fallBackColors = Lists.Map( + var fallBackColors = ListExtensions.Map( textures, i => { if ( t == "ao" && combineORM ) diff --git a/Runtime/Procedural/Mesh/MeshExtractor.cs b/Runtime/Procedural/Mesh/MeshExtractor.cs index 3024fc1..6f2074d 100644 --- a/Runtime/Procedural/Mesh/MeshExtractor.cs +++ b/Runtime/Procedural/Mesh/MeshExtractor.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class MeshExtractor diff --git a/Runtime/Procedural/Mesh/MeshGeometry.cs b/Runtime/Procedural/Mesh/MeshGeometry.cs index ebb23bf..fd85539 100644 --- a/Runtime/Procedural/Mesh/MeshGeometry.cs +++ b/Runtime/Procedural/Mesh/MeshGeometry.cs @@ -3,8 +3,9 @@ using System.Collections.Generic; using Godot; using System; using System.Linq; +using Rokojori.Extensions; - +using Rokojori.Extensions; namespace Rokojori { public class LODLerpingData @@ -212,7 +213,7 @@ namespace Rokojori public override CustomMeshAttributeList Clone() { var v4 = new MeshAttributeVector4List( customIndex ); - v4.values = Lists.Clone( values ); + v4.values = ListExtensions.Clone( values ); return v4; } @@ -257,21 +258,21 @@ namespace Rokojori public string name; public List vertices = new List(); - public int numVertices => Lists.Size( vertices ); + public int numVertices => ListExtensions.Size( vertices ); public List indices = new List(); public List normals; - public int numNormals => Lists.Size( normals ); + public int numNormals => ListExtensions.Size( normals ); public List uvs; - public int numUVs => Lists.Size( uvs ); + public int numUVs => ListExtensions.Size( uvs ); public List uv2s; - public int numUV2s => Lists.Size( uv2s ); + public int numUV2s => ListExtensions.Size( uv2s ); public List colors; - public int numColors => Lists.Size( colors ); + public int numColors => ListExtensions.Size( colors ); public float lodEdgeLength = 0; @@ -768,12 +769,12 @@ namespace Rokojori if ( colors != null ) { - Lists.Add( mg.colors, colors[ a ], colors[ b ], colors[ c ] ); + ListExtensions.Add( mg.colors, colors[ a ], colors[ b ], colors[ c ] ); } if ( uv2s != null ) { - Lists.Add( mg.uv2s, uv2s[ a ], uv2s[ b ], uv2s[ c ] ); + ListExtensions.Add( mg.uv2s, uv2s[ a ], uv2s[ b ], uv2s[ c ] ); } } @@ -977,13 +978,13 @@ namespace Rokojori { var mg = new MeshGeometry(); - mg.vertices = Lists.Clone( vertices ); - mg.indices = Lists.Clone( indices ); - mg.normals = Lists.Clone( normals ); + mg.vertices = ListExtensions.Clone( vertices ); + mg.indices = ListExtensions.Clone( indices ); + mg.normals = ListExtensions.Clone( normals ); - mg.uvs = Lists.Clone( uvs ); - mg.uv2s = Lists.Clone( uv2s ); - mg.colors = Lists.Clone( colors ); + mg.uvs = ListExtensions.Clone( uvs ); + mg.uv2s = ListExtensions.Clone( uv2s ); + mg.colors = ListExtensions.Clone( colors ); mg.lodEdgeLength = lodEdgeLength; @@ -1118,7 +1119,7 @@ namespace Rokojori } - if ( Lists.Size( customMeshAttributes ) == Lists.Size( sourceGeometry.customMeshAttributes ) ) + if ( ListExtensions.Size( customMeshAttributes ) == ListExtensions.Size( sourceGeometry.customMeshAttributes ) ) { for ( int j = 0; j < customMeshAttributes.Count; j++ ) { @@ -1140,11 +1141,11 @@ namespace Rokojori { if ( flip ) { - Lists.Add( indices, c, b, a ); + ListExtensions.Add( indices, c, b, a ); } else { - Lists.Add( indices, a, b, c ); + ListExtensions.Add( indices, a, b, c ); } } @@ -1158,10 +1159,10 @@ namespace Rokojori { var index = vertices.Count; - Lists.Add( vertices, va, vb, vc ); - Lists.Add( normals, na, nb, nc ); - Lists.Add( uvs, uva, uvb, uvc ); - Lists.Add( indices, index, index + 1, index + 2 ); + ListExtensions.Add( vertices, va, vb, vc ); + ListExtensions.Add( normals, na, nb, nc ); + ListExtensions.Add( uvs, uva, uvb, uvc ); + ListExtensions.Add( indices, index, index + 1, index + 2 ); } @@ -1224,12 +1225,12 @@ namespace Rokojori var index = vertices.Count; - Lists.Add( vertices, va, vb, vc, vd ); - Lists.Add( normals, na, nb, nc, nd ); - Lists.Add( uvs, uva, uvb, uvc, uvd ); + ListExtensions.Add( vertices, va, vb, vc, vd ); + ListExtensions.Add( normals, na, nb, nc, nd ); + ListExtensions.Add( uvs, uva, uvb, uvc, uvd ); - Lists.Add( indices, index, index + 1, index + 2 ); - Lists.Add( indices, index + 2, index + 3, index ); + ListExtensions.Add( indices, index, index + 1, index + 2 ); + ListExtensions.Add( indices, index + 2, index + 3, index ); } @@ -1405,7 +1406,7 @@ namespace Rokojori } else { - Lists.Add( indices, lb, rt, lt, rt, lb, rb ); + ListExtensions.Add( indices, lb, rt, lt, rt, lb, rb ); } } @@ -1727,7 +1728,7 @@ namespace Rokojori if ( lodDictionary != null && lodDictionary.Count > 0 ) { - var keys = Lists.From( lodDictionary.Keys ); + var keys = ListExtensions.From( lodDictionary.Keys ); // RJLog.Log( "LODS:", keys ); } @@ -1782,8 +1783,8 @@ namespace Rokojori if ( lerpingData != null ) { var lowOffsetIndex = lodIndices.Count / primitiveLength; - var lowIndices = Lists.Create( lowOffsetIndex, i => i ); - var highIndices = Lists.Create( higherIndicesLength / primitiveLength, i => i + lowOffsetIndex ); + var lowIndices = ListExtensions.Create( lowOffsetIndex, i => i ); + var highIndices = ListExtensions.Create( higherIndicesLength / primitiveLength, i => i + lowOffsetIndex ); for ( int s = 0; s < lerpingData.lerpSteps; s ++ ) { diff --git a/Runtime/Procedural/Mesh/MeshSurface.cs b/Runtime/Procedural/Mesh/MeshSurface.cs index 9f196a6..45d4127 100644 --- a/Runtime/Procedural/Mesh/MeshSurface.cs +++ b/Runtime/Procedural/Mesh/MeshSurface.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class MeshSurface diff --git a/Runtime/Procedural/Mesh/Modifiers/MeshGeometryModifier.cs b/Runtime/Procedural/Mesh/Modifiers/MeshGeometryModifier.cs index f99fe02..2314490 100644 --- a/Runtime/Procedural/Mesh/Modifiers/MeshGeometryModifier.cs +++ b/Runtime/Procedural/Mesh/Modifiers/MeshGeometryModifier.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class MeshGeometryModifier diff --git a/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlender.cs b/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlender.cs index 265af45..ebc4d97 100644 --- a/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlender.cs +++ b/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlender.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderModifier.cs b/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderModifier.cs index 54b332f..b7d2d84 100644 --- a/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderModifier.cs +++ b/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderModifier.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class NormalBlenderModifier:MeshGeometryModifier diff --git a/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderSettings.cs b/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderSettings.cs index 56b7b24..b802cbc 100644 --- a/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderSettings.cs +++ b/Runtime/Procedural/Mesh/Modifiers/NormalBlender/NormalBlenderSettings.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs b/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs index ce59d07..dca0572 100644 --- a/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs +++ b/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class SplinesDeformerMappingData diff --git a/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerSettings.cs b/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerSettings.cs index 2978a32..730ca4b 100644 --- a/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerSettings.cs +++ b/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerSettings.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass,Tool] diff --git a/Runtime/Procedural/Mesh/Modifiers/X_MeshGeometryModifierResource.cs b/Runtime/Procedural/Mesh/Modifiers/X_MeshGeometryModifierResource.cs index 4db14ea..939873e 100644 --- a/Runtime/Procedural/Mesh/Modifiers/X_MeshGeometryModifierResource.cs +++ b/Runtime/Procedural/Mesh/Modifiers/X_MeshGeometryModifierResource.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Mesh/SingleMaterialMesh.cs b/Runtime/Procedural/Mesh/SingleMaterialMesh.cs index a95510c..9da6ca9 100644 --- a/Runtime/Procedural/Mesh/SingleMaterialMesh.cs +++ b/Runtime/Procedural/Mesh/SingleMaterialMesh.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class SingleMaterialMesh diff --git a/Runtime/Procedural/Mesh/VertexAttributes.cs b/Runtime/Procedural/Mesh/VertexAttributes.cs index 42b18d2..b903ae1 100644 --- a/Runtime/Procedural/Mesh/VertexAttributes.cs +++ b/Runtime/Procedural/Mesh/VertexAttributes.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class VertexAttributes diff --git a/Runtime/Procedural/MeshCreationTest.cs b/Runtime/Procedural/MeshCreationTest.cs index 8549f2b..bc41f43 100644 --- a/Runtime/Procedural/MeshCreationTest.cs +++ b/Runtime/Procedural/MeshCreationTest.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/Cuboid/Cuboid.cs b/Runtime/Procedural/Parametric/Cuboid/Cuboid.cs index d105f9e..5abbad8 100644 --- a/Runtime/Procedural/Parametric/Cuboid/Cuboid.cs +++ b/Runtime/Procedural/Parametric/Cuboid/Cuboid.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/Deformer/Deformer.cs b/Runtime/Procedural/Parametric/Deformer/Deformer.cs index 5b1fb63..831d074 100644 --- a/Runtime/Procedural/Parametric/Deformer/Deformer.cs +++ b/Runtime/Procedural/Parametric/Deformer/Deformer.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Procedural/Parametric/Plane/ClipMapPlaneMeshType.cs b/Runtime/Procedural/Parametric/Plane/ClipMapPlaneMeshType.cs index a1d7500..1b92045 100644 --- a/Runtime/Procedural/Parametric/Plane/ClipMapPlaneMeshType.cs +++ b/Runtime/Procedural/Parametric/Plane/ClipMapPlaneMeshType.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum ClipMapCellConstraints @@ -178,7 +179,7 @@ namespace Rokojori var angle = MathX.RadiansToDegrees * center.Angle(); var index = Mathf.RoundToInt( angle / 360f * meshDivisions -0.5f ); - index = MathX.Repeat( index, meshDivisions ); + index = MathX.RepeatInt( index, meshDivisions ); return geometries[ index + 1 ]; } diff --git a/Runtime/Procedural/Parametric/Plane/Plane.cs b/Runtime/Procedural/Parametric/Plane/Plane.cs index 89331e3..9dc16ac 100644 --- a/Runtime/Procedural/Parametric/Plane/Plane.cs +++ b/Runtime/Procedural/Parametric/Plane/Plane.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/Plane/__PlaneMeshType__.cs b/Runtime/Procedural/Parametric/Plane/__PlaneMeshType__.cs index d093466..dc3b66a 100644 --- a/Runtime/Procedural/Parametric/Plane/__PlaneMeshType__.cs +++ b/Runtime/Procedural/Parametric/Plane/__PlaneMeshType__.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardData.cs b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardData.cs index af75b4e..dcae796 100644 --- a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardData.cs +++ b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardData.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class QuadBillboardData:PointData diff --git a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardDataProcessor.cs b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardDataProcessor.cs index 0cdf29c..e22df3f 100644 --- a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardDataProcessor.cs +++ b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardDataProcessor.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardMeshGenerator.cs b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardMeshGenerator.cs index 43e1a88..d17c7e6 100644 --- a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardMeshGenerator.cs +++ b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardMeshGenerator.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -30,7 +31,7 @@ namespace Rokojori if ( ! changed ) { - var updateList = Lists.Map( Nodes.GetDirectChildren( this ), p => p.UpdateID() ); + var updateList = ListExtensions.Map( Nodes.GetDirectChildren( this ), p => p.UpdateID() ); if ( updateList.Count == _updateIDs.Count ) { diff --git a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardsFromMesh.cs b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardsFromMesh.cs index 2a618bc..ea655d5 100644 --- a/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardsFromMesh.cs +++ b/Runtime/Procedural/Parametric/QuadBillboards/QuadBillboardsFromMesh.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/QuadBillboards/SingleQuadBillboard.cs b/Runtime/Procedural/Parametric/QuadBillboards/SingleQuadBillboard.cs index 5ce2e20..f2cb25d 100644 --- a/Runtime/Procedural/Parametric/QuadBillboards/SingleQuadBillboard.cs +++ b/Runtime/Procedural/Parametric/QuadBillboards/SingleQuadBillboard.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/Spline/Spline.cs b/Runtime/Procedural/Parametric/Spline/Spline.cs index 69be3a7..c8db90b 100644 --- a/Runtime/Procedural/Parametric/Spline/Spline.cs +++ b/Runtime/Procedural/Parametric/Spline/Spline.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum SplineAutoOrientationMode diff --git a/Runtime/Procedural/Parametric/Spline/SplineMesh.cs b/Runtime/Procedural/Parametric/Spline/SplineMesh.cs index 6b30291..ebfb81c 100644 --- a/Runtime/Procedural/Parametric/Spline/SplineMesh.cs +++ b/Runtime/Procedural/Parametric/Spline/SplineMesh.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/Spline/SplinePoint.cs b/Runtime/Procedural/Parametric/Spline/SplinePoint.cs index 31339ba..1698713 100644 --- a/Runtime/Procedural/Parametric/Spline/SplinePoint.cs +++ b/Runtime/Procedural/Parametric/Spline/SplinePoint.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum SplinePointTangentMode diff --git a/Runtime/Procedural/Parametric/Spline/SplineUp/AltByAngle_SplineUpGen.cs b/Runtime/Procedural/Parametric/Spline/SplineUp/AltByAngle_SplineUpGen.cs index 131d252..f49d863 100644 --- a/Runtime/Procedural/Parametric/Spline/SplineUp/AltByAngle_SplineUpGen.cs +++ b/Runtime/Procedural/Parametric/Spline/SplineUp/AltByAngle_SplineUpGen.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool, GlobalClass] diff --git a/Runtime/Procedural/Parametric/Spline/SplineUp/Constant_SplineUpGen.cs b/Runtime/Procedural/Parametric/Spline/SplineUp/Constant_SplineUpGen.cs index 6b7660d..054acd3 100644 --- a/Runtime/Procedural/Parametric/Spline/SplineUp/Constant_SplineUpGen.cs +++ b/Runtime/Procedural/Parametric/Spline/SplineUp/Constant_SplineUpGen.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool, GlobalClass] diff --git a/Runtime/Procedural/Parametric/Spline/SplineUp/SplineUpGeneratorStrategy.cs b/Runtime/Procedural/Parametric/Spline/SplineUp/SplineUpGeneratorStrategy.cs index bb13fce..5e0332c 100644 --- a/Runtime/Procedural/Parametric/Spline/SplineUp/SplineUpGeneratorStrategy.cs +++ b/Runtime/Procedural/Parametric/Spline/SplineUp/SplineUpGeneratorStrategy.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool, GlobalClass] diff --git a/Runtime/Procedural/Parametric/Spline/SplineUp/WorldUp_SplineUpGen.cs b/Runtime/Procedural/Parametric/Spline/SplineUp/WorldUp_SplineUpGen.cs index 40e2a13..b5ea6fd 100644 --- a/Runtime/Procedural/Parametric/Spline/SplineUp/WorldUp_SplineUpGen.cs +++ b/Runtime/Procedural/Parametric/Spline/SplineUp/WorldUp_SplineUpGen.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool, GlobalClass] diff --git a/Runtime/Procedural/Parametric/Tube/Tube.cs b/Runtime/Procedural/Parametric/Tube/Tube.cs index 4befd95..8701b77 100644 --- a/Runtime/Procedural/Parametric/Tube/Tube.cs +++ b/Runtime/Procedural/Parametric/Tube/Tube.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum TubeSegmentMode diff --git a/Runtime/Procedural/Parametric/Tube/TubeGeometry.cs b/Runtime/Procedural/Parametric/Tube/TubeGeometry.cs index 4bed050..cb06e0b 100644 --- a/Runtime/Procedural/Parametric/Tube/TubeGeometry.cs +++ b/Runtime/Procedural/Parametric/Tube/TubeGeometry.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { @@ -36,7 +37,7 @@ namespace Rokojori if ( shapes != null && shapes.Length > 0 ) { shapesList.AddRange( shapes ); - Lists.Sort( shapesList, s => s.tubePosition ); + ListExtensions.Sort( shapesList, s => s.tubePosition ); shapesList.ForEach( s => s.ClearCache() ); @@ -93,7 +94,7 @@ namespace Rokojori return shapesList[ 0 ].GetPose( settings.undistortSplineSegments, splineSegments, settings.radialSegments, pose, uv, scale, twistRotation ); } - var lerpResult = Lists.LerpIndex( shapesList, uv.Y, s => s.tubePosition ); + var lerpResult = ListExtensions.LerpIndex( shapesList, uv.Y, s => s.tubePosition ); var closestShape = shapesList[ lerpResult.closestIndex ]; diff --git a/Runtime/Procedural/Parametric/Tube/TubeGeometrySettings.cs b/Runtime/Procedural/Parametric/Tube/TubeGeometrySettings.cs index 0aa0ff4..4b424a4 100644 --- a/Runtime/Procedural/Parametric/Tube/TubeGeometrySettings.cs +++ b/Runtime/Procedural/Parametric/Tube/TubeGeometrySettings.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Parametric/Tube/TubeShape.cs b/Runtime/Procedural/Parametric/Tube/TubeShape.cs index 09640cb..8283739 100644 --- a/Runtime/Procedural/Parametric/Tube/TubeShape.cs +++ b/Runtime/Procedural/Parametric/Tube/TubeShape.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Points/PointData.cs b/Runtime/Procedural/Points/PointData.cs index 59576ef..6c69d60 100644 --- a/Runtime/Procedural/Points/PointData.cs +++ b/Runtime/Procedural/Points/PointData.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class PointData diff --git a/Runtime/Procedural/Points/Transformable.cs b/Runtime/Procedural/Points/Transformable.cs index 61ad838..ceb2076 100644 --- a/Runtime/Procedural/Points/Transformable.cs +++ b/Runtime/Procedural/Points/Transformable.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class Transformable diff --git a/Runtime/Procedural/Random/RandomFloat.cs b/Runtime/Procedural/Random/RandomFloat.cs index 707cb1a..1f335c9 100644 --- a/Runtime/Procedural/Random/RandomFloat.cs +++ b/Runtime/Procedural/Random/RandomFloat.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Discarder/DiscardMode.cs b/Runtime/Procedural/Scatter/Discarder/DiscardMode.cs index 3e97fa7..26f7ac0 100644 --- a/Runtime/Procedural/Scatter/Discarder/DiscardMode.cs +++ b/Runtime/Procedural/Scatter/Discarder/DiscardMode.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum DiscardMode diff --git a/Runtime/Procedural/Scatter/Discarder/DiscardNoise.cs b/Runtime/Procedural/Scatter/Discarder/DiscardNoise.cs index 83082c1..6614435 100644 --- a/Runtime/Procedural/Scatter/Discarder/DiscardNoise.cs +++ b/Runtime/Procedural/Scatter/Discarder/DiscardNoise.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum DiscardNoiseOwnPositionMode diff --git a/Runtime/Procedural/Scatter/Discarder/DiscardSphere.cs b/Runtime/Procedural/Scatter/Discarder/DiscardSphere.cs index c763a1c..9606214 100644 --- a/Runtime/Procedural/Scatter/Discarder/DiscardSphere.cs +++ b/Runtime/Procedural/Scatter/Discarder/DiscardSphere.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Discarder/DiscardSpline.cs b/Runtime/Procedural/Scatter/Discarder/DiscardSpline.cs index 12d69fd..e5665ae 100644 --- a/Runtime/Procedural/Scatter/Discarder/DiscardSpline.cs +++ b/Runtime/Procedural/Scatter/Discarder/DiscardSpline.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Discarder/Discarder.cs b/Runtime/Procedural/Scatter/Discarder/Discarder.cs index ffacf3a..5d32f31 100644 --- a/Runtime/Procedural/Scatter/Discarder/Discarder.cs +++ b/Runtime/Procedural/Scatter/Discarder/Discarder.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Discarder/DiscarderList.cs b/Runtime/Procedural/Scatter/Discarder/DiscarderList.cs index f93801f..becce8a 100644 --- a/Runtime/Procedural/Scatter/Discarder/DiscarderList.cs +++ b/Runtime/Procedural/Scatter/Discarder/DiscarderList.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum DiscardListMode diff --git a/Runtime/Procedural/Scatter/Generators/GenerateFence.cs b/Runtime/Procedural/Scatter/Generators/GenerateFence.cs index 9017f14..20ed5d0 100644 --- a/Runtime/Procedural/Scatter/Generators/GenerateFence.cs +++ b/Runtime/Procedural/Scatter/Generators/GenerateFence.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Generators/GenerateInBox.cs b/Runtime/Procedural/Scatter/Generators/GenerateInBox.cs index 5e6b0e9..0e691b9 100644 --- a/Runtime/Procedural/Scatter/Generators/GenerateInBox.cs +++ b/Runtime/Procedural/Scatter/Generators/GenerateInBox.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Generators/GenerateOnSpline.cs b/Runtime/Procedural/Scatter/Generators/GenerateOnSpline.cs index df0c07a..a9e6538 100644 --- a/Runtime/Procedural/Scatter/Generators/GenerateOnSpline.cs +++ b/Runtime/Procedural/Scatter/Generators/GenerateOnSpline.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Generators/GeneratePinBoundary.cs b/Runtime/Procedural/Scatter/Generators/GeneratePinBoundary.cs index 0f13d0d..52e4311 100644 --- a/Runtime/Procedural/Scatter/Generators/GeneratePinBoundary.cs +++ b/Runtime/Procedural/Scatter/Generators/GeneratePinBoundary.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Generators/GeneratorEntry.cs b/Runtime/Procedural/Scatter/Generators/GeneratorEntry.cs index 2a67ed2..7b0e3d8 100644 --- a/Runtime/Procedural/Scatter/Generators/GeneratorEntry.cs +++ b/Runtime/Procedural/Scatter/Generators/GeneratorEntry.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Generators/GeneratorScatterer.cs b/Runtime/Procedural/Scatter/Generators/GeneratorScatterer.cs index efb8083..0722579 100644 --- a/Runtime/Procedural/Scatter/Generators/GeneratorScatterer.cs +++ b/Runtime/Procedural/Scatter/Generators/GeneratorScatterer.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -40,11 +41,11 @@ namespace Rokojori } childGenerators = Nodes.GetDirectChildren( this ); - childGeneratorWeights = Lists.Map( childGenerators, c => c.probability ); + childGeneratorWeights = ListExtensions.Map( childGenerators, c => c.probability ); var sum = 0f; childGeneratorWeights.ForEach( w => sum += w ); - childGeneratorWeights = Lists.Map( childGeneratorWeights, c => c /= sum ); + childGeneratorWeights = ListExtensions.Map( childGeneratorWeights, c => c /= sum ); } public void AssginSceneAndContainer( ScatterPoint p ) diff --git a/Runtime/Procedural/Scatter/ScatterList.cs b/Runtime/Procedural/Scatter/ScatterList.cs index 8002966..816ef2e 100644 --- a/Runtime/Procedural/Scatter/ScatterList.cs +++ b/Runtime/Procedural/Scatter/ScatterList.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/ScatterPoint.cs b/Runtime/Procedural/Scatter/ScatterPoint.cs index 203cdd4..667e1a6 100644 --- a/Runtime/Procedural/Scatter/ScatterPoint.cs +++ b/Runtime/Procedural/Scatter/ScatterPoint.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class ScatterPoint:PointData diff --git a/Runtime/Procedural/Scatter/Scatterer.cs b/Runtime/Procedural/Scatter/Scatterer.cs index 4954c40..57ca5d3 100644 --- a/Runtime/Procedural/Scatter/Scatterer.cs +++ b/Runtime/Procedural/Scatter/Scatterer.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/ScattererOwnPositionMode.cs b/Runtime/Procedural/Scatter/ScattererOwnPositionMode.cs index afa08f7..bcf08a2 100644 --- a/Runtime/Procedural/Scatter/ScattererOwnPositionMode.cs +++ b/Runtime/Procedural/Scatter/ScattererOwnPositionMode.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum ScattererOwnPositionMode diff --git a/Runtime/Procedural/Scatter/Transform/ProjectOnColliders.cs b/Runtime/Procedural/Scatter/Transform/ProjectOnColliders.cs index 8591052..5c00a5f 100644 --- a/Runtime/Procedural/Scatter/Transform/ProjectOnColliders.cs +++ b/Runtime/Procedural/Scatter/Transform/ProjectOnColliders.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Scatter/Transform/RandomizeTransform.cs b/Runtime/Procedural/Scatter/Transform/RandomizeTransform.cs index 90bfb63..db09ce7 100644 --- a/Runtime/Procedural/Scatter/Transform/RandomizeTransform.cs +++ b/Runtime/Procedural/Scatter/Transform/RandomizeTransform.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/CPUTextureDilater/CPUTextureDilater.cs b/Runtime/Procedural/Textures/CPUTextureDilater/CPUTextureDilater.cs index aac1755..a0d2d4f 100644 --- a/Runtime/Procedural/Textures/CPUTextureDilater/CPUTextureDilater.cs +++ b/Runtime/Procedural/Textures/CPUTextureDilater/CPUTextureDilater.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using System.Linq; using TriangleNet.Geometry; +using Rokojori.Extensions; namespace Rokojori { public class CPUTextureDilater @@ -82,7 +83,7 @@ namespace Rokojori messageCounter ++; } - var edge = _edges.ElementAt( random.IntegerExclusive( _edges.Count ) ); + var edge = _edges.ElementAt( random.IntegerExclusivePositive( _edges.Count ) ); _edges.Remove( edge ); if ( ! _processed.Contains( edge ) ) diff --git a/Runtime/Procedural/Textures/ChannelMixer/TextureChanneMixelChannelSetting.cs b/Runtime/Procedural/Textures/ChannelMixer/TextureChanneMixelChannelSetting.cs index 13a3a2d..37fd833 100644 --- a/Runtime/Procedural/Textures/ChannelMixer/TextureChanneMixelChannelSetting.cs +++ b/Runtime/Procedural/Textures/ChannelMixer/TextureChanneMixelChannelSetting.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -75,7 +76,7 @@ namespace Rokojori if ( source_sRGB ) { - value = ColorX.SRGBtoLinear( value ); + value = ColorX.SRGBtoLinearValue( value ); } if ( source_modifier != null ) @@ -85,7 +86,7 @@ namespace Rokojori if ( output_sRGB ) { - value = ColorX.LinearToSRGB( value ); + value = ColorX.LinearToSRGBValue( value ); } return value; diff --git a/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixer.cs b/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixer.cs index a96b2c6..cacee16 100644 --- a/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixer.cs +++ b/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixer.cs @@ -4,6 +4,7 @@ using Godot; using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixerPreset.cs b/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixerPreset.cs index f963cc4..b150457 100644 --- a/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixerPreset.cs +++ b/Runtime/Procedural/Textures/ChannelMixer/TextureChannelMixerPreset.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/ColorAdjustments.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/ColorAdjustments.cs index d15ea69..2bd3b09 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/ColorAdjustments.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/ColorAdjustments.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -80,7 +81,7 @@ namespace Rokojori weigths = weigths * ( gradientStrength / 100f ) * sampledGradient.A; // weigths.W = 1f; - var combined = HSLColor.LerpWithHueInRGB( hsl2, gradientColorHSL, weigths ); + var combined = HSLColor.LerpWithHueInRGBIndividually( hsl2, gradientColorHSL, weigths ); combined.ClampToLimits(); diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionPreset.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionPreset.cs index 152ddae..df01ebe 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionPreset.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionPreset.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionStack.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionStack.cs index f342fe4..1aa3397 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionStack.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/ColorCorrectionStack.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/Colorize.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/Colorize.cs index 55208af..74c26db 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/Colorize.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/Colorize.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -16,7 +17,7 @@ namespace Rokojori public Color color; [Export] - public Curve amountFromSourceLuminance = MathX.Curve( 0.1f ); + public Curve amountFromSourceLuminance = MathX.CurveFromY( 0.1f ); [Export(PropertyHint.Range, "0,100 suffix:%")] public float hueAmount = 100; @@ -42,11 +43,11 @@ namespace Rokojori if ( blendHueInRGB ) { - targetHSL = HSLColor.LerpWithHueInRGB( sourceHSL, targetHSL, weights ); + targetHSL = HSLColor.LerpWithHueInRGBIndividually( sourceHSL, targetHSL, weights ); } else { - targetHSL = HSLColor.Lerp( sourceHSL, targetHSL, weights ); + targetHSL = HSLColor.HSLLerpIndividually( sourceHSL, targetHSL, weights ); } return targetHSL; diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/CrossCurves.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/CrossCurves.cs index a510d27..71151a0 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/CrossCurves.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/CrossCurves.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/HSLCurves.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/HSLCurves.cs index d24f11f..c11e674 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/HSLCurves.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/HSLCurves.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/RGBCurves.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/RGBCurves.cs index a28196f..ebe4891 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/RGBCurves.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/RGBCurves.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ColorCorrectionStack/_XX_ColorCorrectionModifier.cs b/Runtime/Procedural/Textures/ColorCorrectionStack/_XX_ColorCorrectionModifier.cs index 3e4c0ba..fa0dd4f 100644 --- a/Runtime/Procedural/Textures/ColorCorrectionStack/_XX_ColorCorrectionModifier.cs +++ b/Runtime/Procedural/Textures/ColorCorrectionStack/_XX_ColorCorrectionModifier.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/ImageSaveSettings.cs b/Runtime/Procedural/Textures/ImageSaveSettings.cs index 180c19f..f8e3d66 100644 --- a/Runtime/Procedural/Textures/ImageSaveSettings.cs +++ b/Runtime/Procedural/Textures/ImageSaveSettings.cs @@ -4,6 +4,7 @@ using Godot; using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/Images.cs b/Runtime/Procedural/Textures/Images.cs index 6cfbcbd..2334fa4 100644 --- a/Runtime/Procedural/Textures/Images.cs +++ b/Runtime/Procedural/Textures/Images.cs @@ -4,6 +4,7 @@ using Godot; using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class Images diff --git a/Runtime/Procedural/Textures/PNGSettings.cs b/Runtime/Procedural/Textures/PNGSettings.cs index 3a4ced9..6e5cfa0 100644 --- a/Runtime/Procedural/Textures/PNGSettings.cs +++ b/Runtime/Procedural/Textures/PNGSettings.cs @@ -4,6 +4,7 @@ using Godot; using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTextureLayer.cs b/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTextureLayer.cs index 647e786..670ed48 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTextureLayer.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTextureLayer.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTilerLayer.cs b/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTilerLayer.cs index fdbf94d..509f66b 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTilerLayer.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/Layers/TextureCombinerTilerLayer.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombiner.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombiner.cs index 2647e5e..f11b19a 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombiner.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombiner.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBlendMode.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBlendMode.cs index 5260193..5bec205 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBlendMode.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBlendMode.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public enum TextureCombinerBlendMode diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBuffer.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBuffer.cs index b73a8f0..82e62d7 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBuffer.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerBuffer.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class TextureCombinerBuffer diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerLayer.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerLayer.cs index 02b61c6..fb82285 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerLayer.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerLayer.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerMaterialOutput.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerMaterialOutput.cs index adbe6e8..b9875f6 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerMaterialOutput.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerMaterialOutput.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingContext.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingContext.cs index bd004a8..fd03544 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingContext.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingContext.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class TextureCombinerContext diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingRect.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingRect.cs index 46e57b0..2893364 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingRect.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerProcessingRect.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class TextureCombinerProcessingRect diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerRunner.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerRunner.cs index 3807a5f..e351245 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerRunner.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerRunner.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerStack.cs b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerStack.cs index efb947a..ae9dfde 100644 --- a/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerStack.cs +++ b/Runtime/Procedural/Textures/TextureCombiner/TextureCombinerStack.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Random/GodotRandom.cs b/Runtime/Random/GodotRandom.cs index 5d30641..99ac348 100644 --- a/Runtime/Random/GodotRandom.cs +++ b/Runtime/Random/GodotRandom.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class GodotRandom:RandomEngine diff --git a/Runtime/Random/IDGenerator.cs b/Runtime/Random/IDGenerator.cs index 568a5ab..e2badb7 100644 --- a/Runtime/Random/IDGenerator.cs +++ b/Runtime/Random/IDGenerator.cs @@ -6,6 +6,7 @@ using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class IDGenerator @@ -35,7 +36,21 @@ namespace Rokojori for ( var i = 0; i < DefaultID_NumCharacters; i++ ) { - var randomCharacter = randomEngine.From( DefaultID_CharacterSet ); + var randomCharacter = randomEngine.FromText( DefaultID_CharacterSet ); + id += randomCharacter; + } + + return id; + } + + public static string GenerateIDWith( int characters, RandomEngine randomEngine = null ) + { + var id = ""; + randomEngine = RandomEngine.CreateIfNull( randomEngine ); + + for ( var i = 0; i < characters; i++ ) + { + var randomCharacter = randomEngine.FromText( DefaultID_CharacterSet ); id += randomCharacter; } @@ -49,7 +64,7 @@ namespace Rokojori for ( var i = 0; i < numCharacters; i++ ) { - var randomCharacter = randomEngine.From( characterSet ); + var randomCharacter = randomEngine.FromText( characterSet ); id.Append( randomCharacter ); } diff --git a/Runtime/Random/LCG.cs b/Runtime/Random/LCG.cs index 12f13b4..61a6c48 100644 --- a/Runtime/Random/LCG.cs +++ b/Runtime/Random/LCG.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [System.Serializable] @@ -35,12 +36,12 @@ namespace Rokojori public static LCG Randomized() { - var seed = (int) (Time.GetTicksUsec() % 1000000 ); + var seed = (int) (Godot.Time.GetTicksUsec() % 1000000 ); var lcg = new LCG(); lcg.SetSeed( seed ); - lcg.SetSeed( lcg.IntegerExclusive( 0, 1000000 ) ); + lcg.SetSeed( lcg.IntegerExclusiveInRange( 0, 1000000 ) ); return lcg; } diff --git a/Runtime/Random/Noise.cs b/Runtime/Random/Noise.cs index b949d38..b57a883 100644 --- a/Runtime/Random/Noise.cs +++ b/Runtime/Random/Noise.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { @@ -113,7 +114,7 @@ namespace Rokojori var tc = Random( index + new Vector3( 0.0f, 1.0f, 1.0f ) ); var td = Random( index + new Vector3( 1.0f, 1.0f, 1.0f ) ); - return MathX.Sample( ba, bb, bc, bd, ta, tb, tc, td, uvw ); + return MathX.Sample2D( ba, bb, bc, bd, ta, tb, tc, td, uvw ); } diff --git a/Runtime/Random/RandomEngine.cs b/Runtime/Random/RandomEngine.cs index 425265c..c4c61e5 100644 --- a/Runtime/Random/RandomEngine.cs +++ b/Runtime/Random/RandomEngine.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public abstract class RandomEngine @@ -26,7 +27,7 @@ namespace Rokojori return Next() * scalar; } - public float Range( float a, float b) + public float FromRange( float a, float b) { return this.Next()*( b - a ) + a; } @@ -35,7 +36,7 @@ namespace Rokojori { if ( curve == null ) { - return Range( min, max ); + return FromRange( min, max ); } return curve.Sample( Next() ); @@ -46,14 +47,14 @@ namespace Rokojori return Mathf.RoundToInt( curve.Sample( Next() ) ); } - public float Polar() + public float Polar1() { return this.Next() * 2f - 1f; } public float Polar( float value ) { - return Polar() * value; + return Polar1() * value; } public bool Bool() @@ -75,7 +76,7 @@ namespace Rokojori public float PercentageVariation( float variation ) { var value = ( 100f - variation ) / 100f; - return Range( value, 1f / value ); + return FromRange( value, 1f / value ); } public bool WithChanceOf( float value ) @@ -99,7 +100,7 @@ namespace Rokojori public Color RandomHue( float saturation = 1f, float luminance = 0.5f) { - var hue = Range( 0, 360 ); + var hue = FromRange( 0, 360 ); var color = new HSLColor( hue, saturation, luminance ); return color; @@ -115,12 +116,12 @@ namespace Rokojori public float AngleRadians() { - return Range( 0, Mathf.Pi * 2f ); + return FromRange( 0, Mathf.Pi * 2f ); } public Vector3 InCube() { - return new Vector3( Polar(), Polar(), Polar() ); + return new Vector3( Polar1(), Polar1(), Polar1() ); } public Vector3 InsideCube( float size ) @@ -156,7 +157,7 @@ namespace Rokojori } - public Vector3 OnSphere( float size ) + public Vector3 OnSphereScaled( float size ) { return OnSphere() * size; } @@ -181,25 +182,25 @@ namespace Rokojori public Color HSL( float hMin = 0 , float hMax = 360, float sMin = 1, float sMax = 1, float lMin = 0.5f, float lMax = 0.5f ) { - var h = Range( hMin, hMax ); - var s = Range( sMin, sMax ); - var l = Range( lMin, lMax ); + var h = FromRange( hMin, hMax ); + var s = FromRange( sMin, sMax ); + var l = FromRange( lMin, lMax ); return new HSLColor( h, s, l ); } - public int IntegerInclusive( int min, int max ) + public int IntegerInclusiveInRange( int min, int max ) { return (int) ( Mathf.Floor( this.Next() * ( max - min + 1 ) ) + min ) ; } - public int IntegerInclusive( int max ) + public int IntegerInclusivePositive( int max ) { - return IntegerInclusive( 0, max ); + return IntegerInclusiveInRange( 0, max ); } - public int IntegerExclusive( int min, int max ) + public int IntegerExclusiveInRange( int min, int max ) { var nextValue = this.Next(); var randomValue = nextValue * ( max - min ) + min; @@ -208,15 +209,15 @@ namespace Rokojori return Mathf.Min( max - 1, value ); } - public int IntegerExclusive( int max ) + public int IntegerExclusivePositive( int max ) { - return IntegerExclusive( 0, max ); + return IntegerExclusiveInRange( 0, max ); } - public char From( string source ) + public char FromText( string source ) { - var index = IntegerExclusive( source.Length ); + var index = IntegerExclusivePositive( source.Length ); return source[ index ]; } @@ -226,13 +227,39 @@ namespace Rokojori { return default ( T ); } - var index = IntegerExclusive( array.Length ); + var index = IntegerExclusivePositive( array.Length ); return array[ index ]; } - public T From( HashSet set ) + #if !ROKOJORI_ACTION_CORE_GD + public T From( List list ) { - var selectedIndex = IntegerExclusive( set.Count ); + if ( list.Count == 0 ) + { + return default ( T ); + } + + var index = IntegerExclusivePositive( list.Count ); + + return list[ index ]; + } + #endif + + public T GrabFromRange( List list, int start, int end ) + { + if ( list.Count == 0 ) + { + return default ( T ); + } + + var index = this.IntegerInclusiveInRange( start, end ); + + return list[ index ]; + } + + public T FromSet( HashSet set ) + { + var selectedIndex = IntegerExclusivePositive( set.Count ); var currentIndex = 0; @@ -256,34 +283,12 @@ namespace Rokojori return first; } - var index = IntegerExclusive( values.Length + 1 ); + var index = IntegerExclusivePositive( values.Length + 1 ); return index == 0 ? first : values[ index - 1 ]; } - public T From( List list ) - { - if ( list.Count == 0 ) - { - return default ( T ); - } - - var index = this.IntegerExclusive( 0, list.Count ); - - return list[ index ]; - } - - public T From( List list, int start, int end ) - { - if ( list.Count == 0 ) - { - return default ( T ); - } - - var index = this.IntegerInclusive( start, end ); - - return list[ index ]; - } + public T RemoveFrom( List list ) { @@ -301,7 +306,7 @@ namespace Rokojori return element; } - var index = this.IntegerExclusive( 0, list.Count ); + var index = this.IntegerExclusiveInRange( 0, list.Count ); var item = list[ index ]; @@ -320,7 +325,7 @@ namespace Rokojori for ( int i = 0; i < amount; i++ ) { - var itemIndex = this.IntegerExclusive( 0, list.Count ); + var itemIndex = this.IntegerExclusiveInRange( 0, list.Count ); var item = list[ itemIndex ]; list.RemoveAt( itemIndex ); items.Add( item ); @@ -362,9 +367,9 @@ namespace Rokojori for ( int i = 0; i < amount; i++ ) { - var number = Range( 0, sumWeights ); + var number = FromRange( 0, sumWeights ); - var index = _FindElementIndexWithWeights( weights, Range( 0, sumWeights ) ); + var index = _FindElementIndexWithWeights( weights, FromRange( 0, sumWeights ) ); var element = list[ index ]; var weight = weights[ index ]; list.RemoveAt( index ); diff --git a/Runtime/Random/RandomList.cs b/Runtime/Random/RandomList.cs index d30bd93..34b620c 100644 --- a/Runtime/Random/RandomList.cs +++ b/Runtime/Random/RandomList.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class RandomList diff --git a/Runtime/Reallusion/CCImportFile/CCCustomShader.cs b/Runtime/Reallusion/CCImportFile/CCCustomShader.cs index ceb9243..9b622d0 100644 --- a/Runtime/Reallusion/CCImportFile/CCCustomShader.cs +++ b/Runtime/Reallusion/CCImportFile/CCCustomShader.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCCustomShader:CCImportFileBase @@ -119,7 +120,7 @@ namespace Rokojori.Reallusion Texture2D GetTextureFromRelativePath( string relativePath ) { var rootDirectoryPath = FilePath.Absolute( importFile.directory ); - var relativeFilePath = rootDirectoryPath.MakeRelative( relativePath ); + var relativeFilePath = rootDirectoryPath.MakeRelativeFromPath( relativePath ); try { diff --git a/Runtime/Reallusion/CCImportFile/CCImportFile.cs b/Runtime/Reallusion/CCImportFile/CCImportFile.cs index 70f879e..8a6fbc8 100644 --- a/Runtime/Reallusion/CCImportFile/CCImportFile.cs +++ b/Runtime/Reallusion/CCImportFile/CCImportFile.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCImportFile:CCImportFileBase diff --git a/Runtime/Reallusion/CCImportFile/CCImportFileBase.cs b/Runtime/Reallusion/CCImportFile/CCImportFileBase.cs index e935af0..21bcc43 100644 --- a/Runtime/Reallusion/CCImportFile/CCImportFileBase.cs +++ b/Runtime/Reallusion/CCImportFile/CCImportFileBase.cs @@ -1,6 +1,7 @@ +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCImportFileBase diff --git a/Runtime/Reallusion/CCImportFile/CCJSONProperty.cs b/Runtime/Reallusion/CCImportFile/CCJSONProperty.cs index 967ccda..957b5fa 100644 --- a/Runtime/Reallusion/CCImportFile/CCJSONProperty.cs +++ b/Runtime/Reallusion/CCImportFile/CCJSONProperty.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCJSONProperty diff --git a/Runtime/Reallusion/CCImportFile/CCMaterialGenerator/CCMaterialGenerator.cs b/Runtime/Reallusion/CCImportFile/CCMaterialGenerator/CCMaterialGenerator.cs index c9ed89b..5b8bf88 100644 --- a/Runtime/Reallusion/CCImportFile/CCMaterialGenerator/CCMaterialGenerator.cs +++ b/Runtime/Reallusion/CCImportFile/CCMaterialGenerator/CCMaterialGenerator.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportFile/CCMaterialInfo.cs b/Runtime/Reallusion/CCImportFile/CCMaterialInfo.cs index 3b7de03..3b2a222 100644 --- a/Runtime/Reallusion/CCImportFile/CCMaterialInfo.cs +++ b/Runtime/Reallusion/CCImportFile/CCMaterialInfo.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCMaterialInfo:CCImportFileBase diff --git a/Runtime/Reallusion/CCImportFile/CCMaterialType.cs b/Runtime/Reallusion/CCImportFile/CCMaterialType.cs index ed27e60..c0c7442 100644 --- a/Runtime/Reallusion/CCImportFile/CCMaterialType.cs +++ b/Runtime/Reallusion/CCImportFile/CCMaterialType.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportFile/CCMeshInfo.cs b/Runtime/Reallusion/CCImportFile/CCMeshInfo.cs index dc50788..37933b8 100644 --- a/Runtime/Reallusion/CCImportFile/CCMeshInfo.cs +++ b/Runtime/Reallusion/CCImportFile/CCMeshInfo.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCMeshInfo:CCImportFileBase diff --git a/Runtime/Reallusion/CCImportFile/CCObjectInfo.cs b/Runtime/Reallusion/CCImportFile/CCObjectInfo.cs index 62d11b9..512be02 100644 --- a/Runtime/Reallusion/CCImportFile/CCObjectInfo.cs +++ b/Runtime/Reallusion/CCImportFile/CCObjectInfo.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCObjectInfo:CCImportFileBase diff --git a/Runtime/Reallusion/CCImportFile/CCSubsurfaceScatter.cs b/Runtime/Reallusion/CCImportFile/CCSubsurfaceScatter.cs index d22b043..d8b2d94 100644 --- a/Runtime/Reallusion/CCImportFile/CCSubsurfaceScatter.cs +++ b/Runtime/Reallusion/CCImportFile/CCSubsurfaceScatter.cs @@ -5,6 +5,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCSubsurfaceScatter:CCImportFileBase diff --git a/Runtime/Reallusion/CCImportFile/CCTextureInfo.cs b/Runtime/Reallusion/CCImportFile/CCTextureInfo.cs index 6b532f8..1f760da 100644 --- a/Runtime/Reallusion/CCImportFile/CCTextureInfo.cs +++ b/Runtime/Reallusion/CCImportFile/CCTextureInfo.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCTextureInfo:CCImportFileBase @@ -58,7 +59,7 @@ namespace Rokojori.Reallusion Texture2D GetTextureFromRelativePath( string relativePath ) { var rootDirectoryPath = FilePath.Absolute( importFile.directory ); - var relativeFilePath = rootDirectoryPath.MakeRelative( relativePath ); + var relativeFilePath = rootDirectoryPath.MakeRelativeFromPath( relativePath ); var texture = ResourceLoader.Load( relativeFilePath.fullPath ); diff --git a/Runtime/Reallusion/CCImportSettings/CCHairOpacityGammaOverwrite.cs b/Runtime/Reallusion/CCImportSettings/CCHairOpacityGammaOverwrite.cs index 7be0d67..6690249 100644 --- a/Runtime/Reallusion/CCImportSettings/CCHairOpacityGammaOverwrite.cs +++ b/Runtime/Reallusion/CCImportSettings/CCHairOpacityGammaOverwrite.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportSettings/CCImportConfiguration.cs b/Runtime/Reallusion/CCImportSettings/CCImportConfiguration.cs index e649701..1f59647 100644 --- a/Runtime/Reallusion/CCImportSettings/CCImportConfiguration.cs +++ b/Runtime/Reallusion/CCImportSettings/CCImportConfiguration.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportSettings/CCImportSettings.cs b/Runtime/Reallusion/CCImportSettings/CCImportSettings.cs index 324cd1d..d1c3996 100644 --- a/Runtime/Reallusion/CCImportSettings/CCImportSettings.cs +++ b/Runtime/Reallusion/CCImportSettings/CCImportSettings.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportSettings/CCMaterialOverwrite.cs b/Runtime/Reallusion/CCImportSettings/CCMaterialOverwrite.cs index 69f50d9..aa64b9c 100644 --- a/Runtime/Reallusion/CCImportSettings/CCMaterialOverwrite.cs +++ b/Runtime/Reallusion/CCImportSettings/CCMaterialOverwrite.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportSettings/CCMaterialSettings.cs b/Runtime/Reallusion/CCImportSettings/CCMaterialSettings.cs index 922a373..e3041a8 100644 --- a/Runtime/Reallusion/CCImportSettings/CCMaterialSettings.cs +++ b/Runtime/Reallusion/CCImportSettings/CCMaterialSettings.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { diff --git a/Runtime/Reallusion/CCImportSettings/CCMaterialTarget.cs b/Runtime/Reallusion/CCImportSettings/CCMaterialTarget.cs index 8cfab9b..d26cdc8 100644 --- a/Runtime/Reallusion/CCImportSettings/CCMaterialTarget.cs +++ b/Runtime/Reallusion/CCImportSettings/CCMaterialTarget.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportSettings/CCMeshSettings.cs b/Runtime/Reallusion/CCImportSettings/CCMeshSettings.cs index c6a3e2b..a25a157 100644 --- a/Runtime/Reallusion/CCImportSettings/CCMeshSettings.cs +++ b/Runtime/Reallusion/CCImportSettings/CCMeshSettings.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/CCImportTool.cs b/Runtime/Reallusion/CCImportTool.cs index df55e07..b509511 100644 --- a/Runtime/Reallusion/CCImportTool.cs +++ b/Runtime/Reallusion/CCImportTool.cs @@ -5,6 +5,7 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori.Reallusion { public class CCImportTool diff --git a/Runtime/Reallusion/CCImporter.cs b/Runtime/Reallusion/CCImporter.cs index 833c0e8..383ce7d 100644 --- a/Runtime/Reallusion/CCImporter.cs +++ b/Runtime/Reallusion/CCImporter.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/Materials/CCMaterials.cs b/Runtime/Reallusion/Materials/CCMaterials.cs index dd62ad3..c943249 100644 --- a/Runtime/Reallusion/Materials/CCMaterials.cs +++ b/Runtime/Reallusion/Materials/CCMaterials.cs @@ -7,6 +7,7 @@ using Godot; using System.Threading.Tasks; using System.Text; +using Rokojori.Extensions; namespace Rokojori.Reallusion { [Tool] diff --git a/Runtime/Reallusion/Shaders/CCEyeMaterial.cs b/Runtime/Reallusion/Shaders/CCEyeMaterial.cs index d7268f3..88fc672 100644 --- a/Runtime/Reallusion/Shaders/CCEyeMaterial.cs +++ b/Runtime/Reallusion/Shaders/CCEyeMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/CCEyeOcclusionMaterial.cs b/Runtime/Reallusion/Shaders/CCEyeOcclusionMaterial.cs index 7ef951e..d33551e 100644 --- a/Runtime/Reallusion/Shaders/CCEyeOcclusionMaterial.cs +++ b/Runtime/Reallusion/Shaders/CCEyeOcclusionMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/CCPBROpacityMaterial.cs b/Runtime/Reallusion/Shaders/CCPBROpacityMaterial.cs index 55e352f..ffe93b0 100644 --- a/Runtime/Reallusion/Shaders/CCPBROpacityMaterial.cs +++ b/Runtime/Reallusion/Shaders/CCPBROpacityMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/CCSkinMaterial.cs b/Runtime/Reallusion/Shaders/CCSkinMaterial.cs index 3b4f601..4a2f768 100644 --- a/Runtime/Reallusion/Shaders/CCSkinMaterial.cs +++ b/Runtime/Reallusion/Shaders/CCSkinMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/CCSkinTransmissiveMaterial.cs b/Runtime/Reallusion/Shaders/CCSkinTransmissiveMaterial.cs index 3a05d28..c710fb6 100644 --- a/Runtime/Reallusion/Shaders/CCSkinTransmissiveMaterial.cs +++ b/Runtime/Reallusion/Shaders/CCSkinTransmissiveMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaBackMaterial.cs b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaBackMaterial.cs index f710ee3..c0ed548 100644 --- a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaBackMaterial.cs +++ b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaBackMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaMaterial.cs b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaMaterial.cs index f69fa27..6197587 100644 --- a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaMaterial.cs +++ b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairAlphaMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairDiscardMaterial.cs b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairDiscardMaterial.cs index 823a288..d7eb0ba 100644 --- a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairDiscardMaterial.cs +++ b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairDiscardMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairMaterial.cs b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairMaterial.cs index 51df7e0..2135e8b 100644 --- a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairMaterial.cs +++ b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairScissorMaterial.cs b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairScissorMaterial.cs index d8e6faa..0d26340 100644 --- a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairScissorMaterial.cs +++ b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairScissorMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairShadowMaterial.cs b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairShadowMaterial.cs index 625e8f7..445bed4 100644 --- a/Runtime/Reallusion/Shaders/Hair/Variants/CCHairShadowMaterial.cs +++ b/Runtime/Reallusion/Shaders/Hair/Variants/CCHairShadowMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Rendering/Assets/Foliage/FoliageData.cs b/Runtime/Rendering/Assets/Foliage/FoliageData.cs index 80d0e98..34680c7 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageData.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageData.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/CustomMaterialOverride.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/CustomMaterialOverride.cs index 9df9e78..027ffd5 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/CustomMaterialOverride.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/CustomMaterialOverride.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/FoliageMaterialOverride.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/FoliageMaterialOverride.cs index 1db98b2..1d6ffde 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/FoliageMaterialOverride.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/FoliageMaterialOverride.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/StandardMaterialOverride.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/StandardMaterialOverride.cs index 5cdaabd..4d7894b 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/StandardMaterialOverride.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/StandardMaterialOverride.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TextureOverride/FoliageTextureOverride.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TextureOverride/FoliageTextureOverride.cs index 37dc8bd..86296a0 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TextureOverride/FoliageTextureOverride.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TextureOverride/FoliageTextureOverride.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/BasicFoliageTranslucencySettings.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/BasicFoliageTranslucencySettings.cs index 96b0b85..8cc5cd1 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/BasicFoliageTranslucencySettings.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/BasicFoliageTranslucencySettings.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/FoliageTranslucencySettings.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/FoliageTranslucencySettings.cs index 80b3369..ea5ca45 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/FoliageTranslucencySettings.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TranslucencySettings/FoliageTranslucencySettings.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/AlphaScissorFoliage.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/AlphaScissorFoliage.cs index c0aa276..3d3bc40 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/AlphaScissorFoliage.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/AlphaScissorFoliage.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/BasicFoliageTransparencyRenderMode.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/BasicFoliageTransparencyRenderMode.cs index 90a7bc4..3ff6620 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/BasicFoliageTransparencyRenderMode.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/BasicFoliageTransparencyRenderMode.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/FoliageTransparencyRenderMode.cs b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/FoliageTransparencyRenderMode.cs index b30d907..a544e86 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/FoliageTransparencyRenderMode.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageMaterialOverrides/TransparencyRenderModes/FoliageTransparencyRenderMode.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliagePriority/AbsoluteFoliagePriority.cs b/Runtime/Rendering/Assets/Foliage/FoliagePriority/AbsoluteFoliagePriority.cs index a051e57..c0b873b 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliagePriority/AbsoluteFoliagePriority.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliagePriority/AbsoluteFoliagePriority.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliagePriority/FoliagePriority.cs b/Runtime/Rendering/Assets/Foliage/FoliagePriority/FoliagePriority.cs index f4d0017..9131536 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliagePriority/FoliagePriority.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliagePriority/FoliagePriority.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliagePriority/OrderFoliagePriority.cs b/Runtime/Rendering/Assets/Foliage/FoliagePriority/OrderFoliagePriority.cs index 0c97eb3..5b1cd4f 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliagePriority/OrderFoliagePriority.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliagePriority/OrderFoliagePriority.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliagePriority/RelativeFoliagePriority.cs b/Runtime/Rendering/Assets/Foliage/FoliagePriority/RelativeFoliagePriority.cs index 6f88b53..ec64e59 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliagePriority/RelativeFoliagePriority.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliagePriority/RelativeFoliagePriority.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageQualitySettings.cs b/Runtime/Rendering/Assets/Foliage/FoliageQualitySettings.cs index 3850a20..4567221 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageQualitySettings.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageQualitySettings.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageRenderLayer.cs b/Runtime/Rendering/Assets/Foliage/FoliageRenderLayer.cs index 0452ec9..7d7bd0a 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageRenderLayer.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageRenderLayer.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs b/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs index 13df4e1..3756c31 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs @@ -7,6 +7,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageSources/FoliageSource.cs b/Runtime/Rendering/Assets/Foliage/FoliageSources/FoliageSource.cs index 34bbcec..0f88aee 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageSources/FoliageSource.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageSources/FoliageSource.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageSources/MeshInstanceFoliageSource.cs b/Runtime/Rendering/Assets/Foliage/FoliageSources/MeshInstanceFoliageSource.cs index 50afcb0..3cf9b7b 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageSources/MeshInstanceFoliageSource.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageSources/MeshInstanceFoliageSource.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/FoliageSources/SceneFoliageSource.cs b/Runtime/Rendering/Assets/Foliage/FoliageSources/SceneFoliageSource.cs index 36099b8..104fe9a 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageSources/SceneFoliageSource.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageSources/SceneFoliageSource.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/Assets/Foliage/GPUFoliageShaderMaterial.cs b/Runtime/Rendering/Assets/Foliage/GPUFoliageShaderMaterial.cs index fbf11f9..2cb3369 100644 --- a/Runtime/Rendering/Assets/Foliage/GPUFoliageShaderMaterial.cs +++ b/Runtime/Rendering/Assets/Foliage/GPUFoliageShaderMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Rendering/Assets/Foliage/SubFoliageData.cs b/Runtime/Rendering/Assets/Foliage/SubFoliageData.cs index 2a7d8c6..b010b63 100644 --- a/Runtime/Rendering/Assets/Foliage/SubFoliageData.cs +++ b/Runtime/Rendering/Assets/Foliage/SubFoliageData.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Rendering/AssignedShaderProperty.cs b/Runtime/Rendering/AssignedShaderProperty.cs index 5a71f71..87e15b5 100644 --- a/Runtime/Rendering/AssignedShaderProperty.cs +++ b/Runtime/Rendering/AssignedShaderProperty.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class AssignedShaderProperty diff --git a/Runtime/Rendering/ColorSpace.cs b/Runtime/Rendering/ColorSpace.cs index fe55235..413fb72 100644 --- a/Runtime/Rendering/ColorSpace.cs +++ b/Runtime/Rendering/ColorSpace.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum ColorSpace diff --git a/Runtime/Rendering/Compositor/AnimationTargets/CompFXMemberCurveTarget.cs b/Runtime/Rendering/Compositor/AnimationTargets/CompFXMemberCurveTarget.cs index ade65be..75c1859 100644 --- a/Runtime/Rendering/Compositor/AnimationTargets/CompFXMemberCurveTarget.cs +++ b/Runtime/Rendering/Compositor/AnimationTargets/CompFXMemberCurveTarget.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/AnimationTargets/RokojoriCompositorEffectAnimationTarget.cs b/Runtime/Rendering/Compositor/AnimationTargets/RokojoriCompositorEffectAnimationTarget.cs index c604234..703dd86 100644 --- a/Runtime/Rendering/Compositor/AnimationTargets/RokojoriCompositorEffectAnimationTarget.cs +++ b/Runtime/Rendering/Compositor/AnimationTargets/RokojoriCompositorEffectAnimationTarget.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectDriverTarget.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectDriverTarget.cs index 27887f8..09e053a 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectDriverTarget.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectDriverTarget.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayer.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayer.cs index 0c661c8..49e8473 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayer.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayer.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayerSlot.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayerSlot.cs index 51b1ffe..d26e5a1 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayerSlot.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayerSlot.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayout.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayout.cs index 9662451..c2d575d 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayout.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectLayout.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectMemberCurveTarget.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectMemberCurveTarget.cs index 4744c00..3627800 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectMemberCurveTarget.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectMemberCurveTarget.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectOwner.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectOwner.cs index 1f67fb2..ffa259d 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectOwner.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectOwner.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectReference.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectReference.cs index 1573322..63517e4 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectReference.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectReference.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFX.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFX.cs index 7e11409..74b1501 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFX.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFX.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXEffectPreset.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXEffectPreset.cs index 5fc60ed..d574f64 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXEffectPreset.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXEffectPreset.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXPreset.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXPreset.cs index 2d25197..9925f77 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXPreset.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorVFXPreset.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectID.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectID.cs index a482314..9e81e29 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectID.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectID.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectIDReference.cs b/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectIDReference.cs index b3b23df..7fba784 100644 --- a/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectIDReference.cs +++ b/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectIDReference.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/AntiAliasingEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/AntiAliasingEffect.cs index 718b8a7..0de60a8 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/AntiAliasingEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/AntiAliasingEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/DAA/DAAEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/DAA/DAAEffect.cs index 2d6cc87..8069b49 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/DAA/DAAEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/DAA/DAAEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/FXAA/FXAAEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/FXAA/FXAAEffect.cs index 95bb675..06fcaca 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/FXAA/FXAAEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/AntiAliasing/FXAA/FXAAEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BlurOrSharpenEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BlurOrSharpenEffect.cs index 2aef0ae..6a7463c 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BlurOrSharpenEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BlurOrSharpenEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BoxBlur/BoxBlurEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BoxBlur/BoxBlurEffect.cs index 087ff84..c4bc434 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BoxBlur/BoxBlurEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/BoxBlur/BoxBlurEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/RadialBlur2/RadialBlur2.cs b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/RadialBlur2/RadialBlur2.cs index 28b9147..509aa00 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/RadialBlur2/RadialBlur2.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/RadialBlur2/RadialBlur2.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/Sharpen/SharpenEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/Sharpen/SharpenEffect.cs index 079bc55..d8f9cc0 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/Sharpen/SharpenEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/Sharpen/SharpenEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/TemporalBlur/TemporalBlurEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/TemporalBlur/TemporalBlurEffect.cs index 7b6081f..e37d8d8 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/TemporalBlur/TemporalBlurEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/TemporalBlur/TemporalBlurEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/UnsharpMasking/UnsharpMaskingEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/UnsharpMasking/UnsharpMaskingEffect.cs index 3992263..c0ab5c2 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/UnsharpMasking/UnsharpMaskingEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Blur&Sharpen/UnsharpMasking/UnsharpMaskingEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorEffect.cs index 5607eaf..fb5ad49 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorQuantizer/ColorQuantizerEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorQuantizer/ColorQuantizerEffect.cs index 14e60e2..0be37e7 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorQuantizer/ColorQuantizerEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/ColorQuantizer/ColorQuantizerEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/CrossChannelCurves/CrossChannelCurvesEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/CrossChannelCurves/CrossChannelCurvesEffect.cs index 1d6047f..64efe4c 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/CrossChannelCurves/CrossChannelCurvesEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/CrossChannelCurves/CrossChannelCurvesEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/GreyScale/GreyScaleEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/GreyScale/GreyScaleEffect.cs index 874ee7e..f3e317c 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/GreyScale/GreyScaleEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/GreyScale/GreyScaleEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/HDRMapping/HDRMappingEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/HDRMapping/HDRMappingEffect.cs index 5acde4b..d69b996 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/HDRMapping/HDRMappingEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/HDRMapping/HDRMappingEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLAdjustment/HSLAdjustmentEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLAdjustment/HSLAdjustmentEffect.cs index ac60872..1e0dc9e 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLAdjustment/HSLAdjustmentEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLAdjustment/HSLAdjustmentEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLCurves/HSLCurvesEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLCurves/HSLCurvesEffect.cs index fdba6f1..62654a1 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLCurves/HSLCurvesEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/HSLCurves/HSLCurvesEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/Invert/InvertEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/Invert/InvertEffect.cs index 85bf269..da7663e 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/Invert/InvertEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/Invert/InvertEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/LightnessBasedAdjustment/LightnessBasedAdjustmentEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/LightnessBasedAdjustment/LightnessBasedAdjustmentEffect.cs index c818483..2fd3c4c 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/LightnessBasedAdjustment/LightnessBasedAdjustmentEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/LightnessBasedAdjustment/LightnessBasedAdjustmentEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/Posterization/PosterizationEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/Posterization/PosterizationEffect.cs index 6314770..ab760b3 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/Posterization/PosterizationEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/Posterization/PosterizationEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/RGBCurves/RGBCurvesEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/RGBCurves/RGBCurvesEffect.cs index a5f0619..1bf154e 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/RGBCurves/RGBCurvesEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/RGBCurves/RGBCurvesEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/ReplaceColor/ReplaceColorEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/ReplaceColor/ReplaceColorEffect.cs index c8bdf97..3e73d05 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/ReplaceColor/ReplaceColorEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/ReplaceColor/ReplaceColorEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Color/Sepia/SepiaEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Color/Sepia/SepiaEffect.cs index 9b84bbf..236346d 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Color/Sepia/SepiaEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Color/Sepia/SepiaEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Development/EnsureValidFloats/EnsureValidFloatsEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Development/EnsureValidFloats/EnsureValidFloatsEffect.cs index d65b3b6..4c92009 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Development/EnsureValidFloats/EnsureValidFloatsEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Development/EnsureValidFloats/EnsureValidFloatsEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Development/Kernel3/Kernel3Effect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Development/Kernel3/Kernel3Effect.cs index 64131db..d4cceca 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Development/Kernel3/Kernel3Effect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Development/Kernel3/Kernel3Effect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Development/NormalView/NormalViewEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Development/NormalView/NormalViewEffect.cs index c31c779..4b61b53 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Development/NormalView/NormalViewEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Development/NormalView/NormalViewEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/ChromaticAberation/ChromaticAberation.cs b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/ChromaticAberation/ChromaticAberation.cs index 33f3f43..2cf5c41 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/ChromaticAberation/ChromaticAberation.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/ChromaticAberation/ChromaticAberation.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/DistortionEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/DistortionEffect.cs index bf1dcdd..65ac641 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/DistortionEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/DistortionEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EdgeDistortion/EdgeDistortionEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EdgeDistortion/EdgeDistortionEffect.cs index 99842f5..e94ed21 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EdgeDistortion/EdgeDistortionEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EdgeDistortion/EdgeDistortionEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EllispeDistortion/EllipseDistortionEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EllispeDistortion/EllipseDistortionEffect.cs index 1890559..9873f02 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EllispeDistortion/EllipseDistortionEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/EllispeDistortion/EllipseDistortionEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/NoiseDistortion/NoiseDistortionEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/NoiseDistortion/NoiseDistortionEffect.cs index 0dcf2c8..e1724cc 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/NoiseDistortion/NoiseDistortionEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/NoiseDistortion/NoiseDistortionEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -80,7 +81,7 @@ namespace Rokojori protected override void ForAllViews() { - var time = TimeLine.osTime; + var time = Timeline.osTime; distortion.constants.Set( new Vector4( diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/TextureDistortion/TextureDistortionEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/TextureDistortion/TextureDistortionEffect.cs index d2b8f3f..6108a3c 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Distortion/TextureDistortion/TextureDistortionEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Distortion/TextureDistortion/TextureDistortionEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -51,7 +52,7 @@ namespace Rokojori public Vector2 distortionScroll = Vector2.Zero; [Export] - public TimeLine distortionScrollTimeLine; + public Timeline distortionScrollTimeLine; [Export] public float distortionScrollFPS = 60f; @@ -80,7 +81,7 @@ namespace Rokojori public Vector2 maskScroll = Vector2.Zero; [Export] - public TimeLine maskScrollTimeLine; + public Timeline maskScrollTimeLine; [Export] public float maskScrollFPS = 60f; @@ -172,7 +173,7 @@ namespace Rokojori // maskTextureInput.GetTexture(), maskTexture // ); - var timeLine = TimeLineManager.Ensure( distortionScrollTimeLine ); + var timeLine = TimelineManager.Ensure( distortionScrollTimeLine ); var timelinePosition = timeLine.position; if ( distortionScrollFPS > 0f ) @@ -189,7 +190,7 @@ namespace Rokojori scrollPosition.X = MathX.Repeat( scrollPosition.X, 1.0f ); scrollPosition.Y = MathX.Repeat( scrollPosition.Y, 1.0f ); - var timeLineMask = TimeLineManager.Ensure( maskScrollTimeLine ); + var timeLineMask = TimelineManager.Ensure( maskScrollTimeLine ); var timeLineMaskPosition = timeLineMask.position; diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Edge/DepthOutlines/DepthOutlinesEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Edge/DepthOutlines/DepthOutlinesEffect.cs index a18878c..6d2f6cd 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Edge/DepthOutlines/DepthOutlinesEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Edge/DepthOutlines/DepthOutlinesEffect.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Edge/EdgeCompositorEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Edge/EdgeCompositorEffect.cs index fe35704..26c5d9f 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Edge/EdgeCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Edge/EdgeCompositorEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Edge/Rim/RimEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Edge/Rim/RimEffect.cs index fe05190..78c63d0 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Edge/Rim/RimEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Edge/Rim/RimEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Fog/FogCompositorEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Fog/FogCompositorEffect.cs index d268c5f..69a39e7 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Fog/FogCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Fog/FogCompositorEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Fog/GradientFog/GradientFogEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Fog/GradientFog/GradientFogEffect.cs index cae3f87..3230cb8 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Fog/GradientFog/GradientFogEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Fog/GradientFog/GradientFogEffect.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -45,7 +46,7 @@ namespace Rokojori public float gradientUVScrollFPS = 0f; [Export] - public TimeLine gradientUVScrollTimeline = null; + public Timeline gradientUVScrollTimeline = null; public enum UVGradientSampleMode { @@ -130,7 +131,7 @@ namespace Rokojori var projection = context.GetCameraProjection().Inverse(); - var tl = TimeLineManager.Ensure( gradientUVScrollTimeline ); + var tl = TimelineManager.Ensure( gradientUVScrollTimeline ); float tlPosition = tl.position; diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Glow/ChromaticBloom/ChromaticBloomEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Glow/ChromaticBloom/ChromaticBloomEffect.cs index 5b77514..b7fda28 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Glow/ChromaticBloom/ChromaticBloomEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Glow/ChromaticBloom/ChromaticBloomEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -44,7 +45,7 @@ namespace Rokojori public float distortionAngleSpeed = 0.5f; [Export] - public TimeLine distortionAngleTimeLine; + public Timeline distortionAngleTimeLine; [Export( PropertyHint.Range, "-1,1") ] public Vector2 distortionOffset = Vector2.Zero; @@ -267,7 +268,7 @@ namespace Rokojori var combinedRotation = distortionAngle; - var tl = TimeLineManager.Ensure( distortionAngleTimeLine ); + var tl = TimelineManager.Ensure( distortionAngleTimeLine ); var animationRotation = MathX.Repeat( tl.position * distortionAngleSpeed / 360, 1f ) * 360f; combinedRotation = MathX.Repeat( animationRotation + combinedRotation, 360f ); diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomEffect.cs index 3246368..50c3515 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomEffect.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomSettings.cs b/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomSettings.cs index 8f8a1c0..b77b712 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomSettings.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Glow/GhostBloom/GhostBloomSettings.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Glow/GlowCompositorEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Glow/GlowCompositorEffect.cs index 1ad8f97..cd6f895 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Glow/GlowCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Glow/GlowCompositorEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Glow/MaxBloom/MaxBloomEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Glow/MaxBloom/MaxBloomEffect.cs index 6743a9a..c9d7f98 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Glow/MaxBloom/MaxBloomEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Glow/MaxBloom/MaxBloomEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Glow/RingBloom/RingBloomEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Glow/RingBloom/RingBloomEffect.cs index 2bea873..64c404f 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Glow/RingBloom/RingBloomEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Glow/RingBloom/RingBloomEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Glow/Streaks/StreaksEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Glow/Streaks/StreaksEffect.cs index c1cfde0..b8af044 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Glow/Streaks/StreaksEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Glow/Streaks/StreaksEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -32,7 +33,7 @@ namespace Rokojori public float rotationSpeed = 0; [Export] - public TimeLine rotationSpeedTimeLine; + public Timeline rotationSpeedTimeLine; [Export( PropertyHint.Range, "1,8") ] public int numStreaks = 3; @@ -171,7 +172,7 @@ namespace Rokojori var combinedRotation = rotationOffset; - var tl = TimeLineManager.Ensure( rotationSpeedTimeLine ); + var tl = TimelineManager.Ensure( rotationSpeedTimeLine ); var animationRotation = MathX.Repeat( tl.position * rotationSpeed / 360, 1f ) * 360f; combinedRotation = MathX.Repeat( animationRotation + combinedRotation, 360f ); diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Noise/ChannelPixelation/ChannelPixelationEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Noise/ChannelPixelation/ChannelPixelationEffect.cs index 27b22b0..f66ec8a 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Noise/ChannelPixelation/ChannelPixelationEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Noise/ChannelPixelation/ChannelPixelationEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -95,7 +96,7 @@ namespace Rokojori protected override void ForAllViews() { - var time = TimeLine.osTime; + var time = Timeline.osTime; pixelation.constants.Set( new Vector4( diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Noise/NoiseEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Noise/NoiseEffect.cs index 3efebda..83ea2d3 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Noise/NoiseEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Noise/NoiseEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Noise/Pixelation/PixelationEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Noise/Pixelation/PixelationEffect.cs index 3aaed16..5b31915 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Noise/Pixelation/PixelationEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Noise/Pixelation/PixelationEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/OverlayEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/OverlayEffect.cs index 4188490..20f5400 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/OverlayEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/OverlayEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/ScanLines/ScanLinesEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/ScanLines/ScanLinesEffect.cs index daeb748..639488b 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/ScanLines/ScanLinesEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/ScanLines/ScanLinesEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -82,7 +83,7 @@ namespace Rokojori protected override void ForAllViews() { float duration = 1f / jitterFPS; - float normalizedTime = ( TimeLine.osTime % duration ) / duration; + float normalizedTime = ( Timeline.osTime % duration ) / duration; float jitter = Mathf.Sin( normalizedTime * Mathf.Pi * 2f ) * jitterStrength; // this.LogInfo( jitter ); diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/TextureOverlay/TextureOverlayEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/TextureOverlay/TextureOverlayEffect.cs index 242cbe7..ec2f3b4 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/TextureOverlay/TextureOverlayEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/TextureOverlay/TextureOverlayEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -54,7 +55,7 @@ namespace Rokojori public float scrollingFPS = 60f; [Export] - public TimeLine scrollTimeline; + public Timeline scrollTimeline; [Export] public RenderingDevice.SamplerFilter filter = RenderingDevice.SamplerFilter.Linear; @@ -88,7 +89,7 @@ namespace Rokojori public float maskScrollingFPS = 60f; [Export] - public TimeLine maskScrollTimeline; + public Timeline maskScrollTimeline; [Export] public RenderingDevice.SamplerFilter maskFilter = RenderingDevice.SamplerFilter.Linear; @@ -202,7 +203,7 @@ namespace Rokojori _maskTexture.SetImageTexture( maskTexture ); _alphaMappingTexture.SetImageTexture( alphaMapping ); - var timeLine = TimeLineManager.Ensure( scrollTimeline ); + var timeLine = TimelineManager.Ensure( scrollTimeline ); var timelinePosition = timeLine.position; if ( scrollingFPS > 0f ) @@ -215,7 +216,7 @@ namespace Rokojori scrollPosition.X = MathX.Repeat( scrollPosition.X, 1.0f ); scrollPosition.Y = MathX.Repeat( scrollPosition.Y, 1.0f ); - var timeLineMask = TimeLineManager.Ensure( maskScrollTimeline ); + var timeLineMask = TimelineManager.Ensure( maskScrollTimeline ); float maskPosition = timeLineMask.position; diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/Vignette/VignetteEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/Vignette/VignetteEffect.cs index ce1a767..791990d 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Overlay/Vignette/VignetteEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Overlay/Vignette/VignetteEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Technical/TextureDilation/TextureDilationCompositerEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Technical/TextureDilation/TextureDilationCompositerEffect.cs index a619ba8..3116a8b 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Technical/TextureDilation/TextureDilationCompositerEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Technical/TextureDilation/TextureDilationCompositerEffect.cs @@ -7,6 +7,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/CircleWipe/CircleWipeEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/CircleWipe/CircleWipeEffect.cs index 2a1ab5b..a4200c9 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/CircleWipe/CircleWipeEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/CircleWipe/CircleWipeEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/DirectionalWipe/DirectionalWipeEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/DirectionalWipe/DirectionalWipeEffect.cs index 24c54f4..557b871 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/DirectionalWipe/DirectionalWipeEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/DirectionalWipe/DirectionalWipeEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/NoiseWipe/NoiseWipeEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/NoiseWipe/NoiseWipeEffect.cs index bb860e6..57f714e 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/NoiseWipe/NoiseWipeEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/NoiseWipe/NoiseWipeEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/WipeCompositorEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/WipeCompositorEffect.cs index c9f2f42..e48da61 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/Wipes/WipeCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/Wipes/WipeCompositorEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/AlphaGrabTest/AlphaGrabTestEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/AlphaGrabTest/AlphaGrabTestEffect.cs index 679beeb..dff5355 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/AlphaGrabTest/AlphaGrabTestEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/AlphaGrabTest/AlphaGrabTestEffect.cs @@ -4,6 +4,7 @@ using Godot.Collections; using System.Collections.Generic; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Blur/BlurCompositorEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Blur/BlurCompositorEffect.cs index 8a56783..152ff4c 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Blur/BlurCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Blur/BlurCompositorEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Depth/DepthEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Depth/DepthEffect.cs index 93c5eb2..e60965c 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Depth/DepthEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/Depth/DepthEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAO/DepthAOEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAO/DepthAOEffect.cs index 91d3741..2f3f345 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAO/DepthAOEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAO/DepthAOEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAntiAliasing/DepthAntiAliasingEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAntiAliasing/DepthAntiAliasingEffect.cs index c0f6313..a6ad1a1 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAntiAliasing/DepthAntiAliasingEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthAntiAliasing/DepthAntiAliasingEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthView/DepthViewEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthView/DepthViewEffect.cs index bcd824f..39e4d4a 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthView/DepthViewEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/DepthView/DepthViewEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/RadialBlur/RadialBlurEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/RadialBlur/RadialBlurEffect.cs index 7f645ee..cec9220 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/RadialBlur/RadialBlurEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/RadialBlur/RadialBlurEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmear/TemporalSmearEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmear/TemporalSmearEffect.cs index 6e2a26e..7b34208 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmear/TemporalSmearEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmear/TemporalSmearEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearSimple/TemporalSmearSimpleEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearSimple/TemporalSmearSimpleEffect.cs index 65f4017..7820307 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearSimple/TemporalSmearSimpleEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearSimple/TemporalSmearSimpleEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearWobbly/TemporalSmearWobblyEffect.cs b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearWobbly/TemporalSmearWobblyEffect.cs index 7139ed2..21f1468 100644 --- a/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearWobbly/TemporalSmearWobblyEffect.cs +++ b/Runtime/Rendering/Compositor/CompositorEffects/_Experiments/TemporalSmearWobbly/TemporalSmearWobblyEffect.cs @@ -3,6 +3,7 @@ using Godot; using Godot.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/RDGraphCompositorEffect.cs b/Runtime/Rendering/Compositor/RDGraphCompositorEffect.cs index 234345a..58c8a9c 100644 --- a/Runtime/Rendering/Compositor/RDGraphCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/RDGraphCompositorEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/RokojoriCompositorEffect.cs b/Runtime/Rendering/Compositor/RokojoriCompositorEffect.cs index 2516792..974cacf 100644 --- a/Runtime/Rendering/Compositor/RokojoriCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/RokojoriCompositorEffect.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori.Tools; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/SetCompositorEffectsStates.cs b/Runtime/Rendering/Compositor/SetCompositorEffectsStates.cs index 783b4c1..a55bc55 100644 --- a/Runtime/Rendering/Compositor/SetCompositorEffectsStates.cs +++ b/Runtime/Rendering/Compositor/SetCompositorEffectsStates.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs b/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs index b0bedeb..52b392a 100644 --- a/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Context/RDContext.CleanUp.cs b/Runtime/Rendering/Context/RDContext.CleanUp.cs index 690ee41..f6cb6d5 100644 --- a/Runtime/Rendering/Context/RDContext.CleanUp.cs +++ b/Runtime/Rendering/Context/RDContext.CleanUp.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public partial class RDContext diff --git a/Runtime/Rendering/Context/RDContext.Create.cs b/Runtime/Rendering/Context/RDContext.Create.cs index 49a404b..43c0723 100644 --- a/Runtime/Rendering/Context/RDContext.Create.cs +++ b/Runtime/Rendering/Context/RDContext.Create.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public partial class RDContext diff --git a/Runtime/Rendering/Context/RDContext.Messages.cs b/Runtime/Rendering/Context/RDContext.Messages.cs index 9cc18f3..4e1861b 100644 --- a/Runtime/Rendering/Context/RDContext.Messages.cs +++ b/Runtime/Rendering/Context/RDContext.Messages.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public partial class RDContext diff --git a/Runtime/Rendering/Context/RDContext.cs b/Runtime/Rendering/Context/RDContext.cs index fa2dbb7..7a8d627 100644 --- a/Runtime/Rendering/Context/RDContext.cs +++ b/Runtime/Rendering/Context/RDContext.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public partial class RDContext diff --git a/Runtime/Rendering/DefaultRenderAssets.cs b/Runtime/Rendering/DefaultRenderAssets.cs index b7d8123..fc5577b 100644 --- a/Runtime/Rendering/DefaultRenderAssets.cs +++ b/Runtime/Rendering/DefaultRenderAssets.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/FontFX/FontCreator.cs b/Runtime/Rendering/FontFX/FontCreator.cs index 97a9175..ec9da61 100644 --- a/Runtime/Rendering/FontFX/FontCreator.cs +++ b/Runtime/Rendering/FontFX/FontCreator.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/FontFX/FontDefinition.cs b/Runtime/Rendering/FontFX/FontDefinition.cs index 2c68efd..18aa546 100644 --- a/Runtime/Rendering/FontFX/FontDefinition.cs +++ b/Runtime/Rendering/FontFX/FontDefinition.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/FontFX/FontFX.cs b/Runtime/Rendering/FontFX/FontFX.cs index 3e79246..fac1444 100644 --- a/Runtime/Rendering/FontFX/FontFX.cs +++ b/Runtime/Rendering/FontFX/FontFX.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/FontFX/FontFXLayouter.cs b/Runtime/Rendering/FontFX/FontFXLayouter.cs index 4078d56..0c7dce0 100644 --- a/Runtime/Rendering/FontFX/FontFXLayouter.cs +++ b/Runtime/Rendering/FontFX/FontFXLayouter.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class FontFXGroup diff --git a/Runtime/Rendering/FontFX/FontGlyph.cs b/Runtime/Rendering/FontFX/FontGlyph.cs index e47577f..c3914b5 100644 --- a/Runtime/Rendering/FontFX/FontGlyph.cs +++ b/Runtime/Rendering/FontFX/FontGlyph.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/FontFX/FontKerningPair.cs b/Runtime/Rendering/FontFX/FontKerningPair.cs index f216b1e..3716e23 100644 --- a/Runtime/Rendering/FontFX/FontKerningPair.cs +++ b/Runtime/Rendering/FontFX/FontKerningPair.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/Objects/RDComputeList.cs b/Runtime/Rendering/Objects/RDComputeList.cs index e6fba63..44c859f 100644 --- a/Runtime/Rendering/Objects/RDComputeList.cs +++ b/Runtime/Rendering/Objects/RDComputeList.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDComputeList diff --git a/Runtime/Rendering/Objects/RDFrameBuffer.cs b/Runtime/Rendering/Objects/RDFrameBuffer.cs index a37a51f..2140e89 100644 --- a/Runtime/Rendering/Objects/RDFrameBuffer.cs +++ b/Runtime/Rendering/Objects/RDFrameBuffer.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RDFrameBuffer: RDObject diff --git a/Runtime/Rendering/Objects/RDFrameBufferFormat.cs b/Runtime/Rendering/Objects/RDFrameBufferFormat.cs index f66eea8..6104910 100644 --- a/Runtime/Rendering/Objects/RDFrameBufferFormat.cs +++ b/Runtime/Rendering/Objects/RDFrameBufferFormat.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RDFrameBufferFormat diff --git a/Runtime/Rendering/Objects/RDObject.cs b/Runtime/Rendering/Objects/RDObject.cs index e0d928d..358f6aa 100644 --- a/Runtime/Rendering/Objects/RDObject.cs +++ b/Runtime/Rendering/Objects/RDObject.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDObject diff --git a/Runtime/Rendering/Objects/RDPipeline.cs b/Runtime/Rendering/Objects/RDPipeline.cs index 1ac9e8e..0db3049 100644 --- a/Runtime/Rendering/Objects/RDPipeline.cs +++ b/Runtime/Rendering/Objects/RDPipeline.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDPipeline: RDObject diff --git a/Runtime/Rendering/Objects/RDProgram.cs b/Runtime/Rendering/Objects/RDProgram.cs index 621f578..eeb6476 100644 --- a/Runtime/Rendering/Objects/RDProgram.cs +++ b/Runtime/Rendering/Objects/RDProgram.cs @@ -2,6 +2,7 @@ using Godot; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Rendering/Objects/RDPushConstants.cs b/Runtime/Rendering/Objects/RDPushConstants.cs index 62c653c..8ec883d 100644 --- a/Runtime/Rendering/Objects/RDPushConstants.cs +++ b/Runtime/Rendering/Objects/RDPushConstants.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RDPushConstants diff --git a/Runtime/Rendering/Objects/RDRenderPipelineSetup.cs b/Runtime/Rendering/Objects/RDRenderPipelineSetup.cs index 3de0344..0d9c7c6 100644 --- a/Runtime/Rendering/Objects/RDRenderPipelineSetup.cs +++ b/Runtime/Rendering/Objects/RDRenderPipelineSetup.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RDRenderPipelineSetup diff --git a/Runtime/Rendering/Objects/RDSampler.cs b/Runtime/Rendering/Objects/RDSampler.cs index 7c9bff1..73275ae 100644 --- a/Runtime/Rendering/Objects/RDSampler.cs +++ b/Runtime/Rendering/Objects/RDSampler.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDSampler: RDObject diff --git a/Runtime/Rendering/Objects/RDShader.cs b/Runtime/Rendering/Objects/RDShader.cs index 261725d..e72ddf5 100644 --- a/Runtime/Rendering/Objects/RDShader.cs +++ b/Runtime/Rendering/Objects/RDShader.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDShader: RDObject diff --git a/Runtime/Rendering/Objects/RDTexture.cs b/Runtime/Rendering/Objects/RDTexture.cs index 88108e2..7c0f24e 100644 --- a/Runtime/Rendering/Objects/RDTexture.cs +++ b/Runtime/Rendering/Objects/RDTexture.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDTexture: RDObject @@ -244,7 +245,7 @@ namespace Rokojori var rdFormat = RDTextureFormats.ImageFormatToDataFormat( viewPortImageFormat ); var data = image.GetData(); - RJLog.Log( "Data", data.Length, Lists.SubList( data, 0, 100 ) ); + RJLog.Log( "Data", data.Length, ListExtensions.SubList( data, 0, 100 ) ); RJLog.Log( "Copying Texture From", viewport.Size, viewPortImageFormat, rdFormat, "Bytes", bytes ); var texture = Create( context, viewport.Size, dataFormat ); diff --git a/Runtime/Rendering/Objects/RDTextureFormats.cs b/Runtime/Rendering/Objects/RDTextureFormats.cs index 1be47d6..e09e2e7 100644 --- a/Runtime/Rendering/Objects/RDTextureFormats.cs +++ b/Runtime/Rendering/Objects/RDTextureFormats.cs @@ -4,6 +4,7 @@ using Godot; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class RDTextureFormats diff --git a/Runtime/Rendering/Objects/RDUniformSet.cs b/Runtime/Rendering/Objects/RDUniformSet.cs index 2c7208a..0ccd872 100644 --- a/Runtime/Rendering/Objects/RDUniformSet.cs +++ b/Runtime/Rendering/Objects/RDUniformSet.cs @@ -2,6 +2,7 @@ using Godot; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { public class RDUniformSet:RDObject diff --git a/Runtime/Rendering/Objects/RDVertexFormat.cs b/Runtime/Rendering/Objects/RDVertexFormat.cs index e5f9882..04acb22 100644 --- a/Runtime/Rendering/Objects/RDVertexFormat.cs +++ b/Runtime/Rendering/Objects/RDVertexFormat.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RDVertexFormat diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/DAA/RG_DAA.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/DAA/RG_DAA.cs index 2df9be2..7f4644f 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/DAA/RG_DAA.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/DAA/RG_DAA.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_DAA:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/FXAA/RG_FXAA.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/FXAA/RG_FXAA.cs index 1508e53..9b04f5a 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/FXAA/RG_FXAA.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/AntiAliasing/FXAA/RG_FXAA.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_FXAA:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Alpha/RG_BlendMode_Alpha.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Alpha/RG_BlendMode_Alpha.cs index 18f4d97..12a2617 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Alpha/RG_BlendMode_Alpha.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Alpha/RG_BlendMode_Alpha.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_BlendMode_Alpha:RG_BlendModeBase diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Color/RG_BlendMode_Color.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Color/RG_BlendMode_Color.cs index ba44b01..2639c56 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Color/RG_BlendMode_Color.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Color/RG_BlendMode_Color.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_BlendMode_Color:RG_BlendModeBase diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Screen/RG_BlendMode_Screen.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Screen/RG_BlendMode_Screen.cs index f91e572..06661be 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Screen/RG_BlendMode_Screen.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/BlendMode_Screen/RG_BlendMode_Screen.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_BlendMode_Screen:RG_BlendModeBase diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/RG_BlendModes.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/RG_BlendModes.cs index ea7b157..470860e 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/RG_BlendModes.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blend/RG_BlendModes.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public enum RG_BlendModeType diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/BoxBlur/RG_BoxBlur.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/BoxBlur/RG_BoxBlur.cs index 891dd2d..4635670 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/BoxBlur/RG_BoxBlur.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/BoxBlur/RG_BoxBlur.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_BoxBlur:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/GaussBlur/RG_GaussBlur.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/GaussBlur/RG_GaussBlur.cs index 90afc34..401d0fc 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/GaussBlur/RG_GaussBlur.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/GaussBlur/RG_GaussBlur.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_GaussBlur:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_FadedMaxBlur.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_FadedMaxBlur.cs index 2d429cd..964a263 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_FadedMaxBlur.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_FadedMaxBlur.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_FadedMaxBlur:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_MaxBlur.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_MaxBlur.cs index d9321e9..9f4698d 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_MaxBlur.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/MaxBlur/RG_MaxBlur.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_MaxBlur:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/RadialBlur/RG_RadialBlur.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/RadialBlur/RG_RadialBlur.cs index 84dfbb8..d2c0baf 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/RadialBlur/RG_RadialBlur.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/RadialBlur/RG_RadialBlur.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_RadialBlur:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/TemporalBlur/RG_TemporalBlur.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/TemporalBlur/RG_TemporalBlur.cs index f4f29e7..e8c916d 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/TemporalBlur/RG_TemporalBlur.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Blurs/TemporalBlur/RG_TemporalBlur.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_TemporalBlur:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/AlphaColorDilation/RG_AlphaColorDilation.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/AlphaColorDilation/RG_AlphaColorDilation.cs index 040ffbd..3bfcf8f 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/AlphaColorDilation/RG_AlphaColorDilation.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/AlphaColorDilation/RG_AlphaColorDilation.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_AlphaColorDilation:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ChromaticAberation/RG_ChromaticAberation.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ChromaticAberation/RG_ChromaticAberation.cs index 199d18f..9e4a89d 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ChromaticAberation/RG_ChromaticAberation.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ChromaticAberation/RG_ChromaticAberation.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ChromaticAberation:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ColorQuantizer/RG_ColorQuantizer.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ColorQuantizer/RG_ColorQuantizer.cs index ac02c24..80ed7d7 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ColorQuantizer/RG_ColorQuantizer.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ColorQuantizer/RG_ColorQuantizer.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ColorQuantizer:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/CrossChannelCurves/RG_CrossChannelCurves.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/CrossChannelCurves/RG_CrossChannelCurves.cs index 8df1e6d..8535d94 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/CrossChannelCurves/RG_CrossChannelCurves.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/CrossChannelCurves/RG_CrossChannelCurves.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_CrossChannelCurves:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HDRMapping/RG_HDRMapping.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HDRMapping/RG_HDRMapping.cs index 99b313a..f9fab43 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HDRMapping/RG_HDRMapping.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HDRMapping/RG_HDRMapping.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_HDRMapping:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLAdjustment/RG_HSLAdjustment.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLAdjustment/RG_HSLAdjustment.cs index 12d51bf..fb73367 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLAdjustment/RG_HSLAdjustment.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLAdjustment/RG_HSLAdjustment.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_HSLAdjustment:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLCurves/RG_HSLCurves.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLCurves/RG_HSLCurves.cs index ee8af01..e066add 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLCurves/RG_HSLCurves.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/HSLCurves/RG_HSLCurves.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_HSLCurves:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Invert/RG_Invert.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Invert/RG_Invert.cs index 6f1dc45..082f7a5 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Invert/RG_Invert.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Invert/RG_Invert.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Invert:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/LightnessBasedAdjustment/RG_LightnessBasedAdjustment.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/LightnessBasedAdjustment/RG_LightnessBasedAdjustment.cs index 00491e4..07ad300 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/LightnessBasedAdjustment/RG_LightnessBasedAdjustment.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/LightnessBasedAdjustment/RG_LightnessBasedAdjustment.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_LightnessBasedAdjustment:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Posterization/RG_Posterization.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Posterization/RG_Posterization.cs index e56e1a9..630d8de 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Posterization/RG_Posterization.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Posterization/RG_Posterization.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Posterization:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/RGBCurves/RG_RGBCurves.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/RGBCurves/RG_RGBCurves.cs index d1f358a..4e94001 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/RGBCurves/RG_RGBCurves.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/RGBCurves/RG_RGBCurves.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_RGBCurves:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ReplaceColor/RG_ReplaceColor.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ReplaceColor/RG_ReplaceColor.cs index 2885622..d63568e 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ReplaceColor/RG_ReplaceColor.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/ReplaceColor/RG_ReplaceColor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ReplaceColor:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Sepia/RG_Sepia.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Sepia/RG_Sepia.cs index 1b4cbbd..d3d0007 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Sepia/RG_Sepia.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Color/Sepia/RG_Sepia.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Sepia:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Copy.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Copy.cs index 632dbc3..e5d04e1 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Copy.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Copy.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class CEG_Copy:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Fill.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Fill.cs index 144bbc1..4a7ed55 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Fill.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Fill.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Fill:RDShaderProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Resize.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Resize.cs index 1958e35..3c2bba6 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Resize.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/RG_Resize.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Resize:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Depth/GenerateViewZ/RG_GenerateViewZ.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Depth/GenerateViewZ/RG_GenerateViewZ.cs index e886421..5955ac0 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Depth/GenerateViewZ/RG_GenerateViewZ.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Depth/GenerateViewZ/RG_GenerateViewZ.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_GenerateViewZ:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EdgeDistortion/RG_EdgeDistortion.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EdgeDistortion/RG_EdgeDistortion.cs index ddf861d..bd39df1 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EdgeDistortion/RG_EdgeDistortion.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EdgeDistortion/RG_EdgeDistortion.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_EdgeDistortion:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EllipseDistortion/RG_EllipseDistortion.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EllipseDistortion/RG_EllipseDistortion.cs index a7c11da..6d4a810 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EllipseDistortion/RG_EllipseDistortion.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/EllipseDistortion/RG_EllipseDistortion.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_EllipseDistortion:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/NoiseDistortion/RG_NoiseDistortion.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/NoiseDistortion/RG_NoiseDistortion.cs index 4076a06..4e4dea2 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/NoiseDistortion/RG_NoiseDistortion.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/NoiseDistortion/RG_NoiseDistortion.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_NoiseDistortion:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/ScanLines/RG_ScanLines.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/ScanLines/RG_ScanLines.cs index a8abbc4..4d4272e 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/ScanLines/RG_ScanLines.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/ScanLines/RG_ScanLines.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ScanLines:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/TextureDistortion/RG_TextureDistortion.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/TextureDistortion/RG_TextureDistortion.cs index 6cee69e..4b506d9 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/TextureDistortion/RG_TextureDistortion.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Distortion/TextureDistortion/RG_TextureDistortion.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_TextureDistortion:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Fog/GradientFog/RG_GradientFog.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Fog/GradientFog/RG_GradientFog.cs index adbbef4..777387c 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Fog/GradientFog/RG_GradientFog.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Fog/GradientFog/RG_GradientFog.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_GradientFog:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BlendModeBase.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BlendModeBase.cs index d9eba38..eeadd9b 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BlendModeBase.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BlendModeBase.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public abstract class RG_BlendModeBase:RDShaderProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BufferTexture.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BufferTexture.cs index 2acfe41..c442717 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BufferTexture.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_BufferTexture.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_TextureCreator diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageProcessor.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageProcessor.cs index fdd7b17..27f68ef 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageProcessor.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageProcessor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ImageProcessor:RDShaderProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageTexture.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageTexture.cs index a435e9b..d245974 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageTexture.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ImageTexture.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ImageTexture:RGGraphProcessor, RDGraphTextureSlotInput diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenColorTexture.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenColorTexture.cs index c46090d..5e34995 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenColorTexture.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenColorTexture.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ScreenColorTexure:RGGraphProcessor, RDGraphTextureSlotInput diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenDepthTexture.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenDepthTexture.cs index 2315919..5889811 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenDepthTexture.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenDepthTexture.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ScreenDepthTexture:RGGraphProcessor, RDGraphTextureSlotInput diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenNormalRoughnessTexture.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenNormalRoughnessTexture.cs index 9906dce..99dffef 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenNormalRoughnessTexture.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Generic/RG_ScreenNormalRoughnessTexture.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ScreenNormalRoughnessTexture:RGGraphProcessor, RDGraphTextureSlotInput diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ChromaticBloom/RG_ChromaticBloom.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ChromaticBloom/RG_ChromaticBloom.cs index 05b37b5..ae913e8 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ChromaticBloom/RG_ChromaticBloom.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ChromaticBloom/RG_ChromaticBloom.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ChromaticBloom:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlow.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlow.cs index d6e5c36..f5cb87d 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlow.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlow.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ExtractGlow:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlowPartial.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlowPartial.cs index 89df6e1..832a1d9 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlowPartial.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlow/RG_ExtractGlowPartial.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ExtractGlowPartial:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlowLine/RG_ExtractGlowLine.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlowLine/RG_ExtractGlowLine.cs index 5fc6c54..151f033 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlowLine/RG_ExtractGlowLine.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/ExtractGlowLine/RG_ExtractGlowLine.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ExtractGlowLine:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GhostBloom/RG_GhostBloom.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GhostBloom/RG_GhostBloom.cs index 6b99b53..371d02e 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GhostBloom/RG_GhostBloom.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GhostBloom/RG_GhostBloom.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_GhostBloom:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GlowAdd/RG_GlowAdd.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GlowAdd/RG_GlowAdd.cs index 8cc91a2..515ae1d 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GlowAdd/RG_GlowAdd.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/GlowAdd/RG_GlowAdd.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_GlowAdd:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_ApplyLuma.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_ApplyLuma.cs index e8743f6..111b0ec 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_ApplyLuma.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_ApplyLuma.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ApplyLuma:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_MaxBloom.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_MaxBloom.cs index 5ca8a64..c3f0a5a 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_MaxBloom.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/MaxBloom/RG_MaxBloom.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_MaxBloom:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/RingBloom/RG_RingBloom.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/RingBloom/RG_RingBloom.cs index 9287235..2eee1be 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/RingBloom/RG_RingBloom.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/RingBloom/RG_RingBloom.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_RingBloom:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/Streaks/RG_Streaks.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/Streaks/RG_Streaks.cs index f81fa2f..d2aa16e 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/Streaks/RG_Streaks.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Glow/Streaks/RG_Streaks.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Streaks:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAAssign.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAAssign.cs index a4e2fc2..3ac3810 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAAssign.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAAssign.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_JFAAssign:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAInitialize.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAInitialize.cs index 76866d2..7414522 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAInitialize.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAInitialize.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_JFAInitialize:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAIterate.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAIterate.cs index 4b5a694..ba31340 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAIterate.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/JFA/RG_JFAIterate.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_JFAIterate:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Kernels/Kernel3/RG_Kernel3.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Kernels/Kernel3/RG_Kernel3.cs index 1990c65..94d6ca3 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Kernels/Kernel3/RG_Kernel3.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Kernels/Kernel3/RG_Kernel3.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Kernel3:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Logic/RG_SwapRepeat.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Logic/RG_SwapRepeat.cs index d2059f3..23f7e39 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Logic/RG_SwapRepeat.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Logic/RG_SwapRepeat.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_SwapRepeat:RGGraphProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/ChannelPixelation/RG_ChannelPixelation.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/ChannelPixelation/RG_ChannelPixelation.cs index fccdfdc..60ef116 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/ChannelPixelation/RG_ChannelPixelation.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/ChannelPixelation/RG_ChannelPixelation.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_ChannelPixelation:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/Pixelation/RG_Pixelation.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/Pixelation/RG_Pixelation.cs index 29bf89e..28dd20e 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/Pixelation/RG_Pixelation.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Noise/Pixelation/RG_Pixelation.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_Pixelation:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/Rim/RG_Rim.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/Rim/RG_Rim.cs index b2f24af..7434ced 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/Rim/RG_Rim.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/Rim/RG_Rim.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/ZOutlines/RG_ZOutlines.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/ZOutlines/RG_ZOutlines.cs index 666a10f..2d62d0b 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/ZOutlines/RG_ZOutlines.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Outlines/ZOutlines/RG_ZOutlines.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Overlays/Vignette/RG_Vignette.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Overlays/Vignette/RG_Vignette.cs index 5c4db3a..67ba630 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Overlays/Vignette/RG_Vignette.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Overlays/Vignette/RG_Vignette.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Sharpeners/Sharpen/RG_Sharpen.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Sharpeners/Sharpen/RG_Sharpen.cs index 86f393d..141fa2d 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Sharpeners/Sharpen/RG_Sharpen.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Sharpeners/Sharpen/RG_Sharpen.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RD_Sharpen:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/CircleWipe/RG_CircleWipe.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/CircleWipe/RG_CircleWipe.cs index 5f597bc..bfa223c 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/CircleWipe/RG_CircleWipe.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/CircleWipe/RG_CircleWipe.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_CircleWipe:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/DirectionalWipe/RG_DirectionalWipe.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/DirectionalWipe/RG_DirectionalWipe.cs index 11eb1ee..6fb7867 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/DirectionalWipe/RG_DirectionalWipe.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/DirectionalWipe/RG_DirectionalWipe.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_DirectionalWipe:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/NoiseWipe/RG_NoiseWipe.cs b/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/NoiseWipe/RG_NoiseWipe.cs index 83d150b..b4361f0 100644 --- a/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/NoiseWipe/RG_NoiseWipe.cs +++ b/Runtime/Rendering/RenderGraph/Nodes/Processors/Wipes/NoiseWipe/RG_NoiseWipe.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RG_NoiseWipe:RG_ImageProcessor diff --git a/Runtime/Rendering/RenderGraph/RDGraph.cs b/Runtime/Rendering/RenderGraph/RDGraph.cs index d0ff836..789ae19 100644 --- a/Runtime/Rendering/RenderGraph/RDGraph.cs +++ b/Runtime/Rendering/RenderGraph/RDGraph.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RDGraph diff --git a/Runtime/Rendering/RenderGraph/RDGraphConnection.cs b/Runtime/Rendering/RenderGraph/RDGraphConnection.cs index b6fdb5a..6c883a4 100644 --- a/Runtime/Rendering/RenderGraph/RDGraphConnection.cs +++ b/Runtime/Rendering/RenderGraph/RDGraphConnection.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDGraphConnection:RDGraphNode diff --git a/Runtime/Rendering/RenderGraph/RDGraphNode.cs b/Runtime/Rendering/RenderGraph/RDGraphNode.cs index b0888b6..e85fc54 100644 --- a/Runtime/Rendering/RenderGraph/RDGraphNode.cs +++ b/Runtime/Rendering/RenderGraph/RDGraphNode.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RDGraphNode diff --git a/Runtime/Rendering/RenderGraph/RDGraphProcessor.cs b/Runtime/Rendering/RenderGraph/RDGraphProcessor.cs index 8c54646..fb5e9bb 100644 --- a/Runtime/Rendering/RenderGraph/RDGraphProcessor.cs +++ b/Runtime/Rendering/RenderGraph/RDGraphProcessor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RGGraphProcessor:RDGraphNode diff --git a/Runtime/Rendering/RenderGraph/RDGraphTextureSlot.cs b/Runtime/Rendering/RenderGraph/RDGraphTextureSlot.cs index f32df6d..8400660 100644 --- a/Runtime/Rendering/RenderGraph/RDGraphTextureSlot.cs +++ b/Runtime/Rendering/RenderGraph/RDGraphTextureSlot.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface RDGraphTextureSlotInput diff --git a/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs b/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs index 4b4d086..62c15a6 100644 --- a/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs +++ b/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class RDShaderProcessor:RGGraphProcessor diff --git a/Runtime/Rendering/RenderingManager.cs b/Runtime/Rendering/RenderingManager.cs index 139e6f5..8d2b133 100644 --- a/Runtime/Rendering/RenderingManager.cs +++ b/Runtime/Rendering/RenderingManager.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Rendering/RenderingManagerData.cs b/Runtime/Rendering/RenderingManagerData.cs index 7317f23..ae5d829 100644 --- a/Runtime/Rendering/RenderingManagerData.cs +++ b/Runtime/Rendering/RenderingManagerData.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/RenderingPriority.cs b/Runtime/Rendering/RenderingPriority.cs index dd006ad..0fbedc8 100644 --- a/Runtime/Rendering/RenderingPriority.cs +++ b/Runtime/Rendering/RenderingPriority.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/StencilLayer.cs b/Runtime/Rendering/StencilLayer.cs index c1744b1..4e99f59 100644 --- a/Runtime/Rendering/StencilLayer.cs +++ b/Runtime/Rendering/StencilLayer.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/TextureAttributes/AnimateTextureAttributeChannel.cs b/Runtime/Rendering/TextureAttributes/AnimateTextureAttributeChannel.cs index b6ca2f4..4e3995d 100644 --- a/Runtime/Rendering/TextureAttributes/AnimateTextureAttributeChannel.cs +++ b/Runtime/Rendering/TextureAttributes/AnimateTextureAttributeChannel.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Reflection.Emit; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -62,13 +63,13 @@ namespace Rokojori _running = true; - var animationTimeLine = TimeLineManager.Ensure( duration.timeLine ); + var animationTimeLine = TimelineManager.Ensure( duration.timeLine ); var start = animationTimeLine.position; AnimationManager.StartAnimation( this, textureAttributes, channel + "" ); - TimeLineManager.ScheduleSpanIn( animationTimeLine, 0, duration.GetDurationInSeconds(), + TimelineManager.ScheduleSpanIn( animationTimeLine, 0, duration.GetDurationInSeconds(), ( span, type )=> { if ( actionID == -1 ) @@ -99,7 +100,7 @@ namespace Rokojori } - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { AnimationManager.EndAnimation( this, textureAttributes, channel + "" ); diff --git a/Runtime/Rendering/TextureAttributes/AssignTextureAttributesTexture.cs b/Runtime/Rendering/TextureAttributes/AssignTextureAttributesTexture.cs index d98e36a..86050fc 100644 --- a/Runtime/Rendering/TextureAttributes/AssignTextureAttributesTexture.cs +++ b/Runtime/Rendering/TextureAttributes/AssignTextureAttributesTexture.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/TextureAttributes/SetTextureAttributeChannel.cs b/Runtime/Rendering/TextureAttributes/SetTextureAttributeChannel.cs index b8b579d..6373bf6 100644 --- a/Runtime/Rendering/TextureAttributes/SetTextureAttributeChannel.cs +++ b/Runtime/Rendering/TextureAttributes/SetTextureAttributeChannel.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Reflection.Emit; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Rendering/TextureAttributes/TextureAttributes.cs b/Runtime/Rendering/TextureAttributes/TextureAttributes.cs index 3693062..a33462d 100644 --- a/Runtime/Rendering/TextureAttributes/TextureAttributes.cs +++ b/Runtime/Rendering/TextureAttributes/TextureAttributes.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Scenes/SceneReference.cs b/Runtime/Scenes/SceneReference.cs index ed9ed33..015cf19 100644 --- a/Runtime/Scenes/SceneReference.cs +++ b/Runtime/Scenes/SceneReference.cs @@ -7,6 +7,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { /** diff --git a/Runtime/Scenes/Serializer/MemberData.cs b/Runtime/Scenes/Serializer/MemberData.cs index 10dc35f..6ef7171 100644 --- a/Runtime/Scenes/Serializer/MemberData.cs +++ b/Runtime/Scenes/Serializer/MemberData.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Scenes/Serializer/SerializeScene.cs b/Runtime/Scenes/Serializer/SerializeScene.cs index 06665b4..d8afed2 100644 --- a/Runtime/Scenes/Serializer/SerializeScene.cs +++ b/Runtime/Scenes/Serializer/SerializeScene.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Reflection; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Scenes/Serializer/SerializedBase.cs b/Runtime/Scenes/Serializer/SerializedBase.cs index aced359..3747ed5 100644 --- a/Runtime/Scenes/Serializer/SerializedBase.cs +++ b/Runtime/Scenes/Serializer/SerializedBase.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Godot; using Godot.Collections; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Scenes/Serializer/SerializedNode.cs b/Runtime/Scenes/Serializer/SerializedNode.cs index 604f706..be46be8 100644 --- a/Runtime/Scenes/Serializer/SerializedNode.cs +++ b/Runtime/Scenes/Serializer/SerializedNode.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Scenes/Serializer/SerializedResource.cs b/Runtime/Scenes/Serializer/SerializedResource.cs index cc1334e..74ef404 100644 --- a/Runtime/Scenes/Serializer/SerializedResource.cs +++ b/Runtime/Scenes/Serializer/SerializedResource.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Scenes/Serializer/SerializedScene.cs b/Runtime/Scenes/Serializer/SerializedScene.cs index d8069b3..e849ce5 100644 --- a/Runtime/Scenes/Serializer/SerializedScene.cs +++ b/Runtime/Scenes/Serializer/SerializedScene.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Reflection; using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Selectors/EvaluateSelector.cs b/Runtime/Selectors/EvaluateSelector.cs index a055356..ba6bfbd 100644 --- a/Runtime/Selectors/EvaluateSelector.cs +++ b/Runtime/Selectors/EvaluateSelector.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Selectors/FlagSelector.cs b/Runtime/Selectors/FlagSelector.cs index 77f36d7..4d1b2c4 100644 --- a/Runtime/Selectors/FlagSelector.cs +++ b/Runtime/Selectors/FlagSelector.cs @@ -7,6 +7,7 @@ using Godot; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Selectors/Selectable.cs b/Runtime/Selectors/Selectable.cs index be91050..dc337fd 100644 --- a/Runtime/Selectors/Selectable.cs +++ b/Runtime/Selectors/Selectable.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Selectors/Selector.cs b/Runtime/Selectors/Selector.cs index 317a0e8..d03dda3 100644 --- a/Runtime/Selectors/Selector.cs +++ b/Runtime/Selectors/Selector.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Selectors/SelectorFlag.cs b/Runtime/Selectors/SelectorFlag.cs index 59cedb5..f2fbd6e 100644 --- a/Runtime/Selectors/SelectorFlag.cs +++ b/Runtime/Selectors/SelectorFlag.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Selectors/Selectors.cs b/Runtime/Selectors/Selectors.cs index c330e2b..1b1d121 100644 --- a/Runtime/Selectors/Selectors.cs +++ b/Runtime/Selectors/Selectors.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Selectors diff --git a/Runtime/Sensors/CombineSensor.cs b/Runtime/Sensors/CombineSensor.cs index 6c0a46a..77482ce 100644 --- a/Runtime/Sensors/CombineSensor.cs +++ b/Runtime/Sensors/CombineSensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -57,7 +58,7 @@ namespace Rokojori public override List GetInputIcons() { - var list = Lists.From( inputIcons ); + var list = ListExtensions.From( inputIcons ); if ( useInputIconsFromSensors ) { diff --git a/Runtime/Sensors/DeviceFilters/DefaultSensorDeviceSelector.cs b/Runtime/Sensors/DeviceFilters/DefaultSensorDeviceSelector.cs index 535c376..9803e85 100644 --- a/Runtime/Sensors/DeviceFilters/DefaultSensorDeviceSelector.cs +++ b/Runtime/Sensors/DeviceFilters/DefaultSensorDeviceSelector.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/DeviceFilters/DeviceFilter.cs b/Runtime/Sensors/DeviceFilters/DeviceFilter.cs index c2a1629..2ed7c31 100644 --- a/Runtime/Sensors/DeviceFilters/DeviceFilter.cs +++ b/Runtime/Sensors/DeviceFilters/DeviceFilter.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/DeviceFilters/LastActiveDeviceFilter.cs b/Runtime/Sensors/DeviceFilters/LastActiveDeviceFilter.cs index b004a15..85a45c2 100644 --- a/Runtime/Sensors/DeviceFilters/LastActiveDeviceFilter.cs +++ b/Runtime/Sensors/DeviceFilters/LastActiveDeviceFilter.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/DeviceFilters/SensorDeviceSelector.cs b/Runtime/Sensors/DeviceFilters/SensorDeviceSelector.cs index 6efddf3..cd7f735 100644 --- a/Runtime/Sensors/DeviceFilters/SensorDeviceSelector.cs +++ b/Runtime/Sensors/DeviceFilters/SensorDeviceSelector.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/Devices/GamePadDevice.cs b/Runtime/Sensors/Devices/GamePadDevice.cs index 6793464..adb4685 100644 --- a/Runtime/Sensors/Devices/GamePadDevice.cs +++ b/Runtime/Sensors/Devices/GamePadDevice.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum GamePadDeviceType diff --git a/Runtime/Sensors/Devices/KeyboardDevice.cs b/Runtime/Sensors/Devices/KeyboardDevice.cs index a6d2de3..78fa9c2 100644 --- a/Runtime/Sensors/Devices/KeyboardDevice.cs +++ b/Runtime/Sensors/Devices/KeyboardDevice.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/Devices/MouseDevice.cs b/Runtime/Sensors/Devices/MouseDevice.cs index 2c33f18..24971ea 100644 --- a/Runtime/Sensors/Devices/MouseDevice.cs +++ b/Runtime/Sensors/Devices/MouseDevice.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/Devices/MultiSensorDevice.cs b/Runtime/Sensors/Devices/MultiSensorDevice.cs index 146018e..7fb1fce 100644 --- a/Runtime/Sensors/Devices/MultiSensorDevice.cs +++ b/Runtime/Sensors/Devices/MultiSensorDevice.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/Devices/SensorDevice.cs b/Runtime/Sensors/Devices/SensorDevice.cs index f534b0b..fbe8298 100644 --- a/Runtime/Sensors/Devices/SensorDevice.cs +++ b/Runtime/Sensors/Devices/SensorDevice.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/GamePadAxisSensor.cs b/Runtime/Sensors/GamePadAxisSensor.cs index 81f0955..8b9640a 100644 --- a/Runtime/Sensors/GamePadAxisSensor.cs +++ b/Runtime/Sensors/GamePadAxisSensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/GamePadAxisType.cs b/Runtime/Sensors/GamePadAxisType.cs index bf68fd0..9193cf0 100644 --- a/Runtime/Sensors/GamePadAxisType.cs +++ b/Runtime/Sensors/GamePadAxisType.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum GamePadAxisType diff --git a/Runtime/Sensors/GamePadButtonSensor.cs b/Runtime/Sensors/GamePadButtonSensor.cs index abf08fe..c3928cc 100644 --- a/Runtime/Sensors/GamePadButtonSensor.cs +++ b/Runtime/Sensors/GamePadButtonSensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/HoldSensor.cs b/Runtime/Sensors/HoldSensor.cs index 0468162..1b18920 100644 --- a/Runtime/Sensors/HoldSensor.cs +++ b/Runtime/Sensors/HoldSensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -67,7 +68,7 @@ namespace Rokojori public override List GetInputIcons() { - var list = Lists.From( inputIcons ); + var list = ListExtensions.From( inputIcons ); if ( useInputIconsFromSensors ) { diff --git a/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs index 3ccf93e..4de15f0 100644 --- a/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs +++ b/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -53,7 +54,7 @@ namespace Rokojori return null; } - var resolved = GetIconFor( 0, Lists.From( ci.icons ) ); + var resolved = GetIconFor( 0, ListExtensions.From( ci.icons ) ); if ( resolved == null ) { @@ -84,7 +85,7 @@ namespace Rokojori return false; } - var ic = GetIconFor( 0, Lists.From( ci.icons ) ); + var ic = GetIconFor( 0, ListExtensions.From( ci.icons ) ); return ic != null; } diff --git a/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs b/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs index 990ec3d..84a6d1b 100644 --- a/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs +++ b/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -47,7 +48,7 @@ namespace Rokojori return false; } - if ( Lists.ContainsEqual( iconOrder, icon ) ) + if ( ListExtensions.ContainsEqual( iconOrder, icon ) ) { return false; } @@ -62,14 +63,14 @@ namespace Rokojori if ( CombineIconOrderMode.Forward_Only == orderMode ) { - return Lists.AreEntriesEqual( iconOrder, Lists.From( icons ) ); + return ListExtensions.AreEntriesEqual( iconOrder, ListExtensions.From( icons ) ); } else if ( CombineIconOrderMode.Forward_And_Reverse == orderMode ) { - var list = Lists.From( icons ); - var listR = Lists.From( icons ); listR.Reverse(); + var list = ListExtensions.From( icons ); + var listR = ListExtensions.From( icons ); listR.Reverse(); - return Lists.AreEntriesEqual( iconOrder, list ) || Lists.AreEntriesEqual( iconOrder, listR ); + return ListExtensions.AreEntriesEqual( iconOrder, list ) || ListExtensions.AreEntriesEqual( iconOrder, listR ); } return true; diff --git a/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs index 15ec871..6f10b75 100644 --- a/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs +++ b/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs index 806fbde..3c94ffb 100644 --- a/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs +++ b/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Definitions/IconElement.cs b/Runtime/Sensors/InputIcons/Definitions/IconElement.cs index d47895d..2a49027 100644 --- a/Runtime/Sensors/InputIcons/Definitions/IconElement.cs +++ b/Runtime/Sensors/InputIcons/Definitions/IconElement.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class IconElement diff --git a/Runtime/Sensors/InputIcons/Definitions/InputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/InputIconDefinition.cs index 5b5b77d..c76b4a8 100644 --- a/Runtime/Sensors/InputIcons/Definitions/InputIconDefinition.cs +++ b/Runtime/Sensors/InputIcons/Definitions/InputIconDefinition.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Definitions/InputIconLocale.cs b/Runtime/Sensors/InputIcons/Definitions/InputIconLocale.cs index f46e9e4..69dcec7 100644 --- a/Runtime/Sensors/InputIcons/Definitions/InputIconLocale.cs +++ b/Runtime/Sensors/InputIcons/Definitions/InputIconLocale.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs index ca5b1a4..b1ecbd8 100644 --- a/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs +++ b/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/InputIconsLibrary.cs b/Runtime/Sensors/InputIcons/InputIconsLibrary.cs index 37e5a40..e4004cc 100644 --- a/Runtime/Sensors/InputIcons/InputIconsLibrary.cs +++ b/Runtime/Sensors/InputIcons/InputIconsLibrary.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -104,7 +105,7 @@ namespace Rokojori }; - list = Lists.Filter( list, l => l != null ); + list = ListExtensions.Filter( list, l => l != null ); return list; } diff --git a/Runtime/Sensors/InputIcons/Types/CombinedIcon.cs b/Runtime/Sensors/InputIcons/Types/CombinedIcon.cs index f3a3932..4f9c7f7 100644 --- a/Runtime/Sensors/InputIcons/Types/CombinedIcon.cs +++ b/Runtime/Sensors/InputIcons/Types/CombinedIcon.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum CombineIconOrderMode diff --git a/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs b/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs index 5f23146..61286e0 100644 --- a/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs +++ b/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs b/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs index f0bb79a..c0314d2 100644 --- a/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs +++ b/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Types/GamePadButtonIconSymbolsMap.cs b/Runtime/Sensors/InputIcons/Types/GamePadButtonIconSymbolsMap.cs index 27a89a2..2b1d426 100644 --- a/Runtime/Sensors/InputIcons/Types/GamePadButtonIconSymbolsMap.cs +++ b/Runtime/Sensors/InputIcons/Types/GamePadButtonIconSymbolsMap.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { public class GamePadIconSymbolsMap diff --git a/Runtime/Sensors/InputIcons/Types/InputIcon.cs b/Runtime/Sensors/InputIcons/Types/InputIcon.cs index 8ddeb6b..2c65c52 100644 --- a/Runtime/Sensors/InputIcons/Types/InputIcon.cs +++ b/Runtime/Sensors/InputIcons/Types/InputIcon.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Types/KeyIcon.cs b/Runtime/Sensors/InputIcons/Types/KeyIcon.cs index 24cae6c..0eacead 100644 --- a/Runtime/Sensors/InputIcons/Types/KeyIcon.cs +++ b/Runtime/Sensors/InputIcons/Types/KeyIcon.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Types/KeyIconSymbolsMap.cs b/Runtime/Sensors/InputIcons/Types/KeyIconSymbolsMap.cs index 5144c45..9a9774e 100644 --- a/Runtime/Sensors/InputIcons/Types/KeyIconSymbolsMap.cs +++ b/Runtime/Sensors/InputIcons/Types/KeyIconSymbolsMap.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class KeyIconSymbolsMap diff --git a/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs b/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs index 1f1a383..a1101f2 100644 --- a/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs +++ b/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputIcons/Types/SensorIcon.cs b/Runtime/Sensors/InputIcons/Types/SensorIcon.cs index 5a950ef..0d89dd3 100644 --- a/Runtime/Sensors/InputIcons/Types/SensorIcon.cs +++ b/Runtime/Sensors/InputIcons/Types/SensorIcon.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/InputMapActionSensor.cs b/Runtime/Sensors/InputMapActionSensor.cs index a241c5b..29aa3da 100644 --- a/Runtime/Sensors/InputMapActionSensor.cs +++ b/Runtime/Sensors/InputMapActionSensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -74,7 +75,7 @@ namespace Rokojori public override List GetInputIcons() { - return Lists.From( inputIcons ); + return ListExtensions.From( inputIcons ); } } diff --git a/Runtime/Sensors/KeySensor.cs b/Runtime/Sensors/KeySensor.cs index 3a06b9f..c7d850e 100644 --- a/Runtime/Sensors/KeySensor.cs +++ b/Runtime/Sensors/KeySensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -166,7 +167,7 @@ namespace Rokojori public static bool IsModifierKey( Key key ) { - return Lists.IsOneOf( key, Key.Ctrl, Key.Alt, Key.Shift, Key.Meta ); + return ListExtensions.IsOneOf( key, Key.Ctrl, Key.Alt, Key.Shift, Key.Meta ); } } diff --git a/Runtime/Sensors/MouseButtonSensor.cs b/Runtime/Sensors/MouseButtonSensor.cs index 1f97596..9f6bd22 100644 --- a/Runtime/Sensors/MouseButtonSensor.cs +++ b/Runtime/Sensors/MouseButtonSensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/MouseMotionDelta.cs b/Runtime/Sensors/MouseMotionDelta.cs index 30ade9e..e5dc81a 100644 --- a/Runtime/Sensors/MouseMotionDelta.cs +++ b/Runtime/Sensors/MouseMotionDelta.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/MouseScreenRelative.cs b/Runtime/Sensors/MouseScreenRelative.cs index 2fc85fe..d986591 100644 --- a/Runtime/Sensors/MouseScreenRelative.cs +++ b/Runtime/Sensors/MouseScreenRelative.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/OnSensor.cs b/Runtime/Sensors/OnSensor.cs index ff0fd3a..246fb99 100644 --- a/Runtime/Sensors/OnSensor.cs +++ b/Runtime/Sensors/OnSensor.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] @@ -77,7 +78,7 @@ namespace Rokojori // this.LogInfo( "On Sensor", sensor.value, sensor.isDown ); - var timeNow = Time.GetTicksMsec() / 1000.0f; + var timeNow = Godot.Time.GetTicksMsec() / 1000.0f; if ( sensor.isDown ) { diff --git a/Runtime/Sensors/Sensor.cs b/Runtime/Sensors/Sensor.cs index d461c50..46b2860 100644 --- a/Runtime/Sensors/Sensor.cs +++ b/Runtime/Sensors/Sensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -58,7 +59,7 @@ namespace Rokojori public virtual bool IsRepeatDown( ref float lastActivation, float delay = 0.5f, float repeatDuration = 0.1f ) { - var now = TimeLine.osTime; + var now = Timeline.osTime; if ( isDown ) { diff --git a/Runtime/Sensors/SensorEvent.cs b/Runtime/Sensors/SensorEvent.cs index 2f531d0..6bb8a5f 100644 --- a/Runtime/Sensors/SensorEvent.cs +++ b/Runtime/Sensors/SensorEvent.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class SensorEvent diff --git a/Runtime/Sensors/SensorGroup.cs b/Runtime/Sensors/SensorGroup.cs index 3c1df0e..c8f279d 100644 --- a/Runtime/Sensors/SensorGroup.cs +++ b/Runtime/Sensors/SensorGroup.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/SensorInputHandler.cs b/Runtime/Sensors/SensorInputHandler.cs index 22cdb05..ee1bfaa 100644 --- a/Runtime/Sensors/SensorInputHandler.cs +++ b/Runtime/Sensors/SensorInputHandler.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface SensorInputHandler diff --git a/Runtime/Sensors/SensorManager.cs b/Runtime/Sensors/SensorManager.cs index debe02f..8647f20 100644 --- a/Runtime/Sensors/SensorManager.cs +++ b/Runtime/Sensors/SensorManager.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -95,7 +96,7 @@ namespace Rokojori return testingLastActiveDevice; } - var highest = Lists.IndexOfHighestValue( Lists.From( deviceLastInputTimeStamp ), t => t ); + var highest = ListExtensions.IndexOfHighestValue( ListExtensions.From( deviceLastInputTimeStamp ), t => t ); if ( highest == -1 ) { diff --git a/Runtime/Sensors/SensorManagerSetup.cs b/Runtime/Sensors/SensorManagerSetup.cs index 485d5cd..d9ec137 100644 --- a/Runtime/Sensors/SensorManagerSetup.cs +++ b/Runtime/Sensors/SensorManagerSetup.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/SensorRunner.cs b/Runtime/Sensors/SensorRunner.cs index 5fd86ae..ce2ba76 100644 --- a/Runtime/Sensors/SensorRunner.cs +++ b/Runtime/Sensors/SensorRunner.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class SensorRunner diff --git a/Runtime/Sensors/SensorViewer.cs b/Runtime/Sensors/SensorViewer.cs index e34a072..8e85c78 100644 --- a/Runtime/Sensors/SensorViewer.cs +++ b/Runtime/Sensors/SensorViewer.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sensors/Sensors.cs b/Runtime/Sensors/Sensors.cs index 3d562eb..3c8b143 100644 --- a/Runtime/Sensors/Sensors.cs +++ b/Runtime/Sensors/Sensors.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Sensors diff --git a/Runtime/Sensors/TriggerOnSensor.cs b/Runtime/Sensors/TriggerOnSensor.cs index 6872583..629ffb1 100644 --- a/Runtime/Sensors/TriggerOnSensor.cs +++ b/Runtime/Sensors/TriggerOnSensor.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] diff --git a/Runtime/Sensors/iOnInputSensor.cs b/Runtime/Sensors/iOnInputSensor.cs index 036ad4a..32104a0 100644 --- a/Runtime/Sensors/iOnInputSensor.cs +++ b/Runtime/Sensors/iOnInputSensor.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface iOnInputSensor diff --git a/Runtime/Shading/Generators/Data/Vector2Modifier.cs b/Runtime/Shading/Generators/Data/Vector2Modifier.cs index 4eb55f8..faa380d 100644 --- a/Runtime/Shading/Generators/Data/Vector2Modifier.cs +++ b/Runtime/Shading/Generators/Data/Vector2Modifier.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Data/Vector3Modifier.cs b/Runtime/Shading/Generators/Data/Vector3Modifier.cs index 0da3cd7..d6c0f10 100644 --- a/Runtime/Shading/Generators/Data/Vector3Modifier.cs +++ b/Runtime/Shading/Generators/Data/Vector3Modifier.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Generic/ShaderCode.cs b/Runtime/Shading/Generators/Generic/ShaderCode.cs index d427ce7..8ee3e53 100644 --- a/Runtime/Shading/Generators/Generic/ShaderCode.cs +++ b/Runtime/Shading/Generators/Generic/ShaderCode.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Generic/ShaderCodeStage.cs b/Runtime/Shading/Generators/Generic/ShaderCodeStage.cs index 663b95d..d55b76c 100644 --- a/Runtime/Shading/Generators/Generic/ShaderCodeStage.cs +++ b/Runtime/Shading/Generators/Generic/ShaderCodeStage.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public enum ShaderCodeStage diff --git a/Runtime/Shading/Generators/Generic/ShaderCodeVariable.cs b/Runtime/Shading/Generators/Generic/ShaderCodeVariable.cs index 571ea67..52d49f1 100644 --- a/Runtime/Shading/Generators/Generic/ShaderCodeVariable.cs +++ b/Runtime/Shading/Generators/Generic/ShaderCodeVariable.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Generic/ShaderCodeVariableOccurance.cs b/Runtime/Shading/Generators/Generic/ShaderCodeVariableOccurance.cs index 00ac752..7e8f93c 100644 --- a/Runtime/Shading/Generators/Generic/ShaderCodeVariableOccurance.cs +++ b/Runtime/Shading/Generators/Generic/ShaderCodeVariableOccurance.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public enum ShaderCodeVariableOccuranceType diff --git a/Runtime/Shading/Generators/Generic/ShaderGenerationContext.cs b/Runtime/Shading/Generators/Generic/ShaderGenerationContext.cs index 710034e..96a7cb5 100644 --- a/Runtime/Shading/Generators/Generic/ShaderGenerationContext.cs +++ b/Runtime/Shading/Generators/Generic/ShaderGenerationContext.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class ShaderGenerationContext diff --git a/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs b/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs index a35a69a..e0b8006 100644 --- a/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs +++ b/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Microsoft.VisualBasic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -114,12 +115,12 @@ namespace Rokojori public static List ToCode( params string[] values ) { - return Lists.From( (ShaderCode)new StringShaderCode( Lists.From( values ).Join( "" ) ) ); + return ListExtensions.From( (ShaderCode)new StringShaderCode( ListExtensions.From( values ).Join( "" ) ) ); } public static List ToCode( string value ) { - return Lists.From( (ShaderCode)new StringShaderCode( value ) ); + return ListExtensions.From( (ShaderCode)new StringShaderCode( value ) ); } public static List ToUnsortableCode( string value ) @@ -183,7 +184,7 @@ namespace Rokojori group_uniforms; "; - return Lists.FromLists( ToCode( codeBefore.Indent("") ), code, ToCode( codeAfter.Indent("") ) ); + return ListExtensions.FromLists( ToCode( codeBefore.Indent("") ), code, ToCode( codeAfter.Indent("") ) ); } public List StartUniformGroup( string name ) @@ -230,7 +231,7 @@ namespace Rokojori public static List ToCode( List values ) { - return Lists.From( (ShaderCode)new StringShaderCode( Lists.From( values ).Join( "" ) ) ); + return ListExtensions.From( (ShaderCode)new StringShaderCode( ListExtensions.From( values ).Join( "" ) ) ); } public static string UniformFor( ShaderProperty property ) diff --git a/Runtime/Shading/Generators/Generic/ShaderGenerator.cs b/Runtime/Shading/Generators/Generic/ShaderGenerator.cs index b4f5264..48eb146 100644 --- a/Runtime/Shading/Generators/Generic/ShaderGenerator.cs +++ b/Runtime/Shading/Generators/Generic/ShaderGenerator.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.IO; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Generic/ShaderPhases.cs b/Runtime/Shading/Generators/Generic/ShaderPhases.cs index 300af81..d3c7957 100644 --- a/Runtime/Shading/Generators/Generic/ShaderPhases.cs +++ b/Runtime/Shading/Generators/Generic/ShaderPhases.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.IO; +using Rokojori.Extensions; namespace Rokojori { public enum ShaderPhase diff --git a/Runtime/Shading/Generators/Generic/ShaderRawModule.cs b/Runtime/Shading/Generators/Generic/ShaderRawModule.cs index b4faf3e..1ef7213 100644 --- a/Runtime/Shading/Generators/Generic/ShaderRawModule.cs +++ b/Runtime/Shading/Generators/Generic/ShaderRawModule.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.IO; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Generic/ShaderVariant.cs b/Runtime/Shading/Generators/Generic/ShaderVariant.cs index 8ce062b..58b3251 100644 --- a/Runtime/Shading/Generators/Generic/ShaderVariant.cs +++ b/Runtime/Shading/Generators/Generic/ShaderVariant.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class ShaderVariant @@ -368,7 +369,7 @@ namespace Rokojori return before; } - return Lists.Combine( before, addition, ( a, b ) => a.Extend( b ) ); + return ListExtensions.Combine( before, addition, ( a, b ) => a.Extend( b ) ); } } diff --git a/Runtime/Shading/Generators/Shapes/ShaderShapes3D.cs b/Runtime/Shading/Generators/Shapes/ShaderShapes3D.cs index 145fdeb..6114f72 100644 --- a/Runtime/Shading/Generators/Shapes/ShaderShapes3D.cs +++ b/Runtime/Shading/Generators/Shapes/ShaderShapes3D.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum ShaderShapeType diff --git a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs index e2c29e5..26d8f85 100644 --- a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs +++ b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs index a00c78a..c6035eb 100644 --- a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs +++ b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs b/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs index 2521bbe..e55ea61 100644 --- a/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs +++ b/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum AlphaFadeMode diff --git a/Runtime/Shading/Generators/Spatial/Alpha/AlphaModule.cs b/Runtime/Shading/Generators/Spatial/Alpha/AlphaModule.cs index d92e2f6..8751b61 100644 --- a/Runtime/Shading/Generators/Spatial/Alpha/AlphaModule.cs +++ b/Runtime/Shading/Generators/Spatial/Alpha/AlphaModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Backlight/BacklightModule.cs b/Runtime/Shading/Generators/Spatial/Backlight/BacklightModule.cs index a45d837..9494ce2 100644 --- a/Runtime/Shading/Generators/Spatial/Backlight/BacklightModule.cs +++ b/Runtime/Shading/Generators/Spatial/Backlight/BacklightModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs b/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs index aa569b5..d663c2d 100644 --- a/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs +++ b/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs b/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs index b6163ae..f1a4fa3 100644 --- a/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs +++ b/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Fading/CameraDistance/CameraDistanceFading.cs b/Runtime/Shading/Generators/Spatial/Fading/CameraDistance/CameraDistanceFading.cs index ef1cf68..ee6603e 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/CameraDistance/CameraDistanceFading.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/CameraDistance/CameraDistanceFading.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Fading/DepthProximity/DepthPromixityFading.cs b/Runtime/Shading/Generators/Spatial/Fading/DepthProximity/DepthPromixityFading.cs index b5b5a9b..078369d 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/DepthProximity/DepthPromixityFading.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/DepthProximity/DepthPromixityFading.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs b/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs index 8a577cb..1c844d4 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Fading/FadingModifier.cs b/Runtime/Shading/Generators/Spatial/Fading/FadingModifier.cs index 8fdd1d0..b154558 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/FadingModifier.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/FadingModifier.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs b/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs index 66d4e7f..4075315 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs b/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs index f3d9bc8..9721f15 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Fading/Line/LineFading.cs b/Runtime/Shading/Generators/Spatial/Fading/Line/LineFading.cs index 1eacee7..752c85f 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/Line/LineFading.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/Line/LineFading.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Geometry/BillboardBending/GeometryBillboardBending.cs b/Runtime/Shading/Generators/Spatial/Geometry/BillboardBending/GeometryBillboardBending.cs index caa8b85..7f41ade 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/BillboardBending/GeometryBillboardBending.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/BillboardBending/GeometryBillboardBending.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Geometry/GeometryModifier.cs b/Runtime/Shading/Generators/Spatial/Geometry/GeometryModifier.cs index 27c41d5..798d0a5 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/GeometryModifier.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/GeometryModifier.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs b/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs index c8d5766..b95c63b 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -15,7 +16,7 @@ namespace Rokojori { var list = new List(); - var allModifiers = Lists.From( modifiers ).FilterNulls(); + var allModifiers = ListExtensions.From( modifiers ).FilterNulls(); allModifiers.ForEach( ( m )=> diff --git a/Runtime/Shading/Generators/Spatial/Geometry/NormalOffset/GeometryNormalOffset.cs b/Runtime/Shading/Generators/Spatial/Geometry/NormalOffset/GeometryNormalOffset.cs index 284cc72..a5153b6 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/NormalOffset/GeometryNormalOffset.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/NormalOffset/GeometryNormalOffset.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Geometry/ShapeDeformer/GeometryShapeDeformer.cs b/Runtime/Shading/Generators/Spatial/Geometry/ShapeDeformer/GeometryShapeDeformer.cs index ae5988a..05e84c7 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/ShapeDeformer/GeometryShapeDeformer.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/ShapeDeformer/GeometryShapeDeformer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Geometry/TerrainOffset/GeometryTerrainOffset.cs b/Runtime/Shading/Generators/Spatial/Geometry/TerrainOffset/GeometryTerrainOffset.cs index d48aa2b..b3e48aa 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/TerrainOffset/GeometryTerrainOffset.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/TerrainOffset/GeometryTerrainOffset.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Geometry/VertexSwizzleType.cs b/Runtime/Shading/Generators/Spatial/Geometry/VertexSwizzleType.cs index a3e1825..6fe2866 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/VertexSwizzleType.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/VertexSwizzleType.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum VertexSwizzleType diff --git a/Runtime/Shading/Generators/Spatial/Geometry/VertexTransformSpace.cs b/Runtime/Shading/Generators/Spatial/Geometry/VertexTransformSpace.cs index 0c17f69..ae2737e 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/VertexTransformSpace.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/VertexTransformSpace.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum VertexTransformSpace diff --git a/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryGlobalWind.cs b/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryGlobalWind.cs index 2e5486c..150077b 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryGlobalWind.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryGlobalWind.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryWind.cs b/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryWind.cs index 65c7cd4..3464ccc 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryWind.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/Wind/GeometryWind.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs b/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs index 8ea5c30..267fee6 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs b/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs index 1c3c44c..ec5ad7a 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs b/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs index 61120c0..789db01 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs b/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs index 3e97cc7..28820ae 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum SpatialMaskFormulaType diff --git a/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs b/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs index d7107cc..5ebc627 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs b/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs index 2b7e7a1..e392118 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs b/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs index 94fcc1f..a5fc7af 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs b/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs index dbbb3ec..c4b4d9b 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs b/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs index 359bb6b..ba411e9 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs b/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs index 2b01564..c1ae81e 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs b/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs index ea7e7a7..b46db46 100644 --- a/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs +++ b/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Metallic/MetallicModule.cs b/Runtime/Shading/Generators/Spatial/Metallic/MetallicModule.cs index 36c0c1d..31bc4b1 100644 --- a/Runtime/Shading/Generators/Spatial/Metallic/MetallicModule.cs +++ b/Runtime/Shading/Generators/Spatial/Metallic/MetallicModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/NormalMap/NormalMapModule.cs b/Runtime/Shading/Generators/Spatial/NormalMap/NormalMapModule.cs index 8b9a956..e7cf9c3 100644 --- a/Runtime/Shading/Generators/Spatial/NormalMap/NormalMapModule.cs +++ b/Runtime/Shading/Generators/Spatial/NormalMap/NormalMapModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Occlusion/OcclusionModule.cs b/Runtime/Shading/Generators/Spatial/Occlusion/OcclusionModule.cs index 3a4b681..984fb0c 100644 --- a/Runtime/Shading/Generators/Spatial/Occlusion/OcclusionModule.cs +++ b/Runtime/Shading/Generators/Spatial/Occlusion/OcclusionModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs b/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs index d9ddace..536ee9a 100644 --- a/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs +++ b/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Roughness/RoughnessModule.cs b/Runtime/Shading/Generators/Spatial/Roughness/RoughnessModule.cs index 0df20ba..3677197 100644 --- a/Runtime/Shading/Generators/Spatial/Roughness/RoughnessModule.cs +++ b/Runtime/Shading/Generators/Spatial/Roughness/RoughnessModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Shading/ShadingModule.cs b/Runtime/Shading/Generators/Spatial/Shading/ShadingModule.cs index 16bd5e7..541ebb1 100644 --- a/Runtime/Shading/Generators/Spatial/Shading/ShadingModule.cs +++ b/Runtime/Shading/Generators/Spatial/Shading/ShadingModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs b/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs index 9c1075e..da7c506 100644 --- a/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs +++ b/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs b/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs index e7f9550..4698f1d 100644 --- a/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs +++ b/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Specular/SpecularModule.cs b/Runtime/Shading/Generators/Spatial/Specular/SpecularModule.cs index 263cfe8..3513093 100644 --- a/Runtime/Shading/Generators/Spatial/Specular/SpecularModule.cs +++ b/Runtime/Shading/Generators/Spatial/Specular/SpecularModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilBaseReference.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilBaseReference.cs index 3e5a374..726f641 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilBaseReference.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilBaseReference.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilCustomConfiguration.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilCustomConfiguration.cs index 94e3579..a9a9fd5 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilCustomConfiguration.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilCustomConfiguration.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilIndexReference.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilIndexReference.cs index 6e6bc3a..cd5d285 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilIndexReference.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilIndexReference.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilLayerReference.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilLayerReference.cs index 609a38b..5028a5e 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilLayerReference.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilLayerReference.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilMode.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilMode.cs index b3097b2..01c995e 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilMode.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilMode.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum StencilWriteMode diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilModule.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilModule.cs index a50d4f3..4ac5292 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilModule.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilReadMask.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilReadMask.cs index d3a7857..7cfefff 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilReadMask.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilReadMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilReference.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilReference.cs index 250064e..c0aee3a 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilReference.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilReference.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/Stencil/StencilWriteMask.cs b/Runtime/Shading/Generators/Spatial/Stencil/StencilWriteMask.cs index efd8151..5238761 100644 --- a/Runtime/Shading/Generators/Spatial/Stencil/StencilWriteMask.cs +++ b/Runtime/Shading/Generators/Spatial/Stencil/StencilWriteMask.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Generators/Spatial/SubsurfaceScattering/SubsurfaceScatteringModule.cs b/Runtime/Shading/Generators/Spatial/SubsurfaceScattering/SubsurfaceScatteringModule.cs index 8a2bb93..e35c16f 100644 --- a/Runtime/Shading/Generators/Spatial/SubsurfaceScattering/SubsurfaceScatteringModule.cs +++ b/Runtime/Shading/Generators/Spatial/SubsurfaceScattering/SubsurfaceScatteringModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/TextureModule.cs b/Runtime/Shading/Generators/Spatial/TextureModule.cs index 414ff48..649c56c 100644 --- a/Runtime/Shading/Generators/Spatial/TextureModule.cs +++ b/Runtime/Shading/Generators/Spatial/TextureModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Transparency/TransparencyModule.cs b/Runtime/Shading/Generators/Spatial/Transparency/TransparencyModule.cs index 88083c2..864bcbd 100644 --- a/Runtime/Shading/Generators/Spatial/Transparency/TransparencyModule.cs +++ b/Runtime/Shading/Generators/Spatial/Transparency/TransparencyModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -91,7 +92,7 @@ namespace Rokojori value = RegexUtility.Replace( value, @"\,\s*$", "" ); - return ToVariants( Lists.From( (ShaderCode) new StringShaderCode( value ) ) ); + return ToVariants( ListExtensions.From( (ShaderCode) new StringShaderCode( value ) ) ); } diff --git a/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs b/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs index 29bb559..038fb77 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/UV/UVModifier.cs b/Runtime/Shading/Generators/Spatial/UV/UVModifier.cs index 5207242..7262000 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVModifier.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVModifier.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/UV/UVModule.cs b/Runtime/Shading/Generators/Spatial/UV/UVModule.cs index 7bfdc0e..4b0cc09 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVModule.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVModule.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs b/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs index fee03ea..4f4a5c4 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -33,7 +34,7 @@ namespace Rokojori var lines = new List(); - Lists.From( uvScale, uvUniScale, uvOffset, uvScrolling ).FilterNulls().ForEach( + ListExtensions.From( uvScale, uvUniScale, uvOffset, uvScrolling ).FilterNulls().ForEach( ( p )=> { lines.Add( UniformFor( p ) + "\n" ); diff --git a/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs b/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs index 344a5df..a9bfbd6 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs b/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs index 4292428..9f63636 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs b/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs index 7dab995..dc8d277 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs b/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs index a044b8d..f6f161b 100644 --- a/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs +++ b/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs index 7db8c02..91619c1 100644 --- a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs index 39ef919..dd3e80d 100644 --- a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs index 8bc2762..a95940e 100644 --- a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/CustomMaterial.cs b/Runtime/Shading/Materials/CustomMaterial.cs index a3725c4..e4384e0 100644 --- a/Runtime/Shading/Materials/CustomMaterial.cs +++ b/Runtime/Shading/Materials/CustomMaterial.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/CustomMaterialProperty.cs b/Runtime/Shading/Materials/CustomMaterialProperty.cs index 39429b2..418934d 100644 --- a/Runtime/Shading/Materials/CustomMaterialProperty.cs +++ b/Runtime/Shading/Materials/CustomMaterialProperty.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class CustomMaterialProperty<[MustBeVariant] T> diff --git a/Runtime/Shading/Materials/MaterialDelta.cs b/Runtime/Shading/Materials/MaterialDelta.cs index 3977f43..5ad90fe 100644 --- a/Runtime/Shading/Materials/MaterialDelta.cs +++ b/Runtime/Shading/Materials/MaterialDelta.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/MaterialTransfer.cs b/Runtime/Shading/Materials/MaterialTransfer.cs index 2aa9b72..7dcc84d 100644 --- a/Runtime/Shading/Materials/MaterialTransfer.cs +++ b/Runtime/Shading/Materials/MaterialTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -13,7 +14,7 @@ namespace Rokojori public void Transfer( Material source, Material target ) { - Lists.From( transfers ).ForEach( + ListExtensions.From( transfers ).ForEach( ( t )=> { if ( ! t.MatchesMaterial( source ) ) diff --git a/Runtime/Shading/Materials/Materials.cs b/Runtime/Shading/Materials/Materials.cs index 2958591..c5b4cb5 100644 --- a/Runtime/Shading/Materials/Materials.cs +++ b/Runtime/Shading/Materials/Materials.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class Materials diff --git a/Runtime/Shading/Materials/SubMaterialTransfer.cs b/Runtime/Shading/Materials/SubMaterialTransfer.cs index 15a811a..5612de0 100644 --- a/Runtime/Shading/Materials/SubMaterialTransfer.cs +++ b/Runtime/Shading/Materials/SubMaterialTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/BoolPropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/BoolPropertyTransfer.cs index 14da046..75e0626 100644 --- a/Runtime/Shading/Materials/Transfers/BoolPropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/BoolPropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/ColorPropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/ColorPropertyTransfer.cs index 23f2fbc..da11b84 100644 --- a/Runtime/Shading/Materials/Transfers/ColorPropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/ColorPropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/CustomTransfer.cs b/Runtime/Shading/Materials/Transfers/CustomTransfer.cs index b6fa1f8..1f56f34 100644 --- a/Runtime/Shading/Materials/Transfers/CustomTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/CustomTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/FloatPropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/FloatPropertyTransfer.cs index a0237bb..64e6b3d 100644 --- a/Runtime/Shading/Materials/Transfers/FloatPropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/FloatPropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/IntPropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/IntPropertyTransfer.cs index 20fd7e0..c35edbe 100644 --- a/Runtime/Shading/Materials/Transfers/IntPropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/IntPropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/Texture2DPropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/Texture2DPropertyTransfer.cs index e5b7ced..3e5aa64 100644 --- a/Runtime/Shading/Materials/Transfers/Texture2DPropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/Texture2DPropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/TextureChannelToVector4Transfer.cs b/Runtime/Shading/Materials/Transfers/TextureChannelToVector4Transfer.cs index f51607d..0db2410 100644 --- a/Runtime/Shading/Materials/Transfers/TextureChannelToVector4Transfer.cs +++ b/Runtime/Shading/Materials/Transfers/TextureChannelToVector4Transfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/Vector2PropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/Vector2PropertyTransfer.cs index b1c00b5..c042953 100644 --- a/Runtime/Shading/Materials/Transfers/Vector2PropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/Vector2PropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/Vector3PropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/Vector3PropertyTransfer.cs index 14fd6fa..4e27197 100644 --- a/Runtime/Shading/Materials/Transfers/Vector3PropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/Vector3PropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Materials/Transfers/Vector4PropertyTransfer.cs b/Runtime/Shading/Materials/Transfers/Vector4PropertyTransfer.cs index 8b73909..5f9e5cf 100644 --- a/Runtime/Shading/Materials/Transfers/Vector4PropertyTransfer.cs +++ b/Runtime/Shading/Materials/Transfers/Vector4PropertyTransfer.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Meshes/SphericalParticleMesh.cs b/Runtime/Shading/Meshes/SphericalParticleMesh.cs index c9ad265..d64957b 100644 --- a/Runtime/Shading/Meshes/SphericalParticleMesh.cs +++ b/Runtime/Shading/Meshes/SphericalParticleMesh.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/BoolPropertyName.cs b/Runtime/Shading/Properties/BoolPropertyName.cs index 3fc0ef3..0f9136e 100644 --- a/Runtime/Shading/Properties/BoolPropertyName.cs +++ b/Runtime/Shading/Properties/BoolPropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/ColorPropertyName.cs b/Runtime/Shading/Properties/ColorPropertyName.cs index a4a9221..30ef8c5 100644 --- a/Runtime/Shading/Properties/ColorPropertyName.cs +++ b/Runtime/Shading/Properties/ColorPropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Enums/TextureChannelPropertyName.cs b/Runtime/Shading/Properties/Enums/TextureChannelPropertyName.cs index 85af7fe..055c381 100644 --- a/Runtime/Shading/Properties/Enums/TextureChannelPropertyName.cs +++ b/Runtime/Shading/Properties/Enums/TextureChannelPropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/FloatPropertyName.cs b/Runtime/Shading/Properties/FloatPropertyName.cs index 035007f..23d4349 100644 --- a/Runtime/Shading/Properties/FloatPropertyName.cs +++ b/Runtime/Shading/Properties/FloatPropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/IntPropertyName.cs b/Runtime/Shading/Properties/IntPropertyName.cs index 3deee96..5c5d354 100644 --- a/Runtime/Shading/Properties/IntPropertyName.cs +++ b/Runtime/Shading/Properties/IntPropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/ColorProperty.cs b/Runtime/Shading/Properties/Properties/ColorProperty.cs index e006e73..5705df7 100644 --- a/Runtime/Shading/Properties/Properties/ColorProperty.cs +++ b/Runtime/Shading/Properties/Properties/ColorProperty.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/FloatProperty.cs b/Runtime/Shading/Properties/Properties/FloatProperty.cs index 175b520..4e7ef19 100644 --- a/Runtime/Shading/Properties/Properties/FloatProperty.cs +++ b/Runtime/Shading/Properties/Properties/FloatProperty.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/Sampler2DProperty.cs b/Runtime/Shading/Properties/Properties/Sampler2DProperty.cs index 59f5220..45a8d3a 100644 --- a/Runtime/Shading/Properties/Properties/Sampler2DProperty.cs +++ b/Runtime/Shading/Properties/Properties/Sampler2DProperty.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/SetGlobalVector3PropertyFromNode.cs b/Runtime/Shading/Properties/Properties/SetGlobalVector3PropertyFromNode.cs index 1f12ba6..25c4529 100644 --- a/Runtime/Shading/Properties/Properties/SetGlobalVector3PropertyFromNode.cs +++ b/Runtime/Shading/Properties/Properties/SetGlobalVector3PropertyFromNode.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -21,7 +22,7 @@ namespace Rokojori public Smoothing smoothing; [Export] - public TimeLine timeLine; + public Timeline timeLine; [Export] public Node3D debug; @@ -36,7 +37,7 @@ namespace Rokojori return; } - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var position = Smoothing.Apply( smoothing, node3D.GetPosition( global ), tl.delta ); if ( debug != null ) diff --git a/Runtime/Shading/Properties/Properties/SetVector3PropertyFromNode.cs b/Runtime/Shading/Properties/Properties/SetVector3PropertyFromNode.cs index 075388f..30ce95b 100644 --- a/Runtime/Shading/Properties/Properties/SetVector3PropertyFromNode.cs +++ b/Runtime/Shading/Properties/Properties/SetVector3PropertyFromNode.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/ShaderProperty.cs b/Runtime/Shading/Properties/Properties/ShaderProperty.cs index 04eb469..63e13c8 100644 --- a/Runtime/Shading/Properties/Properties/ShaderProperty.cs +++ b/Runtime/Shading/Properties/Properties/ShaderProperty.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/ShaderPropertyBlock.cs b/Runtime/Shading/Properties/Properties/ShaderPropertyBlock.cs index 6ca3dc7..06c43fa 100644 --- a/Runtime/Shading/Properties/Properties/ShaderPropertyBlock.cs +++ b/Runtime/Shading/Properties/Properties/ShaderPropertyBlock.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/Vector2Property.cs b/Runtime/Shading/Properties/Properties/Vector2Property.cs index 07239db..0962ac4 100644 --- a/Runtime/Shading/Properties/Properties/Vector2Property.cs +++ b/Runtime/Shading/Properties/Properties/Vector2Property.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/Vector3Property.cs b/Runtime/Shading/Properties/Properties/Vector3Property.cs index a9f27e7..5af19ad 100644 --- a/Runtime/Shading/Properties/Properties/Vector3Property.cs +++ b/Runtime/Shading/Properties/Properties/Vector3Property.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Properties/Vector4Property.cs b/Runtime/Shading/Properties/Properties/Vector4Property.cs index 5e5a7d4..0f76921 100644 --- a/Runtime/Shading/Properties/Properties/Vector4Property.cs +++ b/Runtime/Shading/Properties/Properties/Vector4Property.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Sampler2DPropertyName.cs b/Runtime/Shading/Properties/Sampler2DPropertyName.cs index 4690d18..aa863f0 100644 --- a/Runtime/Shading/Properties/Sampler2DPropertyName.cs +++ b/Runtime/Shading/Properties/Sampler2DPropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/ShaderPropertyName.cs b/Runtime/Shading/Properties/ShaderPropertyName.cs index 26a28a1..ab79a10 100644 --- a/Runtime/Shading/Properties/ShaderPropertyName.cs +++ b/Runtime/Shading/Properties/ShaderPropertyName.cs @@ -3,6 +3,7 @@ using System; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public abstract partial class ShaderPropertyName:Resource diff --git a/Runtime/Shading/Properties/Vector2IPropertyName.cs b/Runtime/Shading/Properties/Vector2IPropertyName.cs index f2c42d8..8f6d7f1 100644 --- a/Runtime/Shading/Properties/Vector2IPropertyName.cs +++ b/Runtime/Shading/Properties/Vector2IPropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Vector2PropertyName.cs b/Runtime/Shading/Properties/Vector2PropertyName.cs index 6b5a24b..10e0b9f 100644 --- a/Runtime/Shading/Properties/Vector2PropertyName.cs +++ b/Runtime/Shading/Properties/Vector2PropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Vector3PropertyName.cs b/Runtime/Shading/Properties/Vector3PropertyName.cs index 96bfca2..cd5ddb6 100644 --- a/Runtime/Shading/Properties/Vector3PropertyName.cs +++ b/Runtime/Shading/Properties/Vector3PropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Properties/Vector4PropertyName.cs b/Runtime/Shading/Properties/Vector4PropertyName.cs index 6afd1fd..6e33125 100644 --- a/Runtime/Shading/Properties/Vector4PropertyName.cs +++ b/Runtime/Shading/Properties/Vector4PropertyName.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/ShaderTransformSpace.cs b/Runtime/Shading/ShaderTransformSpace.cs index c0df798..f877f79 100644 --- a/Runtime/Shading/ShaderTransformSpace.cs +++ b/Runtime/Shading/ShaderTransformSpace.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public enum ShaderTransformSpace diff --git a/Runtime/Shading/Shaders/Baking/DilationDrawerMaterial.cs b/Runtime/Shading/Shaders/Baking/DilationDrawerMaterial.cs index 75331a8..364f27d 100644 --- a/Runtime/Shading/Shaders/Baking/DilationDrawerMaterial.cs +++ b/Runtime/Shading/Shaders/Baking/DilationDrawerMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Billboards/QuadBillboard/QuadBillboardMaterial.cs b/Runtime/Shading/Shaders/Billboards/QuadBillboard/QuadBillboardMaterial.cs index 8cba0d1..de0e2a0 100644 --- a/Runtime/Shading/Shaders/Billboards/QuadBillboard/QuadBillboardMaterial.cs +++ b/Runtime/Shading/Shaders/Billboards/QuadBillboard/QuadBillboardMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutlineMaterial.cs b/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutlineMaterial.cs index 45581f8..a59b885 100644 --- a/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutlineMaterial.cs +++ b/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutlineMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlayMaterial.cs b/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlayMaterial.cs index 140ccf9..5f33e8c 100644 --- a/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlayMaterial.cs +++ b/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlayMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Shading/Shaders/Effects/Outline/OutlineMaterial.cs b/Runtime/Shading/Shaders/Effects/Outline/OutlineMaterial.cs index 12b352c..7187b0d 100644 --- a/Runtime/Shading/Shaders/Effects/Outline/OutlineMaterial.cs +++ b/Runtime/Shading/Shaders/Effects/Outline/OutlineMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Effects/Overlay/OverlayMaterial.cs b/Runtime/Shading/Shaders/Effects/Overlay/OverlayMaterial.cs index 5047b44..3705127 100644 --- a/Runtime/Shading/Shaders/Effects/Overlay/OverlayMaterial.cs +++ b/Runtime/Shading/Shaders/Effects/Overlay/OverlayMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradientMaterial.cs b/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradientMaterial.cs index 78636d7..14e6732 100644 --- a/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradientMaterial.cs +++ b/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradientMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlayMaterial.cs b/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlayMaterial.cs index a32b8bf..ee4ab5c 100644 --- a/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlayMaterial.cs +++ b/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlayMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs index a2ba394..5ce8080 100644 --- a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareAddMaterial.cs index 184540c..40baf3c 100644 --- a/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareAddMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareAddMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareMixMaterial.cs index b22de4f..9f0d4f8 100644 --- a/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareMixMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/EllipseFlare/EllipseFlareMixMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs index d94c759..593d415 100644 --- a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs index cdc7a1f..e561dc5 100644 --- a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs index 0ed9e9c..cd6b29a 100644 --- a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs index 4ac103a..c119a53 100644 --- a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs b/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs index 2e66265..c7c8ba9 100644 --- a/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs index 3f11927..717977a 100644 --- a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs index 7abc353..a517dd8 100644 --- a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs index 7b73c91..7f7de63 100644 --- a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs index 08b7fb2..6bc6fed 100644 --- a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs index 0b97aca..084cfa0 100644 --- a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs index 986ae43..df6b2fa 100644 --- a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs index 46beed9..49d30df 100644 --- a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs index f8f6b74..54c8593 100644 --- a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs index 042e25b..e574f7f 100644 --- a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs index 70e32b8..eb16ed0 100644 --- a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs index d023ea7..c190e93 100644 --- a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs index e9a27fe..630fd0a 100644 --- a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Shaders/Shaders.cs b/Runtime/Shading/Shaders/Shaders.cs index 973b695..beb2389 100644 --- a/Runtime/Shading/Shaders/Shaders.cs +++ b/Runtime/Shading/Shaders/Shaders.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { @@ -14,49 +15,49 @@ namespace Rokojori var m = new StandardMaterial3D(); list.AddRange( - Lists.Map( + ListExtensions.Map( ReflectionHelper.GetDataMemberInfos( m ), c => UniformMember.Create( c.Name, Variant.Type.Color ) ) ); list.AddRange( - Lists.Map( + ListExtensions.Map( ReflectionHelper.GetDataMemberInfos( m ), c => UniformMember.Create( c.Name, Variant.Type.Float ) ) ); list.AddRange( - Lists.Map( + ListExtensions.Map( ReflectionHelper.GetDataMemberInfos( m ), c => UniformMember.Create( c.Name, Variant.Type.Bool ) ) ); list.AddRange( - Lists.Map( + ListExtensions.Map( ReflectionHelper.GetDataMemberInfos( m ), c => UniformMember.Create( c.Name, Variant.Type.Vector2 ) ) ); list.AddRange( - Lists.Map( + ListExtensions.Map( ReflectionHelper.GetDataMemberInfos( m ), c => UniformMember.Create( c.Name, Variant.Type.Vector3 ) ) ); list.AddRange( - Lists.Map( + ListExtensions.Map( ReflectionHelper.GetDataMemberInfos( m ), c => UniformMember.Create( c.Name, Variant.Type.Vector4 ) ) ); list.AddRange( - Lists.Map( + ListExtensions.Map( ReflectionHelper.GetDataMemberInfos( m ), c => UniformMember.Create( c.Name, Variant.Type.Color ) ) diff --git a/Runtime/Shading/Shaders/UniformMember.cs b/Runtime/Shading/Shaders/UniformMember.cs index 8bf78e3..c21ca52 100644 --- a/Runtime/Shading/Shaders/UniformMember.cs +++ b/Runtime/Shading/Shaders/UniformMember.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using Microsoft.VisualBasic; +using Rokojori.Extensions; namespace Rokojori { public class UniformMember diff --git a/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipeMaterial.cs b/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipeMaterial.cs index 9a13851..c0f8467 100644 --- a/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipeMaterial.cs +++ b/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipeMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs index d2d1e43..e8bd852 100644 --- a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -307,11 +308,11 @@ namespace Rokojori variables[ CSShaderClassGenerator.ShaderResourcePath ] = resourcePath; variables[ CSShaderClassGenerator.BaseOnly ] = baseOnly ? "" : "//"; - variables[ CSShaderClassGenerator.ShaderStaticPropertyNames ] = Lists.Join( staticProps, "\n " ); - variables[ CSShaderClassGenerator.ShaderInstancePropertiesDeclarations ] = Lists.Join( instanceProps, "\n " ); - variables[ CSShaderClassGenerator.ShaderInstancePropertiesInitializers ] = Lists.Join( instanceInitializers, "\n " ); + variables[ CSShaderClassGenerator.ShaderStaticPropertyNames ] = ListExtensions.Join( staticProps, "\n " ); + variables[ CSShaderClassGenerator.ShaderInstancePropertiesDeclarations ] = ListExtensions.Join( instanceProps, "\n " ); + variables[ CSShaderClassGenerator.ShaderInstancePropertiesInitializers ] = ListExtensions.Join( instanceInitializers, "\n " ); - variables[ CSShaderClassGenerator.MaterialPresets ] = Lists.Join( presets, "\n " ); + variables[ CSShaderClassGenerator.MaterialPresets ] = ListExtensions.Join( presets, "\n " ); var shaderClass = variables.ReplaceAll( template ); diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt index 261ea43..60756e6 100644 --- a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs index a08e5de..f47134d 100644 --- a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs index 76736dc..419d1e9 100644 --- a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs @@ -3,6 +3,7 @@ using System.Reflection; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs index 92d08a8..45eca35 100644 --- a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs @@ -2,6 +2,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Sorting/MinMaxSearch.cs b/Runtime/Sorting/MinMaxSearch.cs index fbe8e08..7a9864d 100644 --- a/Runtime/Sorting/MinMaxSearch.cs +++ b/Runtime/Sorting/MinMaxSearch.cs @@ -5,6 +5,7 @@ using System.Reflection; using System.Text.RegularExpressions; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class MinMaxSearch diff --git a/Runtime/Sorting/MultiValueSorter.cs b/Runtime/Sorting/MultiValueSorter.cs index e600594..44b0833 100644 --- a/Runtime/Sorting/MultiValueSorter.cs +++ b/Runtime/Sorting/MultiValueSorter.cs @@ -4,6 +4,7 @@ using System; using System.Reflection; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Sorting/ValueSorter.cs b/Runtime/Sorting/ValueSorter.cs index 55bf6b3..cb8db9d 100644 --- a/Runtime/Sorting/ValueSorter.cs +++ b/Runtime/Sorting/ValueSorter.cs @@ -4,6 +4,7 @@ using System; using System.Reflection; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class ValueSorter diff --git a/Runtime/Structures/Map.cs b/Runtime/Structures/Map.cs index f661e2d..c318222 100644 --- a/Runtime/Structures/Map.cs +++ b/Runtime/Structures/Map.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Map : Dictionary diff --git a/Runtime/Structures/MapList.cs b/Runtime/Structures/MapList.cs index 82a5309..86b0def 100644 --- a/Runtime/Structures/MapList.cs +++ b/Runtime/Structures/MapList.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class MapList:Map> diff --git a/Runtime/Structures/MultiMap.cs b/Runtime/Structures/MultiMap.cs index fdaabd4..439afc9 100644 --- a/Runtime/Structures/MultiMap.cs +++ b/Runtime/Structures/MultiMap.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class MultiMap:Map> diff --git a/Runtime/Structures/MultiMap3.cs b/Runtime/Structures/MultiMap3.cs index 21fc611..e45845f 100644 --- a/Runtime/Structures/MultiMap3.cs +++ b/Runtime/Structures/MultiMap3.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class MultiMap:Map>> diff --git a/Runtime/Structures/QueueList.cs b/Runtime/Structures/QueueList.cs index 97cd391..65b727c 100644 --- a/Runtime/Structures/QueueList.cs +++ b/Runtime/Structures/QueueList.cs @@ -1,10 +1,12 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { - public class QueueList:List + public class QueueList { + List _data = new List(); List _queuedInsertions = new List(); List _queuedRemovals = new List(); @@ -23,7 +25,7 @@ namespace Rokojori ResolveRemovalsQueue(); ResolveInsertionQueue(); - this.ForEach( t => callback( t ) ); + _data.ForEach( t => callback( t ) ); ResolveRemovalsQueue(); } @@ -35,7 +37,7 @@ namespace Rokojori return; } - AddRange( _queuedInsertions ); + _data.AddRange( _queuedInsertions ); _queuedInsertions.Clear(); } @@ -46,7 +48,7 @@ namespace Rokojori return; } - Lists.RemoveList( this, _queuedRemovals ); + ListExtensions.RemoveList( _data, _queuedRemovals ); _queuedRemovals.Clear(); } diff --git a/Runtime/Structures/Spatial/Grid2D/Grid2D.cs b/Runtime/Structures/Spatial/Grid2D/Grid2D.cs index 9e1a906..e550993 100644 --- a/Runtime/Structures/Spatial/Grid2D/Grid2D.cs +++ b/Runtime/Structures/Spatial/Grid2D/Grid2D.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Grid2D diff --git a/Runtime/Structures/Spatial/OcTree/OcTree.cs b/Runtime/Structures/Spatial/OcTree/OcTree.cs index 29ff35f..60d169f 100644 --- a/Runtime/Structures/Spatial/OcTree/OcTree.cs +++ b/Runtime/Structures/Spatial/OcTree/OcTree.cs @@ -6,6 +6,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public class OcTree:OcTreeNode @@ -270,7 +271,7 @@ namespace Rokojori public OcTreeCell GetRootCellByRootIndex( Vector3I rootCellIndex ) { - var rootCellFlatIndex = MathX.MultiIndexToFlatIndex( rootCellIndex, _rootCellDimensions ); + var rootCellFlatIndex = MathX.XYZIndexToFlatIndex( rootCellIndex, _rootCellDimensions ); if ( rootCellFlatIndex < 0 || rootCellFlatIndex >= _rootCells.Count ) { diff --git a/Runtime/Structures/Spatial/OcTree/OcTreeCell.cs b/Runtime/Structures/Spatial/OcTree/OcTreeCell.cs index e788916..3021ab8 100644 --- a/Runtime/Structures/Spatial/OcTree/OcTreeCell.cs +++ b/Runtime/Structures/Spatial/OcTree/OcTreeCell.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class OcTreeCell:OcTreeNode diff --git a/Runtime/Structures/Spatial/OcTree/OcTreeNode.cs b/Runtime/Structures/Spatial/OcTree/OcTreeNode.cs index 9158436..584e03b 100644 --- a/Runtime/Structures/Spatial/OcTree/OcTreeNode.cs +++ b/Runtime/Structures/Spatial/OcTree/OcTreeNode.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class OcTreeNode diff --git a/Runtime/Structures/Spatial/OcTree/OcTreeWalker.cs b/Runtime/Structures/Spatial/OcTree/OcTreeWalker.cs index 6370383..37cfd1b 100644 --- a/Runtime/Structures/Spatial/OcTree/OcTreeWalker.cs +++ b/Runtime/Structures/Spatial/OcTree/OcTreeWalker.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class OcTreeWalker:TreeWalker> diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTree.cs b/Runtime/Structures/Spatial/QuadTree/QuadTree.cs index 46166d4..445311d 100644 --- a/Runtime/Structures/Spatial/QuadTree/QuadTree.cs +++ b/Runtime/Structures/Spatial/QuadTree/QuadTree.cs @@ -6,6 +6,7 @@ using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public class QuadTree:QuadTreeNode @@ -268,7 +269,7 @@ namespace Rokojori public QuadTreeCell GetRootCellByRootIndex( Vector2I rootCellIndex ) { - var rootCellFlatIndex = MathX.MultiIndexToFlatIndex( rootCellIndex, _rootCellDimensions ); + var rootCellFlatIndex = MathX.XYIndexToFlatIndex( rootCellIndex, _rootCellDimensions ); if ( rootCellFlatIndex < 0 || rootCellFlatIndex >= _rootCells.Count ) { diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs b/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs index f6e2a0a..dd006ef 100644 --- a/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class QuadTreeCell:QuadTreeNode diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs b/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs index 9548654..5041f31 100644 --- a/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class QuadTreeNode diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs b/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs index 3e4d349..c26cbf7 100644 --- a/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs @@ -5,6 +5,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class QuadTreeWalker:TreeWalker> diff --git a/Runtime/Structures/Spatial/Voronoi/Voronoi2D.cs b/Runtime/Structures/Spatial/Voronoi/Voronoi2D.cs index ebb3e60..f6dd4c1 100644 --- a/Runtime/Structures/Spatial/Voronoi/Voronoi2D.cs +++ b/Runtime/Structures/Spatial/Voronoi/Voronoi2D.cs @@ -10,6 +10,7 @@ using TriangleNet.Meshing; using TriangleNet.Voronoi; using TriangleNet.Topology.DCEL; +using Rokojori.Extensions; namespace Rokojori { public class Voronoi2D diff --git a/Runtime/Testing/CheckTransforms.cs b/Runtime/Testing/CheckTransforms.cs index 3110e71..9583601 100644 --- a/Runtime/Testing/CheckTransforms.cs +++ b/Runtime/Testing/CheckTransforms.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; using System.Reflection; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Testing/CheckWarnings.cs b/Runtime/Testing/CheckWarnings.cs index f21579e..8ce84de 100644 --- a/Runtime/Testing/CheckWarnings.cs +++ b/Runtime/Testing/CheckWarnings.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; using System.Reflection; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Testing/DebugAction.cs b/Runtime/Testing/DebugAction.cs index ae2445d..3a863b1 100644 --- a/Runtime/Testing/DebugAction.cs +++ b/Runtime/Testing/DebugAction.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; using System.Reflection; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Testing/DebugMessage.cs b/Runtime/Testing/DebugMessage.cs index 849a1d2..340e043 100644 --- a/Runtime/Testing/DebugMessage.cs +++ b/Runtime/Testing/DebugMessage.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; using System.Reflection; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Testing/GDScriptExportTest.cs b/Runtime/Testing/GDScriptExportTest.cs index 2801f34..7a3430a 100644 --- a/Runtime/Testing/GDScriptExportTest.cs +++ b/Runtime/Testing/GDScriptExportTest.cs @@ -3,6 +3,7 @@ using Godot; using System.Collections.Generic; using System.IO; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -11,41 +12,41 @@ namespace Rokojori; public partial class GDScriptExportTest : NetworkNode { - public static void OtherTest() - { - var lockable = new object(); + // public static void OtherTest() + // { + // var lockable = new object(); - lock ( lockable ) - { - if ( lockable != null ) - { - GD.Print(); - } - else - { - throw new System.Exception( "Some Error" ); - } - } + // lock ( lockable ) + // { + // if ( lockable != null ) + // { + // GD.Print(); + // } + // else + // { + // throw new System.Exception( "Some Error" ); + // } + // } - var path = ""; - var data = ""; + // var path = ""; + // var data = ""; - try - { - StreamWriter streamWriter = File.CreateText( path ); + // try + // { + // StreamWriter streamWriter = File.CreateText( path ); - streamWriter.Write( data ); + // streamWriter.Write( data ); - streamWriter.Dispose(); - } - catch ( System.Exception e ) - { - RJLog.Log( "Could not save text: ", path, "exception", e ); + // streamWriter.Dispose(); + // } + // catch ( System.Exception e ) + // { + // RJLog.Log( "Could not save text: ", path, "exception", e ); - } + // } - } + // } public static void SwitchTest() { diff --git a/Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs b/Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs new file mode 100644 index 0000000..6de381f --- /dev/null +++ b/Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs @@ -0,0 +1,21 @@ +using Godot; + +using System.Collections.Generic; +using System; +using System.Threading.Tasks; +using System.Reflection; + +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +[Tool] +public partial class FindUniqueTest:Action +{ + protected override void _OnTrigger() + { + var node = Unique.Get(); + + RJLog.Log( node.GetPath() ); + } +} diff --git a/Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs.uid b/Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs.uid new file mode 100644 index 0000000..eb4abe1 --- /dev/null +++ b/Runtime/Testing/RokojoriActionCore/FindUniqueTestObject.cs.uid @@ -0,0 +1 @@ +uid://bm003ajepjgi2 diff --git a/Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs b/Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs new file mode 100644 index 0000000..e0c4eab --- /dev/null +++ b/Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs @@ -0,0 +1,16 @@ +using Godot; + +using System.Collections.Generic; +using System; +using System.Threading.Tasks; +using System.Reflection; + +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +[Tool] +public partial class UniqueTestObject:Node +{ + +} diff --git a/Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs.uid b/Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs.uid new file mode 100644 index 0000000..29e950e --- /dev/null +++ b/Runtime/Testing/RokojoriActionCore/UniqueTestObject.cs.uid @@ -0,0 +1 @@ +uid://bvxiemk7m6bad diff --git a/Runtime/Text/JSON/JSON.cs b/Runtime/Text/JSON/JSON.cs index 348ec57..55e5ac2 100644 --- a/Runtime/Text/JSON/JSON.cs +++ b/Runtime/Text/JSON/JSON.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Text/JSON/JSONArray.cs b/Runtime/Text/JSON/JSONArray.cs index 03c27f8..969d969 100644 --- a/Runtime/Text/JSON/JSONArray.cs +++ b/Runtime/Text/JSON/JSONArray.cs @@ -6,6 +6,7 @@ using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class JSONArray:JSONData @@ -67,7 +68,7 @@ namespace Rokojori public JSONData Pop() { - return Lists.PopLast( _values ); + return ListExtensions.PopLast( _values ); } public override string Stringify( StringifyOptions options ) diff --git a/Runtime/Text/JSON/JSONData.cs b/Runtime/Text/JSON/JSONData.cs index f9bf513..33e9939 100644 --- a/Runtime/Text/JSON/JSONData.cs +++ b/Runtime/Text/JSON/JSONData.cs @@ -6,6 +6,7 @@ using System.Text; +using Rokojori.Extensions; namespace Rokojori { public enum JSONDataType diff --git a/Runtime/Text/JSON/JSONLexer.cs b/Runtime/Text/JSON/JSONLexer.cs index d49149d..58d58c0 100644 --- a/Runtime/Text/JSON/JSONLexer.cs +++ b/Runtime/Text/JSON/JSONLexer.cs @@ -6,6 +6,7 @@ using System.Text; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Text/JSON/JSONObject.cs b/Runtime/Text/JSON/JSONObject.cs index d1f60a6..1bcd5fe 100644 --- a/Runtime/Text/JSON/JSONObject.cs +++ b/Runtime/Text/JSON/JSONObject.cs @@ -10,6 +10,7 @@ using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class JSONObject:JSONData diff --git a/Runtime/Text/JSON/JSONParser.cs b/Runtime/Text/JSON/JSONParser.cs index 78273f2..214d0d8 100644 --- a/Runtime/Text/JSON/JSONParser.cs +++ b/Runtime/Text/JSON/JSONParser.cs @@ -7,6 +7,7 @@ using System.Text; using Godot; +using Rokojori.Extensions; namespace Rokojori { using LexerType = JSONLexerEventType; @@ -146,8 +147,8 @@ namespace Rokojori case LexerType.ARRAY_END: case LexerType.OBJECT_END: { - Lists.PopLast( stack ); - current = Lists.GetLast( stack ); + ListExtensions.PopLast( stack ); + current = ListExtensions.GetLast( stack ); if ( current is JSONArray ) { diff --git a/Runtime/Text/JSON/JSONStringConverter.cs b/Runtime/Text/JSON/JSONStringConverter.cs index 5b89822..4064f75 100644 --- a/Runtime/Text/JSON/JSONStringConverter.cs +++ b/Runtime/Text/JSON/JSONStringConverter.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { public class JSONStringConverter @@ -211,5 +212,13 @@ namespace Rokojori } + public static string ExportString( string _stringValue ) + { + var output = new StringBuilder(); + Write( output, _stringValue, 0, _stringValue.Length ); + return output.ToString(); + } + + } } \ No newline at end of file diff --git a/Runtime/Text/JSON/JSONValue.cs b/Runtime/Text/JSON/JSONValue.cs index 7143273..ec9d32f 100644 --- a/Runtime/Text/JSON/JSONValue.cs +++ b/Runtime/Text/JSON/JSONValue.cs @@ -5,6 +5,7 @@ using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class JSONValue:JSONData diff --git a/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs b/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs index 8d5dc1a..be5d5df 100644 --- a/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs +++ b/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs @@ -8,6 +8,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class BigIntegerSerializer: CustomSerializer diff --git a/Runtime/Text/JSON/Serializers/ColorSerializer.cs b/Runtime/Text/JSON/Serializers/ColorSerializer.cs index edb8b81..6a3df97 100644 --- a/Runtime/Text/JSON/Serializers/ColorSerializer.cs +++ b/Runtime/Text/JSON/Serializers/ColorSerializer.cs @@ -11,6 +11,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { public class ColorSerializer: CustomSerializer diff --git a/Runtime/Text/JSON/Serializers/CustomSerializer.cs b/Runtime/Text/JSON/Serializers/CustomSerializer.cs index f34f1c9..3f65e9f 100644 --- a/Runtime/Text/JSON/Serializers/CustomSerializer.cs +++ b/Runtime/Text/JSON/Serializers/CustomSerializer.cs @@ -7,6 +7,7 @@ using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public abstract class CustomSerializer diff --git a/Runtime/Text/JSON/Serializers/DateTimeSerializer.cs b/Runtime/Text/JSON/Serializers/DateTimeSerializer.cs index 2dceff5..65c3fb3 100644 --- a/Runtime/Text/JSON/Serializers/DateTimeSerializer.cs +++ b/Runtime/Text/JSON/Serializers/DateTimeSerializer.cs @@ -9,6 +9,7 @@ using System; +using Rokojori.Extensions; namespace Rokojori { public class DateTimeSerializer: CustomSerializer diff --git a/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs b/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs index 762dadd..1401def 100644 --- a/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs +++ b/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs @@ -1,6 +1,7 @@ +using Rokojori.Extensions; namespace Rokojori { public class JSONAlwaysProcessable: System.Attribute diff --git a/Runtime/Text/JSON/Serializers/JSONDeserializer.cs b/Runtime/Text/JSON/Serializers/JSONDeserializer.cs index 1a51c7d..3c2fc2a 100644 --- a/Runtime/Text/JSON/Serializers/JSONDeserializer.cs +++ b/Runtime/Text/JSON/Serializers/JSONDeserializer.cs @@ -9,6 +9,7 @@ using System; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public class JSONDeserializer diff --git a/Runtime/Text/JSON/Serializers/JSONSerializer.cs b/Runtime/Text/JSON/Serializers/JSONSerializer.cs index a9b5687..80390ec 100644 --- a/Runtime/Text/JSON/Serializers/JSONSerializer.cs +++ b/Runtime/Text/JSON/Serializers/JSONSerializer.cs @@ -8,6 +8,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { public class JSONSerializer diff --git a/Runtime/Text/JSON/Serializers/JSONSerializiationSettings.cs b/Runtime/Text/JSON/Serializers/JSONSerializiationSettings.cs index 4cf67c1..48bc4c9 100644 --- a/Runtime/Text/JSON/Serializers/JSONSerializiationSettings.cs +++ b/Runtime/Text/JSON/Serializers/JSONSerializiationSettings.cs @@ -8,6 +8,7 @@ using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public class JSONSerializationSettings diff --git a/Runtime/Text/JSON/Serializers/Reference.cs b/Runtime/Text/JSON/Serializers/Reference.cs index ef10861..ad46aa5 100644 --- a/Runtime/Text/JSON/Serializers/Reference.cs +++ b/Runtime/Text/JSON/Serializers/Reference.cs @@ -7,6 +7,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public enum ReferenceType diff --git a/Runtime/Text/Levenshtein.cs b/Runtime/Text/Levenshtein.cs new file mode 100644 index 0000000..6dfb303 --- /dev/null +++ b/Runtime/Text/Levenshtein.cs @@ -0,0 +1,101 @@ +using Godot; + +using Rokojori.Extensions; +namespace Rokojori; + +public class LevenshteinFuzzyMatch +{ + public int lowestDistance; + public int index; +} + +public class LevenshteinDistance +{ + protected static int[,] GetMatrix( int aLength, int bLength ) + { + var matrix = new int[ aLength + 1, bLength + 1]; + + + for ( var i = 0; i <= aLength; i++ ) + { + matrix[ i, 0 ] = i; + } + + for ( var j = 0; j <= bLength; j++ ) + { + matrix[ 0, j ] = j; + } + + return matrix; + } + + public static LevenshteinFuzzyMatch ComputeFuzzyMatch( string value, string matcher ) + { + var result = new LevenshteinFuzzyMatch(); + + if ( matcher.Length >= value.Length ) + { + result.index = 0; + result.lowestDistance = LevenshteinDistance.Compute( value, matcher ); + + } + else + { + var offsets = value.Length - matcher.Length; + + for ( var i = 0; i < offsets; i++ ) + { + var subValue = value.Substring( i, matcher.Length ); + var distance = LevenshteinDistance.Compute( subValue, matcher ); + + if ( i == 0 ) + { + result.index = 0; + result.lowestDistance = distance; + continue; + } + + if ( distance < result.lowestDistance ) + { + result.index = i; + result.lowestDistance = distance; + } + + } + } + + + return result; + } + + + public static int Compute( string a, string b ) + { + var aLength = a.Length; + var bLength = b.Length; + + if ( aLength == 0 ) { return bLength; } + if ( bLength == 0 ) { return aLength; } + + var evaluationMatrix = LevenshteinDistance.GetMatrix( aLength, bLength ); + + for ( var i = 1; i <= aLength; i++ ) + { + for ( var j = 1; j <= bLength; j++ ) + { + var isSame = b[ j - 1 ] == a[ i - 1 ]; + + var isDifferentCost = isSame ? 0 : 1; + + var insertionCost = evaluationMatrix[ i - 1, j ] + 1; + var deletionCost = evaluationMatrix[ i , j - 1 ] + 1; + var substitutionCost = evaluationMatrix[ i - 1, j - 1 ] + isDifferentCost; + + evaluationMatrix[ i , j ] = Mathf.Min( Mathf.Min( insertionCost, deletionCost ), substitutionCost ); + } + } + + return evaluationMatrix[ aLength, bLength ]; + } +} + diff --git a/Runtime/Text/Levenshtein.cs.uid b/Runtime/Text/Levenshtein.cs.uid new file mode 100644 index 0000000..c577871 --- /dev/null +++ b/Runtime/Text/Levenshtein.cs.uid @@ -0,0 +1 @@ +uid://djhpxgms7ftki diff --git a/Runtime/Text/Lexing/Lexer.cs b/Runtime/Text/Lexing/Lexer.cs index eff29e6..a4927b3 100644 --- a/Runtime/Text/Lexing/Lexer.cs +++ b/Runtime/Text/Lexing/Lexer.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class Lexer diff --git a/Runtime/Text/Lexing/LexerEvent.cs b/Runtime/Text/Lexing/LexerEvent.cs index c169f4e..97e4883 100644 --- a/Runtime/Text/Lexing/LexerEvent.cs +++ b/Runtime/Text/Lexing/LexerEvent.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class LexerEvent diff --git a/Runtime/Text/Lexing/LexerLibrary/CSLexer.cs b/Runtime/Text/Lexing/LexerLibrary/CSLexer.cs index e051c33..fea4e2c 100644 --- a/Runtime/Text/Lexing/LexerLibrary/CSLexer.cs +++ b/Runtime/Text/Lexing/LexerLibrary/CSLexer.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class CSharpObjectDefinition diff --git a/Runtime/Text/Lexing/LexerLibrary/GDShaderLexer.cs b/Runtime/Text/Lexing/LexerLibrary/GDShaderLexer.cs index b74f13c..d87aa3d 100644 --- a/Runtime/Text/Lexing/LexerLibrary/GDShaderLexer.cs +++ b/Runtime/Text/Lexing/LexerLibrary/GDShaderLexer.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class GDShaderLexer:Lexer diff --git a/Runtime/Text/Lexing/LexerLibrary/UIExpressionLexer.cs b/Runtime/Text/Lexing/LexerLibrary/UIExpressionLexer.cs index 19e2261..0a9558a 100644 --- a/Runtime/Text/Lexing/LexerLibrary/UIExpressionLexer.cs +++ b/Runtime/Text/Lexing/LexerLibrary/UIExpressionLexer.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/Text/Lexing/LexerLibrary/WordLexer.cs b/Runtime/Text/Lexing/LexerLibrary/WordLexer.cs index f446486..a024312 100644 --- a/Runtime/Text/Lexing/LexerLibrary/WordLexer.cs +++ b/Runtime/Text/Lexing/LexerLibrary/WordLexer.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class WordLexer:Lexer diff --git a/Runtime/Text/Lexing/LexerLibrary/XMLLexer.cs b/Runtime/Text/Lexing/LexerLibrary/XMLLexer.cs index 8569344..3d011bc 100644 --- a/Runtime/Text/Lexing/LexerLibrary/XMLLexer.cs +++ b/Runtime/Text/Lexing/LexerLibrary/XMLLexer.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLLexer:Lexer diff --git a/Runtime/Text/Lexing/LexerLibrary/XMLRegexExtension.cs b/Runtime/Text/Lexing/LexerLibrary/XMLRegexExtension.cs index 3d03e4a..eda2cfe 100644 --- a/Runtime/Text/Lexing/LexerLibrary/XMLRegexExtension.cs +++ b/Runtime/Text/Lexing/LexerLibrary/XMLRegexExtension.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class XMLRegexExtensions diff --git a/Runtime/Text/Lexing/LexerList.cs b/Runtime/Text/Lexing/LexerList.cs index c979039..e1f3409 100644 --- a/Runtime/Text/Lexing/LexerList.cs +++ b/Runtime/Text/Lexing/LexerList.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class LexerList diff --git a/Runtime/Text/Lexing/LexerMatcher.cs b/Runtime/Text/Lexing/LexerMatcher.cs index 1c951dc..33420fb 100644 --- a/Runtime/Text/Lexing/LexerMatcher.cs +++ b/Runtime/Text/Lexing/LexerMatcher.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class LexerMatcher diff --git a/Runtime/Text/Lexing/LexerMatcherLibrary.cs b/Runtime/Text/Lexing/LexerMatcherLibrary.cs index 238e4a0..af20e69 100644 --- a/Runtime/Text/Lexing/LexerMatcherLibrary.cs +++ b/Runtime/Text/Lexing/LexerMatcherLibrary.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class LexerMatcherLibrary diff --git a/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs b/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs index 1135676..8a41e51 100644 --- a/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs +++ b/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public abstract class LexerEventSelector diff --git a/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs b/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs index 1b0c039..1db3316 100644 --- a/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs +++ b/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class SelectsAnyType:LexerEventSelector diff --git a/Runtime/Text/Lexing/Selectors/SelectsMatch.cs b/Runtime/Text/Lexing/Selectors/SelectsMatch.cs index eb6813e..46371d8 100644 --- a/Runtime/Text/Lexing/Selectors/SelectsMatch.cs +++ b/Runtime/Text/Lexing/Selectors/SelectsMatch.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class SelectsMatch:LexerEventSelector diff --git a/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs b/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs index e13c8fe..2f01967 100644 --- a/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs +++ b/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class SelectsMatchType:LexerEventSelector diff --git a/Runtime/Text/Lexing/Selectors/SelectsType.cs b/Runtime/Text/Lexing/Selectors/SelectsType.cs index cbc5ade..a2f7b45 100644 --- a/Runtime/Text/Lexing/Selectors/SelectsType.cs +++ b/Runtime/Text/Lexing/Selectors/SelectsType.cs @@ -4,6 +4,7 @@ using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class SelectsType:LexerEventSelector diff --git a/Runtime/Text/Parsing/AST/ASTFileRoot.cs b/Runtime/Text/Parsing/AST/ASTFileRoot.cs index 59bc54c..6fa8d99 100644 --- a/Runtime/Text/Parsing/AST/ASTFileRoot.cs +++ b/Runtime/Text/Parsing/AST/ASTFileRoot.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface ASTFileRoot diff --git a/Runtime/Text/Parsing/AST/ASTNode.cs b/Runtime/Text/Parsing/AST/ASTNode.cs index 0f77ca9..5e6cdfa 100644 --- a/Runtime/Text/Parsing/AST/ASTNode.cs +++ b/Runtime/Text/Parsing/AST/ASTNode.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public abstract class ASTNode diff --git a/Runtime/Text/Parsing/AST/ASTNodeList.cs b/Runtime/Text/Parsing/AST/ASTNodeList.cs index b27d055..ac2e9b7 100644 --- a/Runtime/Text/Parsing/AST/ASTNodeList.cs +++ b/Runtime/Text/Parsing/AST/ASTNodeList.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/AST/ASTWalker.cs b/Runtime/Text/Parsing/AST/ASTWalker.cs index 62b3849..2f533d4 100644 --- a/Runtime/Text/Parsing/AST/ASTWalker.cs +++ b/Runtime/Text/Parsing/AST/ASTWalker.cs @@ -8,6 +8,7 @@ using Godot; using System; using System.Reflection; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewAttribute.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewAttribute.cs index e3eaf2a..5ee1c8a 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewAttribute.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewAttribute.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewAttribute.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewBracketToken.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewBracketToken.cs index e89ad64..2871f1d 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewBracketToken.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewBracketToken.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewBracketToken.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewConstantToken.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewConstantToken.cs index b60c2ce..bf32275 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewConstantToken.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewConstantToken.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewConstantToken.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewContext.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewContext.cs index 9c4e0e0..d4b8522 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewContext.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewContext.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewContext.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewElement.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewElement.cs index 92cb11c..91e5bca 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewElement.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewElement.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewElement.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewExpression.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewExpression.cs index 2e387ee..bc42830 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewExpression.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewExpression.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewExpression.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewIgnoreToken.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewIgnoreToken.cs index d7d2893..d636f21 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewIgnoreToken.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewIgnoreToken.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewIgnoreToken.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewLogicToken.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewLogicToken.cs index 4acb16d..f114816 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewLogicToken.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewLogicToken.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewLogicToken.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewMember.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewMember.cs index bf80458..9ef345d 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewMember.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewMember.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewMember.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewNode.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewNode.cs index 08dcd6d..80a8268 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewNode.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewNode.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewNodeReference.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewNodeReference.cs index 89f3136..63c41f5 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewNodeReference.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewNodeReference.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewObject.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewObject.cs index 7381c62..93cf6e9 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewObject.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewObject.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewObject.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewOperatorToken.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewOperatorToken.cs index 2343bdd..631a1a3 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewOperatorToken.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewOperatorToken.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewOperatorToken.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewRoot.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewRoot.cs index a2a8ea8..f0b7a81 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewRoot.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewRoot.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewRoot.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewStatement.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewStatement.cs index 4cd6fee..0b05c9a 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewStatement.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewStatement.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewStatement.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewToken.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewToken.cs index 6cf4d0e..f0e1c8c 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewToken.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewToken.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewToken.svg")] diff --git a/Runtime/Text/Parsing/AST/Debug/ASTViewWordToken.cs b/Runtime/Text/Parsing/AST/Debug/ASTViewWordToken.cs index aa48aeb..3ee0e30 100644 --- a/Runtime/Text/Parsing/AST/Debug/ASTViewWordToken.cs +++ b/Runtime/Text/Parsing/AST/Debug/ASTViewWordToken.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool, Icon("res://addons/rokojori_action_library/Icons/ASTViewWordToken.svg")] diff --git a/Runtime/Text/Parsing/AST/EnumValueDeclaration.cs b/Runtime/Text/Parsing/AST/EnumValueDeclaration.cs index 55111d9..f70e05c 100644 --- a/Runtime/Text/Parsing/AST/EnumValueDeclaration.cs +++ b/Runtime/Text/Parsing/AST/EnumValueDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface EnumValueDeclaration diff --git a/Runtime/Text/Parsing/AST/ImportDeclaration.cs b/Runtime/Text/Parsing/AST/ImportDeclaration.cs index 31d3795..8db70d6 100644 --- a/Runtime/Text/Parsing/AST/ImportDeclaration.cs +++ b/Runtime/Text/Parsing/AST/ImportDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface ImportDeclaration diff --git a/Runtime/Text/Parsing/AST/Matchers/ASTMatchResult.cs b/Runtime/Text/Parsing/AST/Matchers/ASTMatchResult.cs index 05b552f..0b09da0 100644 --- a/Runtime/Text/Parsing/AST/Matchers/ASTMatchResult.cs +++ b/Runtime/Text/Parsing/AST/Matchers/ASTMatchResult.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class ASTMatchResult diff --git a/Runtime/Text/Parsing/AST/Matchers/ASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/ASTMatcher.cs index 5ef5477..1ac749a 100644 --- a/Runtime/Text/Parsing/AST/Matchers/ASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/ASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public abstract class ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/BracketBlockASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/BracketBlockASTMatcher.cs index 98913c3..7a98a09 100644 --- a/Runtime/Text/Parsing/AST/Matchers/BracketBlockASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/BracketBlockASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class BracketBlockMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/CombinedASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/CombinedASTMatcher.cs index 382c62c..9fd94a5 100644 --- a/Runtime/Text/Parsing/AST/Matchers/CombinedASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/CombinedASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class CombinedASTMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/LambdaASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/LambdaASTMatcher.cs index d49d7d5..fabdf69 100644 --- a/Runtime/Text/Parsing/AST/Matchers/LambdaASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/LambdaASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class LambdaASTMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/MultiTriggerASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/MultiTriggerASTMatcher.cs index 76a202a..b839ba0 100644 --- a/Runtime/Text/Parsing/AST/Matchers/MultiTriggerASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/MultiTriggerASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class MultiTriggerASTMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/NotIgnoreNodeMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/NotIgnoreNodeMatcher.cs index a608527..bc88a8e 100644 --- a/Runtime/Text/Parsing/AST/Matchers/NotIgnoreNodeMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/NotIgnoreNodeMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class NotIgnoreNodeMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/TokenMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/TokenMatcher.cs index 0e98594..41e904b 100644 --- a/Runtime/Text/Parsing/AST/Matchers/TokenMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/TokenMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class TokenMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/TokenRepeatSequenceASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/TokenRepeatSequenceASTMatcher.cs index cd79060..82a002a 100644 --- a/Runtime/Text/Parsing/AST/Matchers/TokenRepeatSequenceASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/TokenRepeatSequenceASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class TokenRepeatSequenceASTMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/TokenSequenceASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/TokenSequenceASTMatcher.cs index cae87d3..75ea0ae 100644 --- a/Runtime/Text/Parsing/AST/Matchers/TokenSequenceASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/TokenSequenceASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class TokenSequenceASTMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/Matchers/TokenWordASTMatcher.cs b/Runtime/Text/Parsing/AST/Matchers/TokenWordASTMatcher.cs index 96482c2..e614357 100644 --- a/Runtime/Text/Parsing/AST/Matchers/TokenWordASTMatcher.cs +++ b/Runtime/Text/Parsing/AST/Matchers/TokenWordASTMatcher.cs @@ -7,6 +7,7 @@ using System.Globalization; using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; public class TokenWordASTMatcher:ASTMatcher diff --git a/Runtime/Text/Parsing/AST/MemberDeclaration.cs b/Runtime/Text/Parsing/AST/MemberDeclaration.cs index 8e58b10..38fd896 100644 --- a/Runtime/Text/Parsing/AST/MemberDeclaration.cs +++ b/Runtime/Text/Parsing/AST/MemberDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface MemberDeclaration diff --git a/Runtime/Text/Parsing/AST/NamespaceBlock.cs b/Runtime/Text/Parsing/AST/NamespaceBlock.cs index 61eb999..bbb27f1 100644 --- a/Runtime/Text/Parsing/AST/NamespaceBlock.cs +++ b/Runtime/Text/Parsing/AST/NamespaceBlock.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface NamespaceBlock diff --git a/Runtime/Text/Parsing/AST/NamespaceDeclaration.cs b/Runtime/Text/Parsing/AST/NamespaceDeclaration.cs index 6b5564a..7ac095f 100644 --- a/Runtime/Text/Parsing/AST/NamespaceDeclaration.cs +++ b/Runtime/Text/Parsing/AST/NamespaceDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface NamespaceDeclaration diff --git a/Runtime/Text/Parsing/AST/ObjectTypes/ClassDeclaration.cs b/Runtime/Text/Parsing/AST/ObjectTypes/ClassDeclaration.cs index 571c860..67ca53f 100644 --- a/Runtime/Text/Parsing/AST/ObjectTypes/ClassDeclaration.cs +++ b/Runtime/Text/Parsing/AST/ObjectTypes/ClassDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface ClassDeclaration diff --git a/Runtime/Text/Parsing/AST/ObjectTypes/EnumDeclaration.cs b/Runtime/Text/Parsing/AST/ObjectTypes/EnumDeclaration.cs index 1e5aad7..1f1bce4 100644 --- a/Runtime/Text/Parsing/AST/ObjectTypes/EnumDeclaration.cs +++ b/Runtime/Text/Parsing/AST/ObjectTypes/EnumDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface EnumDeclaration diff --git a/Runtime/Text/Parsing/AST/ObjectTypes/InterfaceDeclaration.cs b/Runtime/Text/Parsing/AST/ObjectTypes/InterfaceDeclaration.cs index 295ec4f..4984aaa 100644 --- a/Runtime/Text/Parsing/AST/ObjectTypes/InterfaceDeclaration.cs +++ b/Runtime/Text/Parsing/AST/ObjectTypes/InterfaceDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface InterfaceDeclaration diff --git a/Runtime/Text/Parsing/AST/ParameterDeclaration.cs b/Runtime/Text/Parsing/AST/ParameterDeclaration.cs index 919f4dc..216b150 100644 --- a/Runtime/Text/Parsing/AST/ParameterDeclaration.cs +++ b/Runtime/Text/Parsing/AST/ParameterDeclaration.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface ParameterDeclaration diff --git a/Runtime/Text/Parsing/AST/ResolvableASTNode.cs b/Runtime/Text/Parsing/AST/ResolvableASTNode.cs index 43af084..09f581e 100644 --- a/Runtime/Text/Parsing/AST/ResolvableASTNode.cs +++ b/Runtime/Text/Parsing/AST/ResolvableASTNode.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public interface ResolvableASTNode diff --git a/Runtime/Text/Parsing/AST/Resolver/ASTMatcherResolver.cs b/Runtime/Text/Parsing/AST/Resolver/ASTMatcherResolver.cs index fd3f44d..d9881b6 100644 --- a/Runtime/Text/Parsing/AST/Resolver/ASTMatcherResolver.cs +++ b/Runtime/Text/Parsing/AST/Resolver/ASTMatcherResolver.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public abstract class ASTMatcherResolver diff --git a/Runtime/Text/Parsing/AST/Resolver/ASTParser.cs b/Runtime/Text/Parsing/AST/Resolver/ASTParser.cs index a5accfa..e68d54b 100644 --- a/Runtime/Text/Parsing/AST/Resolver/ASTParser.cs +++ b/Runtime/Text/Parsing/AST/Resolver/ASTParser.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public class ASTParser diff --git a/Runtime/Text/Parsing/AST/Resolver/ASTResolver.cs b/Runtime/Text/Parsing/AST/Resolver/ASTResolver.cs index 4ee06a9..21ee240 100644 --- a/Runtime/Text/Parsing/AST/Resolver/ASTResolver.cs +++ b/Runtime/Text/Parsing/AST/Resolver/ASTResolver.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; public abstract class ASTResolver diff --git a/Runtime/Text/Parsing/AST/Token.cs b/Runtime/Text/Parsing/AST/Token.cs index dd27fc0..09005d1 100644 --- a/Runtime/Text/Parsing/AST/Token.cs +++ b/Runtime/Text/Parsing/AST/Token.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/AST/TokenPredicateData.cs b/Runtime/Text/Parsing/AST/TokenPredicateData.cs index 687b9ed..0ecce96 100644 --- a/Runtime/Text/Parsing/AST/TokenPredicateData.cs +++ b/Runtime/Text/Parsing/AST/TokenPredicateData.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionContext.cs b/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionContext.cs index a72d4aa..15a921b 100644 --- a/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionContext.cs +++ b/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionContext.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class ExpressionContext diff --git a/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionEvaluator.cs b/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionEvaluator.cs index 7a3226c..743492e 100644 --- a/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionEvaluator.cs +++ b/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionEvaluator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public abstract class ExpressionEvaluator diff --git a/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionResult.cs b/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionResult.cs index 1bb5f6a..9200b86 100644 --- a/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionResult.cs +++ b/Runtime/Text/Parsing/Expressions/Evaluator/ExpressionResult.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class ExpressionResult diff --git a/Runtime/Text/Parsing/Expressions/ExpressionParser.cs b/Runtime/Text/Parsing/Expressions/ExpressionParser.cs index b0dc82c..ebfc78c 100644 --- a/Runtime/Text/Parsing/Expressions/ExpressionParser.cs +++ b/Runtime/Text/Parsing/Expressions/ExpressionParser.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class ExpressionParser:ParserPhase diff --git a/Runtime/Text/Parsing/Expressions/Operators/ArrayExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/ArrayExpression.cs index 846f51b..30fae84 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/ArrayExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/ArrayExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IArrayExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/ArrayOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/ArrayOperator.cs index dbcb9a3..5c4cbc8 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/ArrayOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/ArrayOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class ArrayOperator:ExpressionOperator where T:ASTNode,IArrayExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/BinaryExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/BinaryExpression.cs index eb9654b..c8a55b3 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/BinaryExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/BinaryExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IBinaryExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/BinaryOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/BinaryOperator.cs index 90a25ef..7759cdd 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/BinaryOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/BinaryOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class BinaryOperator:ExpressionOperator where T:ASTNode,IBinaryExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/ConstantExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/ConstantExpression.cs index b39b280..95d2928 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/ConstantExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/ConstantExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IConstantExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/ConstantOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/ConstantOperator.cs index 38456d4..071fdb9 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/ConstantOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/ConstantOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class ConstantOperator:ExpressionOperator where T:ASTNode,IConstantExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/ExpressionOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/ExpressionOperator.cs index cf783dd..652f56f 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/ExpressionOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/ExpressionOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public abstract class ExpressionOperator diff --git a/Runtime/Text/Parsing/Expressions/Operators/FunctionExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/FunctionExpression.cs index f29298e..f25563f 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/FunctionExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/FunctionExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IFunctionExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/FunctionOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/FunctionOperator.cs index de7f31c..cf092c1 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/FunctionOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/FunctionOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class FunctionOperator:ExpressionOperator where T:ASTNode,IFunctionExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionExpression.cs index c129e0d..04479f2 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IGenericFunctionExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionOperator.cs index 7653244..934e308 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/GenericFunctionOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class GenericFunctionOperator:ExpressionOperator where T:ASTNode,IGenericFunctionExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/GroupExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/GroupExpression.cs index bc9d237..5c278ef 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/GroupExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/GroupExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IGroupExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/GroupOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/GroupOperator.cs index bc65e9a..0c872c1 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/GroupOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/GroupOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class GroupOperator:ExpressionOperator where T:ASTNode,IGroupExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/OperatorExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/OperatorExpression.cs index 80695ce..99de347 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/OperatorExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/OperatorExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceExpression.cs index 407686b..7e7a69a 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface ISeparatedSequenceExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceOperator.cs index 0f99b7b..8e76e6c 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/SeparatedSequenceOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class SeparatedSequenceOperator:ExpressionOperator where T:ASTNode,ISeparatedSequenceExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/TernaryExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/TernaryExpression.cs index 1428433..a0d6325 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/TernaryExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/TernaryExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface ITernaryExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/TernaryOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/TernaryOperator.cs index a47c91d..f887aae 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/TernaryOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/TernaryOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class TernaryOperator:ExpressionOperator where T:ASTNode,ITernaryExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/UnaryExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/UnaryExpression.cs index 60d6d7b..d897c22 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/UnaryExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/UnaryExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IUnaryExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/UnaryOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/UnaryOperator.cs index 016f4f9..a93a3fa 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/UnaryOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/UnaryOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class UnaryOperator:ExpressionOperator where T:ASTNode,IUnaryExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/Operators/VariableExpression.cs b/Runtime/Text/Parsing/Expressions/Operators/VariableExpression.cs index 34b110b..b305485 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/VariableExpression.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/VariableExpression.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public interface IVariableExpression:OperatorExpression diff --git a/Runtime/Text/Parsing/Expressions/Operators/VariableOperator.cs b/Runtime/Text/Parsing/Expressions/Operators/VariableOperator.cs index 611f3b1..298d505 100644 --- a/Runtime/Text/Parsing/Expressions/Operators/VariableOperator.cs +++ b/Runtime/Text/Parsing/Expressions/Operators/VariableOperator.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class VariableOperator:ExpressionOperator where T:ASTNode,IVariableExpression, new() diff --git a/Runtime/Text/Parsing/Expressions/PrecedenceLevel.cs b/Runtime/Text/Parsing/Expressions/PrecedenceLevel.cs index f12ee00..79f0e25 100644 --- a/Runtime/Text/Parsing/Expressions/PrecedenceLevel.cs +++ b/Runtime/Text/Parsing/Expressions/PrecedenceLevel.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class PrecedenceLevel diff --git a/Runtime/Text/Parsing/Parser/ASTParserPhase.cs b/Runtime/Text/Parsing/Parser/ASTParserPhase.cs index b54cc04..44d3bf7 100644 --- a/Runtime/Text/Parsing/Parser/ASTParserPhase.cs +++ b/Runtime/Text/Parsing/Parser/ASTParserPhase.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public abstract class ASTParserPhase:ParserPhase diff --git a/Runtime/Text/Parsing/Parser/LexerPhase.cs b/Runtime/Text/Parsing/Parser/LexerPhase.cs index 317c138..9878f17 100644 --- a/Runtime/Text/Parsing/Parser/LexerPhase.cs +++ b/Runtime/Text/Parsing/Parser/LexerPhase.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class LexerPhase:ParserPhase diff --git a/Runtime/Text/Parsing/Parser/Parser.cs b/Runtime/Text/Parsing/Parser/Parser.cs index 95f19b3..262e470 100644 --- a/Runtime/Text/Parsing/Parser/Parser.cs +++ b/Runtime/Text/Parsing/Parser/Parser.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public abstract class Parser diff --git a/Runtime/Text/Parsing/Parser/ParserMessage.cs b/Runtime/Text/Parsing/Parser/ParserMessage.cs index b5c69df..b3c9346 100644 --- a/Runtime/Text/Parsing/Parser/ParserMessage.cs +++ b/Runtime/Text/Parsing/Parser/ParserMessage.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class ParserMessage diff --git a/Runtime/Text/Parsing/Parser/ParserPhase.cs b/Runtime/Text/Parsing/Parser/ParserPhase.cs index 6ab4f42..7caa41b 100644 --- a/Runtime/Text/Parsing/Parser/ParserPhase.cs +++ b/Runtime/Text/Parsing/Parser/ParserPhase.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public abstract class ParserPhase diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/CSCommentGrabber.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/CSCommentGrabber.cs index 9db364a..2659fdd 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/CSCommentGrabber.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/CSCommentGrabber.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSCommentGrabber diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParser.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParser.cs index 49fa06b..b674132 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParser.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParser.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSParser:Parser diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParserTest.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParserTest.cs index e72a3cf..d80c29a 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParserTest.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/CSParserTest.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Godot; using Rokojori.DocGenerator; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSFileRoot.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSFileRoot.cs index 56b64b1..621d2c2 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSFileRoot.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSFileRoot.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSFileRoot:ASTNode, ASTFileRoot diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSImportDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSImportDeclaration.cs index 1cfc0ea..2a92497 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSImportDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSImportDeclaration.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class CSImportDeclaration: ASTNode, ImportDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceBlock.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceBlock.cs index eb275fe..5d9f5ec 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceBlock.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceBlock.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSNamespaceBlock: ASTNode, NamespaceBlock diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceDeclaration.cs index 5333cdf..4b91347 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSNamespaceDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSNamespaceDeclaration: ASTNode, NamespaceDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSTypeDefinition.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSTypeDefinition.cs index 00b981d..75dee9e 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSTypeDefinition.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/CSTypeDefinition.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSTypeDefinition: ASTNode diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSEnumValueDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSEnumValueDeclaration.cs index b24844d..d232c3c 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSEnumValueDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSEnumValueDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSEnumValueDeclaration: ASTNode, EnumDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSFieldDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSFieldDeclaration.cs index 77e7a6a..c2a67bd 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSFieldDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSFieldDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSFieldDeclaration: CSMemberDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMemberDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMemberDeclaration.cs index 379a216..e96a140 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMemberDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMemberDeclaration.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori; public abstract class CSMemberDeclaration: ASTNode, MemberDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMethodMemberDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMethodMemberDeclaration.cs index 45c2fb1..454669d 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMethodMemberDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSMethodMemberDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSMethodMemberDeclaration: CSMemberDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSParameterDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSParameterDeclaration.cs index 98cf9ef..3a1042f 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSParameterDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSParameterDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSParameterDeclaration: ASTNode, ParameterDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSPropertyDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSPropertyDeclaration.cs index c79a1f4..bd51c2e 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSPropertyDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/MemberDeclarations/CSPropertyDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSPropertyDeclaration: CSMemberDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSClassDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSClassDeclaration.cs index 19c2b35..1eaf4d5 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSClassDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSClassDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSClassDeclaration: CSObjectDeclaration, ClassDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSEnumDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSEnumDeclaration.cs index 6f4da9b..1315e24 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSEnumDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSEnumDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSEnumDeclaration: CSObjectDeclaration, EnumDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSInterfaceDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSInterfaceDeclaration.cs index 7af53d9..56ce298 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSInterfaceDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSInterfaceDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSInterfaceDeclaration: CSObjectDeclaration, InterfaceDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclaration.cs index 49f3d6b..4c6f645 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclaration.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori; public abstract class CSObjectDeclaration: ASTNode diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclarationTail.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclarationTail.cs index a2c265e..e3098c0 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclarationTail.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDeclarationTail.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSObjectDeclarationTail: ASTNode diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDependency.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDependency.cs index 04cf4ca..14cdeb7 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDependency.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSObjectDependency.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSObjectDependency diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSStructDeclaration.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSStructDeclaration.cs index 416cfeb..0e766f2 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSStructDeclaration.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/ObjectDeclarations/CSStructDeclaration.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSStructDeclaration: CSObjectDeclaration diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/SquareBlock.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/SquareBlock.cs index 14ee2c7..81db512 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/SquareBlock.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Nodes/SquareBlock.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSExpressions/CSExpressionParser.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSExpressions/CSExpressionParser.cs index be0699b..d1f546b 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSExpressions/CSExpressionParser.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSExpressions/CSExpressionParser.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSMemberResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSMemberResolver.cs index 1efecf7..9acdcd8 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSMemberResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSMemberResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSMemberResolver:ASTMatcherResolver diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSModifierAttributesParser.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSModifierAttributesParser.cs index 6be3562..8385b99 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSModifierAttributesParser.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSModifierAttributesParser.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSObjectParser.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSObjectParser.cs index 8a1f1e5..25fd300 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSObjectParser.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSObjectParser.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSObjectParser:ASTParserPhase diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessor.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessor.cs index 888776f..43d7b8d 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessor.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessor.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class CSPreProcessor:ParserPhase diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorConditionalEvaluator.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorConditionalEvaluator.cs index b1de982..ace16dd 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorConditionalEvaluator.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorConditionalEvaluator.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorContext.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorContext.cs index 4a2fad0..4dc8b4c 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorContext.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorContext.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSPreProcessorContext diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorExpressionParser.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorExpressionParser.cs index 48b0449..ec38586 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorExpressionParser.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorExpressionParser.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorStack.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorStack.cs index 0a9e722..c2aba9d 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorStack.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSPreProcessor/CSPreProcessorStack.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; public class CSPreProcessorConditionalContext diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSRootFileParser.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSRootFileParser.cs index c0c180f..9b6be06 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSRootFileParser.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSRootFileParser.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSRootFileParser:ASTParserPhase diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSBlockStatementResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSBlockStatementResolver.cs index 0d5ffc5..3776e22 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSBlockStatementResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSBlockStatementResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSBlockStatement:ASTNode,Statement diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSElseIfStatementResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSElseIfStatementResolver.cs index 8a84afe..4a3fdbc 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSElseIfStatementResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSElseIfStatementResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSElseIfStatement:ASTNode,Statement diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSExpressionStatementResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSExpressionStatementResolver.cs index 85ea8a9..0a97e4f 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSExpressionStatementResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSExpressionStatementResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSExpressionStatement:ASTNode,Statement diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForEachStatementResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForEachStatementResolver.cs index 0bd0ed1..c31698e 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForEachStatementResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForEachStatementResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSForEachStatement:ASTNode,Statement diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForStatementResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForStatementResolver.cs index d63d568..14c2bd9 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForStatementResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSForStatementResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSForStatement:ASTNode,Statement diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementResolver.cs index 4281f09..132fd87 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public abstract class CSStatementResolver:ASTMatcherResolver diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementsParser.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementsParser.cs index 3a183ad..4fcdc29 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementsParser.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStatementsParser.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSStatementsParser:ASTParser diff --git a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStopStatementResolver.cs b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStopStatementResolver.cs index 70ab8c0..7b1dba6 100644 --- a/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStopStatementResolver.cs +++ b/Runtime/Text/Parsing/ParserLibrary/CSharp/Parsers/CSStatements/CSStopStatementResolver.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CSStopStatement:ASTNode,Statement diff --git a/Runtime/Text/Parsing/Statements/ASTStatement.cs b/Runtime/Text/Parsing/Statements/ASTStatement.cs index caac1dd..0c942ec 100644 --- a/Runtime/Text/Parsing/Statements/ASTStatement.cs +++ b/Runtime/Text/Parsing/Statements/ASTStatement.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public interface Statement diff --git a/Runtime/Text/RegexBuilder.cs b/Runtime/Text/RegexBuilder.cs index e919d9f..be8894e 100644 --- a/Runtime/Text/RegexBuilder.cs +++ b/Runtime/Text/RegexBuilder.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RegexBuilder @@ -93,7 +94,7 @@ namespace Rokojori public Regex ToRegex() { var options = RegexOptions.None; - var pattern = Lists.Join( _parts, "" ); + var pattern = ListExtensions.Join( _parts, "" ); if ( _flags.IndexOf( "i" ) != -1 ) { diff --git a/Runtime/Text/RegexExtensions.cs b/Runtime/Text/RegexExtensions.cs index c039b9d..1c194d9 100644 --- a/Runtime/Text/RegexExtensions.cs +++ b/Runtime/Text/RegexExtensions.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class RegexExtensions diff --git a/Runtime/Text/RegexMatches.cs b/Runtime/Text/RegexMatches.cs index ae24fd2..2e052ad 100644 --- a/Runtime/Text/RegexMatches.cs +++ b/Runtime/Text/RegexMatches.cs @@ -6,6 +6,7 @@ using System.Text; using System.Globalization; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class RegexMatches diff --git a/Runtime/Text/RegexUtility.cs b/Runtime/Text/RegexUtility.cs index 70a0496..961dfdc 100644 --- a/Runtime/Text/RegexUtility.cs +++ b/Runtime/Text/RegexUtility.cs @@ -8,873 +8,931 @@ using System.Globalization; using Godot; using System.Linq; -namespace Rokojori +using Rokojori.Extensions; +namespace Rokojori; + + + +public static class RegexUtility { - public class MatchRange + + public static bool Matching( string source, string regex ) { - public int start; - public int length; + #if ROKOJORI_ACTION_CORE_GD - public MatchRange( int s, int l ) - { - start = s; - length = l; - } - - public string GetString( string source) - { - return source.Substring( start, length ); - } - } - - public class MatchResult - { - public string source; - public bool matched = false; + /* - public MatchRange match; + var rx := RegEx.create_simple( _AddRegexOptions( regex, options ) ) + return null != rx.search( source ) - public List groups; + */ - public string this[ int index ] + + #else + + + if ( source == null ) { - get - { - if ( ! matched ) - { - return null; - } - - if ( index == 0 ) - { - return match.GetString( source ); - } - - if ( groups != null && index > 0 && index <= groups.Count ) - { - return groups[ index - 1 ] == null ? null : groups[ index - 1 ].GetString( source ); - } - - return null; - } + return false; } - } - - public static class RegexUtility - { - #if !ROKOJORI_ACTION_CORE - - public static MatchResult Exec( this string source, string pattern, RegexOptions options = RegexOptions.None ) - { - var regex = new Regex( pattern ); - var match = regex.Match( source ); - - var result = new MatchResult(); - result.source = source; - result.matched = match.Success; - - if ( match.Success ) - { - result.match = new MatchRange( match.Index, match.Length ); - - result.groups = new List(); - - for ( int i = 1; i < match.Groups.Count; i++ ) - { - var group = match.Groups[i]; - - if ( group.Success ) - { - result.groups.Add( new MatchRange( group.Index, group.Length ) ); - } - else - { - result.groups.Add( null ); - } - } - } - - return null; - } - - public static bool Matches( this string source, string regexPattern, RegexOptions options = RegexOptions.None ) - { - var match = new Regex( regexPattern, options ).Match( source ); - - return match != null && match.Success; - } - - public static Regex MakeSticky( Regex regex ) - { - var source = MakeSourceSticky( regex + "" ); - - return new Regex( source, regex.Options ); - } - - public static string LineBreak( this string value ) - { - return value + "\n"; - } - - public static string LineBreaks( this string value ) - { - return value + "\n\n"; - } - - public static string Indent( this string value, string indentation = " ", bool indentFirstLine = true ) - { - var lines = SplitLines( value ); - - var ignoreFirstLine = ! indentFirstLine; - - var linesBefore = lines; - lines = RemoveIntendation( lines ); - - var indentedLines = lines.Map( - l => - { - - if ( ignoreFirstLine ) - { - ignoreFirstLine = false; - return l; - } - else - { - return indentation + l; - } - - - } - ); - - return indentedLines.Join( "\n" ); - } - - public static List RemoveIntendation( string value ) - { - return RemoveIntendation( SplitLines( value ) ); - } - - public static List RemoveIntendation( List lines ) - { - var initial = 1000000; - - var numSpaces = initial; - - for ( int i = 0; i < lines.Count; i++ ) - { - if ( IsNullOrWhiteSpace( lines[ i ] ) ) - { - continue; - } - - numSpaces = Mathf.Min( numSpaces, MatchLength( lines[ i ], @"^\s+" ) ); - } - - if ( numSpaces == initial || numSpaces <= 0 ) - { - return lines; - } - - var outputLines = lines.Map( - ( l )=> - { - if ( IsNullOrWhiteSpace( l ) ) - { - return ""; - } - - return l.Substring( numSpaces ); - } - ); - - - return outputLines; - } - - public static bool IsNullOrWhiteSpace( string s ) - { - return string.IsNullOrWhiteSpace( s ); - } - - public static string MakeSourceSticky( string source ) - { - if ( ! source.StartsWith( "\\G" ) ) - { - source = "\\G(?:" + source + ")"; - } - - return source; - } - - public static bool IsUpperCase( string value, int position ) - { - if ( value == null || value.Length == 0 || value.Length <= position ) - { - return false; - } - - var ch = ( value[ position ] + "" ).ToUpper(); - - return ch == ( value[ position ] + "" ); - } - - public static bool StartsWithUpperCase( string value ) - { - return IsUpperCase( value, 0 ); - } - - public static string NumberToString( double value ) - { - try - { - var specifier = "G"; - - return value.ToString( specifier, CultureInfo.InvariantCulture ); - } - catch( System.Exception e ) - { - RJLog.Log(e ); - } - - return "0"; - } - - public static string _G( this float value ) - { - var stringValue = NumberToString( value ); - - if ( ! stringValue.Contains( "." ) ) - { - stringValue += ".0"; - } - - return stringValue; - } - - public static string _F( this float value ) - { - return value.ToString( "0.0", CultureInfo.InvariantCulture ); - } - - public static string _FF( this float value ) - { - return value.ToString( "0.00", CultureInfo.InvariantCulture ); - } - - public static string _FFF( this float value ) - { - return value.ToString( "0.000", CultureInfo.InvariantCulture ); - } - - public static string _DDD( this double value ) - { - return value.ToString( "0.000", CultureInfo.InvariantCulture ); - } - - public static string _M( this float meters ) - { - return _FF( meters ) + "m"; - } - - public static string _CM( this float meters ) - { - return _FF( meters * 100 ) + "cm"; - } - - public static string _KM( this float meters ) - { - return _FF( meters / 1000 ) + "km"; - } - - - - public static double ParseDouble( string source, double alternative = 0 ) - { - try - { - double newValue = System.Double.Parse( source, CultureInfo.InvariantCulture ); - return newValue; - } - catch ( System.Exception e ) - { - if ( e != null ) - { - - } - return alternative; - } - } - - public static float ParseFloat( string source, float alternative = 0 ) - { - return ( float ) ParseDouble( source, alternative ); - } - - public static int ParseInt( string source, int alternative = 0 ) - { - var multiply = 1; - var value = 0; - - for ( int i = source.Length - 1; i >= 0 ; i-- ) - { - var symbol = source[ i ]; - - if ( i == 0 ) - { - if ( symbol == '-' ) - { - return - value; - } - - if ( symbol == '+' ) - { - return value; - } - } - - var digitValue = ParseDigit( symbol ); - - if ( digitValue == -1 ) - { - return alternative; - } - - value += digitValue * multiply; - - multiply *= 10; - } - - return value; - } - - public static int ParseDigit( char c ) - { - switch ( c ) - { - case '0': return 0; - case '1': return 1; - case '2': return 2; - case '3': return 3; - case '4': return 4; - case '5': return 5; - case '6': return 6; - case '7': return 7; - case '8': return 8; - case '9': return 9; - } - - return -1; - } - - public static bool Matching( string source, string regex, RegexOptions options = RegexOptions.None ) - { - if ( source == null ) - { - return false; - } - - return new Regex( regex, options ).Match( source ).Success; - } - - public static int MatchLength( string source, string regex, RegexOptions options = RegexOptions.None, int start = 0 ) - { - var match = new Regex( regex, options ).Match( source, start ); - - if ( ! match.Success ) - { - return 0; - } - - return match.Length; - - } - - public static bool MatchingIgnoreCase( string source, string regex ) - { - return Matching( source, regex, RegexOptions.IgnoreCase ); - } - - public static string Substring( string source, string regex ) - { - return new Regex( regex ).Match( source ).Value; - } - - public static string EscapeForRegex( string source ) - { - var sb = new StringBuilder(); - - var escapes = "+*?^$\\.[]{}()|/"; - - for ( int i = 0; i < source.Length; i++ ) - { - var character = source[ i ]; - - if ( escapes.IndexOf( character ) != -1 ) - { - sb.Append( "\\" ); - } - - sb.Append( character ); - } - - return sb.ToString(); - } - - public static string LeadingZeros( int value, int minDigits = 2) - { - var stringValue = value + ""; - - while ( stringValue.Length < minDigits ) - { - stringValue = "0" + stringValue; - } - - return stringValue; - } - - public static string NumberWithThousandsSeperator( int value, string seperator = "." ) - { - var isNegative = value < 0; - - if ( isNegative ){ value = - value; } - - var stringValue = value + ""; - - var builder = new StringBuilder(); - - for ( int i = 0; i < stringValue.Length; i++ ) - { - var index = ( stringValue.Length - 1 ) - i ; - - if ( i % 4 == 3 ) - { - builder.Append( seperator ); - } - - builder.Append( stringValue[ index ] ); - } - - var seperatorValue = builder.ToString(); - - return Reverse( seperatorValue ); - } - - public static string Reverse( string source ) - { - char[] characters = source.ToCharArray(); - System.Array.Reverse( characters ); - return new string( characters ); - } - - public static Regex EscapedOrRegex( string first, params string[] other ) - { - var value = EscapeForRegex( first ); - - for ( var i = 0; i < other.Length; i++ ) - { - value += "|" + EscapeForRegex( other[ i ] ); - - /* - - if ( i == 0 ) - { - value = "(" + value; - } - value += ")|(" + EscapeForRegex( other[ i ] ); - - if ( i == ( other.Length - 1 ) ) - { - value += ")"; - } - - */ - } - - //Logs.Log("EscapedOrRegex:", "'" + value + "'"); - return new Regex( value ); - - } - - public static Color ParseColor( string source, Color alternative ) - { - if ( Matching( source, @"#\d+" ) ) - { - return ParseHexColor( source, alternative ); - } - else if ( Matching( source, @"^rgb" ) ) - { - return ParseRGBColor( source, alternative ); - } - else if ( Matching( source, @"^hsl" ) ) - { - return ParseHSLColor( source, alternative ); - } - - return alternative; - } - - - public static double ParsePercentage( string source ) - { - source = Remove( source, @"\s*%" ); - return ParseDouble( source.Trim(), 0 ) / 100.0; - } - - public static int ParseHexCharacter( char hexCharacter ) - { - if ( '0' <= hexCharacter && hexCharacter <= '9' ) - { - return (int) (hexCharacter - '0' ); - } - - if ( 'a' <= hexCharacter && hexCharacter <= 'f' ) - { - return (int) (hexCharacter - 'a') + 10; - } - - if ( 'A' <= hexCharacter && hexCharacter <= 'F' ) - { - return (int) (hexCharacter - 'A') + 10; - } - - return 0; - } - - public static int ParseHex( string source ) - { - var value = 0; - var shift = 0; - - for ( var i = source.Length - 1; i < source.Length; i++ ) - { - var hexValue = ParseHexCharacter( source[ i ] ) << shift; - shift += 4; - } - - return value; - - } - - public static Color ParseHexColor( string source, Color alternative ) - { - source = RegexUtility.Remove( source, @"^#" ); - - var numbers = new List(); - - for ( var i = 0; i < 3; i++ ) - { - var value = source.Substring( i * 2, 2 ); - var numberValue = ParseHex( value ) / 255f; - numbers.Add( numberValue ); - } - - if ( numbers.Count == 3 ) - { - numbers.Add( 1f ); - } - - return new Color( numbers[ 0 ], numbers[ 1 ], numbers[ 2 ] , numbers[ 3 ] ); - - } - - public static Color ParseRGBColor( string source, Color alternative ) - { - source = RegexUtility.Remove( source, @"^rgba?\(" ); - source = RegexUtility.Remove( source, @"\)$" ); - - var splits = Split( source, @"\," ); - var numbers = Lists.Map( splits, - ( string value, int index ) => - { - if ( value.Contains( "%" ) ) - { - return (float) ParsePercentage( value ); - } - - return ParseFloat( value ); - } - ); - - if ( numbers.Count == 3 ) - { - numbers.Add( 1f ); - } - - return new Color( numbers[ 0 ], numbers[ 1 ], numbers[ 2 ] , numbers[ 3 ] ); - - } - - public static HSLColor ParseHSLColor( string source, HSLColor alternative ) - { - source = RegexUtility.Remove( source, @"^hsl\(" ); - source = RegexUtility.Remove( source, @"\)$" ); - - var splits = Split( source, @"\," ); - var numbers =Lists.Map( splits, - ( string value, int index ) => - { - if ( value.Contains( "%" ) ) - { - return (float) ParsePercentage( value ); - } - - return ParseFloat( value ); - } - ); - - if ( numbers.Count < 3 ) - { - RJLog.Log("Not enough numbers parsed: ", source, ">>", numbers.Count, Lists.Join( numbers, "," ) ); - } - - - if ( numbers.Count == 3 ) - { - numbers.Add( 1f ); - } - - return new HSLColor( numbers[ 0 ], numbers[ 1 ], numbers[ 2 ] , numbers[ 3 ] ); - } - - public static List Split( string source, Regex regex ) - { - var strings = regex.Split( source ); - var list = new List(); - - list.AddRange( strings ); - - return list; - } - - public static List Split( string source, string regex ) - { - return Split( source, new Regex( regex ) ); - } - - public static List SplitLines( string source ) - { - return Regex.Split( source, "\r\n|\r|\n" ).ToList(); - } - - public static string Remove( string source, string regex ) - { - return Replace( source, regex, "" ); - } - - public static string Replace( string source, Regex regex, string replacement ) - { - return regex.Replace( source, replacement ); - } - - public static string Remove( string source, Regex regex ) - { - return Replace( source, regex, "" ); - } - - public static string Replace( string source, string regex, string replacement ) - { - return new Regex( regex ).Replace( source, replacement ); - } - - public static string ReplaceMultiple( string source, Dictionary replacements ) - { - var replaced = source; - - foreach ( var vk in replacements ) - { - replaced = replaced.Replace( vk.Key, vk.Value ); - } - - return replaced; - } - - public static string UpperCaseAndWide( string source ) - { - var sb = new StringBuilder(); - - for ( int i = 0; i < source.Length; i++ ) - { - if ( i != 0 ) - { - sb.Append( " " ); - } - - sb.Append( ( source[ i ] + "" ).ToUpper() ); - - } - - return sb.ToString(); - } - - public static string TrimToLastPathFragment( string path ) - { - var splits = SplitPaths( path ); - - return splits[ splits.Count - 1 ]; - } - - public static bool StartsWithPathProtocol( string path ) - { - return Matching( path, @"^\w+://" ); - } - - public static string ExtractPathProtocol( string path ) - { - if ( ! StartsWithPathProtocol( path) ) - { - return ""; - } - - var splitPosition = path.IndexOf( "://" ); - - return path.Substring( 0, splitPosition + 3 ) ; - } - - public static string ParentPath( string path ) - { - var protocol = ExtractPathProtocol( path ); - - if ( protocol.Length != 0 ) - { - path = path.Substring( protocol.Length ); - } - - var list = SplitPaths( path ); - - list.RemoveAt( list.Count -1 ); - - return protocol + Lists.Join( list, "/" ); - } - - - public static List SplitPaths( string path ) - { - var splittedPaths = new List(); - var normalizedPath = NormalizePath( path ); - var splits = Split( normalizedPath, new Regex( @"\/" ) ); - return splits; - } - - - public static string ToValidCSName( string source) - { - var output = new StringBuilder(); - - for ( int i = 0; i < source.Length; i++) - { - var s = source[ i ]; - var isDigit = Char.IsDigit( s ); - var isLetter = Char.IsLetter( s ); - var isAscii = Char.IsAscii( s ); - - var isDigitAsFirst = i == 0 && isDigit; - var isAllowed = ( isDigit || isLetter ) && isAscii; - - if ( isDigitAsFirst || ! isAllowed ) - { - output.Append( "_" ); - } - else - { - output.Append( source[ i ] ); - } - } - - source = output.ToString(); - - return source.ToCamelCase(); - - } - - public static string JoinPaths( List paths, int startIndex = 0, int length = -1 ) - { - var normalizedPaths = new List(); - // normalizedPaths.AddRange( paths ); - - var endIndex = startIndex + length; - var end = ( length < 0 || ( length + startIndex ) >= paths.Count ) ? paths.Count : endIndex; - - for ( var i = startIndex; i < end; i++ ) - { - normalizedPaths.Add( _NormalizePath( paths[ i ] ) ); - } - - return Lists.Join( normalizedPaths, "/" ); - } - - public static string Join( string pathA, string pathB, params string[] paths ) - { - var normalizedPaths = new List(); - normalizedPaths.Add( pathA ); - normalizedPaths.Add( pathB ); - normalizedPaths.AddRange( paths ); - - for ( var i = 0; i < normalizedPaths.Count; i++ ) - { - normalizedPaths[ i ] = _NormalizePath( normalizedPaths[ i ] ); - } - - return Lists.Join( normalizedPaths, "/" ); - } - - private static string _EnsureForwardSlashes( string path ) - { - if ( path.IndexOf( "\\" ) == -1 ) - { - return path; - } - - var correctedPath = ""; - - for ( int i = 0; i < path.Length; i++ ) - { - if ( path[ i ] == '\\' ) - { - correctedPath += "/"; - } - else - { - correctedPath += path[ i ]; - } - } - - return correctedPath; - } - - public static string NormalizePath( string path ) - { - return _NormalizePath( path ); - } - - public static string WindowsPath( string path ) - { - path = _NormalizePath( path ); - - var slashes = @"\/"; - - path = Regex.Replace( path, slashes, "\\" ); - - return path; - } - - private static string _NormalizePath( string path ) - { - path = _EnsureForwardSlashes( path ); - - var startSlashes = @"^\/+"; - var endSlashes = @"\/+$"; - var multiples = @"\/\/+"; - - path = Regex.Replace( path, startSlashes, "" ); - path = Regex.Replace( path, endSlashes, "" ); - path = Regex.Replace( path, multiples, "/" ); - - return path; - } + return new Regex( regex ).Match( source ).Success; #endif } -} \ No newline at end of file + + + /* + ============================================================================================ + ============================================================================================ + ============================================================================================ + ============================================================================================ + ============================================================================================ + */ + + + #if !ROKOJORI_ACTION_CORE_GD + + public static string NumberToString( double value ) + { + try + { + var specifier = "G"; + + return value.ToString( specifier, CultureInfo.InvariantCulture ); + } + catch( System.Exception e ) + { + RJLog.Log(e ); + } + + return "0"; + } + + public static List SplitPaths( string path ) + { + var splittedPaths = new List(); + var normalizedPath = NormalizePath( path ); + var splits = Split( normalizedPath, new Regex( @"\/" ) ); + return splits; + } + + static string _NormalizePath( string path ) + { + path = _EnsureForwardSlashes( path ); + + var startSlashes = @"^\/+"; + var endSlashes = @"\/+$"; + var multiples = @"\/\/+"; + + path = Regex.Replace( path, startSlashes, "" ); + path = Regex.Replace( path, endSlashes, "" ); + path = Regex.Replace( path, multiples, "/" ); + + return path; + } + + static string _EnsureForwardSlashes( string path ) + { + if ( path.IndexOf( "\\" ) == -1 ) + { + return path; + } + + var correctedPath = ""; + + for ( int i = 0; i < path.Length; i++ ) + { + if ( path[ i ] == '\\' ) + { + correctedPath += "/"; + } + else + { + correctedPath += path[ i ]; + } + } + + return correctedPath; + } + + public static string NormalizePath( string path ) + { + return _NormalizePath( path ); + } + + public static string Replace( string source, string regex, string replacement ) + { + return new Regex( regex ).Replace( source, replacement ); + } + + public static List Split( string source, Regex regex ) + { + var strings = regex.Split( source ); + var list = new List(); + + list.AddRange( strings ); + + return list; + } + + + #endif + + + /* + ============================================================================================ + ============================================================================================ + ============================================================================================ + ============================================================================================ + ============================================================================================ + */ + + #if !ROKOJORI_ACTION_CORE + + public static bool Matching( string source, string regex, RegexOptions options = RegexOptions.None ) + { + if ( source == null ) + { + return false; + } + + return new Regex( regex, options ).Match( source ).Success; + } + + public static MatchResult Exec( this string source, string pattern, RegexOptions options = RegexOptions.None ) + { + var regex = new Regex( pattern ); + var match = regex.Match( source ); + + var result = new MatchResult(); + result.source = source; + result.matched = match.Success; + + if ( match.Success ) + { + result.match = new MatchRange( match.Index, match.Length ); + + result.groups = new List(); + + for ( int i = 1; i < match.Groups.Count; i++ ) + { + var group = match.Groups[i]; + + if ( group.Success ) + { + result.groups.Add( new MatchRange( group.Index, group.Length ) ); + } + else + { + result.groups.Add( null ); + } + } + } + + return null; + } + + + + public static Regex MakeSticky( Regex regex ) + { + var source = MakeSourceSticky( regex + "" ); + + return new Regex( source, regex.Options ); + } + + public static string LineBreak( this string value ) + { + return value + "\n"; + } + + public static string LineBreaks( this string value ) + { + return value + "\n\n"; + } + + public static string Indent( this string value, string indentation = " ", bool indentFirstLine = true ) + { + var lines = SplitLines( value ); + + var ignoreFirstLine = ! indentFirstLine; + + var linesBefore = lines; + lines = RemoveIntendation( lines ); + + var indentedLines = lines.Map( + l => + { + + if ( ignoreFirstLine ) + { + ignoreFirstLine = false; + return l; + } + else + { + return indentation + l; + } + + + } + ); + + return indentedLines.Join( "\n" ); + } + + public static List RemoveIntendation( string value ) + { + return RemoveIntendation( SplitLines( value ) ); + } + + public static List RemoveIntendation( List lines ) + { + var initial = 1000000; + + var numSpaces = initial; + + for ( int i = 0; i < lines.Count; i++ ) + { + if ( IsNullOrWhiteSpace( lines[ i ] ) ) + { + continue; + } + + numSpaces = Mathf.Min( numSpaces, MatchLength( lines[ i ], @"^\s+" ) ); + } + + if ( numSpaces == initial || numSpaces <= 0 ) + { + return lines; + } + + var outputLines = lines.Map( + ( l )=> + { + if ( IsNullOrWhiteSpace( l ) ) + { + return ""; + } + + return l.Substring( numSpaces ); + } + ); + + + return outputLines; + } + + public static bool IsNullOrWhiteSpace( string s ) + { + return string.IsNullOrWhiteSpace( s ); + } + + public static string MakeSourceSticky( string source ) + { + if ( ! source.StartsWith( "\\G" ) ) + { + source = "\\G(?:" + source + ")"; + } + + return source; + } + + public static bool IsUpperCase( string value, int position ) + { + if ( value == null || value.Length == 0 || value.Length <= position ) + { + return false; + } + + var ch = ( value[ position ] + "" ).ToUpper(); + + return ch == ( value[ position ] + "" ); + } + + public static bool StartsWithUpperCase( string value ) + { + return IsUpperCase( value, 0 ); + } + + + public static string _G( this float value ) + { + var stringValue = NumberToString( value ); + + if ( ! stringValue.Contains( "." ) ) + { + stringValue += ".0"; + } + + return stringValue; + } + + public static string _F( this float value ) + { + return value.ToString( "0.0", CultureInfo.InvariantCulture ); + } + + public static string _FF( this float value ) + { + return value.ToString( "0.00", CultureInfo.InvariantCulture ); + } + + public static string _FFF( this float value ) + { + return value.ToString( "0.000", CultureInfo.InvariantCulture ); + } + + public static string _DDD( this double value ) + { + return value.ToString( "0.000", CultureInfo.InvariantCulture ); + } + + public static string _M( this float meters ) + { + return _FF( meters ) + "m"; + } + + public static string _CM( this float meters ) + { + return _FF( meters * 100 ) + "cm"; + } + + public static string _KM( this float meters ) + { + return _FF( meters / 1000 ) + "km"; + } + + + + public static double ParseDouble( string source, double alternative = 0 ) + { + try + { + double newValue = System.Double.Parse( source, CultureInfo.InvariantCulture ); + return newValue; + } + catch ( System.Exception e ) + { + if ( e != null ) + { + + } + return alternative; + } + } + + public static float ParseFloat( string source, float alternative = 0 ) + { + return ( float ) ParseDouble( source, alternative ); + } + + public static int ParseInt( string source, int alternative = 0 ) + { + var multiply = 1; + var value = 0; + + for ( int i = source.Length - 1; i >= 0 ; i-- ) + { + var symbol = source[ i ]; + + if ( i == 0 ) + { + if ( symbol == '-' ) + { + return - value; + } + + if ( symbol == '+' ) + { + return value; + } + } + + var digitValue = ParseDigit( symbol ); + + if ( digitValue == -1 ) + { + return alternative; + } + + value += digitValue * multiply; + + multiply *= 10; + } + + return value; + } + + public static int ParseDigit( char c ) + { + switch ( c ) + { + case '0': return 0; + case '1': return 1; + case '2': return 2; + case '3': return 3; + case '4': return 4; + case '5': return 5; + case '6': return 6; + case '7': return 7; + case '8': return 8; + case '9': return 9; + } + + return -1; + } + + + public static int MatchLength( string source, string regex, RegexOptions options = RegexOptions.None, int start = 0 ) + { + var match = new Regex( regex, options ).Match( source, start ); + + if ( ! match.Success ) + { + return 0; + } + + return match.Length; + + } + + public static bool MatchingIgnoreCase( string source, string regex ) + { + return Matching( source, regex, RegexOptions.IgnoreCase ); + } + + public static string Substring( string source, string regex ) + { + return new Regex( regex ).Match( source ).Value; + } + + public static string EscapeForRegex( string source ) + { + var sb = new StringBuilder(); + + var escapes = "+*?^$\\.[]{}()|/"; + + for ( int i = 0; i < source.Length; i++ ) + { + var character = source[ i ]; + + if ( escapes.IndexOf( character ) != -1 ) + { + sb.Append( "\\" ); + } + + sb.Append( character ); + } + + return sb.ToString(); + } + + public static string LeadingZeros( int value, int minDigits = 2) + { + var stringValue = value + ""; + + while ( stringValue.Length < minDigits ) + { + stringValue = "0" + stringValue; + } + + return stringValue; + } + + public static string NumberWithThousandsSeperator( int value, string seperator = "." ) + { + var isNegative = value < 0; + + if ( isNegative ){ value = - value; } + + var stringValue = value + ""; + + var builder = new StringBuilder(); + + for ( int i = 0; i < stringValue.Length; i++ ) + { + var index = ( stringValue.Length - 1 ) - i ; + + if ( i % 4 == 3 ) + { + builder.Append( seperator ); + } + + builder.Append( stringValue[ index ] ); + } + + var seperatorValue = builder.ToString(); + + return Reverse( seperatorValue ); + } + + public static string Reverse( string source ) + { + char[] characters = source.ToCharArray(); + System.Array.Reverse( characters ); + return new string( characters ); + } + + public static Regex EscapedOrRegex( string first, params string[] other ) + { + var value = EscapeForRegex( first ); + + for ( var i = 0; i < other.Length; i++ ) + { + value += "|" + EscapeForRegex( other[ i ] ); + + /* + + if ( i == 0 ) + { + value = "(" + value; + } + value += ")|(" + EscapeForRegex( other[ i ] ); + + if ( i == ( other.Length - 1 ) ) + { + value += ")"; + } + + */ + } + + //Logs.Log("EscapedOrRegex:", "'" + value + "'"); + return new Regex( value ); + + } + + public static Color ParseColor( string source, Color alternative ) + { + if ( Matching( source, @"#\d+" ) ) + { + return ParseHexColor( source, alternative ); + } + else if ( Matching( source, @"^rgb" ) ) + { + return ParseRGBColor( source, alternative ); + } + else if ( Matching( source, @"^hsl" ) ) + { + return ParseHSLColor( source, alternative ); + } + + return alternative; + } + + + public static double ParsePercentage( string source ) + { + source = Remove( source, @"\s*%" ); + return ParseDouble( source.Trim(), 0 ) / 100.0; + } + + public static int ParseHexCharacter( char hexCharacter ) + { + if ( '0' <= hexCharacter && hexCharacter <= '9' ) + { + return (int) (hexCharacter - '0' ); + } + + if ( 'a' <= hexCharacter && hexCharacter <= 'f' ) + { + return (int) (hexCharacter - 'a') + 10; + } + + if ( 'A' <= hexCharacter && hexCharacter <= 'F' ) + { + return (int) (hexCharacter - 'A') + 10; + } + + return 0; + } + + public static int ParseHex( string source ) + { + var value = 0; + var shift = 0; + + for ( var i = source.Length - 1; i < source.Length; i++ ) + { + var hexValue = ParseHexCharacter( source[ i ] ) << shift; + shift += 4; + } + + return value; + + } + + public static Color ParseHexColor( string source, Color alternative ) + { + source = RegexUtility.Remove( source, @"^#" ); + + var numbers = new List(); + + for ( var i = 0; i < 3; i++ ) + { + var value = source.Substring( i * 2, 2 ); + var numberValue = ParseHex( value ) / 255f; + numbers.Add( numberValue ); + } + + if ( numbers.Count == 3 ) + { + numbers.Add( 1f ); + } + + return new Color( numbers[ 0 ], numbers[ 1 ], numbers[ 2 ] , numbers[ 3 ] ); + + } + + public static Color ParseRGBColor( string source, Color alternative ) + { + source = RegexUtility.Remove( source, @"^rgba?\(" ); + source = RegexUtility.Remove( source, @"\)$" ); + + var splits = Split( source, @"\," ); + var numbers = ListExtensions.Map( splits, + ( string value, int index ) => + { + if ( value.Contains( "%" ) ) + { + return (float) ParsePercentage( value ); + } + + return ParseFloat( value ); + } + ); + + if ( numbers.Count == 3 ) + { + numbers.Add( 1f ); + } + + return new Color( numbers[ 0 ], numbers[ 1 ], numbers[ 2 ] , numbers[ 3 ] ); + + } + + public static HSLColor ParseHSLColor( string source, HSLColor alternative ) + { + source = RegexUtility.Remove( source, @"^hsl\(" ); + source = RegexUtility.Remove( source, @"\)$" ); + + var splits = Split( source, @"\," ); + var numbers =ListExtensions.Map( splits, + ( string value, int index ) => + { + if ( value.Contains( "%" ) ) + { + return (float) ParsePercentage( value ); + } + + return ParseFloat( value ); + } + ); + + if ( numbers.Count < 3 ) + { + RJLog.Log("Not enough numbers parsed: ", source, ">>", numbers.Count, ListExtensions.Join( numbers, "," ) ); + } + + + if ( numbers.Count == 3 ) + { + numbers.Add( 1f ); + } + + return new HSLColor( numbers[ 0 ], numbers[ 1 ], numbers[ 2 ] , numbers[ 3 ] ); + } + + + + public static List Split( string source, string regex ) + { + return Split( source, new Regex( regex ) ); + } + + public static List SplitLines( string source ) + { + return Regex.Split( source, "\r\n|\r|\n" ).ToList(); + } + + public static string Remove( string source, string regex ) + { + return Replace( source, regex, "" ); + } + + public static string Replace( string source, Regex regex, string replacement ) + { + return regex.Replace( source, replacement ); + } + + public static string Remove( string source, Regex regex ) + { + return Replace( source, regex, "" ); + } + + + + public static string ReplaceMultiple( string source, Dictionary replacements ) + { + var replaced = source; + + foreach ( var vk in replacements ) + { + replaced = replaced.Replace( vk.Key, vk.Value ); + } + + return replaced; + } + + public static string UpperCaseAndWide( string source ) + { + var sb = new StringBuilder(); + + for ( int i = 0; i < source.Length; i++ ) + { + if ( i != 0 ) + { + sb.Append( " " ); + } + + sb.Append( ( source[ i ] + "" ).ToUpper() ); + + } + + return sb.ToString(); + } + + public static string TrimToLastPathFragment( string path ) + { + var splits = SplitPaths( path ); + + return splits[ splits.Count - 1 ]; + } + + public static bool StartsWithPathProtocol( string path ) + { + return Matching( path, @"^\w+://" ); + } + + public static string ExtractPathProtocol( string path ) + { + if ( ! StartsWithPathProtocol( path) ) + { + return ""; + } + + var splitPosition = path.IndexOf( "://" ); + + return path.Substring( 0, splitPosition + 3 ) ; + } + + public static string ParentPath( string path ) + { + var protocol = ExtractPathProtocol( path ); + + if ( protocol.Length != 0 ) + { + path = path.Substring( protocol.Length ); + } + + var list = SplitPaths( path ); + + list.RemoveAt( list.Count -1 ); + + return protocol + ListExtensions.Join( list, "/" ); + } + + + + + public static string ToValidCSName( string source) + { + var output = new StringBuilder(); + + for ( int i = 0; i < source.Length; i++) + { + var s = source[ i ]; + var isDigit = Char.IsDigit( s ); + var isLetter = Char.IsLetter( s ); + var isAscii = Char.IsAscii( s ); + + var isDigitAsFirst = i == 0 && isDigit; + var isAllowed = ( isDigit || isLetter ) && isAscii; + + if ( isDigitAsFirst || ! isAllowed ) + { + output.Append( "_" ); + } + else + { + output.Append( source[ i ] ); + } + } + + source = output.ToString(); + + return source.ToCamelCase(); + + } + + public static string JoinPaths( List paths, int startIndex = 0, int length = -1 ) + { + var normalizedPaths = new List(); + // normalizedPaths.AddRange( paths ); + + var endIndex = startIndex + length; + var end = ( length < 0 || ( length + startIndex ) >= paths.Count ) ? paths.Count : endIndex; + + for ( var i = startIndex; i < end; i++ ) + { + normalizedPaths.Add( _NormalizePath( paths[ i ] ) ); + } + + return ListExtensions.Join( normalizedPaths, "/" ); + } + + public static string Join( string pathA, string pathB, params string[] paths ) + { + var normalizedPaths = new List(); + normalizedPaths.Add( pathA ); + normalizedPaths.Add( pathB ); + normalizedPaths.AddRange( paths ); + + for ( var i = 0; i < normalizedPaths.Count; i++ ) + { + normalizedPaths[ i ] = _NormalizePath( normalizedPaths[ i ] ); + } + + return ListExtensions.Join( normalizedPaths, "/" ); + } + + + + public static string WindowsPath( string path ) + { + path = _NormalizePath( path ); + + var slashes = @"\/"; + + path = Regex.Replace( path, slashes, "\\" ); + + return path; + } + + + + #endif +} + +public class MatchRange +{ + public int start; + public int length; + + public MatchRange( int s, int l ) + { + start = s; + length = l; + } + + public string GetString( string source) + { + return source.Substring( start, length ); + } +} + +public class MatchResult +{ + public string source; + public bool matched = false; + + public MatchRange match; + + public List groups; + + public string this[ int index ] + { + get + { + if ( ! matched ) + { + return null; + } + + if ( index == 0 ) + { + return match.GetString( source ); + } + + if ( groups != null && index > 0 && index <= groups.Count ) + { + return groups[ index - 1 ] == null ? null : groups[ index - 1 ].GetString( source ); + } + + return null; + } + } + +} diff --git a/Runtime/Text/Text.cs b/Runtime/Text/Text.cs index 1212e2a..2dff3b9 100644 --- a/Runtime/Text/Text.cs +++ b/Runtime/Text/Text.cs @@ -5,10 +5,14 @@ using System.Text; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public static class Text { + #if !ROKOJORI_ACTION_CORE_GD + + public static string Repeat( this string text, int times ) { if ( times <= 0 ) @@ -26,6 +30,23 @@ namespace Rokojori return sb.ToString(); } + public static bool IsEmpty( string text ) + { + if ( text == null || text.Length == 0 ) + { + return true; + } + + if ( RegexUtility.Matching( text, "^(\\s|\\r|\\n)*$" ) ) + { + return true; + } + + return false; + } + + + public static string GetInnerMatch( this string text, string start, string ending, int offset = 0) { var startIndex = text.IndexOf( start, offset ); @@ -57,65 +78,8 @@ namespace Rokojori return before + next.CapitalizeVariable(); } - public static string MapCharacterToName( this char c ) - { - if ( char.IsLetter( c ) ) - { - if ( char.IsUpper( c ) ) - { - return "uppercase letter " + (c + "").ToLower(); - } - - return "lowercase letter " + c; - } - - if ( char.IsNumber( c ) ) - { - return "number " + c; - } - - - var input = c + ""; - - - var result = Regex.Replace( input, @"[!?.\-#+\[\]:,;_/]", - m => m.Value switch - { - " " => "space", - "!" => "exclamation mark", - "?" => "question mark", - "." => "dot", - "-" => "minus", - "+" => "plus", - "#" => "hash", - "[" => "opening square bracket", - "]" => "closing square bracket", - "{" => "opening curly bracket", - "}" => "closing curly bracket", - "(" => "opening round bracket", - ")" => "closing round bracket", - ":" => "colon", - "," => "comma", - ";" => "semicolon", - "_" => "underscore", - "/" => "slash", - _ => "u" + ( (int) m.Value[ 0 ] ).ToString( "X4" ) - } - ); - - return result; - } - public static string WithLeadingZeros( int value, int minDigits = 2 ) - { - var label = value + ""; - - while ( label.Length < minDigits ) - { - label = "0" + label; - } - - return label; - } + + public static string EscapeAsPathForCommandLine( this string path ) { @@ -212,8 +176,109 @@ namespace Rokojori return other; } - + + + + public static string MapCharacterToName( this char c ) + { + if ( char.IsLetter( c ) ) + { + if ( char.IsUpper( c ) ) + { + return "uppercase letter " + (c + "").ToLower(); + } + + return "lowercase letter " + c; + } + + if ( char.IsNumber( c ) ) + { + return "number " + c; + } + + + var input = c + ""; + + + var result = Regex.Replace( input, @"[!?.\-#+\[\]:,;_/]", + m => m.Value switch + { + " " => "space", + "!" => "exclamation mark", + "?" => "question mark", + "." => "dot", + "-" => "minus", + "+" => "plus", + "#" => "hash", + "[" => "opening square bracket", + "]" => "closing square bracket", + "{" => "opening curly bracket", + "}" => "closing curly bracket", + "(" => "opening round bracket", + ")" => "closing round bracket", + ":" => "colon", + "," => "comma", + ";" => "semicolon", + "_" => "underscore", + "/" => "slash", + _ => "u" + ( (int) m.Value[ 0 ] ).ToString( "X4" ) + } + ); + + return result; + } + + + public static List SplitLines( string text ) + { + return [.. Regex.Split( text, "\r\n|\r|\n" )]; + + + } + + + #else + + + public static List SplitLines( string text ) + { + /* + + return text.replace( "\r\n", "\n" ).replace( "\r", "\n" ).split( "\n", false ) + + */ + GDGlue.CommentToGD(); + + } + #endif + + public static string ExtractFileName( this string source ) + { + var slashIndex = -1; + + for ( int i = source.Length - 1; slashIndex == -1 && i >= 0; i -- ) + { + if ( source[ i ] == '/' || source[ i ] == '\\' ) + { + slashIndex = i; + } + } + + return slashIndex == -1 ? source : source.Substring( slashIndex + 1 ); + } + + public static string WithLeadingZeros( int value, int minDigits = 2 ) + { + var label = value + ""; + + while ( label.Length < minDigits ) + { + label = "0" + label; + } + + return label; + } } } \ No newline at end of file diff --git a/Runtime/Text/TextAnchor.cs b/Runtime/Text/TextAnchor.cs index 46f8f25..5cdf193 100644 --- a/Runtime/Text/TextAnchor.cs +++ b/Runtime/Text/TextAnchor.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class TextAnchor diff --git a/Runtime/Text/TextLine.cs b/Runtime/Text/TextLine.cs index 29df0c9..d60721d 100644 --- a/Runtime/Text/TextLine.cs +++ b/Runtime/Text/TextLine.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class TextLine @@ -44,7 +45,7 @@ namespace Rokojori } ); - return "{ " + Lists.Join( info, ", " ) + " }"; + return "{ " + ListExtensions.Join( info, ", " ) + " }"; } } diff --git a/Runtime/Text/TextLinesMapper.cs b/Runtime/Text/TextLinesMapper.cs index 724015c..1228e42 100644 --- a/Runtime/Text/TextLinesMapper.cs +++ b/Runtime/Text/TextLinesMapper.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class TextLinesMapper @@ -66,7 +67,7 @@ namespace Rokojori output.Add( line.info ); } - return Lists.Join( output, ",\n" ); + return ListExtensions.Join( output, ",\n" ); } } public TextLine GetLine( int characterIndex ) diff --git a/Runtime/Text/TextSelection.cs b/Runtime/Text/TextSelection.cs index 816f7d8..d6dec9d 100644 --- a/Runtime/Text/TextSelection.cs +++ b/Runtime/Text/TextSelection.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class TextSelection diff --git a/Runtime/Time/DateTime/DateMath.cs b/Runtime/Time/DateTime/DateMath.cs index 96c5066..726dd36 100644 --- a/Runtime/Time/DateTime/DateMath.cs +++ b/Runtime/Time/DateTime/DateMath.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class DateMath diff --git a/Runtime/Time/DateTime/ISOTimeStamp.cs b/Runtime/Time/DateTime/ISOTimeStamp.cs index d728cb3..9e881c8 100644 --- a/Runtime/Time/DateTime/ISOTimeStamp.cs +++ b/Runtime/Time/DateTime/ISOTimeStamp.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [GlobalClass] diff --git a/Runtime/Time/Duration/BeatsDuration.cs b/Runtime/Time/Duration/BeatsDuration.cs index e319d90..ddc5f89 100644 --- a/Runtime/Time/Duration/BeatsDuration.cs +++ b/Runtime/Time/Duration/BeatsDuration.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Time/Duration/Duration.cs b/Runtime/Time/Duration/Duration.cs index 3fa6c20..8c6cb5b 100644 --- a/Runtime/Time/Duration/Duration.cs +++ b/Runtime/Time/Duration/Duration.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -13,7 +14,7 @@ namespace Rokojori public abstract partial class Duration:Resource { [Export] - public TimeLine timeLine; + public Timeline timeLine; public virtual float GetDurationInSeconds() { @@ -22,7 +23,7 @@ namespace Rokojori public virtual float GetLoopPosition() { - var tl = TimeLineManager.Ensure( timeLine ); + var tl = TimelineManager.Ensure( timeLine ); var duration = GetDurationInSeconds(); diff --git a/Runtime/Time/Duration/SecondsDuration.cs b/Runtime/Time/Duration/SecondsDuration.cs index d0ea0df..eb71fdc 100644 --- a/Runtime/Time/Duration/SecondsDuration.cs +++ b/Runtime/Time/Duration/SecondsDuration.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -20,7 +21,7 @@ namespace Rokojori return seconds; } - public static SecondsDuration Create( float seconds, TimeLine tl ) + public static SecondsDuration Create( float seconds, Timeline tl ) { var sd = new SecondsDuration(); sd.seconds = seconds; diff --git a/Runtime/Time/ModulateTimeLineSpeed.cs b/Runtime/Time/ModulateTimeLineSpeed.cs index 0c57bde..a2079ec 100644 --- a/Runtime/Time/ModulateTimeLineSpeed.cs +++ b/Runtime/Time/ModulateTimeLineSpeed.cs @@ -2,13 +2,14 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] - public partial class ModulateTimeLineSpeed : SequenceAction + public partial class ModulateTimelineSpeed : SequenceAction { [Export] - public TimeLine timeline; + public Timeline timeline; [Export] public AnimationCurve curve; @@ -16,7 +17,7 @@ namespace Rokojori protected override void _OnTrigger() { - var tm = Unique.Get(); + var tm = Unique.Get(); if ( tm == null || timeline == null || curve == null ) { diff --git a/Runtime/Time/ModulateTimeLineSpeed.cs.uid b/Runtime/Time/ModulateTimeLineSpeed.cs.uid index b5c5799..9b5c55b 100644 --- a/Runtime/Time/ModulateTimeLineSpeed.cs.uid +++ b/Runtime/Time/ModulateTimeLineSpeed.cs.uid @@ -1 +1 @@ -uid://f1qtdesygcg +uid://dw76e4gfqy4no diff --git a/Runtime/Time/SetTimeLineSpeed.cs b/Runtime/Time/SetTimeLineSpeed.cs index 9671f2f..44a8e87 100644 --- a/Runtime/Time/SetTimeLineSpeed.cs +++ b/Runtime/Time/SetTimeLineSpeed.cs @@ -2,20 +2,21 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass ] - public partial class SetTimeLineSpeed : Action + public partial class SetTimelineSpeed : Action { [Export] - public TimeLine timeline; + public Timeline timeline; [Export] public float speed = 1; protected override void _OnTrigger() { - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); timeline.runner.speed = speed; } diff --git a/Runtime/Time/SetTimeLineSpeed.cs.uid b/Runtime/Time/SetTimeLineSpeed.cs.uid index 4830e31..3c488c3 100644 --- a/Runtime/Time/SetTimeLineSpeed.cs.uid +++ b/Runtime/Time/SetTimeLineSpeed.cs.uid @@ -1 +1 @@ -uid://t8ut0fhqua0v +uid://b7dgudl32s41y diff --git a/Runtime/Time/TImeLineManager_Scheduling.cs b/Runtime/Time/TImeLineManager_Scheduling.cs index c3093a3..68e6ef5 100644 --- a/Runtime/Time/TImeLineManager_Scheduling.cs +++ b/Runtime/Time/TImeLineManager_Scheduling.cs @@ -7,49 +7,50 @@ using Godot; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { - public partial class TimeLineManager:NetworkNode + public partial class TimelineManager:NetworkNode { - public static void RemoveEvent( TimeLine timeline, int id ) + public static void RemoveEvent( Timeline timeline, int id ) { RJLog.Log( "Removing tick:", timeline, id ); - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); var runner = timeline.runner; runner.RemoveEvent( id ); } - public static TimeLineCallback ScheduleCallback( TimeLine timeline, System.Action callback ) + public static TimelineCallback ScheduleCallback( Timeline timeline, System.Action callback ) { - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); var runner = timeline.runner; - var eventID = TimeLineManager.CreateID(); + var eventID = TimelineManager.CreateID(); return runner._ScheduleCallback( callback, eventID ); } - static async Task RunLater( float delay, TimeLineEvent te, Action callback, Node context = null ) + static async Task RunLater( float delay, TimelineEvent te, Action callback, Node context = null ) { await context.RequestNextFrame(); - await context.WaitForAsyncTimer( delay ); + await context.WaitFor( delay ); callback( te ); } - public static TimeLineEvent ScheduleEvent( TimeLine timeline, float position, Action callback, Node context = null ) + public static TimelineEvent ScheduleEvent( Timeline timeline, float position, Action callback, Node context = null ) { - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); if ( Engine.IsEditorHint() ) { - var te = new TimeLineEvent(); + var te = new TimelineEvent(); var time = timeline.position; RunLater( position - time, te, callback, context ); return te; @@ -57,36 +58,36 @@ namespace Rokojori var runner = timeline.runner; - var eventID = TimeLineManager.CreateID(); + var eventID = TimelineManager.CreateID(); return runner._ScheduleEvent( position, eventID, false, callback ); } - public static TimeLineEvent ScheduleEventIn( TimeLine timeline, float offset, Action callback, Node context = null) + public static TimelineEvent ScheduleEventIn( Timeline timeline, float offset, Action callback, Node context = null) { - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); var position = timeline.position + offset; return ScheduleEvent( timeline, position, callback, context ); } - public static TimeLineEvent ScheduleEventWith( Duration duration, Action callback, Node context = null ) + public static TimelineEvent ScheduleEventWith( Duration duration, Action callback, Node context = null ) { return ScheduleEventIn( duration.timeLine, duration.GetDurationInSeconds(), callback, context ); } - public static TimeLineEvent ScheduleLoopEvent( TimeLine timeline, float duration, float offset, Action callback ) + public static TimelineEvent ScheduleLoopEvent( Timeline timeline, float duration, float offset, Action callback ) { - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); var runner = timeline.runner; - var eventID = TimeLineManager.CreateID(); + var eventID = TimelineManager.CreateID(); return runner._ScheduleLoopEvent( duration, offset, eventID, false, callback ); } - public static TimeLineSpan ScheduleSpan( TimeLine timeline, float start, float end, Action callback, Node context = null ) + public static TimelineSpan ScheduleSpan( Timeline timeline, float start, float end, Action callback, Node context = null ) { - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); var delay = start - timeline.position; var duration = end - start; @@ -112,12 +113,12 @@ namespace Rokojori return runner._ScheduleSpan( start, end, spanID, false, callback );*/ } - public static TimeLineSpan ScheduleSpanWith( Duration duration, Action callback, Node context = null ) + public static TimelineSpan ScheduleSpanWith( Duration duration, Action callback, Node context = null ) { return ScheduleSpanIn( duration.timeLine, 0, duration.GetDurationInSeconds(), callback, context ); } - static async Task RunSpanInEditor( TimeLineSpan span, float duration, Action callback, Node context = null ) + static async Task RunSpanInEditor( TimelineSpan span, float duration, Action callback, Node context = null ) { if ( context == null ) { @@ -132,33 +133,33 @@ namespace Rokojori var elapsed = 0f; var isFirst = true; - var startTime = Time.GetTicksMsec() / 1000.0f; + var startTime = Godot.Time.GetTicksMsec() / 1000.0f; span.start = startTime; span.end = startTime + duration; span.wasInside = true; - span.timeLine = new TimeLine(); + span.timeLine = new Timeline(); while ( elapsed < duration ) { - var type = isFirst ? TimeLineSpanUpdateType.Start : TimeLineSpanUpdateType.InSpan; + var type = isFirst ? TimelineSpanUpdateType.Start : TimelineSpanUpdateType.InSpan; isFirst = false; callback( span, type ); await context.RequestNextFrame(); - elapsed = ( Time.GetTicksMsec() / 1000.0f - startTime ); + elapsed = (Godot.Time.GetTicksMsec() / 1000.0f - startTime ); } - callback( span, TimeLineSpanUpdateType.End ); + callback( span, TimelineSpanUpdateType.End ); } - public static TimeLineSpan ScheduleSpanIn( TimeLine timeline, float delay, float duration, Action callback, Node context = null ) + public static TimelineSpan ScheduleSpanIn( Timeline timeline, float delay, float duration, Action callback, Node context = null ) { - timeline = TimeLineManager.Ensure( timeline ); + timeline = TimelineManager.Ensure( timeline ); if ( Engine.IsEditorHint() ) { - var span = new TimeLineSpan(); - span.id = GodotRandom.Get().IntegerInclusive( 0, 1000000 ); + var span = new TimelineSpan(); + span.id = GodotRandom.Get().IntegerInclusiveInRange( 0, 1000000 ); // var root = Root.Window(); // RJLog.Log( root, RokojoriPlugin.Get() ); @@ -178,7 +179,7 @@ namespace Rokojori var start = timeline.position + delay; var end = start + duration; - var spanID = TimeLineManager.CreateID(); + var spanID = TimelineManager.CreateID(); return runner._ScheduleSpan( start, end, spanID, false, callback ); } diff --git a/Runtime/Time/TImeLineManager_Scheduling.cs.uid b/Runtime/Time/TImeLineManager_Scheduling.cs.uid index d371951..e6e71b7 100644 --- a/Runtime/Time/TImeLineManager_Scheduling.cs.uid +++ b/Runtime/Time/TImeLineManager_Scheduling.cs.uid @@ -1 +1 @@ -uid://b822fc5go8kwo +uid://clw0a3x4nmr6u diff --git a/Runtime/Time/TimeLine.cs b/Runtime/Time/TimeLine.cs index 8afdefc..7f8aa36 100644 --- a/Runtime/Time/TimeLine.cs +++ b/Runtime/Time/TimeLine.cs @@ -5,13 +5,30 @@ using System.Collections.Generic; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { - [Tool] - [GlobalClass] - public partial class TimeLine:Resource + [RokojoriActionCoreExport] + [Tool][GlobalClass] + public partial class Timeline:Resource { + + [Export] + public bool executesInPause = false; + + [Export] + public bool isModulatedByTimeScale = false; + + [ExportGroup("Start")] + [Export] + public bool autoStart = true; + + [Export] + public float startSpeed = 1; + + + [ExportGroup("Looping")] [Export] public bool isLooping = false; @@ -21,35 +38,31 @@ namespace Rokojori [Export] public float loopEnd = 100000; - [Export] - public float startSpeed = 1; - [Export] - public bool autoStart = true; - [Export] - public bool executesInPause = false; - public static float osTime => (float)( Time.GetTicksMsec() / 1000.0 ); - public TimeLineRunner runner + + public static float osTime => (float)(Godot.Time.GetTicksMsec() / 1000.0 ); + + public TimelineRunner runner { get { - var tm = TimeLineManager.Get(); + var tm = TimelineManager.Get(); if ( tm == null ) { return null; } - return tm.GetRunner( this ); + return tm.GetRunnerByTimeline( this ); } } public float delta => runner == null ? ( (float)( (SceneTree)Engine.GetMainLoop()).Root.GetProcessDeltaTime() ): runner.currentDelta; - public float position => runner == null ? Time.GetTicksMsec() / 1000f : runner.position; + public float position => runner == null ? Godot.Time.GetTicksMsec() / 1000f : runner.position; public float ComputePhase( float duration, float offset = 0 ) { diff --git a/Runtime/Time/TimeLine.cs.uid b/Runtime/Time/TimeLine.cs.uid index 176624d..bd061ce 100644 --- a/Runtime/Time/TimeLine.cs.uid +++ b/Runtime/Time/TimeLine.cs.uid @@ -1 +1 @@ -uid://fqm54rn8fnnl +uid://86qwdjl5kbld diff --git a/Runtime/Time/TimeLineCallback.cs b/Runtime/Time/TimeLineCallback.cs index 5f98fbe..907765c 100644 --- a/Runtime/Time/TimeLineCallback.cs +++ b/Runtime/Time/TimeLineCallback.cs @@ -6,13 +6,14 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { - public class TimeLineCallback + public class TimelineCallback { public int id; public bool done; - public TimeLine timeLine; - public System.Action callback; + public Timeline timeLine; + public System.Action callback; } } \ No newline at end of file diff --git a/Runtime/Time/TimeLineCallback.cs.uid b/Runtime/Time/TimeLineCallback.cs.uid index 910dfcc..34c9bf5 100644 --- a/Runtime/Time/TimeLineCallback.cs.uid +++ b/Runtime/Time/TimeLineCallback.cs.uid @@ -1 +1 @@ -uid://brqn8taooe7ug +uid://bka252qrc5wr diff --git a/Runtime/Time/TimeLineEvent.cs b/Runtime/Time/TimeLineEvent.cs index e9199d5..11a77cf 100644 --- a/Runtime/Time/TimeLineEvent.cs +++ b/Runtime/Time/TimeLineEvent.cs @@ -6,9 +6,10 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { - public class TimeLineEvent + public class TimelineEvent { public int id; public bool persistent; @@ -16,8 +17,8 @@ namespace Rokojori public bool wasInside = false; public bool looping = false; public float loopDuration = 0; - public Action callback; - public TimeLine timeLine; + public Action callback; + public Timeline timeLine; public float GetNextLoopPosition( float timelinePosition ) diff --git a/Runtime/Time/TimeLineEvent.cs.uid b/Runtime/Time/TimeLineEvent.cs.uid index 1c5fa6c..7e71e57 100644 --- a/Runtime/Time/TimeLineEvent.cs.uid +++ b/Runtime/Time/TimeLineEvent.cs.uid @@ -1 +1 @@ -uid://bj1twniua4q8w +uid://b82uqqj3who4c diff --git a/Runtime/Time/TimeLineManager.cs b/Runtime/Time/TimeLineManager.cs index a366c2b..71e29c7 100644 --- a/Runtime/Time/TimeLineManager.cs +++ b/Runtime/Time/TimeLineManager.cs @@ -4,190 +4,220 @@ using System.Collections; using System.Collections.Generic; using System; using Godot; +using Rokojori.Extensions; +namespace Rokojori; -namespace Rokojori -{ - [Tool] - [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/TimeLineManager.svg") ] - public partial class TimeLineManager:NetworkNode - { - [Export] - public TimeLine[] timeLines = new TimeLine[ 0 ]; - - [Export] - public TimeLine gametimeTimeline; - - [Export] - public TimeLine realtimeTimeline; - - [Export] - public bool computeRealtimeWithEngineDelta; - - - List _runners = new List(); - - int _idCounter = 0; - bool _initialized = false; - - public override void _Ready() - { - Initialize(); - } - - public static TimeLineManager Get() - { - return Unique.Get(); - } - - float _lastUpdate = 0; - DateTime lastUpdated = DateTime.Now; - float _estimatedDelta = 0; - float _estimatedDeltaFilter = 0.9f; - float _unscaledDelta = 0; - double _lastRealtimePosition = 0; - double _realtimePosition = 0; - - float _lastTimeScale = 1; - - QueueList _processCallbacks = new QueueList(); - - bool _inProcess = false; - - public bool inProcess => _inProcess; - - bool _paused = false; - public bool paused => _paused; - - public override void _Process( double delta ) - { - _inProcess = true; - - _paused = GetTree().Paused; - - UpdateRealTime( delta ); - - if ( ! Engine.IsEditorHint() && gametimeTimeline != null ) - { - Engine.TimeScale = GetRunner( gametimeTimeline ).modulatedSpeed; - - } +/** + + + Manages time lines for events, callbacks tweens. + + + + Most time-based SequenceActions use a Timeline to define the clock it belongs to. - _runners.ForEach( r => r.UpdateTimeLine( unscaledTimeDelta ) ); + - _processCallbacks.IterateAndResolve( t => t() ); + +*/ - _inProcess = false; - } - - public void AddProcessCallback( System.Action a ) +[Tool] +[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/TimelineManager.svg") ] +public partial class TimelineManager:NetworkNode +{ + [Export] + public Timeline[] timelines = new Timeline[ 0 ]; + + [Export] + public Timeline timeScaleTimeline; + + [Export] + public Timeline realtimeTimeline; + + [Export] + public bool computeRealtimeWithEngineDelta; + + + List _runners = new List(); + + int _idCounter = 0; + bool _initialized = false; + + public override void _Ready() + { + if ( _runners == null ) { - _processCallbacks.QueueInsert( a ); + GD.Print( "is null" ); } - public void RemoveProcessCallback( System.Action a ) - { - _processCallbacks.QueueRemoval( a ); - } - - public int GetTimeLineIndex( TimeLine timeLine ) - { - return timeLines == null ? -1 : Arrays.IndexOf( timeLines, timeLine ); - } - - public void Modulate( TimeLine timeline, AnimationCurve c, Action onReady ) - { - var runner = GetRunner( GetTimeLineIndex( timeline ) ); - runner.Modulate( c, onReady ); - } - - void UpdateRealTime( double engineDelta ) - { - var now = DateTime.Now; - var unscaled = (float) ( ( now - lastUpdated ).TotalSeconds ); - lastUpdated = now; - - if ( unscaled < 1f/20f ) - { - _estimatedDelta += _estimatedDeltaFilter * ( unscaled - _estimatedDelta ); - } - - if ( computeRealtimeWithEngineDelta ) - { - _unscaledDelta = (float)( Engine.TimeScale == 0 ? _estimatedDelta : ( engineDelta / Engine.TimeScale ) ); - } - else - { - _unscaledDelta = _estimatedDelta; - } - - - _lastRealtimePosition = _realtimePosition; - _realtimePosition += _unscaledDelta; - } - - public float unscaledTimeDelta => _unscaledDelta; - public double realtime => _realtimePosition; - - - - - void Initialize() - { - if ( _initialized ) - { - return; - } - - _initialized = true; - _runners = Lists.Map( timeLines, tl => new TimeLineRunner( tl, this ) ); - - // this.LogInfo( "Created runners:", _runners.Count ); - } - - public static TimeLine Ensure( TimeLine timeline ) - { - if ( timeline != null ) - { - return timeline; - } - - var tm = Get(); - - if ( tm == null ) - { - return new TimeLine(); - } - - return tm.gametimeTimeline; - } - - public TimeLineRunner GetRunner( TimeLine timeline ) - { - return GetRunner( _runners.FindIndex( r => r.timeLine == timeline ) ); - } - - public TimeLineRunner GetRunner( int index ) - { - if ( index < 0 || index >= _runners.Count ) - { - return null ; - } - - return _runners[ index ]; - } - - int _CreateID() - { - _idCounter ++; - return _idCounter; - } - - public static int CreateID() - { - var tm = Get(); - return tm._CreateID(); - } - + _runners = null; + Initialize(); } -} \ No newline at end of file + + public static TimelineManager Get() + { + return Unique.Get(); + } + + float _lastUpdate = 0; + //DateTime lastUpdated = DateTime.Now; + float lastUpdated = TimeTool.Now(); + float _estimatedDelta = 0; + float _estimatedDeltaFilter = 0.9f; + float _unscaledDelta = 0; + double _lastRealtimePosition = 0; + double _realtimePosition = 0; + + float _lastTimeScale = 1; + + QueueList _processCallbacks = new QueueList(); + + bool _inProcess = false; + + public bool inProcess => _inProcess; + + bool _paused = false; + public bool paused => _paused; + + public override void _Process( double delta ) + { + _inProcess = true; + + _paused = GetTree().Paused; + + UpdateRealTime( delta ); + + if ( ! Engine.IsEditorHint() && timeScaleTimeline != null ) + { + Engine.TimeScale = GetRunnerByTimeline( timeScaleTimeline ).modulatedSpeed; + } + + _runners.ForEach( + r => + { + if ( r == null ) + { + return; + } + + r.UpdateTimeLine( unscaledTimeDelta ); + } + ); + + _processCallbacks.IterateAndResolve( t => t() ); + + _inProcess = false; + } + + + public void AddProcessCallback( System.Action a ) + { + _processCallbacks.QueueInsert( a ); + } + + public void RemoveProcessCallback( System.Action a ) + { + _processCallbacks.QueueRemoval( a ); + } + + public int GetTimeLineIndex( Timeline timeLine ) + { + return timelines == null ? -1 : Arrays.IndexOf( timelines, timeLine ); + } + + public void Modulate( Timeline timeline, AnimationCurve c, Action onReady ) + { + var runner = GetRunner( GetTimeLineIndex( timeline ) ); + runner.Modulate( c, onReady ); + } + + void UpdateRealTime( double engineDelta ) + { + var now = TimeTool.Now(); + var unscaled = ( now - lastUpdated ); + lastUpdated = now; + + if ( unscaled < 1f/20f ) + { + _estimatedDelta += _estimatedDeltaFilter * ( unscaled - _estimatedDelta ); + } + + if ( computeRealtimeWithEngineDelta ) + { + _unscaledDelta = (float)( Engine.TimeScale == 0 ? _estimatedDelta : ( engineDelta / Engine.TimeScale ) ); + } + else + { + _unscaledDelta = _estimatedDelta; + } + + + _lastRealtimePosition = _realtimePosition; + _realtimePosition += _unscaledDelta; + } + + public float unscaledTimeDelta => _unscaledDelta; + public double realtime => _realtimePosition; + + + + + void Initialize() + { + if ( _initialized ) + { + return; + } + + _initialized = true; + _runners = ListExtensions.Map( timelines, tl => new TimelineRunner( tl, this ) ); + + // this.LogInfo( "Created runners:", _runners.Count ); + } + + public static Timeline Ensure( Timeline timeline ) + { + if ( timeline != null ) + { + return timeline; + } + + var tm = Get(); + + if ( tm == null ) + { + return new Timeline(); + } + + return tm.timeScaleTimeline; + } + + public TimelineRunner GetRunnerByTimeline( Timeline timeline ) + { + return GetRunner( _runners.FindIndex( r => r.timeLine == timeline ) ); + } + + public TimelineRunner GetRunner( int index ) + { + if ( index < 0 || index >= _runners.Count ) + { + return null ; + } + + return _runners[ index ]; + } + + int _CreateID() + { + _idCounter ++; + return _idCounter; + } + + public static int CreateID() + { + var tm = Get(); + return tm._CreateID(); + } + +} diff --git a/Runtime/Time/TimeLineManager.cs.uid b/Runtime/Time/TimeLineManager.cs.uid index 178931e..81c1f5a 100644 --- a/Runtime/Time/TimeLineManager.cs.uid +++ b/Runtime/Time/TimeLineManager.cs.uid @@ -1 +1 @@ -uid://cdweilvlwjucr +uid://b5j3rl0bdcdsi diff --git a/Runtime/Time/TimeLineRunner.cs b/Runtime/Time/TimeLineRunner.cs index 4aaa268..0a9f96f 100644 --- a/Runtime/Time/TimeLineRunner.cs +++ b/Runtime/Time/TimeLineRunner.cs @@ -6,325 +6,326 @@ using System; using Godot; -namespace Rokojori -{ - public class TimeLineRunner +using Rokojori.Extensions; +namespace Rokojori; + + +public class TimelineRunner +{ + public Timeline timeLine; + public TimelineManager manager; + + public float lastPosition = 0; + public float position = 0; + public bool playing = false; + public float deltaScale = 1; + public float speed = 1; + + List events = new List(); + List spans = new List(); + List callbacks = new List(); + + AnimationCurve modulatorCurve; + float modulatorTime; + Vector3 modulatorRandomization; + Action modulatorOnReady = null; + float _lastModulation = 1; + float _currentDelta = 1; + + public float modulatedSpeed => (float)( speed * _lastModulation * deltaScale ); + public float currentDelta => _currentDelta; + + public TimelineRunner( Timeline timeLine, TimelineManager manager ) { - public TimeLine timeLine; - public TimeLineManager manager; - - public float lastPosition = 0; - public float position = 0; - public bool playing = false; - public float deltaScale = 1; - public float speed = 1; + this.timeLine = timeLine; + this.manager = manager; + this.speed = timeLine.startSpeed; - List events = new List(); - List spans = new List(); - List callbacks = new List(); + playing = timeLine.autoStart; + } - AnimationCurve modulatorCurve; - float modulatorTime; - Vector3 modulatorRandomization; - Action modulatorOnReady = null; - float _lastModulation = 1; - float _currentDelta = 1; - - public float modulatedSpeed => (float)( speed * _lastModulation * deltaScale ); - public float currentDelta => _currentDelta; - - public TimeLineRunner( TimeLine timeLine, TimeLineManager manager ) + public void Modulate( AnimationCurve curve, Action onReady ) + { + if ( modulatorOnReady != null ) { - this.timeLine = timeLine; - this.manager = manager; - this.speed = timeLine.startSpeed; - - playing = timeLine.autoStart; + modulatorOnReady( false ); } - public void Modulate( AnimationCurve curve, Action onReady ) - { - if ( modulatorOnReady != null ) - { - modulatorOnReady( false ); - } + modulatorCurve = curve; + modulatorTime = 0; + modulatorRandomization = curve.Randomize(); + modulatorOnReady = onReady; + } - modulatorCurve = curve; - modulatorTime = 0; - modulatorRandomization = curve.Randomize(); - modulatorOnReady = onReady; + public void UpdateTimeLine( float realtimeDelta ) + { + if ( ! playing || ( manager.paused && ! timeLine.executesInPause )) + { + return; } - public void UpdateTimeLine( float realtimeDelta ) - { - if ( ! playing || ( manager.paused && ! timeLine.executesInPause )) + var modulation = 1f; + + if ( modulatorCurve != null ) + { + modulation = modulatorCurve.SampleRandomized( modulatorTime, modulatorRandomization ); + + _lastModulation = modulation; + modulatorTime += realtimeDelta; + + if ( modulatorTime >= modulatorCurve.GetRandomizedEndTime( modulatorRandomization ) ) { - return; - } + var mr = modulatorOnReady; + modulatorOnReady = null; + modulatorCurve = null; + modulatorTime = 0; + modulatorRandomization = Vector3.Zero; - var modulation = 1f; - - if ( modulatorCurve != null ) - { - modulation = modulatorCurve.Sample( modulatorTime, modulatorRandomization ); - - _lastModulation = modulation; - modulatorTime += realtimeDelta; - - if ( modulatorTime >= modulatorCurve.GetRandomizedEndTime( modulatorRandomization ) ) + if ( mr != null ) { - var mr = modulatorOnReady; - modulatorOnReady = null; - modulatorCurve = null; - modulatorTime = 0; - modulatorRandomization = Vector3.Zero; - - if ( mr != null ) - { - mr( true ); - } - + mr( true ); } + } - else - { - _lastModulation = 1; - } - - _currentDelta = realtimeDelta * deltaScale * speed * modulation; - lastPosition = position; - position += _currentDelta; - - var isForward = speed >= 0; - - if ( isForward ) - { - ProcessForward(); - } - + } + else + { + _lastModulation = 1; } + _currentDelta = realtimeDelta * deltaScale * speed * modulation; + lastPosition = position; + position += _currentDelta; + var isForward = speed >= 0; + + if ( isForward ) + { + ProcessForward(); + } - void ProcessForward() - { - ProcessEvents(); - ProcessSpans(); - ProcessCallbacks(); + } + + + + void ProcessForward() + { + ProcessEvents(); + ProcessSpans(); + ProcessCallbacks(); + } + + List _callbackAdditions = new List(); + + void ProcessCallbacks() + { + if ( _callbackAdditions.Count > 0 ) + { + callbacks.AddRange( _callbackAdditions ); + _callbackAdditions.Clear(); } - List _callbackAdditions = new List(); + callbacks.ForEach( c => c.callback( c ) ); - void ProcessCallbacks() + + } + + void ProcessEvents() + { + if ( requestedRemovalIDs.Count > 0 ) { - if ( _callbackAdditions.Count > 0 ) - { - callbacks.AddRange( _callbackAdditions ); - _callbackAdditions.Clear(); - } + requestedRemovalIDs.Sort(); - callbacks.ForEach( c => c.callback( c ) ); + RJLog.Log( "Removing:", requestedRemovalIDs, "From:", events ); + //Lists.RemoveIncreasingSortedIndices( events, requestedRemovalIDs ); + events = events.Filter( e => ! requestedRemovalIDs.Contains( e.id ) ); + requestedRemovalIDs.Clear(); + } + List eventRemovals = null; - } - - void ProcessEvents() + for ( int i = 0; i < events.Count; i++ ) { - if ( requestedRemovalIDs.Count > 0 ) + var eventPosition = events[ i ].position; + + if ( events[ i ].looping ) { - requestedRemovalIDs.Sort(); + var next = events[ i ].GetNextLoopPosition( lastPosition ); + var previous = events[ i ].GetPreviousLoopPosition( position ); - RJLog.Log( "Removing:", requestedRemovalIDs, "From:", events ); - //Lists.RemoveIncreasingSortedIndices( events, requestedRemovalIDs ); - events = events.Filter( e => ! requestedRemovalIDs.Contains( e.id ) ); - requestedRemovalIDs.Clear(); - } - - List eventRemovals = null; - - for ( int i = 0; i < events.Count; i++ ) - { - var eventPosition = events[ i ].position; - - if ( events[ i ].looping ) + if ( next != previous ) { - var next = events[ i ].GetNextLoopPosition( lastPosition ); - var previous = events[ i ].GetPreviousLoopPosition( position ); - - if ( next != previous ) - { - continue; - } - - eventPosition = next; - } - - if ( ! RangeDouble.ContainsExclusiveMax( lastPosition, position, eventPosition ) ) - { - if ( events[ i ].wasInside ) - { - eventRemovals = AddRemoval( events[ i ].persistent, i, eventRemovals ); - } - continue; } - events[ i ].callback( events[ i ] ); - events[ i ].wasInside = true; - - } - - if ( eventRemovals != null ) - { - Lists.RemoveIncreasingSortedIndices( events, eventRemovals ); - } - + eventPosition = next; + } + if ( ! RangeDouble.ContainsExclusiveMax( lastPosition, position, eventPosition ) ) + { + if ( events[ i ].wasInside ) + { + eventRemovals = AddRemoval( events[ i ].persistent, i, eventRemovals ); + } + + continue; + } + + events[ i ].callback( events[ i ] ); + events[ i ].wasInside = true; + } - void ProcessSpans() - { - if ( spans.Count == 0 ) - { - return; - } - - List spanRemovals = null; - - var timelineSpan = new RangeDouble( lastPosition, position ); - var span = new RangeDouble( 0, 1 ); - var isForward = lastPosition < position; - - for ( int i = 0; i < spans.Count; i++ ) - { - span.min = spans[ i ].start; - span.max = spans[ i ].end; - - var overlaps = timelineSpan.Overlaps( span ); - - if ( ! overlaps ) - { - if ( spans[ i ].wasInside ) - { - spanRemovals = AddRemoval( spans[ i ].persistent, i, spanRemovals ); - } - - continue; - } - - var isStart = timelineSpan.Contains( spans[ i ].start ); - var isEnd = timelineSpan.Contains( spans[ i ].end ); - - - var spanType = TimeLineSpanUpdateType.InSpan; - - if ( isStart && isEnd ) - { - spanType = TimeLineSpanUpdateType.CompletelyInside; - } - else if ( isStart ) - { - spanType = TimeLineSpanUpdateType.Start; - } - else if ( isEnd ) - { - spanType = TimeLineSpanUpdateType.End; - } - - spans[ i ].wasInside = true; - - spans[ i ].callback( spans[ i ], spanType ); - - } - - if ( spanRemovals != null ) - { - Lists.RemoveIncreasingSortedIndices( spans, spanRemovals ); - } + if ( eventRemovals != null ) + { + ListExtensions.RemoveIncreasingSortedIndices( events, eventRemovals ); } - List AddRemoval( bool isPersistent, int index, List list ) + } + + void ProcessSpans() + { + if ( spans.Count == 0 ) { - if ( isPersistent ) + return; + } + + List spanRemovals = null; + + var timelineSpan = RangeDouble.Create( lastPosition, position ); + var span = RangeDouble.Create( 0, 1 ); + var isForward = lastPosition < position; + + for ( int i = 0; i < spans.Count; i++ ) + { + span.min = spans[ i ].start; + span.max = spans[ i ].end; + + var overlaps = timelineSpan.Overlaps( span ); + + if ( ! overlaps ) { - return list; + if ( spans[ i ].wasInside ) + { + spanRemovals = AddRemoval( spans[ i ].persistent, i, spanRemovals ); + } + + continue; } - if ( list == null ) + var isStart = timelineSpan.ContainsValue( spans[ i ].start ); + var isEnd = timelineSpan.ContainsValue( spans[ i ].end ); + + + var spanType = TimelineSpanUpdateType.InSpan; + + if ( isStart && isEnd ) { - list = new List(); + spanType = TimelineSpanUpdateType.CompletelyInside; + } + else if ( isStart ) + { + spanType = TimelineSpanUpdateType.Start; + } + else if ( isEnd ) + { + spanType = TimelineSpanUpdateType.End; } - list.Add( index ); + spans[ i ].wasInside = true; + spans[ i ].callback( spans[ i ], spanType ); + + } + + if ( spanRemovals != null ) + { + ListExtensions.RemoveIncreasingSortedIndices( spans, spanRemovals ); + } + } + + + List AddRemoval( bool isPersistent, int index, List list ) + { + if ( isPersistent ) + { return list; } - List requestedRemovalIDs = new List(); - - public void RemoveEvent( int eventID ) + if ( list == null ) { - requestedRemovalIDs.Add( eventID ); - - RJLog.Log( "requestedRemovals add:", eventID ); + list = new List(); } - public TimeLineCallback _ScheduleCallback( Action callback, int eventID ) - { - var tle = new TimeLineCallback(); - tle.id = eventID; - tle.callback = callback; - tle.timeLine = timeLine; + list.Add( index ); - _callbackAdditions.Add( tle ); - - return tle; - } - - public TimeLineEvent _ScheduleEvent( float position, int eventID, bool isPersistent, Action callback ) - { - var tle = new TimeLineEvent(); - tle.position = position; - tle.id = eventID; - tle.persistent = isPersistent; - tle.callback = callback; - tle.timeLine = timeLine; - - events.Add( tle ); - - return tle; - } - - public TimeLineEvent _ScheduleLoopEvent( float loopDuration, float loopOffset, int eventID, bool isPersistent, Action callback ) - { - var tle = new TimeLineEvent(); - tle.position = loopOffset; - tle.looping = true; - tle.loopDuration = loopDuration; - tle.id = eventID; - tle.persistent = isPersistent; - tle.callback = callback; - tle.timeLine = timeLine; - events.Add( tle ); - - return tle; - } - - public TimeLineSpan _ScheduleSpan( float start, float end, int eventID, bool isPersistent, Action callback ) - { - var tse = new TimeLineSpan(); - tse.start = start; - tse.end = end; - tse.id = eventID; - tse.persistent = isPersistent; - tse.wasInside = false; - tse.callback = callback; - tse.timeLine = timeLine; - - spans.Add( tse ); - - return tse; - } + return list; } -} \ No newline at end of file + + List requestedRemovalIDs = new List(); + + public void RemoveEvent( int eventID ) + { + requestedRemovalIDs.Add( eventID ); + + RJLog.Log( "requestedRemovals add:", eventID ); + } + + public TimelineCallback _ScheduleCallback( Action callback, int eventID ) + { + var tle = new TimelineCallback(); + tle.id = eventID; + tle.callback = callback; + tle.timeLine = timeLine; + + _callbackAdditions.Add( tle ); + + return tle; + } + + public TimelineEvent _ScheduleEvent( float position, int eventID, bool isPersistent, Action callback ) + { + var tle = new TimelineEvent(); + tle.position = position; + tle.id = eventID; + tle.persistent = isPersistent; + tle.callback = callback; + tle.timeLine = timeLine; + + events.Add( tle ); + + return tle; + } + + public TimelineEvent _ScheduleLoopEvent( float loopDuration, float loopOffset, int eventID, bool isPersistent, Action callback ) + { + var tle = new TimelineEvent(); + tle.position = loopOffset; + tle.looping = true; + tle.loopDuration = loopDuration; + tle.id = eventID; + tle.persistent = isPersistent; + tle.callback = callback; + tle.timeLine = timeLine; + events.Add( tle ); + + return tle; + } + + public TimelineSpan _ScheduleSpan( float start, float end, int eventID, bool isPersistent, Action callback ) + { + var tse = new TimelineSpan(); + tse.start = start; + tse.end = end; + tse.id = eventID; + tse.persistent = isPersistent; + tse.wasInside = false; + tse.callback = callback; + tse.timeLine = timeLine; + + spans.Add( tse ); + + return tse; + } +} diff --git a/Runtime/Time/TimeLineRunner.cs.uid b/Runtime/Time/TimeLineRunner.cs.uid index ea9c221..582aaf6 100644 --- a/Runtime/Time/TimeLineRunner.cs.uid +++ b/Runtime/Time/TimeLineRunner.cs.uid @@ -1 +1 @@ -uid://dmtb4g8m731af +uid://djcv5dh2u73v5 diff --git a/Runtime/Time/TimeLineSpan.cs b/Runtime/Time/TimeLineSpan.cs index 3c92e97..43284ad 100644 --- a/Runtime/Time/TimeLineSpan.cs +++ b/Runtime/Time/TimeLineSpan.cs @@ -6,9 +6,10 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { - public enum TimeLineSpanUpdateType + public enum TimelineSpanUpdateType { Start, InSpan, @@ -17,16 +18,16 @@ namespace Rokojori } - public class TimeLineSpan + public class TimelineSpan { public int id; public bool persistent; public float start; public float end; public bool wasInside = false; - public TimeLine timeLine; + public Timeline timeLine; - public Action callback; + public Action callback; public float duration => end - start; diff --git a/Runtime/Time/TimeLineSpan.cs.uid b/Runtime/Time/TimeLineSpan.cs.uid index dda6e50..dd01f13 100644 --- a/Runtime/Time/TimeLineSpan.cs.uid +++ b/Runtime/Time/TimeLineSpan.cs.uid @@ -1 +1 @@ -uid://chekdwasmokcq +uid://badk0je4kx6xb diff --git a/Runtime/Time/TimeLines/GameTime.tres b/Runtime/Time/TimeLines/GameTime.tres deleted file mode 100644 index 74ed054..0000000 --- a/Runtime/Time/TimeLines/GameTime.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="Resource" script_class="TimeLine" load_steps=2 format=3 uid="uid://ch5nsa6yafs5l"] - -[ext_resource type="Script" uid="uid://fqm54rn8fnnl" path="res://addons/rokojori_action_library/Runtime/Time/TimeLine.cs" id="1_lxe8k"] - -[resource] -script = ExtResource("1_lxe8k") -loopEnd = 0.0 diff --git a/Runtime/Time/TimeLines/RealTime.tres b/Runtime/Time/TimeLines/RealTime.tres deleted file mode 100644 index 86758f0..0000000 --- a/Runtime/Time/TimeLines/RealTime.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="Resource" script_class="TimeLine" load_steps=2 format=3 uid="uid://h6oi6vkj4c2m"] - -[ext_resource type="Script" uid="uid://fqm54rn8fnnl" path="res://addons/rokojori_action_library/Runtime/Time/TimeLine.cs" id="1_0ltdh"] - -[resource] -script = ExtResource("1_0ltdh") -executesInPause = true diff --git a/Runtime/Time/TimeLines/UITime.tres b/Runtime/Time/TimeLines/UITime.tres deleted file mode 100644 index 596d834..0000000 --- a/Runtime/Time/TimeLines/UITime.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="Resource" script_class="TimeLine" load_steps=2 format=3 uid="uid://b4iykcwesp1y6"] - -[ext_resource type="Script" uid="uid://fqm54rn8fnnl" path="res://addons/rokojori_action_library/Runtime/Time/TimeLine.cs" id="1_xynux"] - -[resource] -script = ExtResource("1_xynux") -executesInPause = true diff --git a/Runtime/Time/TimeTool.cs b/Runtime/Time/TimeTool.cs new file mode 100644 index 0000000..973d53f --- /dev/null +++ b/Runtime/Time/TimeTool.cs @@ -0,0 +1,35 @@ + +using System.Diagnostics; +using System.Collections; +using System.Collections.Generic; +using System; +using Godot; + +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +public static class TimeTool +{ + #if ROKOJORI_ACTION_CORE_GD + + public static float Now() + { + /* + + return Time.get_unix_time_from_system() + + */ + + GDGlue.CommentToGD(); + } + + #else + + public static float Now() + { + return new DateTimeOffset( DateTime.Now ).ToUnixTimeSeconds(); + } + + #endif +} \ No newline at end of file diff --git a/Runtime/Time/TimeTool.cs.uid b/Runtime/Time/TimeTool.cs.uid new file mode 100644 index 0000000..15eee69 --- /dev/null +++ b/Runtime/Time/TimeTool.cs.uid @@ -0,0 +1 @@ +uid://cc672pa2i7hfb diff --git a/Runtime/Time/Timelines/Game Time.tres b/Runtime/Time/Timelines/Game Time.tres new file mode 100644 index 0000000..8e003aa --- /dev/null +++ b/Runtime/Time/Timelines/Game Time.tres @@ -0,0 +1,7 @@ +[gd_resource type="Resource" script_class="Timeline" load_steps=2 format=3 uid="uid://ch5nsa6yafs5l"] + +[ext_resource type="Script" uid="uid://86qwdjl5kbld" path="res://addons/rokojori_action_library/Runtime/Time/Timeline.cs" id="1_afdkj"] + +[resource] +script = ExtResource("1_afdkj") +isModulatedByTimeScale = true diff --git a/Runtime/Time/Timelines/Real Time.tres b/Runtime/Time/Timelines/Real Time.tres new file mode 100644 index 0000000..54f7e18 --- /dev/null +++ b/Runtime/Time/Timelines/Real Time.tres @@ -0,0 +1,8 @@ +[gd_resource type="Resource" script_class="Timeline" load_steps=2 format=3 uid="uid://h6oi6vkj4c2m"] + +[ext_resource type="Script" uid="uid://86qwdjl5kbld" path="res://addons/rokojori_action_library/Runtime/Time/Timeline.cs" id="1_xid7u"] + +[resource] +script = ExtResource("1_xid7u") +clockSource = 2 +executesInPause = true diff --git a/Runtime/Time/Timelines/UI Time.tres b/Runtime/Time/Timelines/UI Time.tres new file mode 100644 index 0000000..dcad604 --- /dev/null +++ b/Runtime/Time/Timelines/UI Time.tres @@ -0,0 +1,8 @@ +[gd_resource type="Resource" script_class="Timeline" load_steps=2 format=3 uid="uid://b4iykcwesp1y6"] + +[ext_resource type="Script" uid="uid://86qwdjl5kbld" path="res://addons/rokojori_action_library/Runtime/Time/Timeline.cs" id="1_kk6wf"] + +[resource] +script = ExtResource("1_kk6wf") +clockSource = 2 +executesInPause = true diff --git a/Runtime/Tools/Arrays.cs b/Runtime/Tools/Arrays.cs index b06716f..b36ca25 100644 --- a/Runtime/Tools/Arrays.cs +++ b/Runtime/Tools/Arrays.cs @@ -3,238 +3,288 @@ using System.Collections.Generic; using System.Text; using System; -namespace Rokojori +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +public static class Arrays { - [RokojoriActionCoreExportCustom] - public static class Arrays + public static T[] AddEntry( T[] values, T other ) { - public static T[] Concat( T[] a, T[] b ) + #if !ROKOJORI_ACTION_CORE_GD + + var newValues = new T[ values.Length + 1 ]; + + Array.Copy( values, newValues, values.Length ); + newValues[ values.Length ] = other; + + return newValues; + + #else + + /* + + values.append( other ) + + return values + + */ + GDGlue.CommentToGD(); + + #endif + } + + public static T[] Add( this T[] values, T other ) + { + return AddEntry( values, other ); + } + + public static T[] Remove( this T[] values, T value ) + { + var index = IndexOf( values, value ); + + if ( index == -1 ) { - var o = new T[ a.Length + b.Length ]; - - a.CopyTo( o, 0 ); - b.CopyTo( o, a.Length ); - - return o; + return values; } - public static int IndexOf( this T[] values, T other ) + return values.RemoveIndex( index ); + } + + public static T[] RemoveIndex( this T[] values, int index ) + { + #if !ROKOJORI_ACTION_CORE_GD + + if ( index <= -1 || index >= values.Length ) { - return Array.IndexOf( values, other ); + return values; } - public static U[] Map( this T[] values, Func mapper ) + if ( values.Length == 1 && index == 0 ) { - var u = new U[ values.Length ]; - - for ( int i = 0; i < values.Length; i++ ) - { - u[ i ] = mapper( values[ i ] ); - } - - return u; + return new T[ 0 ]; } + var newValues = new T[ values.Length - 1 ]; - public static int FindIndex( this T[] values, Func predicate ) + if ( index != 0 ) { - if ( values == null ) - { - return -1; - } + Array.Copy( values, newValues, index ); + } - for ( int i = 0; i < values.Length; i++ ) - { - if ( predicate( values[ i ] ) ) - { - return i; - } - } + if ( index != ( values.Length - 1 ) ) + { + Array.Copy( values, index + 1, newValues, index, ( values.Length - 1 ) - index ); + } + + return newValues; + + #else + + /* + + values.remove_at( index ) + + return values + + */ + GDGlue.CommentToGD(); + + #endif + } + + + #if ! ROKOJORI_ACTION_CORE_GD + + public static int IndexOf( this T[] values, T other ) + { + return Array.IndexOf( values, other ); + } + + #else + + public static int IndexOf( this T[] values, T other ) + { + GDGlue.InsertGDScript( "return values.find( other )" ); + } + + #endif + + #if ! ROKOJORI_ACTION_CORE_GD + + public static T[] Concat( T[] a, T[] b ) + { + var o = new T[ a.Length + b.Length ]; + + a.CopyTo( o, 0 ); + b.CopyTo( o, a.Length ); + + return o; + } + + + public static U[] Map( this T[] values, Func mapper ) + { + var u = new U[ values.Length ]; + + for ( int i = 0; i < values.Length; i++ ) + { + u[ i ] = mapper( values[ i ] ); + } + + return u; + } + + + public static int FindIndex( this T[] values, Func predicate ) + { + if ( values == null ) + { return -1; } - public static T Find( this T[] values, Func predicate ) + for ( int i = 0; i < values.Length; i++ ) { - var entryIndex = FindIndex( values, predicate ); - - return entryIndex == -1 ? default(T) : values[ entryIndex ]; - } - - public static bool Has( this T[] values, Func predicate ) - { - return Find( values, predicate ) != null; - } - - public static T FindNonNull( this T[] values, Func predicate ) - { - if ( values == null ) + if ( predicate( values[ i ] ) ) { - return default(T); + return i; + } + } + + return -1; + } + + public static T Find( this T[] values, Func predicate ) + { + var entryIndex = FindIndex( values, predicate ); + + return entryIndex == -1 ? default(T) : values[ entryIndex ]; + } + + public static bool Has( this T[] values, Func predicate ) + { + return Find( values, predicate ) != null; + } + + public static T FindNonNull( this T[] values, Func predicate ) + { + if ( values == null ) + { + return default(T); + } + + var entryIndex = FindIndex( values, ( v ) => v != null && predicate( v ) ); + + return entryIndex == -1 ? default(T) : values[ entryIndex ]; + } + + public static bool HasNonNull( this T[] values, Func predicate ) + { + return FindNonNull( values, predicate ) != null; + } + + public static int NonNullCount( this T[] values ) + { + var count = 0; + + for ( int i = 0; i < values.Length; i++ ) + { + if ( values[ i ] == null ) + { + continue; } - var entryIndex = FindIndex( values, ( v ) => v != null && predicate( v ) ); - - return entryIndex == -1 ? default(T) : values[ entryIndex ]; + count ++; } - public static bool HasNonNull( this T[] values, Func predicate ) - { - return FindNonNull( values, predicate ) != null; - } + return count; + } - public static int NonNullCount( this T[] values ) - { - var count = 0; + - for ( int i = 0; i < values.Length; i++ ) + public static bool Contains( T[] values, T other ) + { + return Array.IndexOf( values, other ) != -1; + } + + public static bool ContainsAll( T[] values, T[] other ) + { + for ( int i = 0; i < other.Length; i++ ) + { + if ( ! Contains( values, other[ i ] ) ) { - if ( values[ i ] == null ) - { - continue; - } - - count ++; + return false; } - - return count; } - + return true; + } - public static bool Contains( T[] values, T other ) - { - return Array.IndexOf( values, other ) != -1; - } + - public static bool ContainsAll( T[] values, T[] other ) + public static bool ContainsEqual( T[] values, T other ) + { + for ( int i = 0; i < values.Length; i++ ) { - for ( int i = 0; i < other.Length; i++ ) + if ( other.Equals( values[ i ] ) ) { - if ( ! Contains( values, other[ i ] ) ) - { - return false; - } + return true; } - - return true; } - + return false; + } - public static bool ContainsEqual( T[] values, T other ) + + + + public static void ForEach( this T[] values, Action callback, bool skipNulls = true ) + { + foreach ( var it in values ) { - for ( int i = 0; i < values.Length; i++ ) + if ( skipNulls && it == null ) { - if ( other.Equals( values[ i ] ) ) - { - return true; - } + continue; } + + callback( it ); + } + } + public static bool AreArraysAndEntriesEqual( object objA, object objB ) + { + if ( ! ( objA.GetType().IsArray && objB.GetType().IsArray ) ) + { return false; } - public static T[] AddEntry( T[] values, T other ) - { - var newValues = new T[ values.Length + 1 ]; - - Array.Copy( values, newValues, values.Length ); - newValues[ values.Length ] = other; - - return newValues; - } - - public static T[] Add( this T[] values, T other ) - { - return AddEntry( values, other ); - } - - public static T[] Remove( this T[] values, T value ) - { - var index = values.IndexOf( value ); - - if ( index == -1 ) - { - return values; - } - - return values.RemoveIndex( index ); - } - - public static T[] RemoveIndex( this T[] values, int index ) - { - if ( index <= -1 || index >= values.Length ) - { - return values; - } - - if ( values.Length == 1 && index == 0 ) - { - return new T[ 0 ]; - } - - var newValues = new T[ values.Length - 1 ]; - - if ( index != 0 ) - { - Array.Copy( values, newValues, index ); - } - - if ( index != ( values.Length - 1 ) ) - { - Array.Copy( values, index + 1, newValues, index, ( values.Length - 1 ) - index ); - } - - - return newValues; - } - - - public static void ForEach( this T[] values, Action callback, bool skipNulls = true ) - { - foreach ( var it in values ) - { - if ( skipNulls && it == null ) - { - continue; - } - - callback( it ); - } - } - - public static bool AreArraysAndEntriesEqual( object objA, object objB ) - { - if ( ! ( objA.GetType().IsArray && objB.GetType().IsArray ) ) - { - return false; - } - - return Lists.AreEntriesEqual( - Lists.FromEnumerable( objA as IEnumerable ), - Lists.FromEnumerable( objA as IEnumerable ) - ); - } - - public static bool AreEntriesEqual( T[] a, T[] b ) - { - if ( a.Length != b.Length ) - { - return false; - } - - for ( int i = 0; i < a.Length; i++ ) - { - var isEqual = EqualityComparer.Default.Equals( a[ i ], b[ i ]); - - if ( ! isEqual ) - { - return false; - } - } - - return true; - } + return ListExtensions.AreEntriesEqual( + ListExtensions.FromEnumerable( objA as IEnumerable ), + ListExtensions.FromEnumerable( objA as IEnumerable ) + ); } -} \ No newline at end of file + + public static bool AreEntriesEqual( T[] a, T[] b ) + { + if ( a.Length != b.Length ) + { + return false; + } + + for ( int i = 0; i < a.Length; i++ ) + { + var isEqual = EqualityComparer.Default.Equals( a[ i ], b[ i ]); + + if ( ! isEqual ) + { + return false; + } + } + + return true; + } + + #endif + +} diff --git a/Runtime/Tools/Async.cs b/Runtime/Tools/Async.cs index 0f62720..fff4499 100644 --- a/Runtime/Tools/Async.cs +++ b/Runtime/Tools/Async.cs @@ -7,6 +7,7 @@ using Godot; using System; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori { @@ -22,13 +23,13 @@ namespace Rokojori public static double StartTimer() { - return Time.GetTicksMsec() / 1000.0; + return Godot.Time.GetTicksMsec() / 1000.0; } public static double GetTimeMS() { - return Time.GetTicksMsec(); + return Godot.Time.GetTicksMsec(); } public static double PrintAndUpdateMS( double ms, string info = null ) @@ -36,6 +37,20 @@ namespace Rokojori var now = GetTimeMS(); var elapsed = now - ms; + #if ROKOJORI_ACTION_CORE + + if ( info != null && info != "" ) + { + RJLog.Log( "Info:", info, "| Elapsed:", elapsed, "Time:", now ); + } + else + { + RJLog.Log( "| Elapsed:", elapsed, "Time:", now ); + } + + + #else + if ( info != null && info != "" ) { RJLog.Log( "Info:", info, "| Elapsed:", elapsed._DDD(), "Time:", now._DDD() ); @@ -46,18 +61,23 @@ namespace Rokojori } + + #endif + + + return now; } public static async Task WaitIfExceeded( double last, double waitTime = Async.waitTime ) { - var now = Time.GetTicksMsec() / 1000.0; + var now = Godot.Time.GetTicksMsec() / 1000.0; if ( ( now - last ) > waitTime ) { await Task.Delay( (int)( waitTime * 1000 ) ); - return Time.GetTicksMsec() / 1000.0;; + return Godot.Time.GetTicksMsec() / 1000.0;; } return last; @@ -65,13 +85,13 @@ namespace Rokojori public static async Task WaitIfExceeded( double last, Node node, double waitTime = Async.waitTime ) { - var now = Time.GetTicksMsec() / 1000.0; + var now = Godot.Time.GetTicksMsec() / 1000.0; if ( ( now - last ) > waitTime ) { await node.RequestNextFrame(); - return Time.GetTicksMsec() / 1000.0;; + return Godot.Time.GetTicksMsec() / 1000.0;; } return last; @@ -79,7 +99,7 @@ namespace Rokojori public static double DoIfExceeded( double last, System.Action action, double waitTime = Async.waitTime ) { - var now = Time.GetTicksMsec() / 1000.0; + var now = Godot.Time.GetTicksMsec() / 1000.0; if ( ( now - last ) > waitTime ) { @@ -87,7 +107,7 @@ namespace Rokojori } - return Time.GetTicksMsec() / 1000.0;; + return Godot.Time.GetTicksMsec() / 1000.0;; } } diff --git a/Runtime/Tools/BooleanLogic.cs b/Runtime/Tools/BooleanLogic.cs index 8848e64..f726ed3 100644 --- a/Runtime/Tools/BooleanLogic.cs +++ b/Runtime/Tools/BooleanLogic.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public enum BooleanLogicBinaryOperator diff --git a/Runtime/Tools/Boxed/BoxedColorValue.cs b/Runtime/Tools/Boxed/BoxedColorValue.cs index eaa4219..a1171ae 100644 --- a/Runtime/Tools/Boxed/BoxedColorValue.cs +++ b/Runtime/Tools/Boxed/BoxedColorValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/BoxedFloatValue.cs b/Runtime/Tools/Boxed/BoxedFloatValue.cs index 02e4f7f..4d2c19c 100644 --- a/Runtime/Tools/Boxed/BoxedFloatValue.cs +++ b/Runtime/Tools/Boxed/BoxedFloatValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/ColorValue.cs b/Runtime/Tools/Boxed/ColorValue.cs index e24fd59..59d8eb2 100644 --- a/Runtime/Tools/Boxed/ColorValue.cs +++ b/Runtime/Tools/Boxed/ColorValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/BoolFloatValue.cs b/Runtime/Tools/Boxed/FloatRanges/BoolFloatValue.cs index b464d79..6958401 100644 --- a/Runtime/Tools/Boxed/FloatRanges/BoolFloatValue.cs +++ b/Runtime/Tools/Boxed/FloatRanges/BoolFloatValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Float16Value.cs b/Runtime/Tools/Boxed/FloatRanges/Float16Value.cs index c7a959d..f48821e 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Float16Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Float16Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Float256Value.cs b/Runtime/Tools/Boxed/FloatRanges/Float256Value.cs index 3c3ce46..f4640d8 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Float256Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Float256Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Float2Value.cs b/Runtime/Tools/Boxed/FloatRanges/Float2Value.cs index 2ba5926..1ae1413 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Float2Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Float2Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Float4Value.cs b/Runtime/Tools/Boxed/FloatRanges/Float4Value.cs index 5057bba..8982ec4 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Float4Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Float4Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Float8Value.cs b/Runtime/Tools/Boxed/FloatRanges/Float8Value.cs index a740a9e..4f7c5db 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Float8Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Float8Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/FloatDOFDistance.cs b/Runtime/Tools/Boxed/FloatRanges/FloatDOFDistance.cs index 106fffc..94776f4 100644 --- a/Runtime/Tools/Boxed/FloatRanges/FloatDOFDistance.cs +++ b/Runtime/Tools/Boxed/FloatRanges/FloatDOFDistance.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/FloatDOFTransitionValue.cs b/Runtime/Tools/Boxed/FloatRanges/FloatDOFTransitionValue.cs index cc57a12..3a62c7f 100644 --- a/Runtime/Tools/Boxed/FloatRanges/FloatDOFTransitionValue.cs +++ b/Runtime/Tools/Boxed/FloatRanges/FloatDOFTransitionValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Polar1024Value.cs b/Runtime/Tools/Boxed/FloatRanges/Polar1024Value.cs index ba36bbd..5cb635f 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Polar1024Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Polar1024Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Polar16Value.cs b/Runtime/Tools/Boxed/FloatRanges/Polar16Value.cs index f2b4183..17033f2 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Polar16Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Polar16Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/Polar2Value.cs b/Runtime/Tools/Boxed/FloatRanges/Polar2Value.cs index 115d17d..52d5819 100644 --- a/Runtime/Tools/Boxed/FloatRanges/Polar2Value.cs +++ b/Runtime/Tools/Boxed/FloatRanges/Polar2Value.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatRanges/PolarValue.cs b/Runtime/Tools/Boxed/FloatRanges/PolarValue.cs index b6a2d29..801c95b 100644 --- a/Runtime/Tools/Boxed/FloatRanges/PolarValue.cs +++ b/Runtime/Tools/Boxed/FloatRanges/PolarValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/FloatValue.cs b/Runtime/Tools/Boxed/FloatValue.cs index c1e01db..7637e7d 100644 --- a/Runtime/Tools/Boxed/FloatValue.cs +++ b/Runtime/Tools/Boxed/FloatValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/NormalizedValue.cs b/Runtime/Tools/Boxed/NormalizedValue.cs index 42832c5..7080799 100644 --- a/Runtime/Tools/Boxed/NormalizedValue.cs +++ b/Runtime/Tools/Boxed/NormalizedValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Boxed/PowerValue.cs b/Runtime/Tools/Boxed/PowerValue.cs index 2ce1f6a..52e5c65 100644 --- a/Runtime/Tools/Boxed/PowerValue.cs +++ b/Runtime/Tools/Boxed/PowerValue.cs @@ -4,6 +4,7 @@ using System.Text; using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/Tools/Dictionaries.cs b/Runtime/Tools/Dictionaries.cs index 973599f..7eee665 100644 --- a/Runtime/Tools/Dictionaries.cs +++ b/Runtime/Tools/Dictionaries.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using System; +using Rokojori.Extensions; namespace Rokojori { public class Dictionaries diff --git a/Runtime/Tools/ListExtensions.cs b/Runtime/Tools/ListExtensions.cs new file mode 100644 index 0000000..ceb0a9e --- /dev/null +++ b/Runtime/Tools/ListExtensions.cs @@ -0,0 +1,1348 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System; +using Godot; +using System.Threading.Tasks; +using System.Linq; + +using Rokojori.Extensions; +namespace Rokojori.Extensions; + + +[RokojoriActionCoreExport] +public static class ListExtensions +{ + public static List CreateMappedList( List inputList, Func mapper, List list = null ) + { + if ( list == null ) + { + list = new List(); + } + + for ( int i = 0; i < inputList.Count; i++ ) + { + list.Add( mapper( inputList[ i ] ) ); + } + + return list; + } + + public static List Map( this List list, Func mapper ) + { + return CreateMappedList( list, mapper, new List() ); + } + + public static void RemoveIncreasingSortedIndices( this List list, List increasinglySortedRemovals ) + { + for ( var i = increasinglySortedRemovals.Count - 1; i >= 0; i-- ) + { + var index = increasinglySortedRemovals[ i ]; + + if ( index < 0 || index >= list.Count ) + { + // RJLog.Log( "Invalid index in removals:", index, list.Count, increasinglySortedRemovals ); + continue; + } + + // RJLog.Log( "requestedRemovals remove:", index ); + list.RemoveAt( index ); + } + } + + public static string Join( this List array, string seperator = ", " ) + { + #if ROKOJORI_ACTION_CORE_GD + + /* + + var parts: Array[ String ] = [] + + for item in array: + parts.append( str( item ) ) + + return separator.join( parts ) + + */ + #else + + if ( array == null ) + { + return "null"; + } + + var sb = new StringBuilder(); + + for ( var i = 0; i < array.Count; i++ ) + { + if ( i != 0 ) + { + sb.Append( seperator ); + } + + var obj = (object) array[ i ]; + + RJLog.WriteStringified( array[ i ], sb ); + } + + return sb.ToString(); + + #endif + } + + #if ROKOJORI_ACTION_CORE_GD + + public static void RemoveList( this List list, List removals ) + { + foreach ( var item in removals ) + { + list.Remove( item ); + } + } + + [RokojoriActionCoreGenericAsString( "Prepend")] + public static List FilterType( this List inputList ) where R:T + { + var list = new List(); + + foreach ( var item in inputList ) + { + if ( item == null ) + { + continue; + } + + /* + + if ! RJ_TypeTools.is_of_type( type2, item ): + continue; + + */ + GDGlue.CommentToGD(); + + list.Add( item as R ); + } + + + return list; + } + + #else + + public static void RemoveList( this List list, List removals ) + { + var removalSet = new HashSet(); + removalSet.UnionWith( removals ); + + list.RemoveAll( e => removalSet.Contains( e ) ); + } + + #endif + + #if ! ROKOJORI_ACTION_CORE_GD + public static void ForEachThat( this List element, Predicate condition, Action callback ) + { + element.ForEach( + ( e )=> + { + if ( ! condition( e ) ) + { + return; + } + + callback( e ); + } + ); + } + + public static List Sub( this List elements, int start, int length = 0 ) + { + var end = length == 0 ? elements.Count : ( start + length ); + + + var list = new List( end - start ); + + for ( int i = start; i < end; i++ ) + { + list.Add( elements[ i ] ); + } + + return list; + } + + public static List FilterType( this List inputList ) where R:T + { + var list = new List(); + + inputList.ForEach + ( + e => + { + if ( e == null || ! typeof( R ).IsAssignableFrom( e.GetType() ) ) + { + return; + } + + list.Add( (R) e ); + } + ); + + return list; + } + + public static List FilterWithType( this List inputList, Type type ) + { + var list = new List(); + + inputList.ForEach + ( + e => + { + if ( e == null || ! type.IsAssignableFrom( e.GetType() ) ) + { + return; + } + + list.Add( e ); + } + ); + + return list; + } + + public static bool Has( this List list, T item ) + { + return list.IndexOf( item ) != - 1; + } + + + public static List FilterAndMap( List list, Func filter, Func map) + { + var mapped = new List(); + + for ( int i = 0; i < list.Count; i++ ) + { + if ( ! filter( list[ i ], i ) ) + { + continue; + } + + mapped.Add( map( list[ i ] ) ); + } + + return mapped; + } + + public static bool AreEntriesEqual( List a, List b ) + { + if ( a.Count != b.Count ) + { + return false; + } + + for ( int i = 0; i < a.Count; i++ ) + { + var isEqual = EqualityComparer.Default.Equals( a[ i ], b[ i ]); + + if ( ! isEqual ) + { + return false; + } + } + + return true; + } + + public static List FromEnumerable( IEnumerable enumerable ) + { + var listA = new List(); + + foreach ( var it in enumerable ) + { + listA.Add( (T) it ); + } + + return listA; + } + + public static List Filter( this List list, Func filter ) + { + var filteredList = new List(); + ExtractTo( list, filteredList, filter ); + return filteredList; + } + + public static void ExtractTo( List from, List to, Func filter ) + { + for ( int i = 0; i < from.Count; i++ ) + { + if ( filter( from[ i ] ) ) + { + to.Add( from[ i ] ); + } + } + } + + public static List FilterNulls( this List list ) + { + return Filter( list, e => e != null ); + } + + + // =============================================== + // =============================================== + // =============================================== + // =============================================== + // =============================================== + + + + #if !ROKOJORI_ACTION_CORE + + public static void Union( this List list, List other ) + { + var set = new HashSet( list ); + set.UnionWith( other ); + list.Clear(); + list.AddRange( [.. set ] ); + } + + public static void AddIfNotPresent( this List values, T value ) + { + if ( values.Contains( value ) ) + { + return; + } + + values.Add( value ); + } + + public static bool IsOneOf( T value, params T[] values ) + { + for ( int i = 0; i < values.Length; i++ ) + { + if ( EqualityComparer.Default.Equals( values[ i ], value ) ) + { + return true; + } + } + + return false; + } + + public static bool ContainsEqual( List values, T value ) + { + if ( value == null || values == null ) + { + return false; + } + + return values.Find( v => value.Equals( v ) ) != null; + } + + public static void Sort( List data, Func getValue ) + { + ValueSorter.SortList( data, getValue ); + } + + public class IndexLerpResult + { + public int closestIndex = -1; + public int secondIndex = -1; + public float lerpAmount = 0.5f; + } + + + + public static List Clone( this List data ) + { + if ( data == null ) + { + return null; + } + + var cloned = new List( data.Count ); + cloned.AddRange( data ); + return cloned; + } + + public static List TopologicalSort( this List items, Func compare ) + { + var result = new List(); + var incomingEdges = new Dictionary(); + var edges = new Dictionary>(); + + foreach ( var item in items ) + { + incomingEdges[ item ] = 0; + edges[ item ] = new List(); + } + + var count = items.Count; + + for ( int i = 0; i < count; i++ ) + { + for ( int j = i + 1; j < count; j++ ) + { + var a = items[ i]; + var b = items[ j ]; + var cmp = compare( a, b ); + + if ( cmp < 0 ) + { + edges[ a ].Add( b ); + incomingEdges[ b ]++; + } + else if ( cmp > 0 ) + { + edges[b].Add( a ); + incomingEdges[ a ]++; + } + } + } + + var queue = new Queue( incomingEdges.Where( pair => pair.Value == 0 ).Select( pair => pair.Key ) ); + + while ( queue.Any() ) + { + var current = queue.Dequeue(); + result.Add( current ); + + foreach ( var next in edges[ current ] ) + { + incomingEdges[ next ]--; + + if ( incomingEdges[ next ] == 0 ) + { + queue.Enqueue( next ); + } + } + } + + if ( result.Count != items.Count ) + { + return null; + } + + return result; + } + + + public static T Lerp( List data, float value, Func getValue, Func lerper, bool sort = false ) + { + var result = LerpIndex( data, value, getValue, sort ); + return lerper( result ); + } + + public static IndexLerpResult LerpIndex( List data, float value, Func getValue, bool sort = false ) + { + if ( sort ) + { + Sort( data, getValue ); + } + + var result = new IndexLerpResult(); + result.closestIndex = ClosestIndex( data, value, getValue ); + result.secondIndex = SecondClosestIndex( data, result.closestIndex, value, getValue ); + + if ( result.closestIndex == result.secondIndex ) + { + return result; + } + + var closestValue = getValue( data[ result.closestIndex ] ); + var secondValue = getValue( data[ result.secondIndex ] ); + + + var min = closestValue; + var max = secondValue; + var flip = false; + + if ( closestValue > secondValue ) + { + flip = true; + min = secondValue; + max = closestValue; + } + + result.lerpAmount = MathX.Normalize( value, min, max ); + + if ( flip ) + { + result.lerpAmount = 1f - result.lerpAmount; + } + + return result; + + } + + public static T GetWithHighestValue( List data, Func getValue ) + { + var index = IndexOfHighestValue( data, getValue ); + + return index == -1 ? default(T) : data[ index ] ; + } + + public static T GetWithLowestValue( List data, Func getValue ) + { + var index = IndexOfLowestValue( data, getValue ); + + return index == -1 ? default(T) : data[ index ] ; + } + + public static int IndexOfHighestValue( List data, Func getValue ) + { + var index = -1; + var compareValue = -float.MaxValue; + + for ( int i = 0; i < data.Count; i++ ) + { + var value = getValue( data[ i ] ); + + if ( value > compareValue ) + { + index = i; + compareValue = value; + } + } + + return index; + } + + public static int IndexOfLowestValue( List data, Func getValue ) + { + var index = -1; + var compareValue = float.MaxValue; + + for ( int i = 0; i < data.Count; i++ ) + { + var value = getValue( data[ i ] ); + + if ( value < compareValue ) + { + index = i; + compareValue = value; + } + } + + return index; + } + + public static int SecondClosestIndex( this List data, int closest, float compareValue, Func getValue, bool sort = false ) + { + if ( sort ) + { + Sort( data, getValue ); + } + + if ( data.Count == 1 ) + { + return 0; + } + + if ( closest == 0 ) + { + return closest + 1; + } + + if ( closest == data.Count - 1 ) + { + return data.Count - 2; + } + + var before = data[ closest - 1 ]; + var after = data[ closest + 1 ]; + + var bD = Mathf.Abs( getValue( before ) - compareValue ); + var aD = Mathf.Abs( getValue( after ) - compareValue ); + + if ( bD < aD ) + { + return closest - 1 ; + } + + return closest + 1; + } + + public static int SecondClosestIndex( this T[] data, int closest, float compareValue, Func getValue ) + { + + if ( data.Length == 1 ) + { + return 0; + } + + if ( closest == 0 ) + { + return closest + 1; + } + + if ( closest == data.Length - 1 ) + { + return data.Length - 2; + } + + var before = data[ closest - 1 ]; + var after = data[ closest + 1 ]; + + var bD = Mathf.Abs( getValue( before ) - compareValue ); + var aD = Mathf.Abs( getValue( after ) - compareValue ); + + if ( bD < aD ) + { + return closest - 1 ; + } + + return closest + 1; + } + + public static int ClosestIndex( this List data, float compareValue, Func getValue ) + { + var index = -1; + var distance = float.MaxValue; + + for ( int i = 0 ; i < data.Count; i++ ) + { + var d = Mathf.Abs( getValue( data[ i ] ) - compareValue ); + + if ( d < distance ) + { + index = i; + distance = d; + } + } + + return index; + } + + public static int ClosestIndex( this T[] data, float compareValue, Func getValue ) + { + var index = -1; + var distance = float.MaxValue; + + for ( int i = 0 ; i < data.Length; i++ ) + { + var d = Mathf.Abs( getValue( data[ i ] ) - compareValue ); + + if ( d < distance ) + { + index = i; + distance = d; + } + } + + return index; + } + + public static List CollectIndices( List list, Func evaluator ) + { + var output = new List(); + + for ( int i = 0; i < list.Count; i++ ) + { + if ( evaluator( list[ i ] ) ) + { + output.Add( i ); + } + } + + return output; + } + + public static List CombineAll( params List[] lists ) + { + var list = new List(); + + foreach ( var l in lists ) + { + list.AddRange( l ); + } + + return list; + } + + + public static Dictionary ToMap( this List list, Func mapper ) + { + var d = new Dictionary(); + + list.ForEach( + ( item )=> + { + d[ mapper( item ) ] = item; + } + ); + + return d; + } + + public static void ReplaceRange( this List list, int start, int count, List replacement ) + { + if ( count > 0 ) + { + list.RemoveRange( start, count ); + } + + if ( replacement.Count > 0 ) + { + list.InsertRange( start, replacement ); + } + } + + public static List From( params T[] elements ) + { + return ToList( elements ); + } + + public static List FromAny( IEnumerable elements ) + { + var list = new List(); + + foreach ( var e in elements ) + { + list.Add( e ); + } + + return list; + } + + public static List FromLists( params List[] elements ) + { + var list = new List(); + + elements.ForEach( e => list.AddRange( e ) ); + + return list; + } + + public static int MultiFindIndex( this List values, params Predicate[] finder ) + { + for ( int i = 0; i < finder.Length; i++ ) + { + var index = values.FindIndex( 0, finder[ i ] ); + + if ( index != -1 ) + { + return index; + } + } + + + return -1; + } + + public static List SubList( T[] elements, int offset, int length ) + { + var list = new List(); + + for ( int i = 0; i < length; i++ ) + { + list.Add( elements[ i + offset ] ); + } + + return list; + } + + public static int Size( List list ) + { + return list == null ? 0 : list.Count; + } + + public static List Range( this List elements, int start, int end ) + { + return elements.Sub( start, end - start + 1 ); + } + + + public static void ShuffleMultiple( this List list, int numShuffles, int step = 2 ) + { + for ( int i = 0; i < numShuffles; i++ ) + { + list.Shuffle( step ); + } + } + + public static ListView View( this List list, int start = 0, int length = 0 ) + { + return new ListView( list, start, length == 0 ? ( list.Count - start ) : length); + } + + + + public static void Shuffle( this List list, int step = 2 ) + { + + var listStart = new List(); + var listEnd = new List(); + + for ( int i = 0; i < list.Count; i++ ) + { + if ( i % step == 0 ) + { + listStart.Add( list[ i ] ); + } + else + { + listEnd.Add( list[ i ] ); + } + + } + + list.Clear(); + + list.Add( listStart ).Add( listEnd ); + } + + public static List Add( this List list, List other ) + { + list.AddRange( other ); + return list; + } + + + public static List ToList( T[] array ) + { + var list = new List(); + list.AddRange( array ); + return list; + } + + + + public static T RemoveAt( List list, int index ) + { + if ( list.Count == 0 || index < 0 || ( index > ( list.Count - 1 ) ) ) + { + return default(T); + } + + var first = list[ index ]; + list.RemoveAt( index ); + return first; + } + + public static T RemoveFirst( List list ) + { + return RemoveAt( list, 0 ); + } + + public static T RemoveLast( List list ) + { + return RemoveAt( list, list.Count - 1 ); + } + + public static T PopLast( List list ) + { + if ( list.Count == 0 ){ return default(T); } + + var element = list[ list.Count - 1 ]; + list.RemoveAt( list.Count - 1 ); + return element; + } + + public static T Pop( this List list ) + { + return PopLast( list ); + } + + public static void Prepend( this List list, List other ) + { + list.InsertRange( 0, other ); + } + + public static T Shift( this List list ) + { + if ( list.Count == 0 ){ return default(T); } + + var element = list[ 0 ]; + list.RemoveAt( 0 ); + return element; + + } + + public static List Create( int size, Func initializer ) + { + var list = new List(); + + for ( int i = 0; i < size; i++ ) + { + list.Add( initializer( i ) ); + } + + return list; + } + + + public static T GetLast( List list ) + { + return list.Count == 0 ? default(T) : list[ list.Count - 1 ]; + } + + public static T Last( this List list ) + { + return GetLast( list ); + } + + public static T GetFirst( List list ) + { + return list.Count == 0 ? default(T) : list[ 0 ]; + } + + public static T First( this List list ) + { + return list.Count == 0 ? default(T) : list[ 0 ]; + } + + public static T ReverseAt( this List list, int index ) + { + return list[ list.Count - 1 - index ]; + } + + + + + public static int CountItems( List list, Predicate test ) + { + var result = 0; + + for ( int i = 0; i < list.Count; i++ ) + { + if ( test( list[ i ] ) ) + { + result++; + } + } + + return result; + } + + public static int CountItems( T[] list, Predicate test ) + { + var result = 0; + + for ( int i = 0; i < list.Length; i++ ) + { + if ( test( list[ i ] ) ) + { + result++; + } + } + + return result; + } + + + public static bool AreListsAndEntriesEqual( object objA, object objB ) + { + if ( ! ( ReflectionHelper.IsList( objA ) && ReflectionHelper.IsList( objB ) ) ) + { + return false; + } + + return AreEntriesEqual( FromEnumerable( objA as IEnumerable ), FromEnumerable( objB as IEnumerable ) ); + } + + + + + /*public static string Join( this List list, string seperator = "," ) + { + var sb = new StringBuilder(); + }*/ + + + + public static string Join( List array, string seperator = ", " ) + { + var sb = new StringBuilder(); + + for ( var i = 0; i < array.Count; i++ ) + { + if ( i != 0 ) + { + sb.Append( seperator ); + } + + sb.Append( RegexUtility.NumberToString( array[ i ] ) ); + } + + return sb.ToString(); + } + + + public static List From( List list ) + { + var copy = new List(); + copy.AddRange( list ); + return copy; + } + + public static List From<[Godot.MustBeVariant] T>( Godot.Collections.Array list ) + { + var copy = new List(); + copy.AddRange( list ); + return copy; + } + + public static List Combine( List a, List b, Func combiner ) + { + var list = new List(); + + for ( int i = 0; i < a.Count; i++ ) + { + for ( int j = 0; j < b.Count; j++ ) + { + list.Add( combiner( a[ i ], b[ j ] ) ); + } + } + + return list; + } + + public static bool Has( this List list, Func evaluater ) + { + foreach ( var t in list ) + { + if ( evaluater( t ) ) + { + return true; + } + } + + return false; + } + + public static void SwapTowardsBegin( this List list, int index, int steps = 1 ) + { + list.Swap( index, index - steps ); + } + + public static void SwapTowardsEnd( this List list, int index, int steps = 1 ) + { + list.Swap( index, index + steps ); + } + + public static void Swap( this List list, int indexA, int indexB ) + { + if ( list == null || indexA == indexB || indexA < 0 || indexB < 0 || indexA >= list.Count || indexA >= list.Count ) + { + return; + } + + var buffer = list[ indexA ]; + list[ indexA ] = list[ indexB ]; + list[ indexB ] = buffer; + + } + + + public static async Task> FilterAsync( this List list, Func> filter ) + { + var outputList = new List(); + + var index = 0; + + foreach ( var it in list ) + { + var result = await filter( it ); + + if ( result ) + { + outputList.Add( it ); + } + + index++; + } + + return outputList; + } + + public static void Filter( List inputList, List list, Func filter ) + { + for ( int i = 0; i < inputList.Count; i++ ) + { + if ( filter( inputList[ i ], i ) ) + { + list.Add( inputList[ i ] ); + } + } + } + + public static List Filter( this List list, Func filter ) + { + var filteredList = new List(); + Filter( list, filteredList, filter ); + return filteredList; + } + + + + + + public static List FilterWith( List inputList, Func filter ) + { + var list = new List(); + + for ( int i = 0; i < inputList.Count; i++ ) + { + if ( filter( inputList[ i ] ) ) + { + list.Add( inputList[ i ] ); + } + } + + return list; + } + + + + + public static void Add( this List list, params T[] entries ) + { + list.AddRange( entries ); + } + + public static List Concat( this List list, params T[] entries ) + { + list.AddRange( entries ); + return list; + } + + public static List Concat( this List list, List entries ) + { + list.AddRange( entries ); + return list; + } + + public static void Insert( List list, T item, int index ) + { + if ( index >= list.Count ) + { + list.Add( item ); + return; + } + + index = index < 0 ? 0 : index; + + list.Insert( index, item ); + } + + public static T Find( List list, Func callback ) + { + for ( int i = 0; i < list.Count; i++ ) + { + if ( callback( list[ i ] ) ) + { + return list[ i ]; + } + } + + return default( T ); + } + + public static List MultiMap( this List list, Func> mapper ) + { + var outputList = new List(); + + for ( int i = 0; i < list.Count; i++ ) + { + var range = mapper( list[ i ], i ); + + if ( range.Count == 0 ) + { + continue; + } + + outputList.AddRange( range ); + } + + return outputList; + } + + public static List Map( this List list, Func mapper ) + { + return Map( list, mapper, new List() ); + } + + + + public static Dictionary CreateIndex( this List list ) + { + var m = new Dictionary(); + + for ( int i = 0; i < list.Count; i++ ) + { + m[ list[ i ] ] = i; + } + + return m; + } + + public static HashSet CreateSet( this List list ) + { + var set = new HashSet(); + list.ForEach( e => set.Add( e ) ); + return set; + } + + public static List Map( List inputList, Func mapper, List list = null ) + { + if ( list == null ) + { + list = new List(); + } + + for ( int i = 0; i < inputList.Count; i++ ) + { + list.Add( mapper( inputList[ i ], i ) ); + } + + return list; + } + + public static List Map( T[] inputList, Func mapper, List list = null ) + { + if ( list == null ) + { + list = new List(); + } + + for ( int i = 0; i < inputList.Length; i++ ) + { + list.Add( mapper( inputList[ i ], i ) ); + } + + return list; + } + + + + public static Godot.Collections.Array ToGodotArray<[MustBeVariant] T>( this List values ) + { + return [.. values]; + } + + public static void Remove( this List list, HashSet removals ) + { + list.RemoveAll( m => removals.Contains( m ) ); + } + + public static void Remove( this List list, List removals ) + { + if ( list.Count * removals.Count > 100 ) + { + var removalSet = new HashSet( removals ); + list.Remove( removalSet ); + return; + } + + list.RemoveAll( m => removals.Contains( m ) ); + } + + public static List CloneWithout( this List list, List removals ) + { + var cloned = list.Clone(); + cloned.Remove( removals ); + return cloned; + } + + public static List Map<[Godot.MustBeVariant]T,U>( Godot.Collections.Array inputList, Func mapper, List list = null ) + { + if ( list == null ) + { + list = new List(); + } + + for ( int i = 0; i < inputList.Count; i++ ) + { + list.Add( mapper( inputList[ i ] ) ); + } + + return list; + } + + public static List Map( T[] inputList, Func mapper, List list = null ) + { + if ( list == null ) + { + list = new List(); + } + + for ( int i = 0; i < inputList.Length; i++ ) + { + list.Add( mapper( inputList[ i ] ) ); + } + + return list; + } + + #endif + + #if ROKOJORI_ACTION_CORE + + #if !ROKOJORI_ACTION_CORE_GD + + public static List Map( T[] inputList, Func mapper, List list = null ) + { + if ( list == null ) + { + list = new List(); + } + + for ( int i = 0; i < inputList.Length; i++ ) + { + list.Add( mapper( inputList[ i ] ) ); + } + + return list; + } + + #endif + + #endif + + +} + +public class ListView +{ + List _list; + int _offset; + int _length; + + + public ListView( List list, int offset, int length ) + { + _list = list; + _offset = offset; + _length = length; + } + + public T this[ int index ] + { + get => _list[ index - _offset ]; + set => _list[ index - _offset ] = value; + } + + public int Count => _length; + + public void ForEach( Action action ) + { + for ( int i = 0; i < _length; i++ ) + { + action( this[ i ] ); + } + } + + public List GetList() + { + return _list; + } + + public List SubList() + { + return _list.Sub( _offset, _length ); + } + + #endif +} diff --git a/Runtime/Tools/Lists.cs.uid b/Runtime/Tools/ListExtensions.cs.uid similarity index 100% rename from Runtime/Tools/Lists.cs.uid rename to Runtime/Tools/ListExtensions.cs.uid diff --git a/Runtime/Tools/Lists.cs b/Runtime/Tools/Lists.cs deleted file mode 100644 index c5519fc..0000000 --- a/Runtime/Tools/Lists.cs +++ /dev/null @@ -1,1240 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System; -using Godot; -using System.Threading.Tasks; -using System.Linq; - -namespace Rokojori -{ - - [RokojoriActionCoreExportCustom] - public static class Lists - { - public static List Sub( this List elements, int start, int length = 0 ) - { - var end = length == 0 ? elements.Count : ( start + length ); - - - var list = new List( end - start ); - - for ( int i = start; i < end; i++ ) - { - list.Add( elements[ i ] ); - } - - return list; - } - - public static List FilterType( this List inputList ) where R:T - { - var list = new List(); - - inputList.ForEach - ( - e => - { - if ( e == null || ! typeof( R ).IsAssignableFrom( e.GetType() ) ) - { - return; - } - - list.Add( (R) e ); - } - ); - - return list; - } - - public static List FilterWithType( this List inputList, Type type ) - { - var list = new List(); - - inputList.ForEach - ( - e => - { - if ( e == null || ! type.IsAssignableFrom( e.GetType() ) ) - { - return; - } - - list.Add( e ); - } - ); - - return list; - } - - public static bool Has( this List list, T item ) - { - return list.IndexOf( item ) != - 1; - } - - - public static void RemoveList( this List list, List removals ) - { - var removalSet = new HashSet(); - removalSet.UnionWith( removals ); - - list.RemoveAll( e => removalSet.Contains( e ) ); - } - - public static List FilterAndMap( List list, Func filter, Func map) - { - var mapped = new List(); - - for ( int i = 0; i < list.Count; i++ ) - { - if ( ! filter( list[ i ], i ) ) - { - continue; - } - - mapped.Add( map( list[ i ] ) ); - } - - return mapped; - } - - public static bool AreEntriesEqual( List a, List b ) - { - if ( a.Count != b.Count ) - { - return false; - } - - for ( int i = 0; i < a.Count; i++ ) - { - var isEqual = EqualityComparer.Default.Equals( a[ i ], b[ i ]); - - if ( ! isEqual ) - { - return false; - } - } - - return true; - } - - public static List FromEnumerable( IEnumerable enumerable ) - { - var listA = new List(); - - foreach ( var it in enumerable ) - { - listA.Add( (T) it ); - } - - return listA; - } - - - // =============================================== - // =============================================== - // =============================================== - // =============================================== - // =============================================== - - - - #if !ROKOJORI_ACTION_CORE - - public static void Union( this List list, List other ) - { - var set = new HashSet( list ); - set.UnionWith( other ); - list.Clear(); - list.AddRange( [.. set ] ); - } - - public static void AddIfNotPresent( this List values, T value ) - { - if ( values.Contains( value ) ) - { - return; - } - - values.Add( value ); - } - - public static bool IsOneOf( T value, params T[] values ) - { - for ( int i = 0; i < values.Length; i++ ) - { - if ( EqualityComparer.Default.Equals( values[ i ], value ) ) - { - return true; - } - } - - return false; - } - - public static bool ContainsEqual( List values, T value ) - { - if ( value == null || values == null ) - { - return false; - } - - return values.Find( v => value.Equals( v ) ) != null; - } - - public static void Sort( List data, Func getValue ) - { - ValueSorter.SortList( data, getValue ); - } - - public class IndexLerpResult - { - public int closestIndex = -1; - public int secondIndex = -1; - public float lerpAmount = 0.5f; - } - - - - public static List Clone( this List data ) - { - if ( data == null ) - { - return null; - } - - var cloned = new List( data.Count ); - cloned.AddRange( data ); - return cloned; - } - - public static List TopologicalSort( this List items, Func compare ) - { - var result = new List(); - var incomingEdges = new Dictionary(); - var edges = new Dictionary>(); - - foreach ( var item in items ) - { - incomingEdges[ item ] = 0; - edges[ item ] = new List(); - } - - var count = items.Count; - - for ( int i = 0; i < count; i++ ) - { - for ( int j = i + 1; j < count; j++ ) - { - var a = items[ i]; - var b = items[ j ]; - var cmp = compare( a, b ); - - if ( cmp < 0 ) - { - edges[ a ].Add( b ); - incomingEdges[ b ]++; - } - else if ( cmp > 0 ) - { - edges[b].Add( a ); - incomingEdges[ a ]++; - } - } - } - - var queue = new Queue( incomingEdges.Where( pair => pair.Value == 0 ).Select( pair => pair.Key ) ); - - while ( queue.Any() ) - { - var current = queue.Dequeue(); - result.Add( current ); - - foreach ( var next in edges[ current ] ) - { - incomingEdges[ next ]--; - - if ( incomingEdges[ next ] == 0 ) - { - queue.Enqueue( next ); - } - } - } - - if ( result.Count != items.Count ) - { - return null; - } - - return result; - } - - - public static T Lerp( List data, float value, Func getValue, Func lerper, bool sort = false ) - { - var result = LerpIndex( data, value, getValue, sort ); - return lerper( result ); - } - - public static IndexLerpResult LerpIndex( List data, float value, Func getValue, bool sort = false ) - { - if ( sort ) - { - Sort( data, getValue ); - } - - var result = new IndexLerpResult(); - result.closestIndex = ClosestIndex( data, value, getValue ); - result.secondIndex = SecondClosestIndex( data, result.closestIndex, value, getValue ); - - if ( result.closestIndex == result.secondIndex ) - { - return result; - } - - var closestValue = getValue( data[ result.closestIndex ] ); - var secondValue = getValue( data[ result.secondIndex ] ); - - - var min = closestValue; - var max = secondValue; - var flip = false; - - if ( closestValue > secondValue ) - { - flip = true; - min = secondValue; - max = closestValue; - } - - result.lerpAmount = MathX.Normalize( value, min, max ); - - if ( flip ) - { - result.lerpAmount = 1f - result.lerpAmount; - } - - return result; - - } - - public static T GetWithHighestValue( List data, Func getValue ) - { - var index = IndexOfHighestValue( data, getValue ); - - return index == -1 ? default(T) : data[ index ] ; - } - - public static T GetWithLowestValue( List data, Func getValue ) - { - var index = IndexOfLowestValue( data, getValue ); - - return index == -1 ? default(T) : data[ index ] ; - } - - public static int IndexOfHighestValue( List data, Func getValue ) - { - var index = -1; - var compareValue = -float.MaxValue; - - for ( int i = 0; i < data.Count; i++ ) - { - var value = getValue( data[ i ] ); - - if ( value > compareValue ) - { - index = i; - compareValue = value; - } - } - - return index; - } - - public static int IndexOfLowestValue( List data, Func getValue ) - { - var index = -1; - var compareValue = float.MaxValue; - - for ( int i = 0; i < data.Count; i++ ) - { - var value = getValue( data[ i ] ); - - if ( value < compareValue ) - { - index = i; - compareValue = value; - } - } - - return index; - } - - public static int SecondClosestIndex( this List data, int closest, float compareValue, Func getValue, bool sort = false ) - { - if ( sort ) - { - Sort( data, getValue ); - } - - if ( data.Count == 1 ) - { - return 0; - } - - if ( closest == 0 ) - { - return closest + 1; - } - - if ( closest == data.Count - 1 ) - { - return data.Count - 2; - } - - var before = data[ closest - 1 ]; - var after = data[ closest + 1 ]; - - var bD = Mathf.Abs( getValue( before ) - compareValue ); - var aD = Mathf.Abs( getValue( after ) - compareValue ); - - if ( bD < aD ) - { - return closest - 1 ; - } - - return closest + 1; - } - - public static int SecondClosestIndex( this T[] data, int closest, float compareValue, Func getValue ) - { - - if ( data.Length == 1 ) - { - return 0; - } - - if ( closest == 0 ) - { - return closest + 1; - } - - if ( closest == data.Length - 1 ) - { - return data.Length - 2; - } - - var before = data[ closest - 1 ]; - var after = data[ closest + 1 ]; - - var bD = Mathf.Abs( getValue( before ) - compareValue ); - var aD = Mathf.Abs( getValue( after ) - compareValue ); - - if ( bD < aD ) - { - return closest - 1 ; - } - - return closest + 1; - } - - public static int ClosestIndex( this List data, float compareValue, Func getValue ) - { - var index = -1; - var distance = float.MaxValue; - - for ( int i = 0 ; i < data.Count; i++ ) - { - var d = Mathf.Abs( getValue( data[ i ] ) - compareValue ); - - if ( d < distance ) - { - index = i; - distance = d; - } - } - - return index; - } - - public static int ClosestIndex( this T[] data, float compareValue, Func getValue ) - { - var index = -1; - var distance = float.MaxValue; - - for ( int i = 0 ; i < data.Length; i++ ) - { - var d = Mathf.Abs( getValue( data[ i ] ) - compareValue ); - - if ( d < distance ) - { - index = i; - distance = d; - } - } - - return index; - } - - public static List CollectIndices( List list, Func evaluator ) - { - var output = new List(); - - for ( int i = 0; i < list.Count; i++ ) - { - if ( evaluator( list[ i ] ) ) - { - output.Add( i ); - } - } - - return output; - } - - public static List CombineAll( params List[] lists ) - { - var list = new List(); - - foreach ( var l in lists ) - { - list.AddRange( l ); - } - - return list; - } - - - public static Dictionary ToMap( this List list, Func mapper ) - { - var d = new Dictionary(); - - list.ForEach( - ( item )=> - { - d[ mapper( item ) ] = item; - } - ); - - return d; - } - - public static void ReplaceRange( this List list, int start, int count, List replacement ) - { - if ( count > 0 ) - { - list.RemoveRange( start, count ); - } - - if ( replacement.Count > 0 ) - { - list.InsertRange( start, replacement ); - } - } - - public static List From( params T[] elements ) - { - return ToList( elements ); - } - - public static List FromAny( IEnumerable elements ) - { - var list = new List(); - - foreach ( var e in elements ) - { - list.Add( e ); - } - - return list; - } - - public static List FromLists( params List[] elements ) - { - var list = new List(); - - elements.ForEach( e => list.AddRange( e ) ); - - return list; - } - - public static int MultiFindIndex( this List values, params Predicate[] finder ) - { - for ( int i = 0; i < finder.Length; i++ ) - { - var index = values.FindIndex( 0, finder[ i ] ); - - if ( index != -1 ) - { - return index; - } - } - - - return -1; - } - - public static List SubList( T[] elements, int offset, int length ) - { - var list = new List(); - - for ( int i = 0; i < length; i++ ) - { - list.Add( elements[ i + offset ] ); - } - - return list; - } - - public static int Size( List list ) - { - return list == null ? 0 : list.Count; - } - - public static List Range( this List elements, int start, int end ) - { - return elements.Sub( start, end - start + 1 ); - } - - - public static void ShuffleMultiple( this List list, int numShuffles, int step = 2 ) - { - for ( int i = 0; i < numShuffles; i++ ) - { - list.Shuffle( step ); - } - } - - public static ListView View( this List list, int start = 0, int length = 0 ) - { - return new ListView( list, start, length == 0 ? ( list.Count - start ) : length); - } - - - - public static void Shuffle( this List list, int step = 2 ) - { - - var listStart = new List(); - var listEnd = new List(); - - for ( int i = 0; i < list.Count; i++ ) - { - if ( i % step == 0 ) - { - listStart.Add( list[ i ] ); - } - else - { - listEnd.Add( list[ i ] ); - } - - } - - list.Clear(); - - list.Add( listStart ).Add( listEnd ); - } - - public static List Add( this List list, List other ) - { - list.AddRange( other ); - return list; - } - - - public static List ToList( T[] array ) - { - var list = new List(); - list.AddRange( array ); - return list; - } - - - - public static T RemoveAt( List list, int index ) - { - if ( list.Count == 0 || index < 0 || ( index > ( list.Count - 1 ) ) ) - { - return default(T); - } - - var first = list[ index ]; - list.RemoveAt( index ); - return first; - } - - public static T RemoveFirst( List list ) - { - return RemoveAt( list, 0 ); - } - - public static T RemoveLast( List list ) - { - return RemoveAt( list, list.Count - 1 ); - } - - public static T PopLast( List list ) - { - if ( list.Count == 0 ){ return default(T); } - - var element = list[ list.Count - 1 ]; - list.RemoveAt( list.Count - 1 ); - return element; - } - - public static T Pop( this List list ) - { - return PopLast( list ); - } - - public static void Prepend( this List list, List other ) - { - list.InsertRange( 0, other ); - } - - public static T Shift( this List list ) - { - if ( list.Count == 0 ){ return default(T); } - - var element = list[ 0 ]; - list.RemoveAt( 0 ); - return element; - - } - - public static List Create( int size, Func initializer ) - { - var list = new List(); - - for ( int i = 0; i < size; i++ ) - { - list.Add( initializer( i ) ); - } - - return list; - } - - - public static T GetLast( List list ) - { - return list.Count == 0 ? default(T) : list[ list.Count - 1 ]; - } - - public static T Last( this List list ) - { - return GetLast( list ); - } - - public static T GetFirst( List list ) - { - return list.Count == 0 ? default(T) : list[ 0 ]; - } - - public static T First( this List list ) - { - return list.Count == 0 ? default(T) : list[ 0 ]; - } - - public static T ReverseAt( this List list, int index ) - { - return list[ list.Count - 1 - index ]; - } - - public static void RemoveIncreasingSortedIndices( this List list, List increasinglySortedRemovals ) - { - for ( var i = increasinglySortedRemovals.Count - 1; i >= 0; i-- ) - { - var index = increasinglySortedRemovals[ i ]; - - if ( index < 0 || index >= list.Count ) - { - // RJLog.Log( "Invalid index in removals:", index, list.Count, increasinglySortedRemovals ); - continue; - } - - // RJLog.Log( "requestedRemovals remove:", index ); - list.RemoveAt( index ); - } - } - - - public static int CountItems( List list, Predicate test ) - { - var result = 0; - - for ( int i = 0; i < list.Count; i++ ) - { - if ( test( list[ i ] ) ) - { - result++; - } - } - - return result; - } - - public static int CountItems( T[] list, Predicate test ) - { - var result = 0; - - for ( int i = 0; i < list.Length; i++ ) - { - if ( test( list[ i ] ) ) - { - result++; - } - } - - return result; - } - - - public static bool AreListsAndEntriesEqual( object objA, object objB ) - { - if ( ! ( ReflectionHelper.IsList( objA ) && ReflectionHelper.IsList( objB ) ) ) - { - return false; - } - - return AreEntriesEqual( FromEnumerable( objA as IEnumerable ), FromEnumerable( objB as IEnumerable ) ); - } - - - - - /*public static string Join( this List list, string seperator = "," ) - { - var sb = new StringBuilder(); - }*/ - - - - public static string Join( this List array, string seperator = ", " ) - { - if ( array == null ) - { - return "null"; - } - - var sb = new StringBuilder(); - - for ( var i = 0; i < array.Count; i++ ) - { - if ( i != 0 ) - { - sb.Append( seperator ); - } - - var obj = (object) array[ i ]; - - RJLog.Stringify( array[ i ], sb ); - } - - return sb.ToString(); - } - - public static string Join( List array, string seperator = ", " ) - { - var sb = new StringBuilder(); - - for ( var i = 0; i < array.Count; i++ ) - { - if ( i != 0 ) - { - sb.Append( seperator ); - } - - sb.Append( RegexUtility.NumberToString( array[ i ] ) ); - } - - return sb.ToString(); - } - - - public static List From( List list ) - { - var copy = new List(); - copy.AddRange( list ); - return copy; - } - - public static List From<[Godot.MustBeVariant] T>( Godot.Collections.Array list ) - { - var copy = new List(); - copy.AddRange( list ); - return copy; - } - - public static List Combine( List a, List b, Func combiner ) - { - var list = new List(); - - for ( int i = 0; i < a.Count; i++ ) - { - for ( int j = 0; j < b.Count; j++ ) - { - list.Add( combiner( a[ i ], b[ j ] ) ); - } - } - - return list; - } - - public static bool Has( this List list, Func evaluater ) - { - foreach ( var t in list ) - { - if ( evaluater( t ) ) - { - return true; - } - } - - return false; - } - - public static void SwapTowardsBegin( this List list, int index, int steps = 1 ) - { - list.Swap( index, index - steps ); - } - - public static void SwapTowardsEnd( this List list, int index, int steps = 1 ) - { - list.Swap( index, index + steps ); - } - - public static void Swap( this List list, int indexA, int indexB ) - { - if ( list == null || indexA == indexB || indexA < 0 || indexB < 0 || indexA >= list.Count || indexA >= list.Count ) - { - return; - } - - var buffer = list[ indexA ]; - list[ indexA ] = list[ indexB ]; - list[ indexB ] = buffer; - - } - - - public static async Task> FilterAsync( this List list, Func> filter ) - { - var outputList = new List(); - - var index = 0; - - foreach ( var it in list ) - { - var result = await filter( it ); - - if ( result ) - { - outputList.Add( it ); - } - - index++; - } - - return outputList; - } - - public static void Filter( List inputList, List list, Func filter ) - { - for ( int i = 0; i < inputList.Count; i++ ) - { - if ( filter( inputList[ i ], i ) ) - { - list.Add( inputList[ i ] ); - } - } - } - - public static List Filter( this List list, Func filter ) - { - var filteredList = new List(); - Filter( list, filteredList, filter ); - return filteredList; - } - - public static List Filter( this List list, Func filter ) - { - var filteredList = new List(); - Filter( list, filteredList, filter ); - return filteredList; - } - - public static List FilterNulls( this List list ) - { - return Filter( list, e => e != null ); - } - - public static void Filter( List inputList, List list, Func filter ) - { - for ( int i = 0; i < inputList.Count; i++ ) - { - if ( filter( inputList[ i ] ) ) - { - list.Add( inputList[ i ] ); - } - } - } - - public static List FilterWith( List inputList, Func filter ) - { - var list = new List(); - - for ( int i = 0; i < inputList.Count; i++ ) - { - if ( filter( inputList[ i ] ) ) - { - list.Add( inputList[ i ] ); - } - } - - return list; - } - - - - - public static void Add( this List list, params T[] entries ) - { - list.AddRange( entries ); - } - - public static List Concat( this List list, params T[] entries ) - { - list.AddRange( entries ); - return list; - } - - public static List Concat( this List list, List entries ) - { - list.AddRange( entries ); - return list; - } - - public static void Insert( List list, T item, int index ) - { - if ( index >= list.Count ) - { - list.Add( item ); - return; - } - - index = index < 0 ? 0 : index; - - list.Insert( index, item ); - } - - public static T Find( List list, Func callback ) - { - for ( int i = 0; i < list.Count; i++ ) - { - if ( callback( list[ i ] ) ) - { - return list[ i ]; - } - } - - return default( T ); - } - - public static List MultiMap( this List list, Func> mapper ) - { - var outputList = new List(); - - for ( int i = 0; i < list.Count; i++ ) - { - var range = mapper( list[ i ], i ); - - if ( range.Count == 0 ) - { - continue; - } - - outputList.AddRange( range ); - } - - return outputList; - } - - public static List Map( this List list, Func mapper ) - { - return Map( list, mapper, new List() ); - } - - public static List Map( this List list, Func mapper ) - { - return Map( list, mapper, new List() ); - } - - public static Dictionary CreateIndex( this List list ) - { - var m = new Dictionary(); - - for ( int i = 0; i < list.Count; i++ ) - { - m[ list[ i ] ] = i; - } - - return m; - } - - public static HashSet CreateSet( this List list ) - { - var set = new HashSet(); - list.ForEach( e => set.Add( e ) ); - return set; - } - - public static List Map( List inputList, Func mapper, List list = null ) - { - if ( list == null ) - { - list = new List(); - } - - for ( int i = 0; i < inputList.Count; i++ ) - { - list.Add( mapper( inputList[ i ], i ) ); - } - - return list; - } - - public static List Map( T[] inputList, Func mapper, List list = null ) - { - if ( list == null ) - { - list = new List(); - } - - for ( int i = 0; i < inputList.Length; i++ ) - { - list.Add( mapper( inputList[ i ], i ) ); - } - - return list; - } - - public static List Map( List inputList, Func mapper, List list = null ) - { - if ( list == null ) - { - list = new List(); - } - - for ( int i = 0; i < inputList.Count; i++ ) - { - list.Add( mapper( inputList[ i ] ) ); - } - - return list; - } - - public static Godot.Collections.Array ToGodotArray<[MustBeVariant] T>( this List values ) - { - return [.. values]; - } - - public static void Remove( this List list, HashSet removals ) - { - list.RemoveAll( m => removals.Contains( m ) ); - } - - public static void Remove( this List list, List removals ) - { - if ( list.Count * removals.Count > 100 ) - { - var removalSet = new HashSet( removals ); - list.Remove( removalSet ); - return; - } - - list.RemoveAll( m => removals.Contains( m ) ); - } - - public static List CloneWithout( this List list, List removals ) - { - var cloned = list.Clone(); - cloned.Remove( removals ); - return cloned; - } - - public static List Map<[Godot.MustBeVariant]T,U>( Godot.Collections.Array inputList, Func mapper, List list = null ) - { - if ( list == null ) - { - list = new List(); - } - - for ( int i = 0; i < inputList.Count; i++ ) - { - list.Add( mapper( inputList[ i ] ) ); - } - - return list; - } - - public static List Map( T[] inputList, Func mapper, List list = null ) - { - if ( list == null ) - { - list = new List(); - } - - for ( int i = 0; i < inputList.Length; i++ ) - { - list.Add( mapper( inputList[ i ] ) ); - } - - return list; - } - - #endif - - - } - - public class ListView - { - List _list; - int _offset; - int _length; - - - public ListView( List list, int offset, int length ) - { - _list = list; - _offset = offset; - _length = length; - } - - public T this[ int index ] - { - get => _list[ index - _offset ]; - set => _list[ index - _offset ] = value; - } - - public int Count => _length; - - public void ForEach( Action action ) - { - for ( int i = 0; i < _length; i++ ) - { - action( this[ i ] ); - } - } - - public List GetList() - { - return _list; - } - - public List SubList() - { - return _list.Sub( _offset, _length ); - } - } -} \ No newline at end of file diff --git a/Runtime/Tools/ReflectionHelper.cs b/Runtime/Tools/ReflectionHelper.cs index 52afbf4..55a8925 100644 --- a/Runtime/Tools/ReflectionHelper.cs +++ b/Runtime/Tools/ReflectionHelper.cs @@ -5,6 +5,7 @@ using System.Reflection; using System.Text.RegularExpressions; using Godot; +using Rokojori.Extensions; namespace Rokojori { public static class ReflectionHelper @@ -281,7 +282,7 @@ namespace Rokojori public static List GetDataMemberInfos( object instance ) { var list = GetDataMemberInfos( instance, BindingFlags.Instance | BindingFlags.Public ); - list = Lists.Filter( list, m => IsType( m ) ); + list = ListExtensions.Filter( list, m => IsType( m ) ); return list; } @@ -435,7 +436,7 @@ namespace Rokojori { var infos = GetDataMemberInfos( instance ); - return Lists.Map( infos, i => GetDataMemberValue( instance, i ) ); + return ListExtensions.Map( infos, i => GetDataMemberValue( instance, i ) ); } public static MemberInfo GetDataMemberInfo( Type type, string memberName, BindingFlags flags = BindingFlags.Public | BindingFlags.Instance ) diff --git a/Runtime/Tools/Safe.cs b/Runtime/Tools/Safe.cs index dbb85b6..50a12ab 100644 --- a/Runtime/Tools/Safe.cs +++ b/Runtime/Tools/Safe.cs @@ -4,6 +4,7 @@ using System; using System.Reflection; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class Safe diff --git a/Runtime/Tools/Singleton.cs b/Runtime/Tools/Singleton.cs index 8b83df9..ad0b29f 100644 --- a/Runtime/Tools/Singleton.cs +++ b/Runtime/Tools/Singleton.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class Singleton where T:new() diff --git a/Runtime/Tools/TestNode.cs b/Runtime/Tools/TestNode.cs index 1caa3ac..6e65a78 100644 --- a/Runtime/Tools/TestNode.cs +++ b/Runtime/Tools/TestNode.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori; [GlobalClass][Tool] diff --git a/Runtime/Tools/TestResource.cs b/Runtime/Tools/TestResource.cs index 9a8c930..9c31f69 100644 --- a/Runtime/Tools/TestResource.cs +++ b/Runtime/Tools/TestResource.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Godot; +using Rokojori.Extensions; namespace Rokojori; [GlobalClass][Tool] diff --git a/Runtime/Tools/Trillean.cs b/Runtime/Tools/Trillean.cs index 697ae5c..575d659 100644 --- a/Runtime/Tools/Trillean.cs +++ b/Runtime/Tools/Trillean.cs @@ -4,61 +4,63 @@ using System; using System.Reflection; using System.Text.RegularExpressions; -namespace Rokojori +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +public enum Trillean { - public enum Trillean + False, + True, + Any +} + +[RokojoriActionCoreExport] +public static class TrilleanLogic +{ + public static Trillean FromBool( bool value ) { - False, - True, - Any + return value ? Trillean.True : Trillean.False; } - public static class TrilleanLogic + public static bool ToBool( Trillean value, bool any = true ) { - public static Trillean FromBool( bool value ) + if ( Trillean.Any == value ) { - return value ? Trillean.True : Trillean.False; + return any; } - public static bool ToBool( Trillean value, bool any = true ) - { - if ( Trillean.Any == value ) - { - return any; - } + return Trillean.True == value; + } - return Trillean.True == value; + public static bool Matches( Trillean value, bool state, bool anyValue = true ) + { + if ( Trillean.Any == value ) + { + return anyValue; } - public static bool Matches( Trillean value, bool state, bool anyValue = true ) + var boolValue = Trillean.True == value; + + return boolValue == state; + + } + + public static bool AllAny( params Trillean[] values ) + { + if ( values == null || values.Length == 0 ) { - if ( Trillean.Any == value ) - { - return anyValue; - } - - var boolValue = Trillean.True == value; - - return boolValue == state; - + return false; } - public static bool AllAny( params Trillean[] values ) + for ( int i = 0; i < values.Length; i++ ) { - if ( values == null || values.Length == 0 ) + if ( values[ i ] != Trillean.Any ) { return false; } - - for ( int i = 0; i < values.Length; i++ ) - { - if ( values[ i ] != Trillean.Any ) - { - return false; - } - } - - return true; } + + return true; } -} \ No newline at end of file +} diff --git a/Runtime/Tools/TypeTools.cs b/Runtime/Tools/TypeTools.cs new file mode 100644 index 0000000..eb0e920 --- /dev/null +++ b/Runtime/Tools/TypeTools.cs @@ -0,0 +1,93 @@ +using System.Collections; +using System.Collections.Generic; +using System; +using System.Reflection; +using System.Text.RegularExpressions; +using Godot; + +using Rokojori.Extensions; +namespace Rokojori; + +[RokojoriActionCoreExport] +public static class TypeTools +{ + + [RokojoriActionCoreGenericAsString( "Prepend")] + public static bool IsOfType( object obj ) + { + #if ROKOJORI_ACTION_CORE_GD + /* + + if obj == null: + return false; + + return is_script_of_type( type, obj.get_script() ) + + */ + + GDGlue.CommentToGD(); + + #else + + return obj is T; + + #endif + } + + + public static string GetType( object obj ) + { + /* + + if obj == null: + return ""; + + return obj.get_script().get_global_name() + + */ + + GDGlue.CommentToGD(); + + #if ! ROKOJORI_ACTION_CORE_GD + + return obj.GetType().Name; + + #endif + + } + + + + [RokojoriActionCoreGenericAsString( "Prepend")] + public static bool IsScriptOfType( Script script ) + { + /* + + if script == null: + return false; + + if script.get_global_name() == type: + return true; + + return is_script_of_type( type, script.get_base_script() ) + + */ + + GDGlue.CommentToGD(); + + #if ! ROKOJORI_ACTION_CORE_GD + + return false; + + #endif + + } + + public static void Test() + { + TypeTools.IsScriptOfType( null ); + IsScriptOfType( null ); + } + + +} diff --git a/Runtime/Tools/TypeTools.cs.uid b/Runtime/Tools/TypeTools.cs.uid new file mode 100644 index 0000000..a96b12c --- /dev/null +++ b/Runtime/Tools/TypeTools.cs.uid @@ -0,0 +1 @@ +uid://cain5w0ryp8ym diff --git a/Runtime/UI/Actions/SetFocusedControl.cs b/Runtime/UI/Actions/SetFocusedControl.cs index 2a9d743..9467d03 100644 --- a/Runtime/UI/Actions/SetFocusedControl.cs +++ b/Runtime/UI/Actions/SetFocusedControl.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/UI/Actions/SetUIElementActiveState.cs b/Runtime/UI/Actions/SetUIElementActiveState.cs index 858b617..bfa2236 100644 --- a/Runtime/UI/Actions/SetUIElementActiveState.cs +++ b/Runtime/UI/Actions/SetUIElementActiveState.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/UI/Actions/SetUIStyle.cs b/Runtime/UI/Actions/SetUIStyle.cs index 0b73451..e99df55 100644 --- a/Runtime/UI/Actions/SetUIStyle.cs +++ b/Runtime/UI/Actions/SetUIStyle.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/UI/Actions/SetUIText.cs b/Runtime/UI/Actions/SetUIText.cs index 726d8fe..12c482d 100644 --- a/Runtime/UI/Actions/SetUIText.cs +++ b/Runtime/UI/Actions/SetUIText.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool,GlobalClass] diff --git a/Runtime/UI/Components/OldUISlider.cs b/Runtime/UI/Components/OldUISlider.cs index c3b38ba..fdd5dab 100644 --- a/Runtime/UI/Components/OldUISlider.cs +++ b/Runtime/UI/Components/OldUISlider.cs @@ -3,6 +3,7 @@ using Godot; using System; using System.IO; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/UI/Components/UIDragging.cs b/Runtime/UI/Components/UIDragging.cs index a810fe3..a24b49d 100644 --- a/Runtime/UI/Components/UIDragging.cs +++ b/Runtime/UI/Components/UIDragging.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Text.Json.Serialization; +using Rokojori.Extensions; namespace Rokojori { public class UIDragging diff --git a/Runtime/UI/Layouts/UIFlowLayout.cs b/Runtime/UI/Layouts/UIFlowLayout.cs index b6f83c2..fccc027 100644 --- a/Runtime/UI/Layouts/UIFlowLayout.cs +++ b/Runtime/UI/Layouts/UIFlowLayout.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public class UIFlowLayout diff --git a/Runtime/UI/Layouts/UILayout.cs b/Runtime/UI/Layouts/UILayout.cs index ad061f2..0d41062 100644 --- a/Runtime/UI/Layouts/UILayout.cs +++ b/Runtime/UI/Layouts/UILayout.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public enum UILayout diff --git a/Runtime/UI/Layouts/UILayouting.cs b/Runtime/UI/Layouts/UILayouting.cs index 584df55..5c2c57a 100644 --- a/Runtime/UI/Layouts/UILayouting.cs +++ b/Runtime/UI/Layouts/UILayouting.cs @@ -3,6 +3,7 @@ using System.Linq; using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public class UILayouting diff --git a/Runtime/UI/MouseModeTool.cs b/Runtime/UI/MouseModeTool.cs index 80f113b..074e285 100644 --- a/Runtime/UI/MouseModeTool.cs +++ b/Runtime/UI/MouseModeTool.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool][GlobalClass] diff --git a/Runtime/UI/Nodes/Image/UIImage.cs b/Runtime/UI/Nodes/Image/UIImage.cs index 49c9015..ae29c2a 100644 --- a/Runtime/UI/Nodes/Image/UIImage.cs +++ b/Runtime/UI/Nodes/Image/UIImage.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/Image/UIImageTypes/NinePatchUIImageType.cs b/Runtime/UI/Nodes/Image/UIImageTypes/NinePatchUIImageType.cs index e418bae..18189f7 100644 --- a/Runtime/UI/Nodes/Image/UIImageTypes/NinePatchUIImageType.cs +++ b/Runtime/UI/Nodes/Image/UIImageTypes/NinePatchUIImageType.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/Image/UIImageTypes/RoundedRectangleUIImageType.cs b/Runtime/UI/Nodes/Image/UIImageTypes/RoundedRectangleUIImageType.cs index 6ee55d3..2a95c92 100644 --- a/Runtime/UI/Nodes/Image/UIImageTypes/RoundedRectangleUIImageType.cs +++ b/Runtime/UI/Nodes/Image/UIImageTypes/RoundedRectangleUIImageType.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/Image/UIImageTypes/SliderUIImageType.cs b/Runtime/UI/Nodes/Image/UIImageTypes/SliderUIImageType.cs index fed7316..9975583 100644 --- a/Runtime/UI/Nodes/Image/UIImageTypes/SliderUIImageType.cs +++ b/Runtime/UI/Nodes/Image/UIImageTypes/SliderUIImageType.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/Image/UIImageTypes/UIImageType.cs b/Runtime/UI/Nodes/Image/UIImageTypes/UIImageType.cs index ab9980f..d1c7c0a 100644 --- a/Runtime/UI/Nodes/Image/UIImageTypes/UIImageType.cs +++ b/Runtime/UI/Nodes/Image/UIImageTypes/UIImageType.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/Selections/ListSelection/ChangeUIListSelection.cs b/Runtime/UI/Nodes/Selections/ListSelection/ChangeUIListSelection.cs index 15ee4c1..a577f0a 100644 --- a/Runtime/UI/Nodes/Selections/ListSelection/ChangeUIListSelection.cs +++ b/Runtime/UI/Nodes/Selections/ListSelection/ChangeUIListSelection.cs @@ -3,6 +3,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -39,7 +40,7 @@ public partial class ChangeUIListSelection:Action } else if ( Mode.Change == mode ) { - selection.selected = MathX.Repeat( selection.selected + value, selection.values.Length ); + selection.selected = MathX.RepeatInt( selection.selected + value, selection.values.Length ); } } } \ No newline at end of file diff --git a/Runtime/UI/Nodes/Selections/ListSelection/UIListSelection.cs b/Runtime/UI/Nodes/Selections/ListSelection/UIListSelection.cs index 62eb714..6ea2d69 100644 --- a/Runtime/UI/Nodes/Selections/ListSelection/UIListSelection.cs +++ b/Runtime/UI/Nodes/Selections/ListSelection/UIListSelection.cs @@ -3,6 +3,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Nodes/Sliders/ScrollSlider/UIScrollSlider.cs b/Runtime/UI/Nodes/Sliders/ScrollSlider/UIScrollSlider.cs index b9e6e8e..9fb1eac 100644 --- a/Runtime/UI/Nodes/Sliders/ScrollSlider/UIScrollSlider.cs +++ b/Runtime/UI/Nodes/Sliders/ScrollSlider/UIScrollSlider.cs @@ -3,6 +3,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Nodes/Sliders/UISlider.cs b/Runtime/UI/Nodes/Sliders/UISlider.cs index 93fb9c4..6352654 100644 --- a/Runtime/UI/Nodes/Sliders/UISlider.cs +++ b/Runtime/UI/Nodes/Sliders/UISlider.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Nodes/Sliders/ValueSlider/UIFloatValueMode.cs b/Runtime/UI/Nodes/Sliders/ValueSlider/UIFloatValueMode.cs index f4e1bd2..326b0ee 100644 --- a/Runtime/UI/Nodes/Sliders/ValueSlider/UIFloatValueMode.cs +++ b/Runtime/UI/Nodes/Sliders/ValueSlider/UIFloatValueMode.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Nodes/Sliders/ValueSlider/UIResolutionScaleMode.cs b/Runtime/UI/Nodes/Sliders/ValueSlider/UIResolutionScaleMode.cs index 3341eee..e7061f0 100644 --- a/Runtime/UI/Nodes/Sliders/ValueSlider/UIResolutionScaleMode.cs +++ b/Runtime/UI/Nodes/Sliders/ValueSlider/UIResolutionScaleMode.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSlider.cs b/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSlider.cs index 7a64586..8875f77 100644 --- a/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSlider.cs +++ b/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSlider.cs @@ -3,6 +3,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSliderMode.cs b/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSliderMode.cs index 8613cf8..9e59b06 100644 --- a/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSliderMode.cs +++ b/Runtime/UI/Nodes/Sliders/ValueSlider/UIValueSliderMode.cs @@ -3,6 +3,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Nodes/UIBreak.cs b/Runtime/UI/Nodes/UIBreak.cs index cd6275d..49f7c63 100644 --- a/Runtime/UI/Nodes/UIBreak.cs +++ b/Runtime/UI/Nodes/UIBreak.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/UIFocusProcessor.cs b/Runtime/UI/Nodes/UIFocusProcessor.cs index dd8b79f..f795736 100644 --- a/Runtime/UI/Nodes/UIFocusProcessor.cs +++ b/Runtime/UI/Nodes/UIFocusProcessor.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public interface UIFocusProcessor diff --git a/Runtime/UI/Nodes/UIHolder.cs b/Runtime/UI/Nodes/UIHolder.cs index 8b9b0fe..2d7a0cd 100644 --- a/Runtime/UI/Nodes/UIHolder.cs +++ b/Runtime/UI/Nodes/UIHolder.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface UIHolderControl diff --git a/Runtime/UI/Nodes/UIHoverable.cs b/Runtime/UI/Nodes/UIHoverable.cs index c2a537d..763f628 100644 --- a/Runtime/UI/Nodes/UIHoverable.cs +++ b/Runtime/UI/Nodes/UIHoverable.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface UIHoverable diff --git a/Runtime/UI/Nodes/UIInputInfo.cs b/Runtime/UI/Nodes/UIInputInfo.cs index c4a42da..20c0149 100644 --- a/Runtime/UI/Nodes/UIInputInfo.cs +++ b/Runtime/UI/Nodes/UIInputInfo.cs @@ -3,224 +3,223 @@ using Godot; using System.Collections.Generic; -namespace Rokojori +using Rokojori.Extensions; +namespace Rokojori; + +[Tool] +[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/UIInputIcon.svg")] +public partial class UIInputInfo: UIRegion { + InputIcon[] _inputIcons = []; + + [Export] + public InputIcon[] inputIcons + { + get => _inputIcons; + set + { + _inputIcons = value; + // UpdateInfo(); + } + } + + [Export] + public LocalizedString locale; + + [Export] + public bool upperCase; + + [Export] + public bool updateInfo + { + get => false; + set { if ( value ){ UpdateInfo(); }} + } + + [Export] + public DeviceFilter deviceFilter; + + public override void _Ready() + { + UpdateInfo(); + } + + public void UpdateInfo() + { + Nodes.RemoveAndDeleteChildren( this ); + + if ( inputIcons == null ) + { + return; + } + + var iiLib = GetInputIconsLibrary(); + + if ( iiLib == null ) + { + // this.LogInfo( "No Input lib!" ); + return; + } + + var icons = iiLib.ResolveIcons( inputIcons ); + + this.LogInfo( "Resolved Icons:\n", inputIcons, "\n>>\n", icons ); + + if ( deviceFilter != null ) + { + var iconsBefore = ListExtensions.From( icons ); + icons = ListExtensions.Filter( icons, i => deviceFilter.BelongsToDevice( i ) ); + this.LogInfo( "Device Filtered Icons:\n", iconsBefore, "\n>>\n", icons ); + } + + icons = iiLib.ResolveIcons( icons.ToArray() ); + + icons.ForEach( i => AddIcon( i ) ); - [Tool] - [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/UIInputIcon.svg")] - public partial class UIInputInfo: UIRegion - { - InputIcon[] _inputIcons = []; - [Export] - public InputIcon[] inputIcons + + if ( locale != null ) { - get => _inputIcons; - set - { - _inputIcons = value; - // UpdateInfo(); - } + var localeText = this.CreateChild( "Locale" ); + localeText.locale = locale; + + localeText.font = iiLib.font; + localeText.fontSize = this.fontSize ?? iiLib.fontSize; + + localeText.Uppercase = upperCase; + localeText.marginLeft = UINumber.EM( 0.25f ); } + + } - [Export] - public LocalizedString locale; - [Export] - public bool upperCase; + UI ui; - [Export] - public bool updateInfo + public void SetUI( UI ui ) + { + this.ui = ui; + } + + InputIconsLibrary GetInputIconsLibrary() + { + var ui = this.ui != null ? this.ui : Unique.Get(); + + if ( ui == null ) { - get => false; - set { if ( value ){ UpdateInfo(); }} - } - - [Export] - public DeviceFilter deviceFilter; - - public override void _Ready() - { - UpdateInfo(); - } - - public void UpdateInfo() - { - Nodes.RemoveAndDeleteChildren( this ); - - if ( inputIcons == null ) - { - return; - } - - var iiLib = GetInputIconsLibrary(); - - if ( iiLib == null ) - { - // this.LogInfo( "No Input lib!" ); - return; - } - - var icons = iiLib.ResolveIcons( inputIcons ); - - this.LogInfo( "Resolved Icons:\n", inputIcons, "\n>>\n", icons ); - - if ( deviceFilter != null ) - { - var iconsBefore = Lists.From( icons ); - icons = Lists.Filter( icons, i => deviceFilter.BelongsToDevice( i ) ); - this.LogInfo( "Device Filtered Icons:\n", iconsBefore, "\n>>\n", icons ); - } - - icons = iiLib.ResolveIcons( icons.ToArray() ); - - icons.ForEach( i => AddIcon( i ) ); - - - - if ( locale != null ) - { - var localeText = this.CreateChild( "Locale" ); - localeText.locale = locale; - - localeText.font = iiLib.font; - localeText.fontSize = this.fontSize ?? iiLib.fontSize; - - localeText.Uppercase = upperCase; - localeText.marginLeft = UINumber.EM( 0.25f ); - } - - } - - - UI ui; - - public void SetUI( UI ui ) - { - this.ui = ui; - } - - InputIconsLibrary GetInputIconsLibrary() - { - var ui = this.ui != null ? this.ui : Unique.Get(); + ui = this.FindParentThatIs(); if ( ui == null ) { - ui = this.FindParentThatIs(); + this.LogInfo( "No UI in parents >", ui ); - if ( ui == null ) - { - this.LogInfo( "No UI in parents >", ui ); - - return null; - } + return null; } - - var lib = ui.settings.inputIconsLibrary; + } + + var lib = ui.settings.inputIconsLibrary; - return lib; + return lib; + } + + void AddIcon( InputIcon inputIcon ) + { + if ( inputIcon == null ) + { + return; + } + + var lib = GetInputIconsLibrary(); + + var id = lib.GetInputIconDefinition( inputIcon ); + + if ( id == null ) + { + // this.LogInfo( "No definition found >> ", inputIcon ); + return; } - void AddIcon( InputIcon inputIcon ) - { - if ( inputIcon == null ) - { - return; - } - - var lib = GetInputIconsLibrary(); + // this.LogInfo( "Definition found >> ", inputIcon ); - var id = lib.GetInputIconDefinition( inputIcon ); + var iconRegion = this.CreateChild(); + var elements = id.GetIconElementsForIcon( inputIcon ); - if ( id == null ) + elements.ForEach( e => AddElement( iconRegion, e, e == elements[ 0 ] ) ); + + } + + void AddElement( UIRegion iconRegion, IconElement element, bool isBG ) + { + var lib = GetInputIconsLibrary(); + + if ( element is TextureIconElement textureIconElement ) + { + var uiImage = iconRegion.CreateChild(); + uiImage.Texture = textureIconElement.texture; + uiImage.ExpandMode = TextureRect.ExpandModeEnum.IgnoreSize; + uiImage.StretchMode = TextureRect.StretchModeEnum.Scale; + + uiImage.height = UINumber.EM( lib.iconHeightInEm ); + + if ( isBG ) { - // this.LogInfo( "No definition found >> ", inputIcon ); - return; + uiImage.width = UINumber.EM( lib.iconHeightInEm * textureIconElement.widthScale ); + + if ( textureIconElement.hasBorders ) + { + var ninePatchType = new NinePatchUIImageType(); + + ninePatchType.leftPixelOffset = textureIconElement.borderLeft; + ninePatchType.rightPixelOffset = textureIconElement.borderRight; + ninePatchType.topPixelOffset = textureIconElement.borderTop; + ninePatchType.bottomPixelOffset = textureIconElement.borderBottom; + + uiImage.imageType = ninePatchType; + } + } + else + { + var size = textureIconElement.texture.GetSize(); + var ratio = size.X / size.Y; + + uiImage.width = UINumber.EM( lib.iconHeightInEm ).GetMultiplied( ratio ); + uiImage.top = UINumber.EM( 0f ); + uiImage.position = UIPosition.Parent_Anchor; + + if ( TextureIconOverlayAlignment.Left == textureIconElement.alignment ) + { + uiImage.left = UINumber.EM( 0f ); + } + + if ( TextureIconOverlayAlignment.Right == textureIconElement.alignment ) + { + uiImage.right = UINumber.EM( 0f ); + } } - // this.LogInfo( "Definition found >> ", inputIcon ); - - var iconRegion = this.CreateChild(); - var elements = id.GetIconElementsForIcon( inputIcon ); - - elements.ForEach( e => AddElement( iconRegion, e, e == elements[ 0 ] ) ); - + if ( textureIconElement.rotation != 0 ) + { + uiImage.rotation = UINumber.Create( textureIconElement.rotation ); + } } - - void AddElement( UIRegion iconRegion, IconElement element, bool isBG ) + else if ( element is LabelIconElement labelIconElement ) { - var lib = GetInputIconsLibrary(); + var uiText = iconRegion.CreateChild(); - if ( element is TextureIconElement textureIconElement ) - { - var uiImage = iconRegion.CreateChild(); - uiImage.Texture = textureIconElement.texture; - uiImage.ExpandMode = TextureRect.ExpandModeEnum.IgnoreSize; - uiImage.StretchMode = TextureRect.StretchModeEnum.Scale; + uiText.font = lib.font; + uiText.fontSize = labelIconElement.fontScale == 1 ? lib.fontSize : lib.fontSize.GetMultiplied( labelIconElement.fontScale ); + uiText.locale = labelIconElement.locale; - uiImage.height = UINumber.EM( lib.iconHeightInEm ); + uiText.width = UINumber.PW( 100 ); + uiText.height = UINumber.PH( 100 ); + uiText.left = UINumber.EM( 0f ); + uiText.top = UINumber.EM( 0f ); - if ( isBG ) - { - uiImage.width = UINumber.EM( lib.iconHeightInEm * textureIconElement.widthScale ); + uiText.position = UIPosition.Parent_Anchor; + uiText.alwaysMinimumSize = false; + uiText.HorizontalAlignment = HorizontalAlignment.Center; + uiText.VerticalAlignment = VerticalAlignment.Center; - if ( textureIconElement.hasBorders ) - { - var ninePatchType = new NinePatchUIImageType(); - - ninePatchType.leftPixelOffset = textureIconElement.borderLeft; - ninePatchType.rightPixelOffset = textureIconElement.borderRight; - ninePatchType.topPixelOffset = textureIconElement.borderTop; - ninePatchType.bottomPixelOffset = textureIconElement.borderBottom; - - uiImage.imageType = ninePatchType; - } - } - else - { - var size = textureIconElement.texture.GetSize(); - var ratio = size.X / size.Y; - - uiImage.width = UINumber.EM( lib.iconHeightInEm ).GetMultiplied( ratio ); - uiImage.top = UINumber.EM( 0f ); - uiImage.position = UIPosition.Parent_Anchor; - - if ( TextureIconOverlayAlignment.Left == textureIconElement.alignment ) - { - uiImage.left = UINumber.EM( 0f ); - } - - if ( TextureIconOverlayAlignment.Right == textureIconElement.alignment ) - { - uiImage.right = UINumber.EM( 0f ); - } - } - - if ( textureIconElement.rotation != 0 ) - { - uiImage.rotation = UINumber.Create( textureIconElement.rotation ); - } - } - else if ( element is LabelIconElement labelIconElement ) - { - var uiText = iconRegion.CreateChild(); - - uiText.font = lib.font; - uiText.fontSize = labelIconElement.fontScale == 1 ? lib.fontSize : lib.fontSize.GetMultiplied( labelIconElement.fontScale ); - uiText.locale = labelIconElement.locale; - - uiText.width = UINumber.PW( 100 ); - uiText.height = UINumber.PH( 100 ); - uiText.left = UINumber.EM( 0f ); - uiText.top = UINumber.EM( 0f ); - - uiText.position = UIPosition.Parent_Anchor; - uiText.alwaysMinimumSize = false; - uiText.HorizontalAlignment = HorizontalAlignment.Center; - uiText.VerticalAlignment = VerticalAlignment.Center; - - uiText.Uppercase = labelIconElement.fontIsUpperCase; - } + uiText.Uppercase = labelIconElement.fontIsUpperCase; } } -} \ No newline at end of file +} diff --git a/Runtime/UI/Nodes/UIRegion.cs b/Runtime/UI/Nodes/UIRegion.cs index 5abc63e..baa5a31 100644 --- a/Runtime/UI/Nodes/UIRegion.cs +++ b/Runtime/UI/Nodes/UIRegion.cs @@ -3,758 +3,760 @@ using Godot; using System.Collections.Generic; using System.Linq; -namespace Rokojori -{ - [Tool] - [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/UIRegion.svg")] - public partial class UIRegion : Control, UIStylePropertyContainerNode, UIHolderControl - { - - [Export] - public bool activateDebugging = false; +using Rokojori.Extensions; - public bool HasDebugFlag() +using Rokojori.Extensions; +namespace Rokojori; + +[Tool] +[GlobalClass,Icon("res://addons/rokojori_action_library/Icons/UIRegion.svg")] +public partial class UIRegion : Control, UIStylePropertyContainerNode, UIHolderControl +{ + + [Export] + public bool activateDebugging = false; + + public bool HasDebugFlag() + { + return activateDebugging; + } + + [Export] + public string currentSelectors = ""; + + [ExportGroup("Actions")] + + [Export] + public Action onVisible; + + [Export] + public Action onInvisible; + + [Export] + public Action onVisibilityChanged; + + [ExportGroup( "Interactivity" )] + [Export] + public UICursor hoverCursor; + + public UICursor GetHoverCursor( UIStylePropertyContainer container ) + { + return hoverCursor; + } + + + [Export] + public Action onUIConfirm; + + + public enum ConfirmClick + { + Ignore, + MouseDown, + MouseRelease, + Focused_MouseDown, + Focused_MouseRelease + } + + [Export] + public ConfirmClick confirmClickMode = ConfirmClick.MouseDown; + + [Export] + public Action onFocusEntered; + + [Export] + public Action onFocusExited; + + [Export] + public Control[] setActiveWhenFocused = []; + + [Export] + public Control focusControl; + + [Export] + public bool handleMouseEvents = false; + + [Export] + public Action onLeftClick; + + [Export] + public Action onMiddleClick; + + [Export] + public Action onRightClick; + + public override void _GuiInput( InputEvent inputEvent ) + { + var ui = GetUI(); + + // this.LogInfo( "InputEvent", inputEvent, ui.settings.uiConfirm.IsDown( inputEvent ) ); + + if ( ui.settings.uiConfirm.IsDown( inputEvent ) ) { - return activateDebugging; + onUIConfirm?.Trigger(); + // GD.Print("ui_accept pressed while focused"); + // AcceptEvent(); // Optional: stop propagation } - [Export] - public string currentSelectors = ""; - - [ExportGroup("Actions")] - - [Export] - public Action onVisible; - - [Export] - public Action onInvisible; - - [Export] - public Action onVisibilityChanged; - - [ExportGroup( "Interactivity" )] - [Export] - public UICursor hoverCursor; - - public UICursor GetHoverCursor( UIStylePropertyContainer container ) + if ( inputEvent is InputEventMouseButton lmb ) { - return hoverCursor; + if ( lmb.IsPressed() ) + { + AddUISelectorFlag( UISelectorFlag.Dragging ); + + if ( focusControl != null ) + { + focusControl.GrabFocus(); + } + } + + if ( lmb.IsReleased() ) + { + RemoveUISelectorFlag( UISelectorFlag.Dragging ); + } + + + if ( lmb.Pressed && lmb.ButtonIndex == MouseButton.Left ) + { + if ( ConfirmClick.MouseDown == confirmClickMode || ConfirmClick.Focused_MouseDown == confirmClickMode ) + { + if ( HasFocus() || ConfirmClick.MouseDown == confirmClickMode ) + { + onUIConfirm?.Trigger(); + } + } + } + else if ( + lmb.IsReleased() && lmb.ButtonIndex == MouseButton.Left && + _selectorFlags != null && _selectorFlags.Contains( UISelectorFlag.Hover ) + ) + { + if ( ConfirmClick.MouseRelease == confirmClickMode || ConfirmClick.Focused_MouseRelease == confirmClickMode ) + { + if ( HasFocus() || ConfirmClick.MouseRelease == confirmClickMode ) + { + onUIConfirm?.Trigger(); + } + } + } } - - [Export] - public Action onUIConfirm; - - - public enum ConfirmClick + if ( ! handleMouseEvents ) { - Ignore, - MouseDown, - MouseRelease, - Focused_MouseDown, - Focused_MouseRelease + return; + } + + + if ( inputEvent is InputEventMouseButton mb ) + { + if ( mb.Pressed ) + { + this.LogInfo( "Clicked" ); + + if ( mb.ButtonIndex == MouseButton.Left ) + { + Action.TriggerSafe( onLeftClick ); + } + + if ( mb.ButtonIndex == MouseButton.Middle ) + { + Action.TriggerSafe( onMiddleClick ); + } + + if ( mb.ButtonIndex == MouseButton.Right ) + { + Action.TriggerSafe( onRightClick ); + } + } + } + + } + + [ExportGroup( "Functions" )] + [Export] + public UI.FocusOrderType focusOrderType = UI.FocusOrderType.Vertical_List; + + [ExportToolButton( "Set Focus Connections" )] + public Callable setFocusConnectionButton => Callable.From( + ( ) => + { + UI.SetChildFocusOrder( this, focusOrderType, null, FocusModeEnum.Click ); + } + ); + + #if TOOLS + [ExportGroup("Editor SceneSetup")] + [Export] + public UISettings uiSettings; + + [Export] + public bool updateInEditor = false; + + [Export] + public float fontZoom = 1f; + + + + [Export] + public bool reassignUI; + [ExportGroup("Editor SceneSetup/Read Only")] + [Export] + public float computedFontSize = 0f; + + #endif + + [ExportCategory( "UIStyle" )] + + + [ExportGroup( "Size & Margins" )] + [Export] + public UINumber width; + [Export] + public UINumber height; + + + [Export] + public UINumber margin; + + [Export] + public UINumber marginLeft; + [Export] + public UINumber marginTop; + [Export] + public UINumber marginRight; + [Export] + public UINumber marginBottom; + + + [ExportGroup( "Position" )] + [Export] + public UIPosition position; + [Export] + public UILineWrap lineWrap; + [Export] + public UINumber left; + [Export] + public UINumber top; + [Export] + public UINumber right; + [Export] + public UINumber bottom; + + + [ExportGroup( "Child Layout" )] + [Export] + public UILayout layout; + + [Export] + public UINumber horizontalAlignment; + [Export] + public UINumber verticalAlignment; + [Export] + public UINumber verticalPlacement; + + [Export] + public UINumber elementSpacing; + [Export] + public UINumber lineSpacing; + + [ExportGroup( "Font" )] + [Export] + public Font font; + [Export] + public UINumber fontSize; + [Export] + public UIColor fontColor; + + [Export] + public UINumber outlineSize; + [Export] + public UIColor outlineColor; + + [Export] + public UINumber shadowSize; + [Export] + public UIColor shadowColor; + + [Export] + public UINumber shadowOffsetX; + [Export] + public UINumber shadowOffsetY; + + [ExportGroup( "Modulation" )] + [Export] + public UIColor modulationColor; + [Export] + public UIColor selfModulationColor; + + + [ExportGroup("Transitions")] + [Export] + public TransitionSettingsAll transitionSettings; + public TransitionSettingsAll GetTransitionSettingsAll() + { + return transitionSettings; + } + + [Export] + public UINumberTransition[] numberTransitions = new UINumberTransition[ 0 ]; + public UINumberTransition[] GetNumberTransitions() + { + return numberTransitions; + } + + public List> activeNumberTransitions = new List>(); + public List> GetActiveUINumberTransitions() + { + return activeNumberTransitions; + } + + [Export] + public UIColorTransition[] colorTransitions = new UIColorTransition[ 0 ]; + public UIColorTransition[] GetColorTransitions() + { + return colorTransitions; + } + + public List> activeColorTransitions = new List>(); + public List> GetActiveUIColorTransitions() + { + return activeColorTransitions; + } + + [ExportGroup( "Sound" )] + [Export] + public UISoundData onFocusSound; + [Export] + public UISoundData onBlurSound; + + public UISoundData GetUISoundProperty( UISoundProperty property ) + { + if ( UISoundProperty.FocusEntered == property ) + { + return onFocusSound; + } + else if ( UISoundProperty.FocusExited == property ) + { + return onFocusSound; + } + + return null; + } + + public void SetUISoundProperty( UISoundProperty property, UISoundData stream ) + { + if ( UISoundProperty.FocusEntered == property ) + { + onFocusSound = stream; + } + else if ( UISoundProperty.FocusExited == property ) + { + onFocusSound = stream; + } + } + + + + + [ExportGroup( "" )] + [Export] + public UIStyle parentStyle; + + + + + public UIStyle GetUIStyleParent() + { + return parentStyle; + } + + public void SetUIStyleParent( UIStyle uiStyle ) + { + parentStyle = uiStyle; + } + + public UIPosition GetUIPosition() + { + return position; + } + + public UILineWrap GetUILineWrap() + { + return lineWrap; + } + + public UILayout GetUILayout() + { + return layout; + } + + public ShaderUIColor[] GetShaderUIColors() + { + return null; + } + + public ShaderUINumber[] GetShaderUINumbers() + { + return null; + } + + public Font GetFont() + { + return font; + } + + public Vector2 GetUISize() + { + return GetSize(); + } + + public UINumber GetUIStyleNumberProperty( UIStyleNumberProperty property, string shaderPropertyName, UIStylePropertyContainer source ) + { + switch ( property ) + { + case UIStyleNumberProperty.Left: return left; + case UIStyleNumberProperty.Right: return right; + case UIStyleNumberProperty.Top: return top; + case UIStyleNumberProperty.Bottom: return bottom; + + case UIStyleNumberProperty.Width: return width; + case UIStyleNumberProperty.Height: return height; + + case UIStyleNumberProperty.HorizontalAlignment: return horizontalAlignment; + case UIStyleNumberProperty.VerticalAlignment: return verticalAlignment; + case UIStyleNumberProperty.VerticalPlacement: return verticalPlacement; + case UIStyleNumberProperty.ElementSpacing: return elementSpacing; + case UIStyleNumberProperty.LineSpacing: return lineSpacing; + + case UIStyleNumberProperty.Margin: return margin; + + case UIStyleNumberProperty.MarginLeft: return marginLeft; + case UIStyleNumberProperty.MarginRight: return marginRight; + case UIStyleNumberProperty.MarginTop: return marginTop; + case UIStyleNumberProperty.MarginBottom: return marginBottom; + + case UIStyleNumberProperty.FontSize: return fontSize; + case UIStyleNumberProperty.FontOutlineSize: return outlineSize; + case UIStyleNumberProperty.FontShadowSize: return shadowSize; + case UIStyleNumberProperty.FontShadowOffsetX: return shadowOffsetX; + case UIStyleNumberProperty.FontShadowOffsetY: return shadowOffsetY; + + } + + return null; + } + + public void SetUIStyleNumberProperty( UIStyleNumberProperty property, UINumber number ) + { + switch ( property ) + { + case UIStyleNumberProperty.Left: { left = number; } break; + case UIStyleNumberProperty.Right: { right = number; } break; + case UIStyleNumberProperty.Top: { top = number; } break; + case UIStyleNumberProperty.Bottom: { bottom = number; } break; + + case UIStyleNumberProperty.HorizontalAlignment: { horizontalAlignment = number; } break; + case UIStyleNumberProperty.VerticalAlignment: { verticalAlignment = number; } break; + case UIStyleNumberProperty.VerticalPlacement: { verticalPlacement = number; } break; + case UIStyleNumberProperty.ElementSpacing: { elementSpacing = number; } break; + case UIStyleNumberProperty.LineSpacing: { lineSpacing = number; } break; + + + case UIStyleNumberProperty.Width: { width = number; } break; + case UIStyleNumberProperty.Height: { height = number; } break; + case UIStyleNumberProperty.Margin: { margin = number; } break; + + case UIStyleNumberProperty.MarginLeft: { marginLeft = number; } break; + case UIStyleNumberProperty.MarginRight: { marginRight = number; } break; + case UIStyleNumberProperty.MarginTop: { marginTop = number; } break; + case UIStyleNumberProperty.MarginBottom: { marginBottom = number; } break; + + case UIStyleNumberProperty.FontSize: { fontSize = number; } break; + case UIStyleNumberProperty.FontOutlineSize: { outlineSize = number; } break; + case UIStyleNumberProperty.FontShadowSize: { shadowSize = number; } break; + case UIStyleNumberProperty.FontShadowOffsetX: { shadowOffsetX = number; } break; + case UIStyleNumberProperty.FontShadowOffsetY: { shadowOffsetY = number; } break; + + } + + this.SetLayoutDirtyFlag(); + } + + bool _isAnimated = false; + int _isLayoutDirty = 3; + + public void ResetDirtyFlags() + { + _isAnimated = false; + _isLayoutDirty = Mathf.Max( 0, _isLayoutDirty - 1 ); + } + + public void SetAnimatedFlag() + { + _isAnimated = true; + this.SetDirty(); + } + + public void SetLayoutDirtyFlag() + { + _isLayoutDirty = 3; + this.SetDirty(); + } + + + public bool IsDirty() + { + return _isAnimated || _isLayoutDirty != 0 || this.HasActiveTransitions(); + } + + + public UIColor GetUIStyleColorProperty( UIStyleColorProperty property, string shaderPropertyName, UIStylePropertyContainer source ) + { + switch ( property ) + { + case UIStyleColorProperty.FontColor: return fontColor; + case UIStyleColorProperty.FontOutlineColor: return outlineColor; + case UIStyleColorProperty.FontShadowColor: return shadowColor; + case UIStyleColorProperty.ModulationColor: return modulationColor; + case UIStyleColorProperty.SelfModulationColor: return selfModulationColor; } - [Export] - public ConfirmClick confirmClickMode = ConfirmClick.MouseDown; + return null; + } - [Export] - public Action onFocusEntered; + string hoverID = IDGenerator.GenerateID(); - [Export] - public Action onFocusExited; + UICursor appliedCursor = null; - [Export] - public Control[] setActiveWhenFocused = []; + public override void _Ready() + { + VisibilityChanged += ()=> + { + var visible = IsVisibleInTree(); - [Export] - public Control focusControl; - - [Export] - public bool handleMouseEvents = false; - - [Export] - public Action onLeftClick; - - [Export] - public Action onMiddleClick; - - [Export] - public Action onRightClick; - - public override void _GuiInput( InputEvent inputEvent ) - { - var ui = GetUI(); - - // this.LogInfo( "InputEvent", inputEvent, ui.settings.uiConfirm.IsDown( inputEvent ) ); - - if ( ui.settings.uiConfirm.IsDown( inputEvent ) ) + if ( visible ) { - onUIConfirm?.Trigger(); - // GD.Print("ui_accept pressed while focused"); - // AcceptEvent(); // Optional: stop propagation - } - - if ( inputEvent is InputEventMouseButton lmb ) - { - if ( lmb.IsPressed() ) - { - AddUISelectorFlag( UISelectorFlag.Dragging ); - - if ( focusControl != null ) - { - focusControl.GrabFocus(); - } - } - - if ( lmb.IsReleased() ) - { - RemoveUISelectorFlag( UISelectorFlag.Dragging ); - } - - - if ( lmb.Pressed && lmb.ButtonIndex == MouseButton.Left ) - { - if ( ConfirmClick.MouseDown == confirmClickMode || ConfirmClick.Focused_MouseDown == confirmClickMode ) - { - if ( HasFocus() || ConfirmClick.MouseDown == confirmClickMode ) - { - onUIConfirm?.Trigger(); - } - } - } - else if ( - lmb.IsReleased() && lmb.ButtonIndex == MouseButton.Left && - _selectorFlags != null && _selectorFlags.Contains( UISelectorFlag.Hover ) - ) - { - if ( ConfirmClick.MouseRelease == confirmClickMode || ConfirmClick.Focused_MouseRelease == confirmClickMode ) - { - if ( HasFocus() || ConfirmClick.MouseRelease == confirmClickMode ) - { - onUIConfirm?.Trigger(); - } - } - } - } - - if ( ! handleMouseEvents ) - { - return; - } - - - if ( inputEvent is InputEventMouseButton mb ) - { - if ( mb.Pressed ) - { - this.LogInfo( "Clicked" ); - - if ( mb.ButtonIndex == MouseButton.Left ) - { - Action.TriggerSafe( onLeftClick ); - } - - if ( mb.ButtonIndex == MouseButton.Middle ) - { - Action.TriggerSafe( onMiddleClick ); - } - - if ( mb.ButtonIndex == MouseButton.Right ) - { - Action.TriggerSafe( onRightClick ); - } - } - } - - } - - [ExportGroup( "Functions" )] - [Export] - public UI.FocusOrderType focusOrderType = UI.FocusOrderType.Vertical_List; - - [ExportToolButton( "Set Focus Connections" )] - public Callable setFocusConnectionButton => Callable.From( - ( ) => - { - UI.SetChildFocusOrder( this, focusOrderType, null, FocusModeEnum.Click ); - } - ); - - #if TOOLS - [ExportGroup("Editor SceneSetup")] - [Export] - public UISettings uiSettings; - - [Export] - public bool updateInEditor = false; - - [Export] - public float fontZoom = 1f; - - - - [Export] - public bool reassignUI; - [ExportGroup("Editor SceneSetup/Read Only")] - [Export] - public float computedFontSize = 0f; - - #endif - - [ExportCategory( "UIStyle" )] - - - [ExportGroup( "Size & Margins" )] - [Export] - public UINumber width; - [Export] - public UINumber height; - - - [Export] - public UINumber margin; - - [Export] - public UINumber marginLeft; - [Export] - public UINumber marginTop; - [Export] - public UINumber marginRight; - [Export] - public UINumber marginBottom; - - - [ExportGroup( "Position" )] - [Export] - public UIPosition position; - [Export] - public UILineWrap lineWrap; - [Export] - public UINumber left; - [Export] - public UINumber top; - [Export] - public UINumber right; - [Export] - public UINumber bottom; - - - [ExportGroup( "Child Layout" )] - [Export] - public UILayout layout; - - [Export] - public UINumber horizontalAlignment; - [Export] - public UINumber verticalAlignment; - [Export] - public UINumber verticalPlacement; - - [Export] - public UINumber elementSpacing; - [Export] - public UINumber lineSpacing; - - [ExportGroup( "Font" )] - [Export] - public Font font; - [Export] - public UINumber fontSize; - [Export] - public UIColor fontColor; - - [Export] - public UINumber outlineSize; - [Export] - public UIColor outlineColor; - - [Export] - public UINumber shadowSize; - [Export] - public UIColor shadowColor; - - [Export] - public UINumber shadowOffsetX; - [Export] - public UINumber shadowOffsetY; - - [ExportGroup( "Modulation" )] - [Export] - public UIColor modulationColor; - [Export] - public UIColor selfModulationColor; - - - [ExportGroup("Transitions")] - [Export] - public TransitionSettingsAll transitionSettings; - public TransitionSettingsAll GetTransitionSettingsAll() - { - return transitionSettings; - } - - [Export] - public UINumberTransition[] numberTransitions = new UINumberTransition[ 0 ]; - public UINumberTransition[] GetNumberTransitions() - { - return numberTransitions; - } - - public List> activeNumberTransitions = new List>(); - public List> GetActiveUINumberTransitions() - { - return activeNumberTransitions; - } - - [Export] - public UIColorTransition[] colorTransitions = new UIColorTransition[ 0 ]; - public UIColorTransition[] GetColorTransitions() - { - return colorTransitions; - } - - public List> activeColorTransitions = new List>(); - public List> GetActiveUIColorTransitions() - { - return activeColorTransitions; - } - - [ExportGroup( "Sound" )] - [Export] - public UISoundData onFocusSound; - [Export] - public UISoundData onBlurSound; - - public UISoundData GetUISoundProperty( UISoundProperty property ) - { - if ( UISoundProperty.FocusEntered == property ) - { - return onFocusSound; - } - else if ( UISoundProperty.FocusExited == property ) - { - return onFocusSound; - } - - return null; - } - - public void SetUISoundProperty( UISoundProperty property, UISoundData stream ) - { - if ( UISoundProperty.FocusEntered == property ) - { - onFocusSound = stream; - } - else if ( UISoundProperty.FocusExited == property ) - { - onFocusSound = stream; - } - } - - - - - [ExportGroup( "" )] - [Export] - public UIStyle parentStyle; - - - - - public UIStyle GetUIStyleParent() - { - return parentStyle; - } - - public void SetUIStyleParent( UIStyle uiStyle ) - { - parentStyle = uiStyle; - } - - public UIPosition GetUIPosition() - { - return position; - } - - public UILineWrap GetUILineWrap() - { - return lineWrap; - } - - public UILayout GetUILayout() - { - return layout; - } - - public ShaderUIColor[] GetShaderUIColors() - { - return null; - } - - public ShaderUINumber[] GetShaderUINumbers() - { - return null; - } - - public Font GetFont() - { - return font; - } - - public Vector2 GetUISize() - { - return GetSize(); - } - - public UINumber GetUIStyleNumberProperty( UIStyleNumberProperty property, string shaderPropertyName, UIStylePropertyContainer source ) - { - switch ( property ) - { - case UIStyleNumberProperty.Left: return left; - case UIStyleNumberProperty.Right: return right; - case UIStyleNumberProperty.Top: return top; - case UIStyleNumberProperty.Bottom: return bottom; - - case UIStyleNumberProperty.Width: return width; - case UIStyleNumberProperty.Height: return height; - - case UIStyleNumberProperty.HorizontalAlignment: return horizontalAlignment; - case UIStyleNumberProperty.VerticalAlignment: return verticalAlignment; - case UIStyleNumberProperty.VerticalPlacement: return verticalPlacement; - case UIStyleNumberProperty.ElementSpacing: return elementSpacing; - case UIStyleNumberProperty.LineSpacing: return lineSpacing; - - case UIStyleNumberProperty.Margin: return margin; - - case UIStyleNumberProperty.MarginLeft: return marginLeft; - case UIStyleNumberProperty.MarginRight: return marginRight; - case UIStyleNumberProperty.MarginTop: return marginTop; - case UIStyleNumberProperty.MarginBottom: return marginBottom; - - case UIStyleNumberProperty.FontSize: return fontSize; - case UIStyleNumberProperty.FontOutlineSize: return outlineSize; - case UIStyleNumberProperty.FontShadowSize: return shadowSize; - case UIStyleNumberProperty.FontShadowOffsetX: return shadowOffsetX; - case UIStyleNumberProperty.FontShadowOffsetY: return shadowOffsetY; - - } - - return null; - } - - public void SetUIStyleNumberProperty( UIStyleNumberProperty property, UINumber number ) - { - switch ( property ) - { - case UIStyleNumberProperty.Left: { left = number; } break; - case UIStyleNumberProperty.Right: { right = number; } break; - case UIStyleNumberProperty.Top: { top = number; } break; - case UIStyleNumberProperty.Bottom: { bottom = number; } break; - - case UIStyleNumberProperty.HorizontalAlignment: { horizontalAlignment = number; } break; - case UIStyleNumberProperty.VerticalAlignment: { verticalAlignment = number; } break; - case UIStyleNumberProperty.VerticalPlacement: { verticalPlacement = number; } break; - case UIStyleNumberProperty.ElementSpacing: { elementSpacing = number; } break; - case UIStyleNumberProperty.LineSpacing: { lineSpacing = number; } break; - - - case UIStyleNumberProperty.Width: { width = number; } break; - case UIStyleNumberProperty.Height: { height = number; } break; - case UIStyleNumberProperty.Margin: { margin = number; } break; - - case UIStyleNumberProperty.MarginLeft: { marginLeft = number; } break; - case UIStyleNumberProperty.MarginRight: { marginRight = number; } break; - case UIStyleNumberProperty.MarginTop: { marginTop = number; } break; - case UIStyleNumberProperty.MarginBottom: { marginBottom = number; } break; - - case UIStyleNumberProperty.FontSize: { fontSize = number; } break; - case UIStyleNumberProperty.FontOutlineSize: { outlineSize = number; } break; - case UIStyleNumberProperty.FontShadowSize: { shadowSize = number; } break; - case UIStyleNumberProperty.FontShadowOffsetX: { shadowOffsetX = number; } break; - case UIStyleNumberProperty.FontShadowOffsetY: { shadowOffsetY = number; } break; - - } - - this.SetLayoutDirtyFlag(); - } - - bool _isAnimated = false; - int _isLayoutDirty = 3; - - public void ResetDirtyFlags() - { - _isAnimated = false; - _isLayoutDirty = Mathf.Max( 0, _isLayoutDirty - 1 ); - } - - public void SetAnimatedFlag() - { - _isAnimated = true; - this.SetDirty(); - } - - public void SetLayoutDirtyFlag() - { - _isLayoutDirty = 3; - this.SetDirty(); - } - - - public bool IsDirty() - { - return _isAnimated || _isLayoutDirty != 0 || this.HasActiveTransitions(); - } - - - public UIColor GetUIStyleColorProperty( UIStyleColorProperty property, string shaderPropertyName, UIStylePropertyContainer source ) - { - switch ( property ) - { - case UIStyleColorProperty.FontColor: return fontColor; - case UIStyleColorProperty.FontOutlineColor: return outlineColor; - case UIStyleColorProperty.FontShadowColor: return shadowColor; - case UIStyleColorProperty.ModulationColor: return modulationColor; - case UIStyleColorProperty.SelfModulationColor: return selfModulationColor; - } - - return null; - } - - string hoverID = IDGenerator.GenerateID(); - - UICursor appliedCursor = null; - - public override void _Ready() - { - VisibilityChanged += ()=> - { - var visible = IsVisibleInTree(); - - if ( visible ) - { - onVisible?.Trigger(); - } - else - { - onInvisible?.Trigger(); - } - - onVisibilityChanged?.Trigger(); - }; - - FocusEntered += ()=> - { - AddUISelectorFlag( UISelectorFlag.Focus ); - - var sound = UIStyle.GetUISound( this, UISoundProperty.FocusEntered ); - - if ( sound != null ) - { - GetUI().PlaySound( sound ); - } - - onFocusEntered?.Trigger(); - - }; - - FocusExited += ()=> - { - RemoveUISelectorFlag( UISelectorFlag.Focus ); - - var sound = UIStyle.GetUISound( this, UISoundProperty.FocusExited ); - - if ( sound != null ) - { - GetUI().PlaySound( sound ); - } - - onFocusExited?.Trigger(); - }; - - - MouseEntered += ()=> - { - AddUISelectorFlag( UISelectorFlag.Hover, hoverID ); - this.SetDirty(); - - var currentHoverCursor = UIStyle.ResolveHoverCursor( this ); - - if ( currentHoverCursor != null ) - { - currentHoverCursor.ApplyCursor( this ); - appliedCursor = currentHoverCursor; - this.LogInfo( "Set Cursor on Hover:", appliedCursor ); - } - - }; - - MouseExited += ()=> - { - RemoveUISelectorFlag( UISelectorFlag.Hover, hoverID ); - this.SetDirty(); - - if ( appliedCursor != null ) - { - this.LogInfo( "Reset Cursor on Exit"); - appliedCursor.ClearCursor( this ); - } - }; - - } - - int _uiAncestorDepth; - - public void ComputeUIAncestorDepth() - { - SetUIAncestorDepth( NodesWalker.Get().GetAncestorDistance( this, GetUI( false ) ) ); - } - - public void SetUIAncestorDepth( int depth ) - { - _uiAncestorDepth = depth; - } - - public int GetUIAncestorDepth() - { - return _uiAncestorDepth; - } - - public override void _EnterTree() - { - ComputeUIAncestorDepth(); - } - - public override void _ExitTree() - { - ui = null; - _uiAncestorDepth = -1; - } - - [Export] - public UISelectorFlag[] additionalSelectorFlags = []; - - MapList _selectorFlagReferenceCounter = new MapList(); - - public void AddUISelectorFlag( UISelectorFlag flag, string reference = "" ) - { - SetSelectorFlagReference( flag, reference, true ); - } - - public void RemoveUISelectorFlag( UISelectorFlag flag, string reference = "" ) - { - SetSelectorFlagReference( flag, reference, false ); - } - - protected override void Dispose( bool disposing ) - { - _selectorFlagReferenceCounter.Clear(); - } - - void SetSelectorFlagReference( UISelectorFlag flag, string reference, bool enable ) - { - if ( enable ) - { - _selectorFlagReferenceCounter.AddIfNotPresent( flag, reference ); + onVisible?.Trigger(); } else { - _selectorFlagReferenceCounter.Remove( flag, reference ); + onInvisible?.Trigger(); } - var numFlagsBefore = _selectorFlags.Count; - _selectorFlags = _selectorFlagReferenceCounter.Keys.ToList(); - _selectorFlags.AddRange( additionalSelectorFlags ); + onVisibilityChanged?.Trigger(); + }; + FocusEntered += ()=> + { + AddUISelectorFlag( UISelectorFlag.Focus ); + + var sound = UIStyle.GetUISound( this, UISoundProperty.FocusEntered ); - var changed = numFlagsBefore != _selectorFlags.Count; - - UISelector.UpdateParentUISelectorFlags( this ); - - // this.LogInfo( - // "flag:", flag, - // "reference:", reference, - // "enable:", enable, - // "changed:", changed, - // "numFlagsBefore:", numFlagsBefore, - // "_selectorFlags:", _selectorFlags.Map( sf => sf.ResourcePath + " " + sf.ResourceName ).Join( ", " ) - // ); - - if ( changed ) + if ( sound != null ) { - currentSelectors = _selectorFlags.Map( sf => RegexUtility.TrimToLastPathFragment( sf.ResourcePath ) ).Join( ", " ); - this.SetDirty(); + GetUI().PlaySound( sound ); } - } - List _selectorFlags = []; - List _parentSelectorFlags = []; - - public List GetUISelectorFlags() + onFocusEntered?.Trigger(); + + }; + + FocusExited += ()=> { - return _selectorFlags; - } + RemoveUISelectorFlag( UISelectorFlag.Focus ); - public List GetParentUISelectorFlags() + var sound = UIStyle.GetUISound( this, UISoundProperty.FocusExited ); + + if ( sound != null ) + { + GetUI().PlaySound( sound ); + } + + onFocusExited?.Trigger(); + }; + + + MouseEntered += ()=> { - return _parentSelectorFlags; - } + AddUISelectorFlag( UISelectorFlag.Hover, hoverID ); + this.SetDirty(); - public virtual void Layout() + var currentHoverCursor = UIStyle.ResolveHoverCursor( this ); + + if ( currentHoverCursor != null ) + { + currentHoverCursor.ApplyCursor( this ); + appliedCursor = currentHoverCursor; + this.LogInfo( "Set Cursor on Hover:", appliedCursor ); + } + + }; + + MouseExited += ()=> { - var layout = UIStyle.Layout( this ); + RemoveUISelectorFlag( UISelectorFlag.Hover, hoverID ); + this.SetDirty(); - switch ( layout ) + if ( appliedCursor != null ) { - case UILayout.___: - case UILayout.Flow_Left_Top: - { - UIFlowLayout.Apply( this ); - } - break; + this.LogInfo( "Reset Cursor on Exit"); + appliedCursor.ClearCursor( this ); } - } - - public Vector2 contentSize = Vector2.Zero; - public Vector2 contentOffset = Vector2.Zero; - - UI ui; - - public void SetUI( UI ui, bool computeDepth = true ) - { - this.ui = ui; - - if ( computeDepth ) - { - ComputeUIAncestorDepth(); - } - } - - public UI GetUI( bool computeDepth = true ) - { - if ( this.ui != null ) - { - return this.ui; - } - - var ui = this.FindParentThatIs(); - - if ( ui == null ) - { - - _uiAncestorDepth =-1; - this.LogInfo( "No UI in parents >", ui ); - - return null; - } - - if ( computeDepth ) - { - ComputeUIAncestorDepth(); - } - - return ui; - } + }; } -} \ No newline at end of file + + int _uiAncestorDepth; + + public void ComputeUIAncestorDepth() + { + SetUIAncestorDepth( NodesWalker.Get().GetAncestorDistance( this, GetUI( false ) ) ); + } + + public void SetUIAncestorDepth( int depth ) + { + _uiAncestorDepth = depth; + } + + public int GetUIAncestorDepth() + { + return _uiAncestorDepth; + } + + public override void _EnterTree() + { + ComputeUIAncestorDepth(); + } + + public override void _ExitTree() + { + ui = null; + _uiAncestorDepth = -1; + } + + [Export] + public UISelectorFlag[] additionalSelectorFlags = []; + + MapList _selectorFlagReferenceCounter = new MapList(); + + public void AddUISelectorFlag( UISelectorFlag flag, string reference = "" ) + { + SetSelectorFlagReference( flag, reference, true ); + } + + public void RemoveUISelectorFlag( UISelectorFlag flag, string reference = "" ) + { + SetSelectorFlagReference( flag, reference, false ); + } + + protected override void Dispose( bool disposing ) + { + _selectorFlagReferenceCounter.Clear(); + } + + void SetSelectorFlagReference( UISelectorFlag flag, string reference, bool enable ) + { + if ( enable ) + { + _selectorFlagReferenceCounter.AddIfNotPresent( flag, reference ); + } + else + { + _selectorFlagReferenceCounter.Remove( flag, reference ); + } + + var numFlagsBefore = _selectorFlags.Count; + _selectorFlags = _selectorFlagReferenceCounter.Keys.ToList(); + _selectorFlags.AddRange( additionalSelectorFlags ); + + + var changed = numFlagsBefore != _selectorFlags.Count; + + UISelector.UpdateParentUISelectorFlags( this ); + + // this.LogInfo( + // "flag:", flag, + // "reference:", reference, + // "enable:", enable, + // "changed:", changed, + // "numFlagsBefore:", numFlagsBefore, + // "_selectorFlags:", _selectorFlags.Map( sf => sf.ResourcePath + " " + sf.ResourceName ).Join( ", " ) + // ); + + if ( changed ) + { + currentSelectors = _selectorFlags.Map( sf => RegexUtility.TrimToLastPathFragment( sf.ResourcePath ) ).Join( ", " ); + this.SetDirty(); + } + } + + List _selectorFlags = []; + List _parentSelectorFlags = []; + + public List GetUISelectorFlags() + { + return _selectorFlags; + } + + public List GetParentUISelectorFlags() + { + return _parentSelectorFlags; + } + + public virtual void Layout() + { + var layout = UIStyle.Layout( this ); + + switch ( layout ) + { + case UILayout.___: + case UILayout.Flow_Left_Top: + { + UIFlowLayout.Apply( this ); + } + break; + } + } + + public Vector2 contentSize = Vector2.Zero; + public Vector2 contentOffset = Vector2.Zero; + + UI ui; + + public void SetUI( UI ui, bool computeDepth = true ) + { + this.ui = ui; + + if ( computeDepth ) + { + ComputeUIAncestorDepth(); + } + } + + public UI GetUI( bool computeDepth = true ) + { + if ( this.ui != null ) + { + return this.ui; + } + + var ui = this.FindParentThatIs(); + + if ( ui == null ) + { + + _uiAncestorDepth =-1; + this.LogInfo( "No UI in parents >", ui ); + + return null; + } + + if ( computeDepth ) + { + ComputeUIAncestorDepth(); + } + + return ui; + } + +} diff --git a/Runtime/UI/Nodes/UISpace.cs b/Runtime/UI/Nodes/UISpace.cs index ea40bbd..7246e96 100644 --- a/Runtime/UI/Nodes/UISpace.cs +++ b/Runtime/UI/Nodes/UISpace.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/UIText.cs b/Runtime/UI/Nodes/UIText.cs index 5dd31c7..a3c3396 100644 --- a/Runtime/UI/Nodes/UIText.cs +++ b/Runtime/UI/Nodes/UIText.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Nodes/UIWrapper.cs b/Runtime/UI/Nodes/UIWrapper.cs index ae2d9f8..4d7fc28 100644 --- a/Runtime/UI/Nodes/UIWrapper.cs +++ b/Runtime/UI/Nodes/UIWrapper.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/OnSliderValueChange.cs b/Runtime/UI/OnSliderValueChange.cs index fb00f70..b7680bc 100644 --- a/Runtime/UI/OnSliderValueChange.cs +++ b/Runtime/UI/OnSliderValueChange.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Optimization/CachedUIColor.cs b/Runtime/UI/Optimization/CachedUIColor.cs index d280d24..ec66276 100644 --- a/Runtime/UI/Optimization/CachedUIColor.cs +++ b/Runtime/UI/Optimization/CachedUIColor.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { public class CachedUIColor diff --git a/Runtime/UI/Optimization/CachedUINumber.cs b/Runtime/UI/Optimization/CachedUINumber.cs index 92c4ab2..00e4230 100644 --- a/Runtime/UI/Optimization/CachedUINumber.cs +++ b/Runtime/UI/Optimization/CachedUINumber.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { public class CachedUINumber diff --git a/Runtime/UI/Optimization/RedrawCue.cs b/Runtime/UI/Optimization/RedrawCue.cs index 2f3f6e2..31319c9 100644 --- a/Runtime/UI/Optimization/RedrawCue.cs +++ b/Runtime/UI/Optimization/RedrawCue.cs @@ -2,6 +2,7 @@ using Godot; using System; +using Rokojori.Extensions; namespace Rokojori { public class RedrawCue diff --git a/Runtime/UI/ShaderProperties/ShaderUIColor.cs b/Runtime/UI/ShaderProperties/ShaderUIColor.cs index d7d9369..9c30154 100644 --- a/Runtime/UI/ShaderProperties/ShaderUIColor.cs +++ b/Runtime/UI/ShaderProperties/ShaderUIColor.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/ShaderProperties/ShaderUINumber.cs b/Runtime/UI/ShaderProperties/ShaderUINumber.cs index d36de29..1f694cd 100644 --- a/Runtime/UI/ShaderProperties/ShaderUINumber.cs +++ b/Runtime/UI/ShaderProperties/ShaderUINumber.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/ShaderProperties/UIShaderProperties.cs b/Runtime/UI/ShaderProperties/UIShaderProperties.cs index e4a9835..20c73a8 100644 --- a/Runtime/UI/ShaderProperties/UIShaderProperties.cs +++ b/Runtime/UI/ShaderProperties/UIShaderProperties.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public partial class UIShaderProperties diff --git a/Runtime/UI/Shaders/NinePatch/UINinePatchMaterial.cs b/Runtime/UI/Shaders/NinePatch/UINinePatchMaterial.cs index 729ca3c..f873770 100644 --- a/Runtime/UI/Shaders/NinePatch/UINinePatchMaterial.cs +++ b/Runtime/UI/Shaders/NinePatch/UINinePatchMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/UI/Shaders/RoundedRectangle/RoundedRectangleMaterial.cs b/Runtime/UI/Shaders/RoundedRectangle/RoundedRectangleMaterial.cs index e46c031..086ba40 100644 --- a/Runtime/UI/Shaders/RoundedRectangle/RoundedRectangleMaterial.cs +++ b/Runtime/UI/Shaders/RoundedRectangle/RoundedRectangleMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/UI/Shaders/Slider/SliderMaterial.cs b/Runtime/UI/Shaders/Slider/SliderMaterial.cs index 5d39b8e..e10a780 100644 --- a/Runtime/UI/Shaders/Slider/SliderMaterial.cs +++ b/Runtime/UI/Shaders/Slider/SliderMaterial.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { // Generated by ShaderClassGenerator diff --git a/Runtime/UI/Sound/UISoundData.cs b/Runtime/UI/Sound/UISoundData.cs index 9aee3f7..cb38588 100644 --- a/Runtime/UI/Sound/UISoundData.cs +++ b/Runtime/UI/Sound/UISoundData.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Styling/UIColor.cs b/Runtime/UI/Styling/UIColor.cs index e8a145b..5e50465 100644 --- a/Runtime/UI/Styling/UIColor.cs +++ b/Runtime/UI/Styling/UIColor.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public enum UIColorAnimationBlend @@ -34,7 +35,7 @@ namespace Rokojori public float animationOffset = 0; [Export] - public TimeLine timeLine; + public Timeline timeLine; public static Color Compute( Control control, UIStyleColorProperty property, string shaderPropertyName, Color defaultColor ) diff --git a/Runtime/UI/Styling/UICursor.cs b/Runtime/UI/Styling/UICursor.cs index 7316b1e..cb9c2fa 100644 --- a/Runtime/UI/Styling/UICursor.cs +++ b/Runtime/UI/Styling/UICursor.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/UI/Styling/UILineWrap.cs b/Runtime/UI/Styling/UILineWrap.cs index f0f0b8e..19aa554 100644 --- a/Runtime/UI/Styling/UILineWrap.cs +++ b/Runtime/UI/Styling/UILineWrap.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public enum UILineWrap diff --git a/Runtime/UI/Styling/UINumber.cs b/Runtime/UI/Styling/UINumber.cs index df371f6..8292cd7 100644 --- a/Runtime/UI/Styling/UINumber.cs +++ b/Runtime/UI/Styling/UINumber.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { @@ -33,7 +34,7 @@ namespace Rokojori public float animationOffset; [Export] - public TimeLine timeLine; + public Timeline timeLine; public bool IsNone => unit == "none"; @@ -660,7 +661,7 @@ namespace Rokojori } else { - data = GodotRandom.Get().From( cachedExpressions, 4 * maxCachedExpressions / 5, maxCachedExpressions - 1 ); + data = GodotRandom.Get().GrabFromRange( cachedExpressions, 4 * maxCachedExpressions / 5, maxCachedExpressions - 1 ); } data.formula = formula; diff --git a/Runtime/UI/Styling/UINumberVariable.cs b/Runtime/UI/Styling/UINumberVariable.cs index f3d23eb..ccab282 100644 --- a/Runtime/UI/Styling/UINumberVariable.cs +++ b/Runtime/UI/Styling/UINumberVariable.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Globalization; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/Styling/UIPosition.cs b/Runtime/UI/Styling/UIPosition.cs index 65f958f..499491e 100644 --- a/Runtime/UI/Styling/UIPosition.cs +++ b/Runtime/UI/Styling/UIPosition.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public enum UIPosition diff --git a/Runtime/UI/Styling/UIRule.cs b/Runtime/UI/Styling/UIRule.cs index e616db9..07535d0 100644 --- a/Runtime/UI/Styling/UIRule.cs +++ b/Runtime/UI/Styling/UIRule.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/Styling/UISelector.cs b/Runtime/UI/Styling/UISelector.cs index 06423e5..06052a7 100644 --- a/Runtime/UI/Styling/UISelector.cs +++ b/Runtime/UI/Styling/UISelector.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/Styling/UISelectorFlag.cs b/Runtime/UI/Styling/UISelectorFlag.cs index 46f478d..e3b7f9c 100644 --- a/Runtime/UI/Styling/UISelectorFlag.cs +++ b/Runtime/UI/Styling/UISelectorFlag.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/Styling/UISelectorFlagEntry.cs b/Runtime/UI/Styling/UISelectorFlagEntry.cs index 280e5c5..68f97a4 100644 --- a/Runtime/UI/Styling/UISelectorFlagEntry.cs +++ b/Runtime/UI/Styling/UISelectorFlagEntry.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/Styling/UIStyle.cs b/Runtime/UI/Styling/UIStyle.cs index f32bb38..314ce6b 100644 --- a/Runtime/UI/Styling/UIStyle.cs +++ b/Runtime/UI/Styling/UIStyle.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.ConstrainedExecution; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/Styling/UIStyleProperty.cs b/Runtime/UI/Styling/UIStyleProperty.cs index e449de0..e41ec73 100644 --- a/Runtime/UI/Styling/UIStyleProperty.cs +++ b/Runtime/UI/Styling/UIStyleProperty.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public enum UIStyleNumberProperty diff --git a/Runtime/UI/Styling/UIStylePropertyContainer.cs b/Runtime/UI/Styling/UIStylePropertyContainer.cs index 46425b5..55bc728 100644 --- a/Runtime/UI/Styling/UIStylePropertyContainer.cs +++ b/Runtime/UI/Styling/UIStylePropertyContainer.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { public interface UIStylePropertyContainer diff --git a/Runtime/UI/Styling/UIStyling.cs b/Runtime/UI/Styling/UIStyling.cs index f6d8e20..4b81294 100644 --- a/Runtime/UI/Styling/UIStyling.cs +++ b/Runtime/UI/Styling/UIStyling.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { public class UIStyling diff --git a/Runtime/UI/Transitions/ActiveStyleTransition.cs b/Runtime/UI/Transitions/ActiveStyleTransition.cs index 86dc349..faa95ae 100644 --- a/Runtime/UI/Transitions/ActiveStyleTransition.cs +++ b/Runtime/UI/Transitions/ActiveStyleTransition.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -13,7 +14,7 @@ namespace Rokojori public List lastValues = []; public List lastWeights = []; public P propertyType; - public TimeLine timeLine; + public Timeline timeLine; public float start; public float end; public Curve curve; diff --git a/Runtime/UI/Transitions/TransitionSettings.cs b/Runtime/UI/Transitions/TransitionSettings.cs index 186e942..b0ebbe0 100644 --- a/Runtime/UI/Transitions/TransitionSettings.cs +++ b/Runtime/UI/Transitions/TransitionSettings.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { @@ -16,7 +17,7 @@ namespace Rokojori public Curve curve; [Export] - public TimeLine timeLine; + public Timeline timeLine; } diff --git a/Runtime/UI/Transitions/TransitionSettingsAll.cs b/Runtime/UI/Transitions/TransitionSettingsAll.cs index cd07cc3..6e4ce47 100644 --- a/Runtime/UI/Transitions/TransitionSettingsAll.cs +++ b/Runtime/UI/Transitions/TransitionSettingsAll.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/Transitions/UIColorTransition.cs b/Runtime/UI/Transitions/UIColorTransition.cs index 8955970..3c9ab15 100644 --- a/Runtime/UI/Transitions/UIColorTransition.cs +++ b/Runtime/UI/Transitions/UIColorTransition.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/Transitions/UINumberTransition.cs b/Runtime/UI/Transitions/UINumberTransition.cs index 02187c4..42f6eb0 100644 --- a/Runtime/UI/Transitions/UINumberTransition.cs +++ b/Runtime/UI/Transitions/UINumberTransition.cs @@ -2,6 +2,7 @@ using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/UI-Settings-Default.tres b/Runtime/UI/UI-Settings-Default.tres index e03d7e8..5ecbc77 100644 --- a/Runtime/UI/UI-Settings-Default.tres +++ b/Runtime/UI/UI-Settings-Default.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="UISettings" load_steps=9 format=3 uid="uid://dp57o0ykhkqfj"] [ext_resource type="Script" uid="uid://cgdxalxhdbmjn" path="res://addons/rokojori_action_library/Runtime/UI/UISettings.cs" id="1_5a283"] -[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/UITime.tres" id="1_6vky0"] +[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/UI Time.tres" id="1_6vky0"] [ext_resource type="Resource" uid="uid://bhy8b3gopkq4m" path="res://addons/rokojori_action_library/Runtime/UI/ShaderProperties/Vector2/Size.tres" id="2_cdd3u"] [ext_resource type="Script" uid="uid://cebfjne1ewhnm" path="res://addons/rokojori_action_library/Runtime/Shading/Properties/Vector2PropertyName.cs" id="3_e2b6y"] [ext_resource type="Script" uid="uid://cnkyynboxg1qg" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UINumber.cs" id="3_xon8j"] diff --git a/Runtime/UI/UI.cs b/Runtime/UI/UI.cs index e24d927..0aa04a3 100644 --- a/Runtime/UI/UI.cs +++ b/Runtime/UI/UI.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Text; +using Rokojori.Extensions; namespace Rokojori { @@ -265,7 +266,7 @@ namespace Rokojori } - public static TimeLine GetTimeLine( Control c, TimeLine timeLine ) + public static Timeline GetTimeLine( Control c, Timeline timeLine ) { if ( timeLine != null ) { @@ -524,7 +525,7 @@ namespace Rokojori float time = 0; void UpdateUIElementsOptimized() { - var timeNow = TimeLine.osTime; + var timeNow = Timeline.osTime; var elapsed = timeNow - time; time = timeNow; // this.LogInfo( Mathf.RoundToInt( elapsed * 1000f ) ); @@ -716,8 +717,8 @@ namespace Rokojori { controls[ i ].FocusMode = focuseMode; - var previousIndex = wrap ? MathX.Repeat( i - 1, controls.Count ) : Mathf.Clamp( i - 1, 0, controls.Count - 1 ); - var nextIndex = wrap ? MathX.Repeat( i + 1, controls.Count ) : Mathf.Clamp( i + 1, 0, controls.Count - 1 ); + var previousIndex = wrap ? MathX.RepeatInt( i - 1, controls.Count ) : Mathf.Clamp( i - 1, 0, controls.Count - 1 ); + var nextIndex = wrap ? MathX.RepeatInt( i + 1, controls.Count ) : Mathf.Clamp( i + 1, 0, controls.Count - 1 ); if ( isHorizontal ) { diff --git a/Runtime/UI/UIAppSettings/Background/MinimalisticBackgroundGenerator.cs b/Runtime/UI/UIAppSettings/Background/MinimalisticBackgroundGenerator.cs index 41d186d..10105a9 100644 --- a/Runtime/UI/UIAppSettings/Background/MinimalisticBackgroundGenerator.cs +++ b/Runtime/UI/UIAppSettings/Background/MinimalisticBackgroundGenerator.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Background/UIAppSettingsBackgroundGenerator.cs b/Runtime/UI/UIAppSettings/Background/UIAppSettingsBackgroundGenerator.cs index f92a6ef..0c0f587 100644 --- a/Runtime/UI/UIAppSettings/Background/UIAppSettingsBackgroundGenerator.cs +++ b/Runtime/UI/UIAppSettings/Background/UIAppSettingsBackgroundGenerator.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/CategoryPages/MinimalisticCategoryPagesGenerator.cs b/Runtime/UI/UIAppSettings/CategoryPages/MinimalisticCategoryPagesGenerator.cs index 50ef9c9..58bde92 100644 --- a/Runtime/UI/UIAppSettings/CategoryPages/MinimalisticCategoryPagesGenerator.cs +++ b/Runtime/UI/UIAppSettings/CategoryPages/MinimalisticCategoryPagesGenerator.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -104,7 +105,7 @@ public partial class MinimalisticCategoryPagesGenerator:UIAppSettingsCategoryPag if ( setting is NumberAppSetting ) { var numberHandler = (UINumberAppSettingHandler) handler; - var numberController = handler.CreateChild( appSettingNumberController, name + " Number Handler" ); + var numberController = handler.CreateChildFromScene( appSettingNumberController, name + " Number Handler" ); numberHandler.slider = numberController.Get(); numberHandler.slider.setActiveWhenFocused = [ handler, handlerBG, label, labelRegion ]; @@ -123,7 +124,7 @@ public partial class MinimalisticCategoryPagesGenerator:UIAppSettingsCategoryPag if ( setting is ListAppSetting ) { var listHandler = (UIListAppSettingHandler) handler; - var listController = handler.CreateChild( appSettingNumberController, "List Handler" ); + var listController = handler.CreateChildFromScene( appSettingNumberController, "List Handler" ); listHandler.list = listController.Get(); listHandler.list.setActiveWhenFocused = [ handler, handlerBG, label, labelRegion ]; diff --git a/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPage.cs b/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPage.cs index fae9fb4..6e5408f 100644 --- a/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPage.cs +++ b/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPage.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPageGenerator.cs b/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPageGenerator.cs index f2c621f..4723f6d 100644 --- a/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPageGenerator.cs +++ b/Runtime/UI/UIAppSettings/CategoryPages/UIAppSettingsCategoryPageGenerator.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Handlers/UIAppSettingHandler.cs b/Runtime/UI/UIAppSettings/Handlers/UIAppSettingHandler.cs index 3824a2f..b2b3f7f 100644 --- a/Runtime/UI/UIAppSettings/Handlers/UIAppSettingHandler.cs +++ b/Runtime/UI/UIAppSettings/Handlers/UIAppSettingHandler.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Handlers/UIListAppSettingHandler.cs b/Runtime/UI/UIAppSettings/Handlers/UIListAppSettingHandler.cs index 8a6bcc8..c746e1a 100644 --- a/Runtime/UI/UIAppSettings/Handlers/UIListAppSettingHandler.cs +++ b/Runtime/UI/UIAppSettings/Handlers/UIListAppSettingHandler.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Handlers/UINumberAppSettingHandler.cs b/Runtime/UI/UIAppSettings/Handlers/UINumberAppSettingHandler.cs index b85c483..4b65be7 100644 --- a/Runtime/UI/UIAppSettings/Handlers/UINumberAppSettingHandler.cs +++ b/Runtime/UI/UIAppSettings/Handlers/UINumberAppSettingHandler.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Headers/MinimalisticHeaderGenerator.cs b/Runtime/UI/UIAppSettings/Headers/MinimalisticHeaderGenerator.cs index 0b18571..0ad0afc 100644 --- a/Runtime/UI/UIAppSettings/Headers/MinimalisticHeaderGenerator.cs +++ b/Runtime/UI/UIAppSettings/Headers/MinimalisticHeaderGenerator.cs @@ -4,6 +4,7 @@ using System.Linq; using Godot; using Rokojori; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Headers/SelectSettingsPage.cs b/Runtime/UI/UIAppSettings/Headers/SelectSettingsPage.cs index 2cf9201..fb64e19 100644 --- a/Runtime/UI/UIAppSettings/Headers/SelectSettingsPage.cs +++ b/Runtime/UI/UIAppSettings/Headers/SelectSettingsPage.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Headers/SetFocusedUIAppSettings.cs b/Runtime/UI/UIAppSettings/Headers/SetFocusedUIAppSettings.cs index 58b2372..7418b0d 100644 --- a/Runtime/UI/UIAppSettings/Headers/SetFocusedUIAppSettings.cs +++ b/Runtime/UI/UIAppSettings/Headers/SetFocusedUIAppSettings.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeader.cs b/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeader.cs index 68c5251..aef1ef3 100644 --- a/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeader.cs +++ b/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeader.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeaderGenerator.cs b/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeaderGenerator.cs index 8cc39c1..16772b4 100644 --- a/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeaderGenerator.cs +++ b/Runtime/UI/UIAppSettings/Headers/UIAppSettingsHeaderGenerator.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/InitializeUIAppSettings.cs b/Runtime/UI/UIAppSettings/InitializeUIAppSettings.cs index 3223ab7..cd598fe 100644 --- a/Runtime/UI/UIAppSettings/InitializeUIAppSettings.cs +++ b/Runtime/UI/UIAppSettings/InitializeUIAppSettings.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/SetUIAppSettingsReady.cs b/Runtime/UI/UIAppSettings/SetUIAppSettingsReady.cs index b16efb6..c7a33e9 100644 --- a/Runtime/UI/UIAppSettings/SetUIAppSettingsReady.cs +++ b/Runtime/UI/UIAppSettings/SetUIAppSettingsReady.cs @@ -2,6 +2,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIAppSettings/UIAppSettings.cs b/Runtime/UI/UIAppSettings/UIAppSettings.cs index 1e15f48..100b278 100644 --- a/Runtime/UI/UIAppSettings/UIAppSettings.cs +++ b/Runtime/UI/UIAppSettings/UIAppSettings.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -138,7 +139,7 @@ public partial class UIAppSettings:UIRegion var selectedPageIndex = pages.FindIndex( p => p.Visible ); var nextIndex = selectedPageIndex + offset; - nextIndex = wrap ? MathX.Repeat( nextIndex, pages.Length ) : Mathf.Clamp( nextIndex, 0, pages.Length -1 ); + nextIndex = wrap ? MathX.RepeatInt( nextIndex, pages.Length ) : Mathf.Clamp( nextIndex, 0, pages.Length -1 ); var nextSelectedPage = pages[ nextIndex ]; diff --git a/Runtime/UI/UIAppSettings/UIAppSettingsGenerator.cs b/Runtime/UI/UIAppSettings/UIAppSettingsGenerator.cs index 4a7bfec..a75072e 100644 --- a/Runtime/UI/UIAppSettings/UIAppSettingsGenerator.cs +++ b/Runtime/UI/UIAppSettings/UIAppSettingsGenerator.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/UI/UIRuleSet.cs b/Runtime/UI/UIRuleSet.cs index 9d73249..fdc9b7e 100644 --- a/Runtime/UI/UIRuleSet.cs +++ b/Runtime/UI/UIRuleSet.cs @@ -3,6 +3,7 @@ using Godot; using Rokojori; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/UI/UISettings.cs b/Runtime/UI/UISettings.cs index 4113078..19d0d8a 100644 --- a/Runtime/UI/UISettings.cs +++ b/Runtime/UI/UISettings.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -11,7 +12,7 @@ namespace Rokojori public InputIconsLibrary inputIconsLibrary; [Export] - public TimeLine defaultTimeline; + public Timeline defaultTimeline; [ExportGroup("Font")] [Export] diff --git a/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs b/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs index 3216fca..b75c31a 100644 --- a/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs +++ b/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs b/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs index 66c534d..b2bc3c4 100644 --- a/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs b/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs index 7ddec9d..ceee1e3 100644 --- a/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs b/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs index f819967..465dfef 100644 --- a/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs index 77aaf38..60a9e87 100644 --- a/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs +++ b/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs index ff1aaa1..02f5563 100644 --- a/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs +++ b/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs index 12be9bf..0cb4c5c 100644 --- a/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs +++ b/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs index a82e98c..e38dcea 100644 --- a/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs +++ b/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareLayer.cs b/Runtime/VFX/FlareVFX/FlareLayer.cs index 9b9f5b7..b24660f 100644 --- a/Runtime/VFX/FlareVFX/FlareLayer.cs +++ b/Runtime/VFX/FlareVFX/FlareLayer.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs b/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs index 3616536..14dee79 100644 --- a/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs +++ b/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs b/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs index 63cf497..f2cb5aa 100644 --- a/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs +++ b/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlarePreset.cs b/Runtime/VFX/FlareVFX/FlarePreset.cs index e6f9ee1..3ab7833 100644 --- a/Runtime/VFX/FlareVFX/FlarePreset.cs +++ b/Runtime/VFX/FlareVFX/FlarePreset.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs b/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs index 5e4b2aa..60dfa32 100644 --- a/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs +++ b/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs index bf34d45..3a61641 100644 --- a/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs +++ b/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareType/FlareType.cs b/Runtime/VFX/FlareVFX/FlareType/FlareType.cs index befd33f..74d30d0 100644 --- a/Runtime/VFX/FlareVFX/FlareType/FlareType.cs +++ b/Runtime/VFX/FlareVFX/FlareType/FlareType.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs index 859e746..5fd4c44 100644 --- a/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs +++ b/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs index 69ebbb7..3030c1e 100644 --- a/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs +++ b/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs index 5fcaff5..b6983dd 100644 --- a/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs +++ b/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs @@ -1,5 +1,6 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlareVFX/FlareVFX.cs b/Runtime/VFX/FlareVFX/FlareVFX.cs index 8534c7f..8ca2880 100644 --- a/Runtime/VFX/FlareVFX/FlareVFX.cs +++ b/Runtime/VFX/FlareVFX/FlareVFX.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlashVFX/FlashPreset.cs b/Runtime/VFX/FlashVFX/FlashPreset.cs index e000ac9..53c5660 100644 --- a/Runtime/VFX/FlashVFX/FlashPreset.cs +++ b/Runtime/VFX/FlashVFX/FlashPreset.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashPosition.cs b/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashPosition.cs index cd71e0a..06d1e58 100644 --- a/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashPosition.cs +++ b/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashPosition.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashType.cs b/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashType.cs index 3ef26ee..8c0ee05 100644 --- a/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashType.cs +++ b/Runtime/VFX/FlashVFX/FlashTypes/CustomFlashType/CustomFlashType.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlashVFX/FlashTypes/FlashType.cs b/Runtime/VFX/FlashVFX/FlashTypes/FlashType.cs index 5f224fa..05d2b56 100644 --- a/Runtime/VFX/FlashVFX/FlashTypes/FlashType.cs +++ b/Runtime/VFX/FlashVFX/FlashTypes/FlashType.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlashVFX/FlashTypes/FlatFlashType/FlatFlashType.cs b/Runtime/VFX/FlashVFX/FlashTypes/FlatFlashType/FlatFlashType.cs index bf009d5..d60b186 100644 --- a/Runtime/VFX/FlashVFX/FlashTypes/FlatFlashType/FlatFlashType.cs +++ b/Runtime/VFX/FlashVFX/FlashTypes/FlatFlashType/FlatFlashType.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlashVFX/FlashTypes/FresnelFlashType/FresnelFlashType.cs b/Runtime/VFX/FlashVFX/FlashTypes/FresnelFlashType/FresnelFlashType.cs index 1b623e6..c7b400e 100644 --- a/Runtime/VFX/FlashVFX/FlashTypes/FresnelFlashType/FresnelFlashType.cs +++ b/Runtime/VFX/FlashVFX/FlashTypes/FresnelFlashType/FresnelFlashType.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/FlashVFX/FlashVFX.cs b/Runtime/VFX/FlashVFX/FlashVFX.cs index dfc3857..dfe727a 100644 --- a/Runtime/VFX/FlashVFX/FlashVFX.cs +++ b/Runtime/VFX/FlashVFX/FlashVFX.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -61,7 +62,7 @@ namespace Rokojori var id = DispatchStart(); var duration = preset.duration == null ? new SecondsDuration() : preset.duration; - var tl = TimeLineManager.Ensure( duration.timeLine ); + var tl = TimelineManager.Ensure( duration.timeLine ); var OVERLAY = GeometryInstance3D.PropertyName.MaterialOverlay; @@ -104,7 +105,7 @@ namespace Rokojori } - TimeLineManager.ScheduleSpanIn( tl, 0, duration.GetDurationInSeconds(), + TimelineManager.ScheduleSpanIn( tl, 0, duration.GetDurationInSeconds(), ( span, type )=> { var timeNow = tl.position; @@ -128,7 +129,7 @@ namespace Rokojori } - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { for ( int i = 0; i < runner.targets.Count; i++ ) { @@ -155,7 +156,7 @@ namespace Rokojori var id = DispatchStart(); var duration = preset.duration == null ? new SecondsDuration() : preset.duration; - var tl = TimeLineManager.Ensure( duration.timeLine ); + var tl = TimelineManager.Ensure( duration.timeLine ); var OVERLAY = GeometryInstance3D.PropertyName.MaterialOverlay; @@ -221,7 +222,7 @@ namespace Rokojori _running[ id ] = runner; - TimeLineManager.ScheduleSpanIn( tl, 0, duration.GetDurationInSeconds(), + TimelineManager.ScheduleSpanIn( tl, 0, duration.GetDurationInSeconds(), ( span, type )=> { var timeNow = tl.position; @@ -237,7 +238,7 @@ namespace Rokojori preset.flashType.ApplyFlashType( runner, span.phase, color, opacity, null, material ); } - if ( type == TimeLineSpanUpdateType.End ) + if ( type == TimelineSpanUpdateType.End ) { for ( int i = 0; i < runner.targets.Count; i++ ) { diff --git a/Runtime/VFX/GradientGenerator/CustomGradient.cs b/Runtime/VFX/GradientGenerator/CustomGradient.cs index aa997c2..fbd3ab5 100644 --- a/Runtime/VFX/GradientGenerator/CustomGradient.cs +++ b/Runtime/VFX/GradientGenerator/CustomGradient.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/GradientGenerator/GradientGenerator.cs b/Runtime/VFX/GradientGenerator/GradientGenerator.cs index 34f0272..7b9646c 100644 --- a/Runtime/VFX/GradientGenerator/GradientGenerator.cs +++ b/Runtime/VFX/GradientGenerator/GradientGenerator.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/GradientGenerator/RainbowGradient.cs b/Runtime/VFX/GradientGenerator/RainbowGradient.cs index 63dab51..8f2e7c5 100644 --- a/Runtime/VFX/GradientGenerator/RainbowGradient.cs +++ b/Runtime/VFX/GradientGenerator/RainbowGradient.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/GradientGenerator/TemperatureGradient.cs b/Runtime/VFX/GradientGenerator/TemperatureGradient.cs index 2e1b944..fd23317 100644 --- a/Runtime/VFX/GradientGenerator/TemperatureGradient.cs +++ b/Runtime/VFX/GradientGenerator/TemperatureGradient.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/VFX/LineVFX/LineMaterial/CustomLineMaterialPreset.cs b/Runtime/VFX/LineVFX/LineMaterial/CustomLineMaterialPreset.cs index a56e45c..e85732c 100644 --- a/Runtime/VFX/LineVFX/LineMaterial/CustomLineMaterialPreset.cs +++ b/Runtime/VFX/LineVFX/LineMaterial/CustomLineMaterialPreset.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LineMaterial/LineMaterialPreset.cs b/Runtime/VFX/LineVFX/LineMaterial/LineMaterialPreset.cs index cef0883..17bfd67 100644 --- a/Runtime/VFX/LineVFX/LineMaterial/LineMaterialPreset.cs +++ b/Runtime/VFX/LineVFX/LineMaterial/LineMaterialPreset.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderPointProperties.cs b/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderPointProperties.cs index 7dbb15a..fe2f107 100644 --- a/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderPointProperties.cs +++ b/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderPointProperties.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderSetup.cs b/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderSetup.cs index c4d3c6d..9678277 100644 --- a/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderSetup.cs +++ b/Runtime/VFX/LineVFX/LineMaterial/LineVFXShaderSetup.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LineMeshGenerator/CustomMeshGenerator.cs b/Runtime/VFX/LineVFX/LineMeshGenerator/CustomMeshGenerator.cs index cf67251..0d23b76 100644 --- a/Runtime/VFX/LineVFX/LineMeshGenerator/CustomMeshGenerator.cs +++ b/Runtime/VFX/LineVFX/LineMeshGenerator/CustomMeshGenerator.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LineMeshGenerator/CylinderMeshGenerator.cs b/Runtime/VFX/LineVFX/LineMeshGenerator/CylinderMeshGenerator.cs index 2a85d8f..2bf2271 100644 --- a/Runtime/VFX/LineVFX/LineMeshGenerator/CylinderMeshGenerator.cs +++ b/Runtime/VFX/LineVFX/LineMeshGenerator/CylinderMeshGenerator.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LineMeshGenerator/LineMeshGenerator.cs b/Runtime/VFX/LineVFX/LineMeshGenerator/LineMeshGenerator.cs index 5ba8c4c..215b0ba 100644 --- a/Runtime/VFX/LineVFX/LineMeshGenerator/LineMeshGenerator.cs +++ b/Runtime/VFX/LineVFX/LineMeshGenerator/LineMeshGenerator.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshEntry.cs b/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshEntry.cs index d6e4886..98866bf 100644 --- a/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshEntry.cs +++ b/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshEntry.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshGenerator.cs b/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshGenerator.cs index 0597200..6393d17 100644 --- a/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshGenerator.cs +++ b/Runtime/VFX/LineVFX/LineMeshGenerator/RandomLineMeshGenerator.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointData.cs b/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointData.cs index bd8eedf..f125f1e 100644 --- a/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointData.cs +++ b/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointData.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointList.cs b/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointList.cs index 90289ec..2842a1c 100644 --- a/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointList.cs +++ b/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLinePointList.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; diff --git a/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLineVFXData.cs b/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLineVFXData.cs index 34d4940..b9eba1a 100644 --- a/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLineVFXData.cs +++ b/Runtime/VFX/LineVFX/LinePoint/AutoLine/AutoLineVFXData.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class AutoLineVFXData:LineVFXData diff --git a/Runtime/VFX/LineVFX/LinePoint/ChildPositionsAutoLine/ChildPositionsAutoLine.cs b/Runtime/VFX/LineVFX/LinePoint/ChildPositionsAutoLine/ChildPositionsAutoLine.cs index ef5b018..4c2511e 100644 --- a/Runtime/VFX/LineVFX/LinePoint/ChildPositionsAutoLine/ChildPositionsAutoLine.cs +++ b/Runtime/VFX/LineVFX/LinePoint/ChildPositionsAutoLine/ChildPositionsAutoLine.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointData.cs b/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointData.cs index 8f1617b..2e48273 100644 --- a/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointData.cs +++ b/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointData.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointList.cs b/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointList.cs index 0f277bc..7064913 100644 --- a/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointList.cs +++ b/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLinePointList.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLineVFXData.cs b/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLineVFXData.cs index d9bd2e5..8ae411d 100644 --- a/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLineVFXData.cs +++ b/Runtime/VFX/LineVFX/LinePoint/CustomLine/CustomLineVFXData.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public class CustomLineVFXData:LineVFXData diff --git a/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/FollowAutoLine.cs b/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/FollowAutoLine.cs index daf0817..05f0696 100644 --- a/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/FollowAutoLine.cs +++ b/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/FollowAutoLine.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/SetFollowAutoLine.cs b/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/SetFollowAutoLine.cs index cab1f02..d72c5bb 100644 --- a/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/SetFollowAutoLine.cs +++ b/Runtime/VFX/LineVFX/LinePoint/FollowAutoLine/SetFollowAutoLine.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LinePoint/LinePointData.cs b/Runtime/VFX/LineVFX/LinePoint/LinePointData.cs index 8ff24ba..201f75b 100644 --- a/Runtime/VFX/LineVFX/LinePoint/LinePointData.cs +++ b/Runtime/VFX/LineVFX/LinePoint/LinePointData.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool,GlobalClass] diff --git a/Runtime/VFX/LineVFX/LinePoint/LinePointDataGenerator.cs b/Runtime/VFX/LineVFX/LinePoint/LinePointDataGenerator.cs index 34435dd..7ea2d2d 100644 --- a/Runtime/VFX/LineVFX/LinePoint/LinePointDataGenerator.cs +++ b/Runtime/VFX/LineVFX/LinePoint/LinePointDataGenerator.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LinePoint/LineVFXPointData.cs b/Runtime/VFX/LineVFX/LinePoint/LineVFXPointData.cs index 5fe6da9..cb17231 100644 --- a/Runtime/VFX/LineVFX/LinePoint/LineVFXPointData.cs +++ b/Runtime/VFX/LineVFX/LinePoint/LineVFXPointData.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; public abstract class LineVFXData diff --git a/Runtime/VFX/LineVFX/LinePoint/ManualAutoLine/ManualAutoLine.cs b/Runtime/VFX/LineVFX/LinePoint/ManualAutoLine/ManualAutoLine.cs index b6f590c..4250b7d 100644 --- a/Runtime/VFX/LineVFX/LinePoint/ManualAutoLine/ManualAutoLine.cs +++ b/Runtime/VFX/LineVFX/LinePoint/ManualAutoLine/ManualAutoLine.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LinePreset.cs b/Runtime/VFX/LineVFX/LinePreset.cs index ddba66e..ebfd493 100644 --- a/Runtime/VFX/LineVFX/LinePreset.cs +++ b/Runtime/VFX/LineVFX/LinePreset.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/LineVFX.cs b/Runtime/VFX/LineVFX/LineVFX.cs index b9b8bb7..2ec8b6e 100644 --- a/Runtime/VFX/LineVFX/LineVFX.cs +++ b/Runtime/VFX/LineVFX/LineVFX.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] diff --git a/Runtime/VFX/LineVFX/SetPositionOnLineVFX.cs b/Runtime/VFX/LineVFX/SetPositionOnLineVFX.cs index ecc033e..73bd946 100644 --- a/Runtime/VFX/LineVFX/SetPositionOnLineVFX.cs +++ b/Runtime/VFX/LineVFX/SetPositionOnLineVFX.cs @@ -1,6 +1,7 @@ using Godot; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori; [Tool] @@ -26,7 +27,7 @@ public partial class SetPositionOnLineVFX:Action var min = normalizedPosition - normalizedRange; var max = normalizedPosition + normalizedRange; - var t = random.Range( min, max ); + var t = random.FromRange( min, max ); t = MathX.Clamp01( t ); // this.LogInfo( t, normalizedPosition, normalizedRange, min, max ); diff --git a/Runtime/VFX/VFXTools.cs b/Runtime/VFX/VFXTools.cs index 5248372..8fcaf76 100644 --- a/Runtime/VFX/VFXTools.cs +++ b/Runtime/VFX/VFXTools.cs @@ -2,6 +2,7 @@ using Godot; using System.Collections.Generic; using System.Linq; +using Rokojori.Extensions; namespace Rokojori { public class VFXTools diff --git a/Runtime/Viewports/CopyViewportSize.cs b/Runtime/Viewports/CopyViewportSize.cs index d01b57d..ec294b8 100644 --- a/Runtime/Viewports/CopyViewportSize.cs +++ b/Runtime/Viewports/CopyViewportSize.cs @@ -6,6 +6,7 @@ using System; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/WorldMap/Layers/Grid/GridWorldMapLayer.cs b/Runtime/WorldMap/Layers/Grid/GridWorldMapLayer.cs index 28f41c6..435bcba 100644 --- a/Runtime/WorldMap/Layers/Grid/GridWorldMapLayer.cs +++ b/Runtime/WorldMap/Layers/Grid/GridWorldMapLayer.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -233,7 +234,7 @@ namespace Rokojori // RJLog.Log( "Loading regionID:", regionID, regionIndex.X, regionIndex.Y ); var regionInfo = new WorldMapRegionInfo(); regionInfo.id = regionID; - regionInfo.loadingTime = Time.GetTicksMsec() / 1000f; + regionInfo.loadingTime = Godot.Time.GetTicksMsec() / 1000f; _loadedRegions[ regionID ] = regionInfo; diff --git a/Runtime/WorldMap/Layers/Grid/GridWorldRegion.cs b/Runtime/WorldMap/Layers/Grid/GridWorldRegion.cs index c435e69..a843bfe 100644 --- a/Runtime/WorldMap/Layers/Grid/GridWorldRegion.cs +++ b/Runtime/WorldMap/Layers/Grid/GridWorldRegion.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/WorldMap/Layers/WorldMapLayer.cs b/Runtime/WorldMap/Layers/WorldMapLayer.cs index b820015..8217291 100644 --- a/Runtime/WorldMap/Layers/WorldMapLayer.cs +++ b/Runtime/WorldMap/Layers/WorldMapLayer.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/WorldMap/Layers/WorldMapLayerType.cs b/Runtime/WorldMap/Layers/WorldMapLayerType.cs index c8c2345..9e03d7f 100644 --- a/Runtime/WorldMap/Layers/WorldMapLayerType.cs +++ b/Runtime/WorldMap/Layers/WorldMapLayerType.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/WorldMap/Streamers/WorldStreamer.cs b/Runtime/WorldMap/Streamers/WorldStreamer.cs index 561ea91..47ffcf9 100644 --- a/Runtime/WorldMap/Streamers/WorldStreamer.cs +++ b/Runtime/WorldMap/Streamers/WorldStreamer.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/WorldMap/WorldMap.cs b/Runtime/WorldMap/WorldMap.cs index bb25bad..828fc22 100644 --- a/Runtime/WorldMap/WorldMap.cs +++ b/Runtime/WorldMap/WorldMap.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/WorldMap/WorldMapDefinition.cs b/Runtime/WorldMap/WorldMapDefinition.cs index ea924bf..f7af4f1 100644 --- a/Runtime/WorldMap/WorldMapDefinition.cs +++ b/Runtime/WorldMap/WorldMapDefinition.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/XML/HTML/HTMLElementName.cs b/Runtime/XML/HTML/HTMLElementName.cs index 4ca9a20..2576876 100644 --- a/Runtime/XML/HTML/HTMLElementName.cs +++ b/Runtime/XML/HTML/HTMLElementName.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class HTMLElementName diff --git a/Runtime/XML/Nodes/XMLAttributeNode.cs b/Runtime/XML/Nodes/XMLAttributeNode.cs index 40cbcd5..98330fb 100644 --- a/Runtime/XML/Nodes/XMLAttributeNode.cs +++ b/Runtime/XML/Nodes/XMLAttributeNode.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLAttributeNode:XMLNode diff --git a/Runtime/XML/Nodes/XMLCDataSectionNode.cs b/Runtime/XML/Nodes/XMLCDataSectionNode.cs index 628a634..c69af27 100644 --- a/Runtime/XML/Nodes/XMLCDataSectionNode.cs +++ b/Runtime/XML/Nodes/XMLCDataSectionNode.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLCDataSectionNode:XMLNode diff --git a/Runtime/XML/Nodes/XMLCommentNode.cs b/Runtime/XML/Nodes/XMLCommentNode.cs index f6d31d7..066dc6a 100644 --- a/Runtime/XML/Nodes/XMLCommentNode.cs +++ b/Runtime/XML/Nodes/XMLCommentNode.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLCommentNode:XMLNode diff --git a/Runtime/XML/Nodes/XMLDocument.cs b/Runtime/XML/Nodes/XMLDocument.cs index c8f078a..943ebb5 100644 --- a/Runtime/XML/Nodes/XMLDocument.cs +++ b/Runtime/XML/Nodes/XMLDocument.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLDocument:XMLNode diff --git a/Runtime/XML/Nodes/XMLDocumentFragmentNode.cs b/Runtime/XML/Nodes/XMLDocumentFragmentNode.cs index e298fb7..328b338 100644 --- a/Runtime/XML/Nodes/XMLDocumentFragmentNode.cs +++ b/Runtime/XML/Nodes/XMLDocumentFragmentNode.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLDocumentFragmentNode:XMLNode diff --git a/Runtime/XML/Nodes/XMLDocumentTypeNode.cs b/Runtime/XML/Nodes/XMLDocumentTypeNode.cs index 1b2d5a3..07244d1 100644 --- a/Runtime/XML/Nodes/XMLDocumentTypeNode.cs +++ b/Runtime/XML/Nodes/XMLDocumentTypeNode.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLDocumentTypeNode:XMLNode diff --git a/Runtime/XML/Nodes/XMLElementNode.cs b/Runtime/XML/Nodes/XMLElementNode.cs index e3d03b1..bec3754 100644 --- a/Runtime/XML/Nodes/XMLElementNode.cs +++ b/Runtime/XML/Nodes/XMLElementNode.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLElementNode:XMLNode diff --git a/Runtime/XML/Nodes/XMLProcessingInstructionNode.cs b/Runtime/XML/Nodes/XMLProcessingInstructionNode.cs index 842bce4..5584213 100644 --- a/Runtime/XML/Nodes/XMLProcessingInstructionNode.cs +++ b/Runtime/XML/Nodes/XMLProcessingInstructionNode.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLProcessingInstructionNode:XMLNode diff --git a/Runtime/XML/Nodes/XMLTextNode.cs b/Runtime/XML/Nodes/XMLTextNode.cs index bbe088c..e0aabde 100644 --- a/Runtime/XML/Nodes/XMLTextNode.cs +++ b/Runtime/XML/Nodes/XMLTextNode.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLTextNode:XMLNode diff --git a/Runtime/XML/SVG/Inkscape.cs b/Runtime/XML/SVG/Inkscape.cs index a09a5a5..8ac134e 100644 --- a/Runtime/XML/SVG/Inkscape.cs +++ b/Runtime/XML/SVG/Inkscape.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class Inkscape diff --git a/Runtime/XML/SVG/SVGArc.cs b/Runtime/XML/SVG/SVGArc.cs index 29d1b46..bd7521e 100644 --- a/Runtime/XML/SVG/SVGArc.cs +++ b/Runtime/XML/SVG/SVGArc.cs @@ -1,6 +1,7 @@ using Godot; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/XML/SVG/SVGAttributeName.cs b/Runtime/XML/SVG/SVGAttributeName.cs index 114f728..a5f3386 100644 --- a/Runtime/XML/SVG/SVGAttributeName.cs +++ b/Runtime/XML/SVG/SVGAttributeName.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class SVGAttributeName diff --git a/Runtime/XML/SVG/SVGElementName.cs b/Runtime/XML/SVG/SVGElementName.cs index 9f2c0b9..4a8bf09 100644 --- a/Runtime/XML/SVG/SVGElementName.cs +++ b/Runtime/XML/SVG/SVGElementName.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class SVGElementName diff --git a/Runtime/XML/SVG/SVGInkscapeLayerSeperator.cs b/Runtime/XML/SVG/SVGInkscapeLayerSeperator.cs index 6d15009..50f1e94 100644 --- a/Runtime/XML/SVG/SVGInkscapeLayerSeperator.cs +++ b/Runtime/XML/SVG/SVGInkscapeLayerSeperator.cs @@ -2,6 +2,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { [Tool] @@ -56,7 +57,7 @@ namespace Rokojori var doc = reader.Read( text ); var layers = Inkscape.GetLayers( doc, true ); - var layerNames = Lists.Map( layers, l => Inkscape.GetLayerName( l ) ); + var layerNames = ListExtensions.Map( layers, l => Inkscape.GetLayerName( l ) ); Inkscape.StripEditorData( doc ); diff --git a/Runtime/XML/SVG/SVGPathCommand.cs b/Runtime/XML/SVG/SVGPathCommand.cs index c5ebd19..ce7ff18 100644 --- a/Runtime/XML/SVG/SVGPathCommand.cs +++ b/Runtime/XML/SVG/SVGPathCommand.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class SVGPathCommand @@ -27,7 +28,7 @@ namespace Rokojori { if ( paramaters.Count > 0 ) { - return "Invalid! " + type + " " + Lists.Join( paramaters, " " ); + return "Invalid! " + type + " " + ListExtensions.Join( paramaters, " " ); } return type; @@ -39,10 +40,10 @@ namespace Rokojori if ( ! valid ) { - return "Invalid! " + type + " " + Lists.Join( paramaters, " " ); + return "Invalid! " + type + " " + ListExtensions.Join( paramaters, " " ); } - return type + "(" + blocks + ") " + Lists.Join( paramaters, " " ); + return type + "(" + blocks + ") " + ListExtensions.Join( paramaters, " " ); } public static int GetParameterLengthForCommand( string commandType ) diff --git a/Runtime/XML/SVG/SVGPathExtractor.cs b/Runtime/XML/SVG/SVGPathExtractor.cs index fd85574..9c164c7 100644 --- a/Runtime/XML/SVG/SVGPathExtractor.cs +++ b/Runtime/XML/SVG/SVGPathExtractor.cs @@ -2,6 +2,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/XML/SVG/SVGPathInstruction.cs b/Runtime/XML/SVG/SVGPathInstruction.cs index f24850a..20f25bc 100644 --- a/Runtime/XML/SVG/SVGPathInstruction.cs +++ b/Runtime/XML/SVG/SVGPathInstruction.cs @@ -2,6 +2,7 @@ using Godot; using System; using System.Collections.Generic; +using Rokojori.Extensions; namespace Rokojori { diff --git a/Runtime/XML/SVG/SVGPathParser.cs b/Runtime/XML/SVG/SVGPathParser.cs index 8a95203..0a96018 100644 --- a/Runtime/XML/SVG/SVGPathParser.cs +++ b/Runtime/XML/SVG/SVGPathParser.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class SVGPathParser diff --git a/Runtime/XML/XMLAttributeName.cs b/Runtime/XML/XMLAttributeName.cs index d681f5a..8ca9d65 100644 --- a/Runtime/XML/XMLAttributeName.cs +++ b/Runtime/XML/XMLAttributeName.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLAttributeName:XMLElementSelector diff --git a/Runtime/XML/XMLElementNodeName.cs b/Runtime/XML/XMLElementNodeName.cs index 65900ae..a02e5db 100644 --- a/Runtime/XML/XMLElementNodeName.cs +++ b/Runtime/XML/XMLElementNodeName.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLElementNodeName:XMLElementSelector diff --git a/Runtime/XML/XMLElementSelector.cs b/Runtime/XML/XMLElementSelector.cs index 07c0efc..981ea7f 100644 --- a/Runtime/XML/XMLElementSelector.cs +++ b/Runtime/XML/XMLElementSelector.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public interface XMLElementSelector diff --git a/Runtime/XML/XMLNode.cs b/Runtime/XML/XMLNode.cs index f75a657..7b24ac6 100644 --- a/Runtime/XML/XMLNode.cs +++ b/Runtime/XML/XMLNode.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public abstract class XMLNode diff --git a/Runtime/XML/XMLQuery.cs b/Runtime/XML/XMLQuery.cs index 88ce49e..8e92066 100644 --- a/Runtime/XML/XMLQuery.cs +++ b/Runtime/XML/XMLQuery.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using Godot; +using Rokojori.Extensions; namespace Rokojori { public class XMLQuery diff --git a/Runtime/XML/XMLReader.cs b/Runtime/XML/XMLReader.cs index fdad71d..426f1f8 100644 --- a/Runtime/XML/XMLReader.cs +++ b/Runtime/XML/XMLReader.cs @@ -3,7 +3,8 @@ using System.Text.RegularExpressions; using System.Xml; - namespace Rokojori + using Rokojori.Extensions; +namespace Rokojori { public class XMLReader { @@ -154,10 +155,10 @@ { var element = (XMLElementNode) node; - var infos = Lists.Join( Lists.Map( insideTagElements, i => i.match ), "" ); + var infos = ListExtensions.Join( ListExtensions.Map( insideTagElements, i => i.match ), "" ); // RJLog.Log( "Set Attributes", element.fullNodeName, insideTagElements.Count, infos ); - var attributeNameIndices = Lists.CollectIndices( insideTagElements, le => XMLLexer.XMLAttributeName.Matches( le ) ); + var attributeNameIndices = ListExtensions.CollectIndices( insideTagElements, le => XMLLexer.XMLAttributeName.Matches( le ) ); attributeNameIndices.ForEach( ( attIndex )=> diff --git a/Runtime/XML/XMLReaderTest.cs b/Runtime/XML/XMLReaderTest.cs index d597e9a..c1d1fbb 100644 --- a/Runtime/XML/XMLReaderTest.cs +++ b/Runtime/XML/XMLReaderTest.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using Godot; +using Rokojori.Extensions; namespace Rokojori { [Tool] diff --git a/Runtime/XML/XMLSerializer.cs b/Runtime/XML/XMLSerializer.cs index 554425a..c0c9f30 100644 --- a/Runtime/XML/XMLSerializer.cs +++ b/Runtime/XML/XMLSerializer.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using System.Text; +using Rokojori.Extensions; namespace Rokojori { public class XMLSerializer diff --git a/Runtime/XML/XMLWalker.cs b/Runtime/XML/XMLWalker.cs index aca1fef..23fefea 100644 --- a/Runtime/XML/XMLWalker.cs +++ b/Runtime/XML/XMLWalker.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +using Rokojori.Extensions; namespace Rokojori { public class XMLWalker: TreeWalker diff --git a/Tools/FFmpeg/FFmpeg.cs b/Tools/FFmpeg/FFmpeg.cs index 6da025c..e9550b6 100644 --- a/Tools/FFmpeg/FFmpeg.cs +++ b/Tools/FFmpeg/FFmpeg.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.Collections.Generic; using System.Threading.Tasks; using System; +using Rokojori.Extensions; namespace Rokojori.Tools; diff --git a/Tools/Git/Git.cs b/Tools/Git/Git.cs index 371be88..92dc604 100644 --- a/Tools/Git/Git.cs +++ b/Tools/Git/Git.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.Collections.Generic; using System.Threading.Tasks; using System; +using Rokojori.Extensions; namespace Rokojori.Tools { diff --git a/Tools/Messages/Idle Font Style.tres b/Tools/Messages/Idle Font Style.tres index cee2656..ab8f045 100644 --- a/Tools/Messages/Idle Font Style.tres +++ b/Tools/Messages/Idle Font Style.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://chmcc71dvu4vj" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UIStyle.cs" id="1_idqg4"] [ext_resource type="Script" uid="uid://3bymmno3avag" path="res://addons/rokojori_action_library/Runtime/UI/Transitions/TransitionSettingsAll.cs" id="2_lh08y"] -[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/UITime.tres" id="3_rbu1a"] +[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/UI Time.tres" id="3_rbu1a"] [sub_resource type="Curve" id="Curve_016cl"] _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0] diff --git a/Tools/Messages/Messages.tscn b/Tools/Messages/Messages.tscn index 9ae12b6..fe0bdb7 100644 --- a/Tools/Messages/Messages.tscn +++ b/Tools/Messages/Messages.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://bu6np1t32bddg" path="res://addons/rokojori_action_library/Runtime/UI/UI.cs" id="1_op0b4"] [ext_resource type="Resource" uid="uid://dp57o0ykhkqfj" path="res://addons/rokojori_action_library/Runtime/UI/UI-Settings-Default.tres" id="2_iufyf"] -[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/UITime.tres" id="2_kfok7"] +[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/UI Time.tres" id="2_kfok7"] [ext_resource type="Script" uid="uid://cnkyynboxg1qg" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UINumber.cs" id="4_05c0h"] [ext_resource type="Script" uid="uid://c2hicupu28nbi" path="res://addons/rokojori_action_library/Runtime/UI/Nodes/UIRegion.cs" id="5_05c0h"] [ext_resource type="PackedScene" uid="uid://d728w4qocmyb" path="res://addons/rokojori_action_library/Tools/Messages/Message.tscn" id="5_u3an3"] diff --git a/Tools/Messages/Vertical-Slider.tres b/Tools/Messages/Vertical-Slider.tres index 2be3e47..34047b3 100644 --- a/Tools/Messages/Vertical-Slider.tres +++ b/Tools/Messages/Vertical-Slider.tres @@ -7,8 +7,8 @@ [ext_resource type="Script" uid="uid://c5k6edrmdr3qc" path="res://addons/rokojori_action_library/Runtime/UI/Transitions/UIColorTransition.cs" id="4_20qqy"] [ext_resource type="Script" uid="uid://cnkyynboxg1qg" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UINumber.cs" id="4_ly1j0"] [ext_resource type="Script" uid="uid://5w3jvlqxrvaf" path="res://addons/rokojori_action_library/Runtime/UI/Transitions/TransitionSettings.cs" id="5_qjwj3"] -[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/UITime.tres" id="6_a0omq"] -[ext_resource type="Script" uid="uid://bqypmtxqo5rnf" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UISelectorStyle.cs" id="6_quaxm"] +[ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/Timelines/UI Time.tres" id="6_a0omq"] +[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UISelectorStyle.cs" id="6_quaxm"] [ext_resource type="Script" uid="uid://brmxttyvbwoit" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UISelector.cs" id="7_7ojah"] [ext_resource type="Script" uid="uid://jqgdm3r2u8xq" path="res://addons/rokojori_action_library/Runtime/Shading/Properties/FloatPropertyName.cs" id="8_sg07i"] [ext_resource type="Script" uid="uid://j3mk8vwv56ui" path="res://addons/rokojori_action_library/Runtime/UI/ShaderProperties/ShaderUINumber.cs" id="9_ia68h"] diff --git a/Tools/blender/Blender.cs b/Tools/blender/Blender.cs index 501fa34..42f2034 100644 --- a/Tools/blender/Blender.cs +++ b/Tools/blender/Blender.cs @@ -4,6 +4,7 @@ using Rokojori; using System.Diagnostics; using System.Collections.Generic; using System.Threading.Tasks; +using Rokojori.Extensions; namespace Rokojori.Tools { diff --git a/Tools/core-generation/RokojoriActionCoreExport.cs b/Tools/core-generation/RokojoriActionCoreExport.cs index f888d95..38d5f1b 100644 --- a/Tools/core-generation/RokojoriActionCoreExport.cs +++ b/Tools/core-generation/RokojoriActionCoreExport.cs @@ -1,6 +1,7 @@ using System; namespace Rokojori; +[RokojoriActionCoreGDIgnore] public class RokojoriActionCoreExport : Attribute { diff --git a/Tools/core-generation/RokojoriActionCoreExportCustom.cs b/Tools/core-generation/RokojoriActionCoreExportCustom.cs index 05dbb0e..e925898 100644 --- a/Tools/core-generation/RokojoriActionCoreExportCustom.cs +++ b/Tools/core-generation/RokojoriActionCoreExportCustom.cs @@ -1,6 +1,7 @@ using System; namespace Rokojori; +[RokojoriActionCoreGDIgnore] public class RokojoriActionCoreExportCustom : Attribute { diff --git a/Tools/core-generation/RokojoriActionCoreFlatten.cs b/Tools/core-generation/RokojoriActionCoreFlatten.cs new file mode 100644 index 0000000..252192e --- /dev/null +++ b/Tools/core-generation/RokojoriActionCoreFlatten.cs @@ -0,0 +1,13 @@ +using System; +namespace Rokojori; + +[RokojoriActionCoreGDIgnore] +public class RokojoriActionCoreExportFlatten: Attribute +{ + public string baseClass; + + public RokojoriActionCoreExportFlatten( string baseClass = null ) + { + this.baseClass = baseClass; + } +} \ No newline at end of file diff --git a/Tools/core-generation/RokojoriActionCoreFlatten.cs.uid b/Tools/core-generation/RokojoriActionCoreFlatten.cs.uid new file mode 100644 index 0000000..1401b9a --- /dev/null +++ b/Tools/core-generation/RokojoriActionCoreFlatten.cs.uid @@ -0,0 +1 @@ +uid://y4kkvpec53p6 diff --git a/Tools/core-generation/RokojoriActionCoreGDIgnore.cs b/Tools/core-generation/RokojoriActionCoreGDIgnore.cs new file mode 100644 index 0000000..6765a94 --- /dev/null +++ b/Tools/core-generation/RokojoriActionCoreGDIgnore.cs @@ -0,0 +1,8 @@ +using System; +namespace Rokojori; + +[RokojoriActionCoreGDIgnore] +public class RokojoriActionCoreGDIgnore : Attribute +{ + +} \ No newline at end of file diff --git a/Tools/core-generation/RokojoriActionCoreGDIgnore.cs.uid b/Tools/core-generation/RokojoriActionCoreGDIgnore.cs.uid new file mode 100644 index 0000000..c7c9027 --- /dev/null +++ b/Tools/core-generation/RokojoriActionCoreGDIgnore.cs.uid @@ -0,0 +1 @@ +uid://jp5ngn6arfmi diff --git a/Tools/core-generation/RokojoriActionCoreGenericAsString.cs b/Tools/core-generation/RokojoriActionCoreGenericAsString.cs new file mode 100644 index 0000000..fa63cf3 --- /dev/null +++ b/Tools/core-generation/RokojoriActionCoreGenericAsString.cs @@ -0,0 +1,18 @@ +using System; +namespace Rokojori; + +[RokojoriActionCoreGDIgnore] +public class RokojoriActionCoreGenericAsString : Attribute +{ + public static string Default => Prepend; + public const string Prepend = "Prepend"; + public const string Append = "Append"; + + + public string mode = Prepend; + + public RokojoriActionCoreGenericAsString( string mode = "Prepend" ) + { + this.mode = mode; + } +} \ No newline at end of file diff --git a/Tools/core-generation/RokojoriActionCoreGenericAsString.cs.uid b/Tools/core-generation/RokojoriActionCoreGenericAsString.cs.uid new file mode 100644 index 0000000..ccc014d --- /dev/null +++ b/Tools/core-generation/RokojoriActionCoreGenericAsString.cs.uid @@ -0,0 +1 @@ +uid://dedntk4mf40ub diff --git a/Tools/core-generation/RokojoriActionCoreGenerator.cs b/Tools/core-generation/RokojoriActionCoreSymbols.cs similarity index 51% rename from Tools/core-generation/RokojoriActionCoreGenerator.cs rename to Tools/core-generation/RokojoriActionCoreSymbols.cs index bf64184..05e71a8 100644 --- a/Tools/core-generation/RokojoriActionCoreGenerator.cs +++ b/Tools/core-generation/RokojoriActionCoreSymbols.cs @@ -11,23 +11,10 @@ using System.IO; namespace Rokojori.CoreGeneration; -[Tool] -public partial class RokojoriActionCoreGenerator : Node +public partial class RokojoriActionCoreSymbols { public static readonly string ROKOJORI_ACTION_CORE = "ROKOJORI_ACTION_CORE"; - - [ExportToolButton( "Generate" )] - public Callable generateButton => Callable.From( - ()=> - { - settings.Generate( this ); - } - ); - - [Export] - public RokojoriActionCoreSettings settings; - - - + public static readonly string ROKOJORI_ACTION_CORE_GD = "ROKOJORI_ACTION_CORE_GD"; + public static readonly string ROKOJORI_ACTION_CORE_CS = "ROKOJORI_ACTION_CORE_CS"; } \ No newline at end of file diff --git a/Tools/core-generation/RokojoriActionCoreGenerator.cs.uid b/Tools/core-generation/RokojoriActionCoreSymbols.cs.uid similarity index 100% rename from Tools/core-generation/RokojoriActionCoreGenerator.cs.uid rename to Tools/core-generation/RokojoriActionCoreSymbols.cs.uid diff --git a/Tools/docs/ClassDocEditing/ClassDocEditor.cs b/Tools/docs/ClassDocEditing/ClassDocEditor.cs index aa289be..bdd7b2f 100644 --- a/Tools/docs/ClassDocEditing/ClassDocEditor.cs +++ b/Tools/docs/ClassDocEditing/ClassDocEditor.cs @@ -8,6 +8,7 @@ using System.Reflection; using System.Text.RegularExpressions; using System.Linq; using Rokojori.Tools; +using Rokojori.Extensions; namespace Rokojori.DocGenerator { diff --git a/Tools/docs/ClassDocEditing/ClassDocMember.cs b/Tools/docs/ClassDocEditing/ClassDocMember.cs index 2d32213..f5562c7 100644 --- a/Tools/docs/ClassDocEditing/ClassDocMember.cs +++ b/Tools/docs/ClassDocEditing/ClassDocMember.cs @@ -7,6 +7,7 @@ using System; using System.Reflection; using System.Text.RegularExpressions; using System.Linq; +using Rokojori.Extensions; namespace Rokojori.DocGenerator { diff --git a/Tools/docs/ClassDocEditing/ClassDocParser.cs b/Tools/docs/ClassDocEditing/ClassDocParser.cs index 304dbae..8da0471 100644 --- a/Tools/docs/ClassDocEditing/ClassDocParser.cs +++ b/Tools/docs/ClassDocEditing/ClassDocParser.cs @@ -7,6 +7,7 @@ using System; using System.Reflection; using System.Text.RegularExpressions; using System.Linq; +using Rokojori.Extensions; namespace Rokojori.DocGenerator { @@ -634,7 +635,7 @@ namespace Rokojori.DocGenerator var startRegex = @"^\/\*\*(\s|\n|\r)*(\s|\n|\r)*\*\/$"; - if ( RegexUtility.Matches( comment, startRegex ) && RegexUtility.Matches( comment, endRegex ) ) + if ( comment.Matches( startRegex ) && comment.Matches( endRegex ) ) { return it; } diff --git a/Tools/docs/ClassDocGenerator.cs b/Tools/docs/ClassDocGenerator.cs index 5229dcb..df9e7b1 100644 --- a/Tools/docs/ClassDocGenerator.cs +++ b/Tools/docs/ClassDocGenerator.cs @@ -7,6 +7,7 @@ using System; using System.Reflection; using System.Text.RegularExpressions; using System.Linq; +using Rokojori.Extensions; namespace Rokojori.DocGenerator { @@ -129,8 +130,8 @@ namespace Rokojori.DocGenerator info.interfaces = classType.GetInterfaces().ToList().Map( i => GetDocsType.Of( i ) ); var allBindings = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; - var fields = Lists.ToList( classType.GetFields( allBindings ) ); - fields = Lists.Filter( fields, f => ! f.IsPrivate ); + var fields = ListExtensions.ToList( classType.GetFields( allBindings ) ); + fields = ListExtensions.Filter( fields, f => ! f.IsPrivate ); var godotTypes = new List() { @@ -185,7 +186,7 @@ namespace Rokojori.DocGenerator memberInfo.csNameSpace = f.FieldType.Namespace; memberInfo.dataType = GetDocsType.Of( f.FieldType ); - memberInfo.generics = Lists.Map( f.FieldType.GetGenericArguments(), t => t + "" ); + memberInfo.generics = ListExtensions.Map( f.FieldType.GetGenericArguments(), t => t + "" ); memberInfo.doc = comments.FindDoc( "field", f.Name ); memberInfo.attributes = GetExports( f ); @@ -202,8 +203,8 @@ namespace Rokojori.DocGenerator ); - var constructors = Lists.ToList( classType.GetConstructors( allBindings ) ); - constructors = Lists.Filter( constructors, m => ! m.IsPrivate ); + var constructors = ListExtensions.ToList( classType.GetConstructors( allBindings ) ); + constructors = ListExtensions.Filter( constructors, m => ! m.IsPrivate ); constructors.ForEach( ( con ) => @@ -219,7 +220,7 @@ namespace Rokojori.DocGenerator memberInfo.modifiers.Add( con.IsPublic ? "public" : "protected" ); - var parameters = Lists.ToList( con.GetParameters() ); + var parameters = ListExtensions.ToList( con.GetParameters() ); parameters.ForEach( ( p )=> { @@ -227,7 +228,7 @@ namespace Rokojori.DocGenerator parameterType.name = p.Name; parameterType.type = GetDocsType.Of( p.ParameterType ); parameterType.csNameSpace = p.ParameterType.Namespace; - parameterType.generics = Lists.Map( p.ParameterType.GetGenericArguments(), t => t + "" ); + parameterType.generics = ListExtensions.Map( p.ParameterType.GetGenericArguments(), t => t + "" ); memberInfo.parameters.Add( parameterType ); @@ -240,8 +241,8 @@ namespace Rokojori.DocGenerator ); - var methods = Lists.ToList( classType.GetMethods( allBindings ) ); - methods = Lists.Filter( methods, m => ! m.IsPrivate ); + var methods = ListExtensions.ToList( classType.GetMethods( allBindings ) ); + methods = ListExtensions.Filter( methods, m => ! m.IsPrivate ); var godotInternalMethods = new List() { @@ -272,7 +273,7 @@ namespace Rokojori.DocGenerator memberInfo.dataType = GetDocsType.Of( m.ReturnType ); memberInfo.csNameSpace = m.ReturnType.Namespace; - memberInfo.generics = Lists.Map( m.GetGenericArguments(), t => t + "" ); + memberInfo.generics = ListExtensions.Map( m.GetGenericArguments(), t => t + "" ); memberInfo.doc = comments.FindDoc( "method", m.Name ); if ( m.IsStatic ) @@ -282,7 +283,7 @@ namespace Rokojori.DocGenerator memberInfo.modifiers.Add( m.IsPublic ? "public" : "protected" ); - var parameters = Lists.ToList( m.GetParameters() ); + var parameters = ListExtensions.ToList( m.GetParameters() ); parameters.ForEach( ( p )=> { @@ -290,7 +291,7 @@ namespace Rokojori.DocGenerator parameterType.name = p.Name; parameterType.type = GetDocsType.Of( p.ParameterType ); parameterType.csNameSpace = p.ParameterType.Namespace; - parameterType.generics = Lists.Map( p.ParameterType.GetGenericArguments(), t => t + "" ); + parameterType.generics = ListExtensions.Map( p.ParameterType.GetGenericArguments(), t => t + "" ); memberInfo.parameters.Add( parameterType ); diff --git a/Tools/docs/CreateDoc.cs b/Tools/docs/CreateDoc.cs index 2dd3ad4..812a36e 100644 --- a/Tools/docs/CreateDoc.cs +++ b/Tools/docs/CreateDoc.cs @@ -4,6 +4,7 @@ using Godot; using System.Collections.Generic; using System; using Rokojori.Tools; +using Rokojori.Extensions; namespace Rokojori.DocGenerator { @@ -49,7 +50,7 @@ namespace Rokojori.DocGenerator generator.cSharp = c_sharp; generator.checkChangeTime = processOnlyNewer; - var icons = Lists.Map( FilesSync.GetFiles( absoluteIconPath, ( fp => fp.fileExtension == ".svg" ) ), fp => fp.fullFileName ); + var icons = ListExtensions.Map( FilesSync.GetFiles( absoluteIconPath, ( fp => fp.fileExtension == ".svg" ) ), fp => fp.fullFileName ); generator.Generate( absoluteLibraryPath, absoluteOutputPath, icons ); } @@ -100,7 +101,7 @@ namespace Rokojori.DocGenerator var relativeFilePath = externalPath.MakeRelative( docFile ); var relativePath = docFile.path.ReplaceEnd( ".json" ); - var libPath = libraryFilePath.MakeRelative( relativePath ); + var libPath = libraryFilePath.MakeRelativeFromPath( relativePath ); if ( ! libPath.Exists() ) { diff --git a/Tools/docs/GetDocsType.cs b/Tools/docs/GetDocsType.cs index f0843df..a11c10b 100644 --- a/Tools/docs/GetDocsType.cs +++ b/Tools/docs/GetDocsType.cs @@ -6,6 +6,9 @@ using System.Collections.Generic; using System; using System.Text.RegularExpressions; using System.Linq; +using Rokojori.Extensions; + + namespace Rokojori.DocGenerator { public static class GetDocsType @@ -46,7 +49,7 @@ namespace Rokojori.DocGenerator if ( docType.Contains( "`" ) ) { - var generics = Lists.Map( type.GetGenericArguments(), t => Of( t ) ); + var generics = ListExtensions.Map( type.GetGenericArguments(), t => Of( t ) ); var replacement = "<" + generics.Join( "," ) + ">"; docType = docType.Replace( new Regex( "`.*$" ), replacement ); } diff --git a/Tools/docs/ShaderDocGenerator.cs b/Tools/docs/ShaderDocGenerator.cs index 894591b..b83febd 100644 --- a/Tools/docs/ShaderDocGenerator.cs +++ b/Tools/docs/ShaderDocGenerator.cs @@ -7,6 +7,7 @@ using System; using System.Reflection; using System.Text.RegularExpressions; using System.Linq; +using Rokojori.Extensions; namespace Rokojori.DocGenerator { diff --git a/Tools/gd-only-generator/GDLibraryGenerator.cs b/Tools/gd-only-generator/GDLibraryGenerator.cs index 5208b46..3d2f0ff 100644 --- a/Tools/gd-only-generator/GDLibraryGenerator.cs +++ b/Tools/gd-only-generator/GDLibraryGenerator.cs @@ -8,6 +8,7 @@ using System.Reflection; using System.Text.RegularExpressions; using System.Linq; using System.IO; +using Rokojori.Extensions; namespace Rokojori.GDLibraryGeneration { @@ -55,7 +56,7 @@ namespace Rokojori.GDLibraryGeneration var originalPath = FilePath.Absolute( root.GetFilePath() ); var relativePath = rokojoriProPath.MakeAbsolutePathRelative( originalPath.parentAbsolutePath ); - var gdPath = rokojoriGDPath.MakeRelative( relativePath.path ); + var gdPath = rokojoriGDPath.MakeRelativeFromPath( relativePath.path ); var converter = new GDScriptFromCSAST(); converter.Convert( root ); diff --git a/Tools/gltf-export/GLTFExport.cs b/Tools/gltf-export/GLTFExport.cs index 9d794f2..9db2eba 100644 --- a/Tools/gltf-export/GLTFExport.cs +++ b/Tools/gltf-export/GLTFExport.cs @@ -78,8 +78,8 @@ namespace Rokojori.Tools var image = images.Get( i ).AsObject(); var uri = image.GetString( "uri" ).Replace( "%2F", "/" ); - var textureFilePath = temporaryDirPath.MakeRelative( uri ); - var newTexturesFilePath = texturesDirPath.MakeRelative( textureFilePath.fullFileName ); + var textureFilePath = temporaryDirPath.MakeRelativeFromPath( uri ); + var newTexturesFilePath = texturesDirPath.MakeRelativeFromPath( textureFilePath.fullFileName ); var newRelativeFilePath = gltfParentFilePath.MakeAbsolutePathRelative( newTexturesFilePath.fullPath ); @@ -100,8 +100,8 @@ namespace Rokojori.Tools var buffer = buffers.Get( i ).AsObject(); var uri = buffer.GetString( "uri" ).Replace( "%2F", "/" ); - var bufferFilePath = temporaryDirPath.MakeRelative( uri ); - var newBufferFilePath = binDirPath.MakeRelative( gltfFilePath.WithExtension( ".bin" ).fullFileName ); + var bufferFilePath = temporaryDirPath.MakeRelativeFromPath( uri ); + var newBufferFilePath = binDirPath.MakeRelativeFromPath( gltfFilePath.WithExtension( ".bin" ).fullFileName ); var newRelativeFilePath = gltfParentFilePath.MakeAbsolutePathRelative( newBufferFilePath.fullPath ); // RJLog.Log( "Moving buffer", i, uri, newRelativeFilePath.path, bufferFilePath.fullPath, newRelativeFilePath.fullPath );