public override int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.ReadFrom(Buffer, cursor);

            SectorMove = new SectorMove(Buffer, cursor);
            cursor += SectorMove.ByteLength;
          
            return cursor - StartIndex;
        }
 public SectorMoveMessage(SectorMove SectorMove) 
     : base(MessageTypeGameMode.SectorMove)
 {
     this.SectorMove = SectorMove;      
 }
Beispiel #3
0
 /// <summary>
 /// Starts a movement of the sector
 /// </summary>
 /// <param name="SectorMove"></param>
 public void StartMove(SectorMove SectorMove)
 {
     if (SectorMove.Type == AnimationType.FLOORLIFT)
     {
         // set target height and speed for floor
         MoveFloorHeight = (Real)SectorMove.Height;
         MoveFloorSpeed = SectorMove.Speed;
         IsMovingFloor = true;
     }
     else if (SectorMove.Type == AnimationType.CEILINGLIFT)
     {
         // set target height and speed for ceiling
         MoveCeilingHeight = (Real)SectorMove.Height;
         MoveCeilingSpeed = SectorMove.Speed;
         IsMovingCeiling = true;
     }
 }