-
Notifications
You must be signed in to change notification settings - Fork 791
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGenKit: 增加 TabCustomCode(misakiMeiii 提供) ActionKit: 增加 StartCurrentScene(misakiMeiii 提供建议,已包含示例和文档) QFramework.cs: 增加 UnRegisterWhenCurrentSceneUnloaded(misakiMeiii 提供建议,已包含示例和文档)
- Loading branch information
1 parent
93190db
commit e30403f
Showing
16 changed files
with
314 additions
and
86 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file modified
BIN
+988 Bytes
(100%)
QFramework.Unity2018+/Assets/QFramework/Framework/Examples.unitypackage
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+814 Bytes
(100%)
QFramework.Unity2018+/Assets/QFramework/Toolkits/_CoreKit/ActionKit/Example.unitypackage
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...+/Assets/QFramework/Toolkits/_CoreKit/ActionKit/Scripts/Internal/ActionKitCurrentScene.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/**************************************************************************** | ||
* Copyright (c) 2016 - 2024 liangxiegame UNDER MIT License | ||
* | ||
* https://qframework.cn | ||
* https://github.com/liangxiegame/QFramework | ||
* https://gitee.com/liangxiegame/QFramework | ||
****************************************************************************/ | ||
|
||
using UnityEngine; | ||
|
||
namespace QFramework | ||
{ | ||
public class ActionKitCurrentScene : MonoBehaviour | ||
{ | ||
public static ActionKitCurrentScene mSceneComponent = null; | ||
|
||
public static ActionKitCurrentScene SceneComponent | ||
{ | ||
get | ||
{ | ||
if (!mSceneComponent) | ||
{ | ||
mSceneComponent = new GameObject("ActionKitCurrentScene").AddComponent<ActionKitCurrentScene>(); | ||
} | ||
|
||
return mSceneComponent; | ||
} | ||
} | ||
|
||
private void Awake() => hideFlags = HideFlags.HideInHierarchy; | ||
|
||
private void OnDestroy() => mSceneComponent = null; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ets/QFramework/Toolkits/_CoreKit/ActionKit/Scripts/Internal/ActionKitCurrentScene.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,4 @@ public static ICodeScope Custom(this ICodeScope self, string line) | |
return self; | ||
} | ||
} | ||
|
||
|
||
} |
31 changes: 31 additions & 0 deletions
31
.../QFramework/Toolkits/_CoreKit/CodeGenKit/Scripts/Framework/Code/Language/TabCustomCode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace QFramework | ||
{ | ||
public class TabCustomCode : ICode | ||
{ | ||
private readonly string mLine; | ||
|
||
public TabCustomCode(string line) | ||
{ | ||
mLine = line; | ||
} | ||
|
||
public void Gen(ICodeWriter writer) | ||
{ | ||
writer.WriteLine("\t" + mLine); | ||
} | ||
} | ||
|
||
public static partial class ICodeScopeExtensions | ||
{ | ||
public static ICodeScope TabCustom(this ICodeScope self, string line) | ||
{ | ||
self.Codes.Add(new TabCustomCode(line)); | ||
return self; | ||
} | ||
} | ||
} | ||
|
||
namespace CodeGenKit | ||
{ | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
...mework/Toolkits/_CoreKit/CodeGenKit/Scripts/Framework/Code/Language/TabCustomCode.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.