提交模块切换任务,修改

This commit is contained in:
李浩 2025-04-23 15:38:01 +08:00
parent 3919197a21
commit b9e784f912
2 changed files with 39 additions and 22 deletions

View File

@ -15,7 +15,7 @@ namespace QFramework.Example
Button curBtn; Button curBtn;
protected override void OnInit(IUIData uiData = null) protected override void OnInit(IUIData uiData = null)
{ {
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuit).UnRegisterWhenGameObjectDestroyed(gameObject); //TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuit).UnRegisterWhenGameObjectDestroyed(gameObject);
mData = uiData as UIChangeOperationData ?? new UIChangeOperationData(); mData = uiData as UIChangeOperationData ?? new UIChangeOperationData();
// please add init code here // please add init code here
@ -45,6 +45,7 @@ namespace QFramework.Example
{ {
} }
protected override void OnShow() protected override void OnShow()
{ {
} }
@ -55,14 +56,17 @@ namespace QFramework.Example
} }
private void OnDisable()
{
}
protected override void OnClose() protected override void OnClose()
{ {
//transform.gameObject.SetActive(false);
}
public void OnModuleQuit(OnModuleQuit arg)
{
Hide();
} }
//public void OnModuleQuit(OnModuleQuit arg)
//{
// Hide();
//}
} }
} }

View File

