public void CreateNPC(GameObject prefab, Character.BalanceInfo balanceInfo, BalanceInfo tileInfo) { npc = Instantiate(prefab, transform).GetComponentInChildren <Character>(); npc.InitBalancing(balanceInfo); npc.transform.parent.localPosition = new Vector3(.8f, 1.0f, -1.0f); this.tileInfo = tileInfo; }
private void Awake() { DontDestroyOnLoad(gameObject); BalanceInfos = new Character.BalanceInfo[monsterPrefabs.Length]; TileInfos = new Tile.BalanceInfo[9]; for (int i = 0; i < TileInfos.Length; ++i) { TileInfos[i] = new Tile.BalanceInfo(); } InitFixed(); }