This commit is contained in:
CortexCore
2023-07-18 16:42:33 +08:00
parent 5f6975ca67
commit 37f46e6d16
25 changed files with 335 additions and 105 deletions

View File

@@ -1,15 +0,0 @@
using Godot;
using RosSharp.RosBridgeClient.Protocols;
namespace BITKit;
/// <summary>
/// 使用Godot.Node作为容器的RosClient
/// </summary>
public partial class ROSClientService : Node
{
public override void _Ready()
{
WebSocketNetProtocol protocol = new("ws://");
RosSharp.RosBridgeClient.RosSocket client = new(protocol);
}
}

View File

@@ -26,9 +26,12 @@ public partial class RotationComponent : EntityComponent
/// 可读可写的当前角度
/// </summary>
public float CurrentAngle;
[ExportCategory("Nodes")]
[Export] public Node3D node3D;
public override void _Ready()
{
//保存默认角度
OriginalEuler = Rotation;
OriginalEuler = node3D.RotationDegrees;
}
}

View File

@@ -148,7 +148,7 @@ public partial class SCADAService : Node,IProvider<string>,IActivable
euler.X = Mathf.DegToRad(euler.X);
euler.Y = Mathf.DegToRad(euler.Y);
euler.Z = Mathf.DegToRad(euler.Z);
rotationComponent.Rotation = euler;
rotationComponent.node3D.Rotation = euler;
//rotationComponent.RotationDegrees = euler;

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://b32l3iwogkdf5"]
[ext_resource type="Script" path="res://BITKit/Scripts/ECS/GodotEntitiesService.cs" id="1_ewsld"]
[ext_resource type="Script" path="res://BITKit/Scripts/ECS/Core/GodotEntitiesService.cs" id="1_5wmjb"]
[node name="EntitiesManager" type="Node"]
script = ExtResource("1_ewsld")
script = ExtResource("1_5wmjb")

File diff suppressed because one or more lines are too long