private static Texture2D GetBodyMask(KoiClothesOverlayController controller, MaskKind kind)
            {
                var newMask = controller.GetOverlayTex(kind.ToString(), false)?.Texture;

                if (newMask != null)
                {
                    // the field is needed for dumping, doesn't seem to be necessary to overwrite with the custom tex
                    //Traverse maskField = GetMaskField(controller, kind);
                    //maskField.SetValue(newMask);
                    return(newMask);
                }
                return(null);
            }
Ejemplo n.º 2
0
            public static Texture GetMask(KoiClothesOverlayController controller, MaskKind kind)
            {
                switch (kind)
                {
                case MaskKind.BodyMask:
                    return(controller.ChaControl.texBodyAlphaMask);

                case MaskKind.InnerMask:
                    return(controller.ChaControl.texInnerAlphaMask);

                case MaskKind.BraMask:
                    return(controller.ChaControl.texBraAlphaMask);

                default:
                    throw new ArgumentOutOfRangeException(nameof(kind), kind, null);
                }
            }
 public static Traverse GetMaskField(KoiClothesOverlayController controller, MaskKind kind)
 {
     return(Traverse.Create(controller.ChaControl).Property(GetMaskFieldName(kind)));
 }