123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace KairoEngine
- {
- public class PlayerEvents
- {
- public static event System.Action<Vector3> OnPositionChange;
- public static event System.Action<GameObject> OnHoverTarget;
- public static event System.Action<Vector3, Quaternion> OnSetPlayerPosition;
- public static void PositionChange(Vector3 position)
- {
- if(OnPositionChange != null)
- {
- //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
- OnPositionChange(position);
- }
- }
- public static void HoverTarget(GameObject target)
- {
- if(OnHoverTarget != null)
- {
- //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
- OnHoverTarget(target);
- }
- }
- public static void SetPlayerPosition(Vector3 targetPosition, Quaternion targetRotation)
- {
- if(OnSetPlayerPosition != null)
- {
- //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
- OnSetPlayerPosition(targetPosition, targetRotation);
- }
- }
- }
- }
|