using System.Collections; using System.Collections.Generic; using UnityEngine; public class GreenMan : MonoBehaviour { Animator animator; public Transform safePos; public Transform unSafePos; private void Awake() { animator=GetComponent(); } public void SetPosBySafe(bool safe) { transform.position = safe ? safePos.position : unSafePos.position; } public void E_GameEnd() { EventManager.Instance.emit("GameEnd"); } }