예제 #1
0
        /// <summary>
        /// 解锁
        /// </summary>
        /// <param name="self"></param>
        /// <returns></returns>
        public static async Task Release(this LockComponent self)
        {
            --self.lockCount;
            if (self.lockCount != 0)
            {
                return;
            }

            self.status = LockStatus.LockedNot;                                                //设置为不加锁状态
            Session session = Game.Scene.GetComponent <NetInnerComponent>().Get(self.address); //获取他的地址
            G2G_LockReleaseRequest request = new G2G_LockReleaseRequest();
            await session.Call(request);                                                       //发送解锁消息
        }
예제 #2
0
 public virtual async ETTask G2G_LockReleaseRequestHandler(Scene scene, G2G_LockReleaseRequest request, G2G_LockReleaseResponse response, Action reply)
 {
 }