コード例 #1
0
ファイル: GameManager.cs プロジェクト: DailySoccer/Boomons
    //========================================================

    #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
ファイル: PathSolver.cs プロジェクト: DailySoccer/Boomons
 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;
    }