Unity/Unity 리서치
Delegate와 Action 사용 예시
lipnus
2021. 12. 15. 19:45
반응형
public class CustomEvents : MonoBehaviour {
public delegate void GameStateEventHandler();
public static event GameStateEventHandler GameStateUpdated = delegate { };
public delegate void EntityEventHandler(Entity entity);
public static event EntityEventHandler EntitySelected = delegate { };
public static event EntityEventHandler EntityDeselected = delegate { };
public delegate void FactionEntityEventHandler (FactionEntity entity);
public static event FactionEntityEventHandler FactionEntityDead = delegate { };
public static event FactionEntityEventHandler FactionEntityMouseEnter = delegate { };
public static event FactionEntityEventHandler FactionEntityMouseExit = delegate { };
// ...
이런식으로.
UntyEvent와 UnityAction 차이
https://wergia.tistory.com/243
[Unity3D] 유니티 이벤트와 유니티 액션
유니티 이벤트와 유니티 액션을 사용을 사용하는 방법을 알아봅시다. 타임라인 0:00 유니티 이벤트와 유니티 액션 개요 1:15 유니티 이벤트의 예시(버튼 UI 컴포넌트) 1:49 유니티 이벤트를
wergia.tistory.com
반응형