Exemplo n.º 1
0
        private void targetItem_OnUserWalksOffFurni(object sender, UserWalksOnArgs e)
        {
            if (requiredCycles > 0)
            {
                UserWalksFurniValue obj = new UserWalksFurniValue(e.user, (RoomItem)sender);
                lock (requestQueue.SyncRoot)
                {
                    requestQueue.Enqueue(obj);
                }

                handler.RequestCycle(this);
            }
            else
            {
                handler.RequestStackHandle(item.Coordinate, (RoomItem)sender, e.user, Games.Team.none);
                handler.OnEvent(item.Id);
            }
        }
Exemplo n.º 2
0
 public bool OnCycle()
 {
     if (currentCycle > requiredCycles)
     {
         if (requestQueue.Count > 0)
         {
             lock (requestQueue.SyncRoot)
             {
                 while (requestQueue.Count > 0)
                 {
                     UserWalksFurniValue obj = (UserWalksFurniValue)requestQueue.Dequeue();
                     handler.RequestStackHandle(item.Coordinate, obj.item, obj.user, Games.Team.none);
                 }
             }
             handler.OnEvent(item.Id);
         }
         return(false);
     }
     else
     {
         currentCycle++;
         return(true);
     }
 }
Exemplo n.º 3
0
        private void targetItem_OnUserWalksOffFurni(object sender, UserWalksOnArgs e)
        {
            if (requiredCycles > 0)
            {
                UserWalksFurniValue obj = new UserWalksFurniValue(e.user, (RoomItem)sender);
                lock (requestQueue.SyncRoot)
                {
                    requestQueue.Enqueue(obj);
                }

                handler.RequestCycle(this);
            }
            else
            {
                GenericTriggerWithModes.DoAnimation(this.item);
                handler.RequestStackHandle(item.GetX, item.GetY, (RoomItem)sender, e.user, Games.Team.none, item.Room);
                handler.OnEvent(item.Id);
            }
        }
Exemplo n.º 4
0
        private void targetItem_OnUserWalksOffFurni(object sender, UserWalksOnArgs e)
        {
            if (requiredCycles > 0)
            {
                UserWalksFurniValue obj = new UserWalksFurniValue(e.user, (RoomItem)sender);
                lock (requestQueue.SyncRoot)
                {
                    requestQueue.Enqueue(obj);
                }

                handler.RequestCycle(this);
            }
            else
            {
                handler.RequestStackHandle(item.Coordinate, (RoomItem)sender, e.user, Games.Team.none);
                handler.OnEvent(item.Id);
            }
        }