第六章 基本框架(Framework)
这一章主要编写各个游戏都有的基本框架。
关于源码、打包好的dll文件还没有上传,如何使用它们的Example工程也没有上传。
先来介绍一下源码的各个文件,有个初步认识。
一 源码文件介绍
Author: DarKRabbit
Blog: 优快云
The introduction of files.
文件介绍
Singleton Folder
Singleton.cs
This script is the base class of singleton class except MonoBehaviour.
所有除了组件的单例类的基类UnitySingleton.cs
This script is the base class of singleton MonoBehaviour.
所有单例组件的基类CoroutineInstance.cs
This script is a sealed class inherits ‘UnitySingleton’.
When ‘activeInHierarchy’ of other GameObject is false, you can use this to ‘StartCoroutine’.
继承自’UnitySingleton’。
当其它游戏物体的’activeInHierarchy’为false时,你可以使用这个脚本来’StartCoroutine’。
EventCenter Folder
MessageCenter.cs
This script is used to register(unregister, send) messages.
负责注册(注销,分发)消息。IMessageHandler.cs
This script is the interface that is used to notify the ‘MessageCenter’ who is a handler.
消息处理者接口,在’MessageCenter’中被使用。MessageControllerBase.cs
This script is the base class of controller for handling messages.
所有处理消息的Controller的基类。MessageArgs.cs
This script is the base class of ‘Message Arguments’.
消息参数的基类。

本文介绍了SRPG游戏开发的基本框架,涵盖Singleton、EventCenter、Application、ObjectPools等文件夹的内容,包括消息处理、场景管理、对象池管理、配置文件加载等方面,为游戏开发提供基础架构。
最低0.47元/天 解锁文章
2360

被折叠的 条评论
为什么被折叠?



