示例#1
0
        private void initBattleViews()
        {
            GameObject battleViewObj = GameObject.Instantiate(Resources.Load("battle/BattleView", typeof(GameObject))) as GameObject;
            battleViewObj.transform.SetParent(transform);
            battleViewObj.transform.localScale = Vector3.one;
            battleViewObj.transform.localPosition = Positions.CENTER;

            battleView = battleViewObj.GetComponent<BattleView>();
            battleView.initBattle(playerModel, enemyModel);
        }
示例#2
0
        private void initBattleViews()
        {
            GameObject battleViewObj = GameObject.Instantiate(Resources.Load("battle/BattleView", typeof(GameObject))) as GameObject;

            battleViewObj.transform.SetParent(transform);
            battleViewObj.transform.localScale    = Vector3.one;
            battleViewObj.transform.localPosition = Positions.CENTER;

            battleView = battleViewObj.GetComponent <BattleView>();
            battleView.initBattle(playerModel, enemyModel);
        }