示例#1
0
        public GirlPartInfo(GirlPartSubDefinition girlPartSubDef, AssetProvider assetProvider, int GirlId)
        {
            if (girlPartSubDef == null)
            {
                throw new ArgumentNullException(nameof(girlPartSubDef));
            }
            if (assetProvider == null)
            {
                throw new ArgumentNullException(nameof(assetProvider));
            }

            PartType          = girlPartSubDef.partType;
            PartName          = girlPartSubDef.partName;
            X                 = girlPartSubDef.x;
            Y                 = girlPartSubDef.y;
            MirroredPartIndex = girlPartSubDef.mirroredPartIndex;
            AltPartIndex      = girlPartSubDef.altPartIndex;

            // Special handling, prefixes id because all the part sprites have the same name...
            if (girlPartSubDef.sprite != null)
            {
                SpriteInfo = new SpriteInfo(GirlId.ToString() + "_" + girlPartSubDef.sprite.name, false);
                assetProvider.AddAsset(SpriteInfo.Path, girlPartSubDef.sprite);
            }
        }
示例#2
0
 public GirlPartInfo(GirlPartType partType,
                     string partName,
                     int x,
                     int y,
                     int mirroredPartIndex,
                     int altPartIndex,
                     SpriteInfo spriteInfo)
 {
     PartType          = partType;
     PartName          = partName;
     SpriteInfo        = spriteInfo;
     X                 = x;
     Y                 = y;
     MirroredPartIndex = mirroredPartIndex;
     AltPartIndex      = altPartIndex;
 }