Exemplo n.º 1
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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
        }
Exemplo n.º 4
0
        public BattleGame(BattleGameData gameData, Random r, BattleSceneControllerScript gameScript)
        {
            this.gameControllerScript = gameScript;

            this.gameData = gameData;

            this.r = r;

            battleLog = new BattleLog();

            LoadBoardFromData();
            LoadCharactersFromData();

            StartBattle();
        }
Exemplo n.º 5
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;
        }
Exemplo n.º 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);
        }