예제 #1
0
    //========================================================

    #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;
    }
예제 #2
0
 public string GetBoomonPath(BoomonRole role, InstanceType instanceType)
 {
     return(string.Format(_boomonPathFormat, instanceType, role));
 }
예제 #3
0
    //==========================================

    #region Public Methods

    public void Setup(BoomonRole role)
    {
        BoomonRole = role;
    }