public Battle(EncounterType encounter, params Puppet[] puppets) { if (puppets.Length < 1) { throw new Exception("Can't start a battle without a party!"); } else if (puppets.Length > PARTY_SIZE) { throw new Exception($"Can't start battle w/ {puppets.Length} puppets - larger than {PARTY_SIZE}"); } foreach (var p in puppets) { if (p.State == PuppetState.New) { throw new Exception("Shouldn't be starting a battle w/ a new puppet"); } // don't ask why this exception is here or what dumb, dumb things happened that make this an error // we're explicitly looking for Party.Add(p); } Encounter = encounter; var enemies = EncounterTable.Get(Encounter).Enemies; Enemies = new Enemy[enemies.Length]; for (int i = 0; i < Enemies.Length; i++) { Enemies[i] = EnemyTable.Get(enemies[i]).Instantiate(); } }
/* * 初期化 * プレイヤーと敵を生成 * カメラの設定 * 後々テーブルで敵の数などを決めれるようにする */ void Start() { // プレイヤーの生成 player = Instantiate(playerPrefab, new Vector3(PLAYER_POSITION, 0.0f, 0.0f), Quaternion.Euler(0, 90, 0)) as BattlePlayer; PlayerStatesData stateData = GlobalDataManager.GetGlobalData().LoadPlayerStatesData(); if (stateData == null) { player.STATES = GlobalDataManager.GetGlobalData().GetDataBase().GetPlayerStates(1); player.HP = player.STATES.HP; } else { player.STATES = GlobalDataManager.GetGlobalData().GetDataBase().GetPlayerStates(stateData.LV); player.STATES.HP = stateData.HP; player.HP = stateData.HP; player.STATES.MP = stateData.MP; player.STATES.EXP = stateData.EXP; } canvasManager.CreateStatesUI(player, true); // エネミーの生成 EnemyTable table = GlobalDataManager.GetGlobalData().GetEnemyTable().GetEnemyTable((int)Table.LEVEL.EASY); int enemy_num = table.NUM; for (int i = 0; i < enemy_num; i++) { BattleEnemy enemy = Instantiate(enemyPrefab, new Vector3((i * 0.3f) + 0.3f, 0.0f, 0.0f), Quaternion.Euler(0, 270, 0)) as BattleEnemy; enemy.STATES = GlobalDataManager.GetGlobalData().GetDataBase().GetSkeletonStates(table.LEVEL); enemy.HP = enemy.STATES.HP; enemy.Manager = this; enemy.Player = player; enemy.ID = i; enemyList.Add(enemy); //canvasManager.CreateStatesUI(enemy); targetList.Add(i); } player.Manager = this; player.Enemy = enemyList[player.TargetID]; // カメラ位置の設定 centerPoint.Player = player.transform; centerPoint.TargetEnemy = enemyList[player.TargetID].transform; // ターゲットポインター targetPointer = Instantiate(targetPointerPrefab); targetPointer.Target = player.Enemy; StartCoroutine(GameStart()); }
/* * 敵テーブルのデータベースをCSVから読み込む */ public List <EnemyTable> LoadEnemyTableDataCSV() { Debug.Log("敵テーブルのデータベースの読み込みを開始します。"); TextAsset csv = Resources.Load("enemytable") as TextAsset; StringReader reader = new StringReader(csv.text); List <EnemyTable> datalist = new List <EnemyTable>(); while (reader.Peek() > -1) { string line = reader.ReadLine(); if (line.Contains("NUM")) { continue; } string[] values = line.Split(','); EnemyTable data = new EnemyTable(); for (int i = 0; i < values.Length; i++) { switch ((Table.CATEGORY)i) { case Table.CATEGORY.NUM: data.NUM = int.Parse(values[i]); break; case Table.CATEGORY.MIN_LV: data.MIN_LV = int.Parse(values[i]); break; case Table.CATEGORY.MAX_LV: data.MAX_LV = int.Parse(values[i]); break; case Table.CATEGORY.TYPE: data.TYPE = int.Parse(values[i]); break; default: break; } } Debug.Log("出現数 : " + data.NUM + ", 最低レベル : " + data.MIN_LV + ", 最大レベル : " + data.MAX_LV + ", 種類 : " + data.TYPE); datalist.Add(data); } Debug.Log("敵テーブルのデータベースの読み込みを終了しました。"); return(datalist); }
void Awake() { if (instance == null) { instance = this; Enemy = new EnemyTable(); Item = new ItemTable(); Level = new LevelTable(); Player = new PlayerTable(); Sheet1 = new Sheet1Table(); } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
public GameEnemyInstance spawnSoldier(string attackerTemplate, int spawnZone, byte order) { SwarmOrder orderObj = createOrder(0, order, spawnZone); GameEnemy template = EnemyTable.getInstance().getEnemyByName(attackerTemplate); if (template == null) { return(null); } GameEnemyInstance attacker = new GameEnemyInstance(IDFactory.getNextID(), template, spawnZone); World.getInstance().registerEnemy(attacker); Vector3 spawnPosition = _positions [_computedPaths [spawnZone].getSpawnPointIndex()]; attacker.getGameInstance().transform.position = spawnPosition; attacker.getGameInstance().GetComponent <EnemyController> ().setOrder(orderObj); return(attacker); }
void TestExample() { var EnemyAll = EnemyTable.GetAll(); var EnemyIndex = EnemyTable.GetByIndex(0); var EnemyKey = EnemyTable.GetByKey("200001"); var EnemyList = EnemyTable.GetAllList(); Debug.Log(" < ---EnemyTable Dictionary --->"); foreach (var item in EnemyAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_Name = {2},m_BaseHealth = {3},m_PlayerHealth = {4},m_BaseDefense = {5},", item.Key, item.Value.m_ID, item.Value.m_Name, item.Value.m_BaseHealth, item.Value.m_PlayerHealth, item.Value.m_BaseDefense)); } Debug.Log(" < ---EnemyTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_PlayerHealth = {3},m_BaseDefense = {4},", EnemyIndex.m_ID, EnemyIndex.m_Name, EnemyIndex.m_BaseHealth, EnemyIndex.m_PlayerHealth, EnemyIndex.m_BaseDefense)); Debug.Log(" < ---EnemyTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_PlayerHealth = {3},m_BaseDefense = {4},", EnemyKey.m_ID, EnemyKey.m_Name, EnemyKey.m_BaseHealth, EnemyKey.m_PlayerHealth, EnemyKey.m_BaseDefense)); Debug.Log(" < ---EnemyTable List --->"); foreach (var item in EnemyList) { Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_PlayerHealth = {3},m_BaseDefense = {4},", item.m_ID, item.m_Name, item.m_BaseHealth, item.m_PlayerHealth, item.m_BaseDefense)); } var ItemAll = ItemTable.GetAll(); var ItemIndex = ItemTable.GetByIndex(0); var ItemKey = ItemTable.GetByKey(30000001); var ItemList = ItemTable.GetAllList(); Debug.Log(" < ---ItemTable Dictionary --->"); foreach (var item in ItemAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_AddHealth = {2},m_AddAttack = {3},m_AddDefense = {4},m_Name = {5},", item.Key, item.Value.m_ID, item.Value.m_AddHealth, item.Value.m_AddAttack, item.Value.m_AddDefense, item.Value.m_Name)); } Debug.Log(" < ---ItemTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},m_Name = {4},", ItemIndex.m_ID, ItemIndex.m_AddHealth, ItemIndex.m_AddAttack, ItemIndex.m_AddDefense, ItemIndex.m_Name)); Debug.Log(" < ---ItemTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},m_Name = {4},", ItemKey.m_ID, ItemKey.m_AddHealth, ItemKey.m_AddAttack, ItemKey.m_AddDefense, ItemKey.m_Name)); Debug.Log(" < ---ItemTable List --->"); foreach (var item in ItemList) { Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},m_Name = {4},", item.m_ID, item.m_AddHealth, item.m_AddAttack, item.m_AddDefense, item.m_Name)); } var LevelAll = LevelTable.GetAll(); var LevelIndex = LevelTable.GetByIndex(0); var LevelKey = LevelTable.GetByKey(1); var LevelList = LevelTable.GetAllList(); Debug.Log(" < ---LevelTable Dictionary --->"); foreach (var item in LevelAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_AddHealth = {2},m_AddAttack = {3},m_AddDefense = {4},", item.Key, item.Value.m_ID, item.Value.m_AddHealth, item.Value.m_AddAttack, item.Value.m_AddDefense)); } Debug.Log(" < ---LevelTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},", LevelIndex.m_ID, LevelIndex.m_AddHealth, LevelIndex.m_AddAttack, LevelIndex.m_AddDefense)); Debug.Log(" < ---LevelTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},", LevelKey.m_ID, LevelKey.m_AddHealth, LevelKey.m_AddAttack, LevelKey.m_AddDefense)); Debug.Log(" < ---LevelTable List --->"); foreach (var item in LevelList) { Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},", item.m_ID, item.m_AddHealth, item.m_AddAttack, item.m_AddDefense)); } var PlayerAll = PlayerTable.GetAll(); var PlayerIndex = PlayerTable.GetByIndex(0); var PlayerKey = PlayerTable.GetByKey(100001); var PlayerList = PlayerTable.GetAllList(); Debug.Log(" < ---PlayerTable Dictionary --->"); foreach (var item in PlayerAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_Name = {2},m_BaseHealth = {3},m_BaseAttack = {4},m_BaseDefense = {5},", item.Key, item.Value.m_ID, item.Value.m_Name, item.Value.m_BaseHealth, item.Value.m_BaseAttack, item.Value.m_BaseDefense)); } Debug.Log(" < ---PlayerTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_BaseAttack = {3},m_BaseDefense = {4},", PlayerIndex.m_ID, PlayerIndex.m_Name, PlayerIndex.m_BaseHealth, PlayerIndex.m_BaseAttack, PlayerIndex.m_BaseDefense)); Debug.Log(" < ---PlayerTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_BaseAttack = {3},m_BaseDefense = {4},", PlayerKey.m_ID, PlayerKey.m_Name, PlayerKey.m_BaseHealth, PlayerKey.m_BaseAttack, PlayerKey.m_BaseDefense)); Debug.Log(" < ---PlayerTable List --->"); foreach (var item in PlayerList) { Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_BaseAttack = {3},m_BaseDefense = {4},", item.m_ID, item.m_Name, item.m_BaseHealth, item.m_BaseAttack, item.m_BaseDefense)); } }
void OnGUI() { GUILayout.BeginArea(m_rectSheet, GUI.skin.box); { m_scrollPosSheet = GUILayout.BeginScrollView(m_scrollPosSheet, true, true); { GUILayout.BeginHorizontal(GUI.skin.button); { if (GUILayout.Button("Enemy", GUILayout.Width(200), GUILayout.Height(30))) { Init(); canShowEnemy = true; } if (GUILayout.Button("Item", GUILayout.Width(200), GUILayout.Height(30))) { Init(); canShowItem = true; } if (GUILayout.Button("Level", GUILayout.Width(200), GUILayout.Height(30))) { Init(); canShowLevel = true; } if (GUILayout.Button("Player", GUILayout.Width(200), GUILayout.Height(30))) { Init(); canShowPlayer = true; } } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); } GUILayout.EndArea(); if (canShowEnemy) { GUILayout.BeginArea(m_rectTable, GUI.skin.box); { if (EnemyTable.GetAll().Count > 0) { m_scrollPosTable = GUILayout.BeginScrollView(m_scrollPosTable, true, true); { GUILayout.BeginVertical(GUI.skin.box); { foreach (var info in EnemyTable.GetAll()) { GUILayout.BeginHorizontal(GUI.skin.box); { GUILayout.TextField("Key: " + info.Key.ToString(), GUI.skin.box, GUILayout.Width(200), GUILayout.Height(30)); GUILayout.TextField("", GUI.skin.box, GUILayout.Width(30), GUILayout.Height(30)); GUILayout.TextField("ID: " + info.Value.m_ID.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("Name: " + info.Value.m_Name.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("BaseHealth: " + info.Value.m_BaseHealth.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("PlayerHealth: " + info.Value.m_PlayerHealth.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("BaseDefense: " + info.Value.m_BaseDefense.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); } GUILayout.EndHorizontal(); } } GUILayout.EndVertical(); } GUILayout.EndScrollView(); } } GUILayout.EndArea(); } if (canShowItem) { GUILayout.BeginArea(m_rectTable, GUI.skin.box); { if (ItemTable.GetAll().Count > 0) { m_scrollPosTable = GUILayout.BeginScrollView(m_scrollPosTable, true, true); { GUILayout.BeginVertical(GUI.skin.box); { foreach (var info in ItemTable.GetAll()) { GUILayout.BeginHorizontal(GUI.skin.box); { GUILayout.TextField("Key: " + info.Key.ToString(), GUI.skin.box, GUILayout.Width(200), GUILayout.Height(30)); GUILayout.TextField("", GUI.skin.box, GUILayout.Width(30), GUILayout.Height(30)); GUILayout.TextField("ID: " + info.Value.m_ID.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("AddHealth: " + info.Value.m_AddHealth.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("AddAttack: " + info.Value.m_AddAttack.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("AddDefense: " + info.Value.m_AddDefense.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("Name: " + info.Value.m_Name.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); } GUILayout.EndHorizontal(); } } GUILayout.EndVertical(); } GUILayout.EndScrollView(); } } GUILayout.EndArea(); } if (canShowLevel) { GUILayout.BeginArea(m_rectTable, GUI.skin.box); { if (LevelTable.GetAll().Count > 0) { m_scrollPosTable = GUILayout.BeginScrollView(m_scrollPosTable, true, true); { GUILayout.BeginVertical(GUI.skin.box); { foreach (var info in LevelTable.GetAll()) { GUILayout.BeginHorizontal(GUI.skin.box); { GUILayout.TextField("Key: " + info.Key.ToString(), GUI.skin.box, GUILayout.Width(200), GUILayout.Height(30)); GUILayout.TextField("", GUI.skin.box, GUILayout.Width(30), GUILayout.Height(30)); GUILayout.TextField("ID: " + info.Value.m_ID.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("AddHealth: " + info.Value.m_AddHealth.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("AddAttack: " + info.Value.m_AddAttack.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("AddDefense: " + info.Value.m_AddDefense.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); } GUILayout.EndHorizontal(); } } GUILayout.EndVertical(); } GUILayout.EndScrollView(); } } GUILayout.EndArea(); } if (canShowPlayer) { GUILayout.BeginArea(m_rectTable, GUI.skin.box); { if (PlayerTable.GetAll().Count > 0) { m_scrollPosTable = GUILayout.BeginScrollView(m_scrollPosTable, true, true); { GUILayout.BeginVertical(GUI.skin.box); { foreach (var info in PlayerTable.GetAll()) { GUILayout.BeginHorizontal(GUI.skin.box); { GUILayout.TextField("Key: " + info.Key.ToString(), GUI.skin.box, GUILayout.Width(200), GUILayout.Height(30)); GUILayout.TextField("", GUI.skin.box, GUILayout.Width(30), GUILayout.Height(30)); GUILayout.TextField("ID: " + info.Value.m_ID.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("Name: " + info.Value.m_Name.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("BaseHealth: " + info.Value.m_BaseHealth.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("BaseAttack: " + info.Value.m_BaseAttack.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); GUILayout.TextField("BaseDefense: " + info.Value.m_BaseDefense.ToString(), GUI.skin.box, GUILayout.Width(150), GUILayout.Height(30)); } GUILayout.EndHorizontal(); } } GUILayout.EndVertical(); } GUILayout.EndScrollView(); } } GUILayout.EndArea(); } }
// Use this for initialization void Start() { Table = new EnemyTable(); Count = Table.getRandomEnemyCreateFream(); }
void TestExample() { var EnemyAll = EnemyTable.GetAll(); var EnemyIndex = EnemyTable.GetByIndex(0); var EnemyKey = EnemyTable.GetByKey("200001"); var EnemyList = EnemyTable.GetAllList(); Debug.Log(" < ---EnemyTable Dictionary --->"); foreach (var item in EnemyAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_Name = {2},m_BaseHealth = {3},m_PlayerHealth = {4},m_BaseDefense = {5},", item.Key, item.Value.m_ID, item.Value.m_Name, item.Value.m_BaseHealth, item.Value.m_PlayerHealth, item.Value.m_BaseDefense)); } Debug.Log(" < ---EnemyTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_PlayerHealth = {3},m_BaseDefense = {4},", EnemyIndex.m_ID, EnemyIndex.m_Name, EnemyIndex.m_BaseHealth, EnemyIndex.m_PlayerHealth, EnemyIndex.m_BaseDefense)); Debug.Log(" < ---EnemyTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_PlayerHealth = {3},m_BaseDefense = {4},", EnemyKey.m_ID, EnemyKey.m_Name, EnemyKey.m_BaseHealth, EnemyKey.m_PlayerHealth, EnemyKey.m_BaseDefense)); Debug.Log(" < ---EnemyTable List --->"); foreach (var item in EnemyList) { Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_PlayerHealth = {3},m_BaseDefense = {4},", item.m_ID, item.m_Name, item.m_BaseHealth, item.m_PlayerHealth, item.m_BaseDefense)); } var ItemAll = ItemTable.GetAll(); var ItemIndex = ItemTable.GetByIndex(0); var ItemKey = ItemTable.GetByKey(30000001); var ItemList = ItemTable.GetAllList(); Debug.Log(" < ---ItemTable Dictionary --->"); foreach (var item in ItemAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_AddHealth = {2},m_AddAttack = {3},m_AddDefense = {4},m_Name = {5},", item.Key, item.Value.m_ID, item.Value.m_AddHealth, item.Value.m_AddAttack, item.Value.m_AddDefense, item.Value.m_Name)); } Debug.Log(" < ---ItemTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},m_Name = {4},", ItemIndex.m_ID, ItemIndex.m_AddHealth, ItemIndex.m_AddAttack, ItemIndex.m_AddDefense, ItemIndex.m_Name)); Debug.Log(" < ---ItemTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},m_Name = {4},", ItemKey.m_ID, ItemKey.m_AddHealth, ItemKey.m_AddAttack, ItemKey.m_AddDefense, ItemKey.m_Name)); Debug.Log(" < ---ItemTable List --->"); foreach (var item in ItemList) { Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},m_Name = {4},", item.m_ID, item.m_AddHealth, item.m_AddAttack, item.m_AddDefense, item.m_Name)); } var LevelAll = LevelTable.GetAll(); var LevelIndex = LevelTable.GetByIndex(0); var LevelKey = LevelTable.GetByKey(1); var LevelList = LevelTable.GetAllList(); Debug.Log(" < ---LevelTable Dictionary --->"); foreach (var item in LevelAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_AddHealth = {2},m_AddAttack = {3},m_AddDefense = {4},", item.Key, item.Value.m_ID, item.Value.m_AddHealth, item.Value.m_AddAttack, item.Value.m_AddDefense)); } Debug.Log(" < ---LevelTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},", LevelIndex.m_ID, LevelIndex.m_AddHealth, LevelIndex.m_AddAttack, LevelIndex.m_AddDefense)); Debug.Log(" < ---LevelTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},", LevelKey.m_ID, LevelKey.m_AddHealth, LevelKey.m_AddAttack, LevelKey.m_AddDefense)); Debug.Log(" < ---LevelTable List --->"); foreach (var item in LevelList) { Debug.Log(string.Format("m_ID = {0},m_AddHealth = {1},m_AddAttack = {2},m_AddDefense = {3},", item.m_ID, item.m_AddHealth, item.m_AddAttack, item.m_AddDefense)); } var PlayerAll = PlayerTable.GetAll(); var PlayerIndex = PlayerTable.GetByIndex(0); var PlayerKey = PlayerTable.GetByKey(100001); var PlayerList = PlayerTable.GetAllList(); Debug.Log(" < ---PlayerTable Dictionary --->"); foreach (var item in PlayerAll) { Debug.Log(string.Format("Key = {0}, m_ID = {1},m_Name = {2},m_BaseHealth = {3},m_BaseAttack = {4},m_BaseDefense = {5},", item.Key, item.Value.m_ID, item.Value.m_Name, item.Value.m_BaseHealth, item.Value.m_BaseAttack, item.Value.m_BaseDefense)); } Debug.Log(" < ---PlayerTable Dictionary Index --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_BaseAttack = {3},m_BaseDefense = {4},", PlayerIndex.m_ID, PlayerIndex.m_Name, PlayerIndex.m_BaseHealth, PlayerIndex.m_BaseAttack, PlayerIndex.m_BaseDefense)); Debug.Log(" < ---PlayerTable Dictionary Key --->"); Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_BaseAttack = {3},m_BaseDefense = {4},", PlayerKey.m_ID, PlayerKey.m_Name, PlayerKey.m_BaseHealth, PlayerKey.m_BaseAttack, PlayerKey.m_BaseDefense)); Debug.Log(" < ---PlayerTable List --->"); foreach (var item in PlayerList) { Debug.Log(string.Format("m_ID = {0},m_Name = {1},m_BaseHealth = {2},m_BaseAttack = {3},m_BaseDefense = {4},", item.m_ID, item.m_Name, item.m_BaseHealth, item.m_BaseAttack, item.m_BaseDefense)); } var Sheet1All = Sheet1Table.GetAll(); var Sheet1Index = Sheet1Table.GetByIndex(0); var Sheet1Key = Sheet1Table.GetByKey(1601); var Sheet1List = Sheet1Table.GetAllList(); Debug.Log(" < ---Sheet1Table Dictionary --->"); foreach (var item in Sheet1All) { Debug.Log(string.Format("Key = {0}, m_name = {1},m_targetObject_Type = {2},m_behaviorProperties1 = {3},m_behaviorProperties2 = {4},m_value1 = {5},m_value2 = {6},m_behaviorCondition1 = {7},m_behaviorCondition2 = {8},m_behaviorType = {9},m_behaviorRate = {10},", item.Key, item.Value.m_name, item.Value.m_targetObject_Type, item.Value.m_behaviorProperties1, item.Value.m_behaviorProperties2, item.Value.m_value1, item.Value.m_value2, item.Value.m_behaviorCondition1, item.Value.m_behaviorCondition2, item.Value.m_behaviorType, item.Value.m_behaviorRate)); } Debug.Log(" < ---Sheet1Table Dictionary Index --->"); Debug.Log(string.Format("m_name = {0},m_targetObject_Type = {1},m_behaviorProperties1 = {2},m_behaviorProperties2 = {3},m_value1 = {4},m_value2 = {5},m_behaviorCondition1 = {6},m_behaviorCondition2 = {7},m_behaviorType = {8},m_behaviorRate = {9},", Sheet1Index.m_name, Sheet1Index.m_targetObject_Type, Sheet1Index.m_behaviorProperties1, Sheet1Index.m_behaviorProperties2, Sheet1Index.m_value1, Sheet1Index.m_value2, Sheet1Index.m_behaviorCondition1, Sheet1Index.m_behaviorCondition2, Sheet1Index.m_behaviorType, Sheet1Index.m_behaviorRate)); Debug.Log(" < ---Sheet1Table Dictionary Key --->"); Debug.Log(string.Format("m_name = {0},m_targetObject_Type = {1},m_behaviorProperties1 = {2},m_behaviorProperties2 = {3},m_value1 = {4},m_value2 = {5},m_behaviorCondition1 = {6},m_behaviorCondition2 = {7},m_behaviorType = {8},m_behaviorRate = {9},", Sheet1Key.m_name, Sheet1Key.m_targetObject_Type, Sheet1Key.m_behaviorProperties1, Sheet1Key.m_behaviorProperties2, Sheet1Key.m_value1, Sheet1Key.m_value2, Sheet1Key.m_behaviorCondition1, Sheet1Key.m_behaviorCondition2, Sheet1Key.m_behaviorType, Sheet1Key.m_behaviorRate)); Debug.Log(" < ---Sheet1Table List --->"); foreach (var item in Sheet1List) { Debug.Log(string.Format("m_name = {0},m_targetObject_Type = {1},m_behaviorProperties1 = {2},m_behaviorProperties2 = {3},m_value1 = {4},m_value2 = {5},m_behaviorCondition1 = {6},m_behaviorCondition2 = {7},m_behaviorType = {8},m_behaviorRate = {9},", item.m_name, item.m_targetObject_Type, item.m_behaviorProperties1, item.m_behaviorProperties2, item.m_value1, item.m_value2, item.m_behaviorCondition1, item.m_behaviorCondition2, item.m_behaviorType, item.m_behaviorRate)); } }
public void Initialize() { Clear(); Singleton <AbilityDataTable> .Create(); Singleton <AbilityTable> .Create(); Singleton <AudioSettingTable> .Create(); Singleton <AvatarTable> .Create(); Singleton <CreateEquipItemTable> .Create(); Singleton <CreatePickupItemTable> .Create(); Singleton <DeliveryRewardTable> .Create(); Singleton <DeliveryTable> .Create(); Singleton <EnemyHitMaterialTable> .Create(); Singleton <EnemyHitTypeTable> .Create(); Singleton <EnemyPersonalityTable> .Create(); Singleton <EnemyTable> .Create(); Singleton <EquipItemExceedParamTable> .Create(); Singleton <EquipItemExceedTable> .Create(); Singleton <EquipItemTable> .Create(); Singleton <EquipModelTable> .Create(); Singleton <EvolveEquipItemTable> .Create(); Singleton <FieldMapTable> .Create(); Singleton <GrowEnemyTable> .Create(); Singleton <GrowEquipItemTable> .Create(); Singleton <GrowSkillItemTable> .Create(); Singleton <ItemTable> .Create(); Singleton <ItemToFieldTable> .Create(); Singleton <ItemToQuestTable> .Create(); Singleton <NPCMessageTable> .Create(); Singleton <NPCTable> .Create(); Singleton <QuestTable> .Create(); Singleton <QuestToFieldTable> .Create(); Singleton <RegionTable> .Create(); Singleton <SETable> .Create(); Singleton <SkillItemTable> .Create(); Singleton <ExceedSkillItemTable> .Create(); Singleton <StageTable> .Create(); Singleton <StampTable> .Create(); Singleton <StringTable> .Create(); Singleton <TaskTable> .Create(); Singleton <TutorialMessageTable> .Create(); Singleton <UserLevelTable> .Create(); Singleton <PointShopGetPointTable> .Create(); Singleton <DegreeTable> .Create(); Singleton <DamageDistanceTable> .Create(); Singleton <GachaSearchEnemyTable> .Create(); Singleton <HomeThemeTable> .Create(); Singleton <CountdownTable> .Create(); Singleton <BuffTable> .Create(); Singleton <FieldBuffTable> .Create(); Singleton <LimitedEquipItemExceedTable> .Create(); Singleton <PlayDataTable> .Create(); Singleton <ArenaTable> .Create(); Singleton <EnemyAngryTable> .Create(); Singleton <EnemyActionTable> .Create(); Singleton <NpcLevelTable> .Create(); Singleton <FieldMapEnemyPopTimeZoneTable> .Create(); RegisterTable("AbilityDataTable", Singleton <AbilityDataTable> .I, null); RegisterTable("AbilityTable", Singleton <AbilityTable> .I, null); RegisterTable("AudioSettingTable", Singleton <AudioSettingTable> .I, null); RegisterTable("AvatarTable", Singleton <AvatarTable> .I, null); RegisterTable("CreateEquipItemTable", Singleton <CreateEquipItemTable> .I, null); RegisterTable("CreatePickupItemTable", Singleton <CreatePickupItemTable> .I, null); RegisterTable("DeliveryRewardTable", Singleton <DeliveryRewardTable> .I, null); RegisterTable("DeliveryTable", Singleton <DeliveryTable> .I, null); EnemyTable i = Singleton <EnemyTable> .I; RegisterTable("EnemyTable", new DataTableInterfaceProxy(i.CreateTable), null); RegisterTable("EquipItemExceedParamTable", Singleton <EquipItemExceedParamTable> .I, null); RegisterTable("EquipItemExceedTable", Singleton <EquipItemExceedTable> .I, null); EquipItemTable i2 = Singleton <EquipItemTable> .I; RegisterTable("EquipItemTable", new DataTableInterfaceProxy(i2.CreateTable), null); RegisterTable("EquipModelTable", Singleton <EquipModelTable> .I, null); RegisterTable("EvolveEquipItemTable", Singleton <EvolveEquipItemTable> .I, null); RegisterTable("GrowEnemyTable", Singleton <GrowEnemyTable> .I, null); GrowSkillItemTable i3 = Singleton <GrowSkillItemTable> .I; RegisterTable("GrowSkillItemTable", new DataTableInterfaceProxy(i3.CreateTable), null); RegisterTable("ItemTable", Singleton <ItemTable> .I, null); RegisterTable("NPCMessageTable", Singleton <NPCMessageTable> .I, null); RegisterTable("NPCTable", Singleton <NPCTable> .I, null); RegisterTable("SETable", Singleton <SETable> .I, null); RegisterTable("SkillItemTable", Singleton <SkillItemTable> .I, null); RegisterTable("ExceedSkillItemTable", Singleton <ExceedSkillItemTable> .I, null); RegisterTable("StageTable", Singleton <StageTable> .I, null); RegisterTable("StampTypeTable", Singleton <StampTable> .I, null); RegisterTable("StringTable", Singleton <StringTable> .I, null); RegisterTable("TaskTable", Singleton <TaskTable> .I, null); RegisterTable("TutorialMessageTable", Singleton <TutorialMessageTable> .I, null); RegisterTable("UserLevelTable", Singleton <UserLevelTable> .I, null); RegisterTable("GachaSearchEnemyTable", Singleton <GachaSearchEnemyTable> .I, null); RegisterTable("HomeThemeTable", Singleton <HomeThemeTable> .I, null); RegisterTable("CountdownTable", Singleton <CountdownTable> .I, null); RegisterTable("LimitedEquipItemExceedTable", Singleton <LimitedEquipItemExceedTable> .I, "ItemTable"); RegisterTable("PlayDataTable", Singleton <PlayDataTable> .I, null); RegisterTable("ArenaTable", Singleton <ArenaTable> .I, null); RegisterTable("EnemyAngryTable", Singleton <EnemyAngryTable> .I, null); RegisterTable("EnemyActionTable", Singleton <EnemyActionTable> .I, null); RegisterTable("NpcLevelTable", Singleton <NpcLevelTable> .I, null); RegisterTable("GrowEquipItemTable", new DataTableInterfaceProxy(Singleton <GrowEquipItemTable> .I.CreateGrowTable), "ItemTable"); RegisterTable("GrowEquipItemNeedItemTable", new DataTableInterfaceProxy(Singleton <GrowEquipItemTable> .I.CreateNeedTable), "ItemTable"); RegisterTable("GrowEquipItemNeedUniqueItemTable", new DataTableInterfaceProxy(Singleton <GrowEquipItemTable> .I.CreateNeedUniqueTable), "ItemTable"); RegisterTable("QuestTable", new DataTableInterfaceProxy(delegate(string csv) { Singleton <QuestTable> .I.CreateQuestTable(csv); afterProcesses.Add(delegate { Singleton <QuestTable> .I.InitQuestDependencyData(); }); }), null); RegisterTable("MissionTable", new DataTableInterfaceProxy(Singleton <QuestTable> .I.CreateMissionTable), null); RegisterTable("RegionTable", Singleton <RegionTable> .I, null); RegisterTable("FieldMapTable", new DataTableInterfaceProxy(Singleton <FieldMapTable> .I.CreateFieldMapTable), null); RegisterTable("FieldMapPortalTable", new DataTableInterfaceProxy(Singleton <FieldMapTable> .I.CreatePortalTable), null); RegisterTable("FieldMapEnemyPopTable", new DataTableInterfaceProxy(Singleton <FieldMapTable> .I.CreateEnemyPopTable), null); RegisterTable("FieldMapGatherPointTable", new DataTableInterfaceProxy(Singleton <FieldMapTable> .I.CreateGatherPointTable), null); RegisterTable("FieldMapGatherPointViewTable", new DataTableInterfaceProxy(Singleton <FieldMapTable> .I.CreateGatherPointViewTable), null); RegisterTable("FieldMapGimmickPointTable", new DataTableInterfaceProxy(Singleton <FieldMapTable> .I.CreateGimmickPointTable), null); RegisterTable("FieldMapGimmickActionTable", new DataTableInterfaceProxy(Singleton <FieldMapTable> .I.CreateGimmickActionTable), null); RegisterTable("QuestToFieldTable", new DataTableInterfaceProxy(delegate(string csv) { Singleton <QuestToFieldTable> .I.CreateTable(csv); afterProcesses.Add(delegate { Singleton <QuestToFieldTable> .I.InitDependencyData(); }); }), null); RegisterTable("ItemToFieldTable", new DataTableInterfaceProxy(delegate(string csv) { Singleton <ItemToFieldTable> .I.CreateTable(csv); afterProcesses.Add(delegate { Singleton <ItemToFieldTable> .I.InitDependencyData(); }); }), null); RegisterTable("EnemyHitTypeTable", Singleton <EnemyHitTypeTable> .I, null); RegisterTable("EnemyHitMaterialTable", Singleton <EnemyHitMaterialTable> .I, "EnemyHitTypeTable"); RegisterTable("EnemyPersonalityTable", Singleton <EnemyPersonalityTable> .I, null); RegisterTable("PointShopGetPointTable", Singleton <PointShopGetPointTable> .I, null); RegisterTable("DegreeTable", Singleton <DegreeTable> .I, null); RegisterTable("DamageDistanceTable", Singleton <DamageDistanceTable> .I, null); RegisterTable("BuffTable", Singleton <BuffTable> .I, null); RegisterTable("FieldBuffTable", Singleton <FieldBuffTable> .I, null); RegisterTable("FieldMapEnemyPopTimeZoneTable", Singleton <FieldMapEnemyPopTimeZoneTable> .I, null); UpdateDependency(); }