UnityEngine Event
2016-08-09 17:32:40 0 举报
UnityEngine Event是Unity引擎中的一种事件系统,用于在游戏对象之间实现通信和交互。通过使用Event,开发者可以创建自定义的事件和委托,以便在特定的情况下触发特定的操作。Event可以是公共的,也可以是私有的,可以被多个脚本或游戏对象订阅和触发。当一个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 条评论
下一页