private static void ModifyNode(Godot.Node node, Props oldProps, Props props) { if (!oldProps.Equals(props) && node is Godot.VBoxContainer control) { CopyToNode(control, oldProps, props); } }
public static void ModifyNode(Godot.Node node, Props oldProps, Props props) { if (!oldProps.Equals(props) && node is Godot.Label control) { CopyToNode(control, oldProps, props); } }
public static void ModifyNode(Godot.Node node, Props oldProps, Props props) { if (!oldProps.Equals(props) && node is Godot.Label control) { CopyToNode(control, oldProps, props); Component.RegisterLabelSignals(control, props); } }
private static void ModifyNode(Godot.Node node, Props oldProps, Props props) { if (!oldProps.Equals(props) && node is Godot.CenterContainer control) { CopyToNode(control, oldProps, props); Component.RegisterCenterContainerSignals(control, props); } }
private int GetNodeHierarchySize(Godot.Node node) { var size = 1; for (int i = 0; i < node.GetChildCount(); i++) { size += GetNodeHierarchySize(node.GetChild(i)); } return(size); }
public void Connect(Godot.Node node, string signalName, Signal?oldSignal) { this.node = node; if (oldSignal == null || !Equals(oldSignal)) { if (oldSignal != null) { node.Disconnect(signalName, oldSignal, nameof(oldSignal.Call)); } node.Connect(signalName, this, nameof(this.Call)); } }
public static ArcadiaHook GetHook(Godot.Node o) { for (int i = 0; i < o.GetChildCount(); i++) { ArcadiaHook found = o.GetChildOrNull <ArcadiaHook>(i); if (found != null) { return(found); } } return(null); }
private void TrackGodotPlayer(Godot.Node player) { var key = LastPlayKey++; var signal = new GodotGlue.GodotSignalSubscriber0(); signal.Connect(player, "finished"); signal.Signal += () => { CleanupAudioPlayer(key); }; PlayingGodotStreams[key] = new PlayingGodotStream() { Player = player, Signal = signal }; }
public void Render(Godot.Node parent, Element elem) { nodesCreated = 0; nodesDestroyed = 0; var popElem = Render(null, 0, oldRootElem, elem); if (oldRootElem == null) { parent.AddChild(popElem.node); } oldRootElem = popElem; }
private static void CallCallback(Godot.Node node, CallbackHolder holder) => holder.callback(node);
public Node() { Base = new _Node(this); }
private void InputEvent(Godot.Node viewport, Godot.InputEvent ev, int shapeIdx) { ClassOwner.InputEvent?.Invoke(viewport, ev, shapeIdx); }
public Viewport() { Base = new _Viewport(this); }
private void BodyShapeExited(int areaId, Godot.Node body, int bodyShapeId, int selfShapeId) { ICollisionBody collision = body as ICollisionBody; ClassOwner.BodyShapeExited?.Invoke(areaId, collision.Reference, bodyShapeId, selfShapeId); }
private void BodyShapeExited(int id, Godot.Node node, int areaShape, int selfShape) { ClassOwner.BodyShapeExited?.Invoke(id, node, areaShape, selfShape); }
private void BodyExited(Godot.Node node) { ClassOwner.BodyExited?.Invoke(node); }
private void BodyExited(Godot.Node body) { ICollisionBody collision = body as ICollisionBody; ClassOwner.BodyExited?.Invoke(collision.Reference); }
private void OnInputEvent(Godot.Node camera, Godot.InputEvent ev, Godot.Vector3 clickPosition, Godot.Vector3 normalPosition, int index) { ClassOwner.OnInputEvent?.Invoke(camera, ev, clickPosition, normalPosition, index); }
private void BodyShapeExited(int bodyId, Godot.Node body, int bodyShapeId, int localShape) { ICollisionBody collision = body as ICollisionBody; ClassOwner.BodyShapeExited?.Invoke(bodyId, collision.Reference, bodyShapeId, localShape); }
private void NodeUnselected(Godot.Node node) { ClassOwner.NodeUnselected?.Invoke(node); }