public override void OnAdd() { base.OnAdd(); var holder = IoCManager.Resolve <ISceneTreeHolder>(); SceneNode = new Godot.Node2D(); SceneNode.SetName($"Transform {Owner.Uid} ({Owner.Name})"); holder.WorldRoot.AddChild(SceneNode); }
public override void Initialize() { transform = Owner.GetComponent<IGodotTransformComponent>(); debugNode = new Godot.Node2D(); debugNode.SetName("Collidable debug"); debugDrawSubscriber = new GodotGlue.GodotSignalSubscriber0(); debugDrawSubscriber.Connect(debugNode, "draw"); debugDrawSubscriber.Signal += DrawDebugRect; transform.SceneNode.AddChild(debugNode); base.Initialize(); }