-
全局管理
- LogicMM
- 游戏入口:GameMng
-
mvc
-
M和C都是单例模式,可以理解为静态
-
SmartControl
- 写逻辑层
-
SmartModel
- 写数据层
-
可覆写的方法
-
public virtual void OnAppInit() { }//全局初始化 public virtual void OnFrameUpdate() { }//每帧调用
-
-
例子:
- TalksControl
-
-
数据存储
-
public static class DB
-
-
音效
-
public static class SoundManager
-
有注释,可以自己先试下,不懂了再来问我
-
-
UI写法
-
步骤
-
继承MyPanel类
-
创建构造函数,并赋值_panelResName为资源名
-
覆写方法
-
void OnInit();//第一次创建调用 void OnShow();//显示时调用 void OnDestroy();//销毁时调用 void Display(bool b);//显示隐藏时调用 bool IsVisible { get; }//是否显示 public virtual void OnClick(MonoBehaviour behaviour);//按钮按下时调用 public void RunUITask(IEnumerator e);//调用协程
-
-
获取并创建panel
-
var _task_panel = MyGUIManager.GetInstance().GetOrCreatePanel<MainTaskTipsPanel>(); _task_panel.InitData(config, Vector2.zero); _task_panel.Display(true);
-
-
-
例子:MainTaskTipsPanel
-
最好是模仿写一下
-
-
插件
forked from Soviby/GameJam2020_8
-
Notifications
You must be signed in to change notification settings - Fork 0
lushaoshu/GameJam2020_8
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- C# 99.9%
- Other 0.1%