//======================================================== #region Private Methods private void SpawnBoomon(BoomonRole boomonRole, Transform spawner) { if (boomonRole == BoomonRole.None) { Debug.LogError("GameManager::SpawnBoomon>> Boomon role not defined!!", this); return; } if (Boomon != null) { Destroy(Boomon.gameObject); } string boomonPath = PathSolver.Instance.GetBoomonPath(boomonRole, PathSolver.InstanceType.Controllable); var prefab = Resources.Load <GameObject>(boomonPath); var boomonGo = Instantiate(prefab, spawner.position, spawner.rotation); Boomon = boomonGo.GetComponent <BoomonController>(); MetaManager.Instance.Get <ObjectTouchManager>().enabled = true; }
public string GetBoomonPath(BoomonRole role, InstanceType instanceType) { return(string.Format(_boomonPathFormat, instanceType, role)); }
//========================================== #region Public Methods public void Setup(BoomonRole role) { BoomonRole = role; }