UnityEngine Event
2016-10-21 16:55:56 0 举报
UnityEngine Event是Unity引擎中的一个核心组件,用于实现游戏对象之间的交互和通信。通过使用Event系统,开发者可以轻松地创建和管理事件,以便在游戏运行时触发特定的行为或操作。Event通常与特定的方法关联,当满足某个条件时,该方法会被调用。这使得游戏对象可以监听和响应这些事件,从而实现复杂的逻辑和互动效果。Event系统还支持多播和单播事件,以及自定义事件的注册和注销。总之,UnityEngine Event为开发者提供了一种高效、灵活的方式来组织和管理游戏中的交互逻辑。
作者其他创作
大纲/内容
StandaloneInputModule
+ ctor()+ AddListener(UnityAction)+ RemoveListener(UnityAction);+ Invoke()
PointerInputModule
AxisEventData
+ moveDir+ moveVector
BaseInputModule
+ Process() : 每帧调用
IDe/SelectHandler
IPointerXXXHandler
PhysicsRayCaster
IDragXXXHandler
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
需要绑定在同一个GameObject上
PointerEventData
+ button+ delta+ scrollDelta+ pointerCurrentRaycast+ position+ worldPosition
0 条评论
下一页