コード例 #1
0
 private static void ModifyNode(Godot.Node node, Props oldProps, Props props)
 {
     if (!oldProps.Equals(props) && node is Godot.VBoxContainer control)
     {
         CopyToNode(control, oldProps, props);
     }
 }
コード例 #2
0
 public static void ModifyNode(Godot.Node node, Props oldProps, Props props)
 {
     if (!oldProps.Equals(props) && node is Godot.Label control)
     {
         CopyToNode(control, oldProps, props);
     }
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
ファイル: CenterContainer.cs プロジェクト: Cifram/greact
 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);
     }
 }
コード例 #5
0
ファイル: GReact.cs プロジェクト: zorbathut/greact
        private int GetNodeHierarchySize(Godot.Node node)
        {
            var size = 1;

            for (int i = 0; i < node.GetChildCount(); i++)
            {
                size += GetNodeHierarchySize(node.GetChild(i));
            }
            return(size);
        }
コード例 #6
0
ファイル: Signal.cs プロジェクト: zorbathut/greact
 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));
     }
 }
コード例 #7
0
ファイル: Util.cs プロジェクト: kamisori/ArcadiaGodot
 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);
 }
コード例 #8
0
        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
            };
        }
コード例 #9
0
ファイル: GReact.cs プロジェクト: zorbathut/greact
        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;
        }
コード例 #10
0
ファイル: Signal.cs プロジェクト: zorbathut/greact
 private static void CallCallback(Godot.Node node, CallbackHolder holder) => holder.callback(node);
コード例 #11
0
ファイル: Node.cs プロジェクト: Ellizium/EGL
 public Node()
 {
     Base = new _Node(this);
 }
コード例 #12
0
ファイル: KinematicBody2D.cs プロジェクト: Ellizium/EGL
 private void InputEvent(Godot.Node viewport, Godot.InputEvent ev, int shapeIdx)
 {
     ClassOwner.InputEvent?.Invoke(viewport, ev, shapeIdx);
 }
コード例 #13
0
 public Viewport()
 {
     Base = new _Viewport(this);
 }
コード例 #14
0
            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);
            }
コード例 #15
0
 private void BodyShapeExited(int id, Godot.Node node, int areaShape, int selfShape)
 {
     ClassOwner.BodyShapeExited?.Invoke(id, node, areaShape, selfShape);
 }
コード例 #16
0
 private void BodyExited(Godot.Node node)
 {
     ClassOwner.BodyExited?.Invoke(node);
 }
コード例 #17
0
            private void BodyExited(Godot.Node body)
            {
                ICollisionBody collision = body as ICollisionBody;

                ClassOwner.BodyExited?.Invoke(collision.Reference);
            }
コード例 #18
0
 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);
 }
コード例 #19
0
            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);
            }
コード例 #20
0
 private void NodeUnselected(Godot.Node node)
 {
     ClassOwner.NodeUnselected?.Invoke(node);
 }