UnityEngine Event
2016-07-17 23:59:06 0 举报
UnityEngine Event是Unity引擎中用于处理事件的一种机制。它允许开发者在特定情况下触发和响应事件,从而实现游戏逻辑的交互和控制。通过使用Event,开发者可以将多个对象或组件连接在一起,形成一个事件链,当某个对象触发一个事件时,所有连接到该事件的其他对象都会收到通知并执行相应的操作。这种机制可以用于实现游戏中的各种交互行为,如玩家移动、物体碰撞、按钮点击等。UnityEngine Event提供了丰富的API和功能,使开发者能够灵活地创建、触发和监听事件,从而实现复杂的游戏逻辑和交互效果。
作者其他创作
大纲/内容
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 条评论
下一页