@ -11,17 +11,21 @@
<State name="初始化"> <State name="初始化">
<Enter> <Enter>
<Action type="Sequence"> <Action type="Sequence">
<Action type="Log" value="进入初始化状态"></Action>
<Action type="Var" name="完成" value="0"></Action> <Action type="Var" name="完成" value="0"></Action>
<Action type="UIShow" value="UIOperationList" isShow="true"></Action> <Action type="UIShow" value="UIOperationList" isShow="true"></Action>
<Action type="UIShow" value="UIChangeOperation" isShow="true"></Action> <Action type="OperationChange" name="初始化"></Action>
<Action type="UIShow" value="UIHint" isShow="true"></Action> <Action type="UIShow" value="UIHint" isShow="true"></Action>
<Action type="Hint" value="请选择对应模块,进行对应实验学习。或者使用键盘鼠标,自由漫游场景,进行游览。" time="-1" icon="false"></Action> <Action type="Hint" value="请选择对应模块,进行对应实验学习。或者使用键盘鼠标,自由漫游场景,进行游览。" time="-1" icon="false"></Action>
<Action type="Log" value="HintHintHintHint1111"></Action>
<Action type="NextOperation"></Action>
<!--<Action type="Show" value="CustomParent/Canvas" isShow="false"></Action>
<Action type="Show" value="CustomParent/Eye" isShow="false"></Action>
<Action type="Show" value="CustomParent/Canvas" isShow="false"></Action>-->
<Action type="Parallel"> <Action type="Parallel">
<Action type="Move" value="FlyCamera" to="-3.745917,1.538797,0.7142447" time="0"></Action> <Action type="Move" value="FlyCamera" to="-3.745917,1.538797,0.7142447" time="0"></Action>
<Action type="Rotate" value="FlyCamera" to="15.41563,92.03246,-8.856362E-07" time="0"></Action> <Action type="Rotate" value="FlyCamera" to="15.41563,92.03246,-8.856362E-07" time="0"></Action>
@ -66,8 +70,8 @@
<Action type="Show" value="Main/SM_danfan/SM_yejingjianshiqi/Canvas/BaoGuangGroup" isShow="false"></Action> <Action type="Show" value="Main/SM_danfan/SM_yejingjianshiqi/Canvas/BaoGuangGroup" isShow="false"></Action>
<Action type="Show" value="Main/SM_danfan/SM_yejingjianshiqi/Canvas/拍照焦点_红色" isShow="false"></Action> <Action type="Show" value="Main/SM_danfan/SM_yejingjianshiqi/Canvas/拍照焦点_红色" isShow="false"></Action>
<Action type="TimeLine" value="TimeLines/SanJiaoJiaShenZhan" isShow="true" finishedEvent="播放完毕" isWait="true" frame="0" endFrame="0"></Action> <Action type="TimeLine" value="TimeLines/SanJiaoJiaShenZhan" isShow="true" finishedEvent="播放完毕" isWait="true" frame="0" endFrame="1"></Action>
<Action type="TimeLine" value="TimeLines/AnZhuangSheXiangJi" isShow="true" finishedEvent="播放完毕" isWait="true" frame="0" endFrame="0"></Action> <Action type="TimeLine" value="TimeLines/AnZhuangSheXiangJi" isShow="true" finishedEvent="播放完毕" isWait="true" frame="0" endFrame="1"></Action>
@ -84,10 +88,12 @@
<Action type="Rotate" value="Main/SM_danfan" to="0,270.0002,0" time="0"></Action> <Action type="Rotate" value="Main/SM_danfan" to="0,270.0002,0" time="0"></Action>
</Action> </Action>
<Action type="Log" value="HintHintHintHint2222"></Action>
<!--<Action type="OperationChange" name="单反拍照"></Action>--> <!--<Action type="OperationChange" name="单反拍照"></Action>-->
<Action type="OperationChange" name="请选择对应模块"></Action> <Action type="UIShow" value="UIChangeOperation" isShow="true"></Action>
<Action type="Log" value="HintHintHintHint3333"></Action>
</Action> </Action>
</Enter> </Enter>
@ -98,14 +104,14 @@
<Enter> <Enter>
<Action type="Sequence"> <Action type="Sequence">
<Action type="OperationChange" name="摄像机拍摄"></Action> <Action type="OperationChange" name="摄像机拍摄"></Action>
</Action> </Action>
</Enter> </Enter>
</State> </State>
<State name="单反摄影"> <State name="单反摄影">
<Enter> <Enter>
<Action type="Sequence"> <Action type="Sequence">
<Action type="OperationChange" name="单反摄影"></Action> <Action type="OperationChange" name="单反摄影"></Action>
</Action> </Action>
</Enter> </Enter>
</State> </State>
@ -114,7 +120,7 @@
<Enter> <Enter>
<Action type="Sequence"> <Action type="Sequence">
<Action type="OperationChange" name="单反拍照"></Action> <Action type="OperationChange" name="单反拍照"></Action>
</Action> </Action>
</Enter> </Enter>
</State> </State>
@ -130,7 +136,8 @@
</Transision> </Transision>
<Transision from="any" to="初始化"> <Transision from="any" to="初始化">
<Condition type="Var" name="完成" value="1"></Condition> <Condition type="Var" name="完成" value="1"></Condition>
<Action type="OperationChange" name="初始化"></Action>
<!--<Action type="OperationChange" name="初始化"></Action>-->
</Transision> </Transision>
@ -215,6 +222,7 @@
<Start> <Start>
<Action type="Sequence"> <Action type="Sequence">
<Action type="UIShow" value="UIChangeOperation" isShow="false"></Action>
<Action type="Move" value="FlyCamera" to="1.921192,1.341881,-1.91985" time="0"></Action> <Action type="Move" value="FlyCamera" to="1.921192,1.341881,-1.91985" time="0"></Action>
<Action type="Rotate" value="FlyCamera" to="1.338014,327.1598,2.66877E-08" time="0"></Action> <Action type="Rotate" value="FlyCamera" to="1.338014,327.1598,2.66877E-08" time="0"></Action>
@ -776,6 +784,7 @@
<Start> <Start>
<Action type="Sequence"> <Action type="Sequence">
<Action type="UIShow" value="UIChangeOperation" isShow="false"></Action>
<Action type="Move" value="FlyCamera" to="1.921192,1.341881,-1.91985" time="0"></Action> <Action type="Move" value="FlyCamera" to="1.921192,1.341881,-1.91985" time="0"></Action>
<Action type="Rotate" value="FlyCamera" to="1.338014,327.1598,2.66877E-08" time="0"></Action> <Action type="Rotate" value="FlyCamera" to="1.338014,327.1598,2.66877E-08" time="0"></Action>
@ -1457,6 +1466,8 @@
</Action> </Action>
</Start> </Start>
</Step> </Step>
@ -1475,6 +1486,7 @@
<Start> <Start>
<Action type="Sequence"> <Action type="Sequence">
<Action type="UIShow" value="UIChangeOperation" isShow="false"></Action>
<Action type="Move" value="FlyCamera" to="1.921192,1.341881,-1.91985" time="0"></Action> <Action type="Move" value="FlyCamera" to="1.921192,1.341881,-1.91985" time="0"></Action>
<Action type="Rotate" value="FlyCamera" to="1.338014,327.1598,2.66877E-08" time="0"></Action> <Action type="Rotate" value="FlyCamera" to="1.338014,327.1598,2.66877E-08" time="0"></Action>
@ -2037,6 +2049,7 @@
</Action> </Action>
</Start> </Start>
</Step> </Step>