예제 #1
0
파일: EntityLook.cs 프로젝트: Riul/emulator
 public EntityLook(short bonesId, short[] skins, int[] indexedColors, short[] scales, SubEntity[] subentities)
 {
     BonesId = bonesId;
     Skins = skins;
     IndexedColors = indexedColors;
     Scales = scales;
     Subentities = subentities;
 }
예제 #2
0
파일: EntityLook.cs 프로젝트: Riul/emulator
 public virtual void Deserialize(BigEndianReader reader)
 {
     BonesId = reader.ReadShort();
     var limit = reader.ReadUShort();
     Skins = new short[limit];
     for (int i = 0; i < limit; i++)
     {
         Skins[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     IndexedColors = new int[limit];
     for (int i = 0; i < limit; i++)
     {
         IndexedColors[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     Scales = new short[limit];
     for (int i = 0; i < limit; i++)
     {
         Scales[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     Subentities = new SubEntity[limit];
     for (int i = 0; i < limit; i++)
     {
         Subentities[i] = new SubEntity();
         Subentities[i].Deserialize(reader);
     }
 }