public static async ETTask <long> Get(this LocationProxyComponent self, long key)
        {
            if (key == 0)
            {
                throw new Exception($"get location key 0");
            }
            ObjectGetResponse response =
                (ObjectGetResponse)await MessageHelper.CallActor(
                    StartSceneConfigCategory.Instance.LocationConfig.SceneId,
                    new ObjectGetRequest()
            {
                Key = key
            });

            return(response.InstanceId);
        }
示例#2
0
        public static async ETTask <long> Get(this LocationProxyComponent self, long key)
        {
            if (key == 0)
            {
                throw new Exception($"get location key 0");
            }

            // location server配置到共享区,一个大战区可以配置N多个location server,这里暂时为1
            ObjectGetResponse response =
                (ObjectGetResponse)await MessageHelper.CallActor(GetLocationSceneId(key),
                                                                 new ObjectGetRequest()
            {
                Key = key
            });

            return(response.InstanceId);
        }