コード例 #1
0
ファイル: BoardFactory.cs プロジェクト: mengtest/UnityRPG
        public static Board getBoardFromBattleGameData(BattleGameData battleGameData, BattleGame battleGame)
        {
            Board b = new Board(battleGame, battleGameData.tileMapData.battleTileArray.GetLength(0));
            b.board = copyTileArray(battleGameData.tileMapData.battleTileArray);

            return b;
        }
コード例 #2
0
        public static Board getBoardFromBattleGameData(BattleGameData battleGameData, BattleGame battleGame)
        {
            Board b = new Board(battleGame, battleGameData.tileMapData.battleTileArray.GetLength(0));

            b.board = copyTileArray(battleGameData.tileMapData.battleTileArray);

            return(b);
        }
コード例 #3
0
        public BattleGame(BattleGameData gameData, Random r, BattleSceneControllerScript gameScript)
        {
            this.gameControllerScript = gameScript;

            this.gameData = gameData;

            this.r = r;

            battleLog = new BattleLog();

            LoadBoardFromData();
            LoadCharactersFromData();

            StartBattle();
        }
コード例 #4
0
ファイル: BattleGame.cs プロジェクト: mengtest/UnityRPG
        public BattleGame(BattleGameData gameData, Random r, BattleSceneControllerScript gameScript)
        {
            this.gameControllerScript = gameScript;

            this.gameData = gameData;

            this.r = r;

            battleLog = new BattleLog();

            LoadBoardFromData();
            LoadCharactersFromData();

            StartBattle();
        }
コード例 #5
0
ファイル: BattleFactory.cs プロジェクト: mengtest/UnityRPG
        public static BattleGameData getBattleGameDataFromZoneTree(List<GameCharacter> playerCharacterList, BattleTree battleTree, GameDataSet gameDataSet, TileMapData tileMapData)
        {
            BattleGameData retval = new BattleGameData();

            retval.tileMapData = tileMapData;

            //load player

            retval.gameCharacterList.AddRange(playerCharacterList);

            //load enemies
            foreach (var enemyNode in battleTree.getEnemyNodeList())
            {
                if(gameDataSet.gameCharacterDataDictionary.ContainsKey(enemyNode.content.linkIndex)){
                       var enemyData = gameDataSet.gameCharacterDataDictionary[enemyNode.content.linkIndex];
                       retval.gameCharacterList.Add(CharacterFactory.getGameCharacterFromGameCharacterData(enemyData, gameDataSet));
                }
             
            }
            return retval;
        }
コード例 #6
0
        public static BattleGameData getBattleGameDataFromZoneTree(List <GameCharacter> playerCharacterList, BattleTree battleTree, GameDataSet gameDataSet, TileMapData tileMapData)
        {
            BattleGameData retval = new BattleGameData();

            retval.tileMapData = tileMapData;

            //load player

            retval.gameCharacterList.AddRange(playerCharacterList);

            //load enemies
            foreach (var enemyNode in battleTree.getEnemyNodeList())
            {
                if (gameDataSet.gameCharacterDataDictionary.ContainsKey(enemyNode.content.linkIndex))
                {
                    var enemyData = gameDataSet.gameCharacterDataDictionary[enemyNode.content.linkIndex];
                    retval.gameCharacterList.Add(CharacterFactory.getGameCharacterFromGameCharacterData(enemyData, gameDataSet));
                }
            }
            return(retval);
        }