IEnumerator LoadInitialData() { string path = "Object/Tablet/TabletCharacter"; yield return(StartCoroutine(ResourceLoader.Instance.Load <GameObject>(path, o => { tabletCharacter = Instantiate(o) as GameObject; tabletCharacter.transform.position = new Vector3(0, 0, 0); camera = tabletCharacter.transform.GetChild(0).GetComponent <Camera_Controller>(); camera.InitCamera(); effect = tabletCharacter.transform.GetChild(1).gameObject; schedule_Controller = tabletCharacter.transform.GetChild(2).GetComponent <Schedule_Controller>(); }))); path = "Object/Situation/Situation"; yield return(StartCoroutine(ResourceLoader.Instance.Load <GameObject>(path, o => { var inGameObject = Instantiate(o) as GameObject; inGameObject.transform.position = new Vector3(0, 0, 0); situation_Controller = inGameObject.GetComponent <Situation_Controller>(); }))); SetLoadComplete(); }
public void SetCharacter(GameObject effect, Schedule_Controller schedule) { animator.runtimeAnimatorController = NewAniController; Effect = effect; Schedule = schedule; }