コード例 #1
0
 public static async ETTask Remove(this LocationProxyComponent self, long key)
 {
     await MessageHelper.CallActor(
         StartSceneConfigCategory.Instance.LocationConfig.SceneId,
         new ObjectRemoveRequest()
     {
         Key = key
     });
 }
コード例 #2
0
 public static async ETTask UnLock(this LocationProxyComponent self, long key, long oldInstanceId, long instanceId)
 {
     await MessageHelper.CallActor(
         StartSceneConfigCategory.Instance.LocationConfig.SceneId,
         new ObjectUnLockRequest()
     {
         Key = key, OldInstanceId = oldInstanceId, InstanceId = instanceId
     });
 }
コード例 #3
0
 public static async ETTask Lock(this LocationProxyComponent self, long key, long instanceId, int time = 1000)
 {
     await MessageHelper.CallActor(
         StartSceneConfigCategory.Instance.LocationConfig.SceneId,
         new ObjectLockRequest()
     {
         Key = key, InstanceId = instanceId, Time = time
     });
 }
コード例 #4
0
 public static async ETTask Remove(this LocationProxyComponent self, long key)
 {
     await MessageHelper.CallActor(
         StartConfigComponent.Instance.GetInstanceId(SceneType.Location),
         new ObjectRemoveRequest()
     {
         Key = key
     });
 }
コード例 #5
0
 public static async ETTask Add(this LocationProxyComponent self, long key, long instanceId)
 {
     await MessageHelper.CallActor(
         StartConfigComponent.Instance.GetInstanceId(SceneType.Location),
         new ObjectAddRequest()
     {
         Key = key, InstanceId = instanceId
     });
 }
コード例 #6
0
        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);
        }