Esempio n. 1
0
    public void StartNewCombat(GameData gameData)
    {
        Debug.Log("Starting new combat, enemy encountered!");
        // open websocket for combat
        combatSocket = new CombatSocket();
        combatSocket.StartConnection(this, gameData.playerId);

        combatData    = CombatService.startNewCombat(gameData.playerId, gameData.gameId, gameData.combatEncounterId);
        this.gameData = gameData;
        playerId      = gameData.playerId;
        gameId        = gameData.gameId;
        encounterId   = gameData.combatEncounterId;
        combatEnd     = false;

        initGrid();
    }