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); }
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); }