Skip to content

Commit

Permalink
v1.0.93 release
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxiegame committed Sep 26, 2023
1 parent 3d4afe5 commit da4bec7
Show file tree
Hide file tree
Showing 68 changed files with 3,311 additions and 2,641 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class CounterAppController : Control,IController
[Export] public Button BtnAdd;

[Export] public Button BtnSub;

public override void _Ready()
{
this.GetModel<ICounterAppModel>().Count.RegisterWithInitValue(count =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* Community
* QQ Group: 623597263
* Latest Update: 2023.9.12 14:42 revert operator override
* Latest Update: 2023.9.26 15:14 support godot4.net
****************************************************************************/

using System;
Expand Down Expand Up @@ -488,27 +488,6 @@ private void OnDestroy()
}
}
#endif

#if GODOT
public partial class UnRegisterTrigger : Godot.Node
{
private readonly HashSet<IUnRegister> mUnRegisters = new HashSet<IUnRegister>();

public void AddUnRegister(IUnRegister unRegister) => mUnRegisters.Add(unRegister);

public void RemoveUnRegister(IUnRegister unRegister) => mUnRegisters.Remove(unRegister);

public override void _ExitTree()
{
foreach (var unRegister in mUnRegisters)
{
unRegister.UnRegister();
}

mUnRegisters.Clear();
}
}
#endif

public static class UnRegisterExtension
{
Expand Down Expand Up @@ -536,16 +515,7 @@ public static IUnRegister UnRegisterWhenGameObjectDestroyed<T>(this IUnRegister
#if GODOT
public static IUnRegister UnRegisterWhenNodeExitTree(this IUnRegister unRegister, Godot.Node node)
{
var trigger = node.FindChild("UnRegisterTrigger") as UnRegisterTrigger;

if (trigger == null)
{
trigger = new UnRegisterTrigger();
trigger.Name = "UnRegisterTrigger";
node.AddChild(trigger);
}

trigger.AddUnRegister(unRegister);
node.TreeExiting += unRegister.UnRegister;
return unRegister;
}
#endif
Expand Down Expand Up @@ -682,7 +652,6 @@ IUnRegister IEasyEvent.Register(Action onEvent)
void Action(T _) => onEvent();
}

public static implicit operator T(BindableProperty<T> property) => property.Value;
public override string ToString() => Value.ToString();
}

Expand Down
9 changes: 9 additions & 0 deletions QFramework.Godot4+/addons/qframework/package_window.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends Node

# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
14 changes: 14 additions & 0 deletions QFramework.Godot4+/addons/qframework/package_window.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=3 uid="uid://xxj1uctj31xw"]

[ext_resource type="Script" path="res://addons/qframework/package_window.gd" id="1_53f3v"]

[node name="QFramework" type="Control"]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_53f3v")

[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 23.0
text = "这个是插件界面"
7 changes: 7 additions & 0 deletions QFramework.Godot4+/addons/qframework/plugin.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[plugin]

name="QFramework"
description=""
author="liangxie"
version="0.1"
script="qframework.gd"
15 changes: 15 additions & 0 deletions QFramework.Godot4+/addons/qframework/qframework.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@tool
extends EditorPlugin

var window

func _enter_tree():
# Initialization of the plugin goes here.
window = preload("res://addons/qframework/package_window.tscn").instantiate()

add_control_to_dock(DOCK_SLOT_LEFT_UL,window)

func _exit_tree():
# Clean-up of the plugin goes here.
remove_control_from_docks(window)
window.free()
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ config/icon="res://icon.svg"

project/assembly_name="Q Framework.godot 4.net"

[editor_plugins]

enabled=PackedStringArray("res://addons/qframework/plugin.cfg")

[rendering]

renderer/rendering_method="gl_compatibility"
Expand Down
Binary file modified QFramework.Toolkits.unitypackage
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Id": "",
"Version": "v1.0.76",
"Version": "v1.0.93",
"Type": 0,
"AccessRight": 0,
"DownloadUrl": "",
Expand All @@ -11,10 +11,10 @@
],
"DocUrl": "https://liangxiegame.com",
"Readme": {
"version": "v1.0.76",
"content": "Bind 在 IDE 报错问题修复",
"version": "v1.0.93",
"content": "QFramework.cs 支持 Godot",
"author": "liangxie",
"date": "2023 年 08 月 26 日 15:08",
"date": "2023 年 09 月 26 日 15:17",
"PackageId": ""
}
}
Loading

0 comments on commit da4bec7

Please sign in to comment.