obsidian/笔记文件/2.笔记/通关切换场景涉及到的功能.md
2025-03-26 00:02:56 +08:00

43 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

是通过异步协程的形式,去加载相关逻辑
而且可以看到异步协程是可以有多个yield的时间延迟去设定多个不同阶段的逻辑
![[Pasted image 20230704170925.png]]
场景也是循例要先加到setting里
![[Pasted image 20230704171523.png]]
在开始函数下一个场景其实就已经弄好的了只是allow那个允许的布尔设置为false了
![[Pasted image 20230704171033.png]]
是等前面的异步协程逻辑都跑完,才修改这个布尔
![[Pasted image 20230704171144.png]]
游戏场景内
![[Pasted image 20230704171300.png]]
对应的脚本也是挂载上的了
![[Pasted image 20230704171315.png]]
这是第二个场景
![[Pasted image 20230704171417.png]]
需要注意的是这里判断是否通过是小于总数减1而不是小于总数
是因为主角身上最后一个是相机位置,是没有加入判断逻辑的
![[Pasted image 20230706151048.png]]
![[Pasted image 20230706150943.png]]
主角上,也是有挂一个通关相关的脚本逻辑
![[Pasted image 20230706151849.png]]