14 lines
548 B
Python
14 lines
548 B
Python
import asyncio
|
|
from threading import Thread
|
|
from game_server.srtools.server import run_flask
|
|
from game_server.net.gateway import KCPGateway
|
|
from utils.config import Config
|
|
from game_server.resource import ResourceManager
|
|
|
|
def fn_main():
|
|
try:
|
|
ResourceManager.instance().load_resources()
|
|
Thread(target=run_flask, args=(Config.SRToolsServer.IP, Config.SRToolsServer.Port), daemon=True).start()
|
|
asyncio.run(KCPGateway.new(Config.GameServer.IP, Config.GameServer.Port))
|
|
except Exception as e:
|
|
print(f"Error: {e}") |