Example #1
0
        public virtual unsafe void ReadFrom(ref byte *Buffer)
        {
            sectorNr = *((ushort *)Buffer);
            Buffer  += TypeSizes.SHORT;

            depth = (RooSectorFlags.DepthType)Buffer[0];
            Buffer++;

            scrollSpeed = (TextureScrollSpeed)Buffer[0];
            Buffer++;
        }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="RaiseChangedEvent"></param>
 public virtual void Clear(bool RaiseChangedEvent)
 {
     if (RaiseChangedEvent)
     {
         SectorNr    = 0;
         Depth       = 0;
         ScrollSpeed = 0;
     }
     else
     {
         sectorNr    = 0;
         depth       = 0;
         scrollSpeed = 0;
     }
 }
Example #3
0
        public virtual int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            sectorNr = BitConverter.ToUInt16(Buffer, cursor);
            cursor  += TypeSizes.SHORT;

            depth = (RooSectorFlags.DepthType)Buffer[cursor];
            cursor++;

            scrollSpeed = (TextureScrollSpeed)Buffer[cursor];
            cursor++;

            return(cursor - StartIndex);;
        }
Example #4
0
 public SectorChange(ushort SectorNr, RooSectorFlags.DepthType Depth, TextureScrollSpeed ScrollSpeed)
 {
     this.sectorNr    = SectorNr;
     this.depth       = Depth;
     this.scrollSpeed = ScrollSpeed;
 }