public static void UpdateTexture(ChaControl cc, TexType type)
        {
            if (cc == null)
            {
                return;
            }
            if (cc.customTexCtrlBody == null || cc.customTexCtrlFace == null)
            {
                return;
            }

            switch (type)
            {
            case TexType.BodyOver:
            case TexType.BodyUnder:
                cc.AddUpdateCMBodyTexFlags(true, true, true, true);
                cc.CreateBodyTexture();
                break;

            case TexType.FaceOver:
            case TexType.FaceUnder:
                cc.AddUpdateCMFaceTexFlags(true, true, true, true, true, true, true);
                cc.CreateFaceTexture();
                break;

            default:
                cc.AddUpdateCMBodyTexFlags(true, true, true, true);
                cc.CreateBodyTexture();
                cc.AddUpdateCMFaceTexFlags(true, true, true, true, true, true, true);
                cc.CreateFaceTexture();
                break;
            }
        }
Esempio n. 2
0
        public static void UpdateTexture(ChaControl cc, TexType type)
        {
            if (cc == null)
            {
                return;
            }
            if (cc.customTexCtrlBody == null || cc.customTexCtrlFace == null)
            {
                return;
            }
#if KK || EC
            switch (type)
            {
            case TexType.BodyOver:
            case TexType.BodyUnder:
                cc.AddUpdateCMBodyTexFlags(true, true, true, true, true);
                cc.CreateBodyTexture();
                break;

            case TexType.FaceOver:
            case TexType.FaceUnder:
                cc.AddUpdateCMFaceTexFlags(true, true, true, true, true, true, true);
                cc.CreateFaceTexture();
                break;

            case TexType.EyeUnder:
            case TexType.EyeOver:
            case TexType.EyeUnderL:
            case TexType.EyeOverL:
            case TexType.EyeUnderR:
            case TexType.EyeOverR:
                cc.ChangeSettingEye(true, true, true);
                break;

            default:
                cc.AddUpdateCMBodyTexFlags(true, true, true, true, true);
                cc.CreateBodyTexture();
                cc.AddUpdateCMFaceTexFlags(true, true, true, true, true, true, true);
                cc.CreateFaceTexture();
                cc.ChangeSettingEye(true, true, true);
                break;
            }
#elif AI || HS2
            switch (type)
            {
            case TexType.BodyOver:
            case TexType.BodyUnder:
                cc.AddUpdateCMBodyTexFlags(true, true, true, true);
                cc.CreateBodyTexture();
                break;

            case TexType.FaceOver:
            case TexType.FaceUnder:
                cc.AddUpdateCMFaceTexFlags(true, true, true, true, true, true, true);
                cc.CreateFaceTexture();
                break;

            case TexType.EyeUnderL:
            case TexType.EyeOverL:
                cc.ChangeEyesKind(0);     //todo test sides
                break;

            case TexType.EyeUnderR:
            case TexType.EyeOverR:
                cc.ChangeEyesKind(1);
                break;

            case TexType.EyeUnder:
            case TexType.EyeOver:
                cc.ChangeEyesKind(2);
                break;

            default:
                cc.AddUpdateCMBodyTexFlags(true, true, true, true);
                cc.CreateBodyTexture();
                cc.AddUpdateCMFaceTexFlags(true, true, true, true, true, true, true);
                cc.CreateFaceTexture();
                cc.ChangeEyesKind(2);
                break;
            }
#endif
        }