コード例 #1
0
 public void TriggerLocomotionAction(LocomotionActionEvent action, bool droppable)
 {
     action.SessionId = clubPenguinClient.PlayerSessionId;
     if (action.Object != null && action.Object.type == ObjectType.LOCAL)
     {
         List <string> list = new List <string>();
         list.Add(action.Object.id);
         Reward inRoomReward = definitions.GetInRoomReward(list);
         if (!inRoomReward.isEmpty())
         {
             inRoomRewards[action.Object.id] = ServerTime;
             CoroutineRunner.StartPersistent(pickupResponse(), this, "pickupResponse");
         }
     }
     if (currentConsumable != null)
     {
         currentConsumable.HandleInteraction(action);
     }
     foreach (IConsumable activeConsumable in activeConsumables)
     {
         activeConsumable.HandleInteraction(action);
     }
     if (currentRoom != null)
     {
         currentRoom.HandleInteraction(action);
     }
 }