UnityEngine Event
2016-07-07 12:44:50 0 举报
UnityEngine Event是Unity引擎中的一种事件系统,允许开发者在游戏中创建和触发自定义事件。通过使用Event,可以实现游戏对象之间的通信和交互,实现游戏逻辑的解耦和模块化。Event可以包含多个参数,如整数、浮点数、字符串等,以满足不同场景的需求。在Unity中,可以通过脚本编写Event的处理函数,当事件发生时,会自动调用对应的处理函数。此外,Unity还提供了多种内置Event,如Update、FixedUpdate等,方便开发者快速实现游戏逻辑。总之,UnityEngine Event是一种强大的工具,可以帮助开发者更高效地开发游戏。
作者其他创作
大纲/内容
StandaloneInputModule
+ ctor()+ AddListener(UnityAction)+ RemoveListener(UnityAction);+ Invoke()
AxisEventData
+ moveDir+ moveVector
PointerInputModule
BaseInputModule
+ Process() : 每帧调用
IDe/SelectHandler
IPointerXXXHandler
IDragXXXHandler
PhysicsRayCaster
BaseRayCaster
IEventSystemHandler
BaseEventData
+ currentInputModule.+ selectedObject+ used
TouchInputModule
EventSystem
+ currentInputModule + static current : EventSystem+ (current/first/last)SelectedGameObject: GameObject
+ RaycastAll(PointerEventData List);
UnityEvent分为泛型和非泛型两种,用法各有不同,不同模版参数的UnityEvent对应相应的UnityAction
UnityEventBase
+ GetPersistentEventCount() : int+ GetPersistentMethodName(int) : string+ GetPersistentTarget(int) : Object+ RemoveAllListeners()
Physics2DRayCaster
PointerEventData
+ button+ delta+ scrollDelta+ pointerCurrentRaycast+ position+ worldPosition
需要绑定在同一个GameObject上
0 条评论
下一页