using BigSpace.Logic; using BigSpace.XRCore.Event; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class QuadMoveMgr : MonoBehaviour { public GameObject Quad3; public GameObject Quad4; public GameObject Quad5; public GameObject Quad6; // Start is called before the first frame update void Start() { GlobalEventMgr.Listen(GameEvent.EventCatchAnimalState, GameDataManage_EventCatchAnimal); } private void GameDataManage_EventCatchAnimal(int obj) { if (obj == 1) { Quad3.SetActive(true); Quad3.GetComponent().StartMove(); Quad4.SetActive(false); Quad5.SetActive(false); Quad6.SetActive(false); } else if (obj == 2) { Quad3.SetActive(false); Quad4.SetActive(true); Quad4.GetComponent().StartMove(); Quad5.SetActive(false); Quad6.SetActive(false); } else if (obj == 3) { Quad3.SetActive(false); Quad4.SetActive(false); Quad5.SetActive(true); Quad5.GetComponent().StartMove(); } else if (obj == 4) { Quad3.SetActive(false); Quad4.SetActive(false); Quad6.SetActive(true); Quad6.GetComponent().StartMove(); } } }