示例#1
0
 private void unsetRoomUnitTileState(roomUnit pUnit)
 {
     if (this.gridState[pUnit.X, pUnit.Y] == roomTileState.Interactive)
     {
         List<floorItem> Items = this.getFloorItems(pUnit.X, pUnit.Y);
         foreach (floorItem lItem in Items)
         {
             if (lItem.Definition.Behaviour.canSitOnTop) // User was seated, remove sit animation and reset height
             {
                 pUnit.removeStatus("sit");
                 pUnit.Z = this.gridHeight[pUnit.X, pUnit.Y];
             }
         }
     }
 }
示例#2
0
        private void setRoomUnitTileState(roomUnit pUnit)
        {
            pUnit.removeStatus("sit");
            pUnit.removeStatus("lay");

            List<floorItem> tileItems = this.getFloorItems(pUnit.X, pUnit.Y);
            foreach (Items.floorItem lItem in tileItems)
            {
                if (lItem.Definition.Behaviour.canSitOnTop)
                {
                    pUnit.Z = lItem.Z;
                    pUnit.rotationHead = lItem.Rotation;
                    pUnit.rotationBody = lItem.Rotation;

                    pUnit.removeStatus("dance");
                    pUnit.addStatus("sit", "sit", stringFunctions.formatFloatForClient(lItem.Definition.topHeight), 0, null, 0, 0);
                }
                else if (lItem.Definition.Behaviour.canLayOnTop)
                {
                    //pUnit.X = lItem.X;
                    //pUnit.Y = lItem.Y;
                    pUnit.Z = lItem.Z;
                    pUnit.rotationBody = lItem.Rotation;
                    pUnit.rotationHead = lItem.Rotation;

                    pUnit.removeStatus("dance");
                    pUnit.removeStatus("handitem");
                    pUnit.addStatus("lay", "lay", stringFunctions.formatFloatForClient(lItem.Definition.topHeight) + " null", 0, null, 0, 0);
                }
            }
        }