基本
快速访问原生能力,服务端同理,服务端没有PID
python
class ClientBase(CommonBase, ClientSystem, Mixin, SdkInterface):
self.api = clientApi
self.cf = clientApi.GetEngineCompFactory()
self.LID = clientApi.GetLevelId()
self.game = clientApi.GetEngineCompFactory().CreateGame(self.LID) # type: GameComponentClient
self.PID = clientApi.GetLocalPlayerId()访问BI
又称中台,核心服务,BI系统
设计思想是将需要一个实例来处理的复用事务集成在BI。
python
class Server/ClientBase(CommonBase, ServerSystem, Mixin, SdkInterface):
def isBI(self):
return self.__class__.__name__ == 'BIServer'
def getBI(self):
# BI 是 builtin 的缩写
return serverApi.GetSystem(ModNameSpace, 'BIServer')