コード例 #1
0
        public void Update()
        {
            //PluginHelper.LineClear();
            PluginHelper.DebugClear();
            // テンプレートキャッシュを消去して、再読み込みを促す
            if (Input.GetKey(KeyCode.F12))
            {
                FaceScriptTemplates.Clear();
                SliderTemplates.Clear();
            }
            SliderTemplates.Update(PluginName);

            // エディット画面にいる場合は特別処理として毎フレームアップデートを行う
            if (SceneManager.GetActiveScene().name == "SceneEdit")
            {
                if (GameMain.Instance != null && GameMain.Instance.CharacterMgr != null)
                {
                    CharacterMgr cm = GameMain.Instance.CharacterMgr;
                    for (int i = 0, n = cm.GetStockMaidCount(); i < n; i++)
                    {
                        EditSceneMaidUpdate(cm.GetStockMaid(i));
                    }
                }
            }
        }
コード例 #2
0
        public void Update()
        {
            //PluginHelper.LineClear();
            PluginHelper.DebugClear();
            // テンプレートキャッシュを消去して、再読み込みを促す
            if (Input.GetKey(KeyCode.F12))
            {
                FaceScriptTemplates.Clear();
                SliderTemplates.Clear();
            }
            SliderTemplates.Update(PluginName);

            // エディット画面にいる場合は特別処理として毎フレームアップデートを行う
            if (Application.loadedLevel == 5)
            {
                if (GameMain.Instance != null && GameMain.Instance.CharacterMgr != null)
                {
                    CharacterMgr cm = GameMain.Instance.CharacterMgr;
                    for (int i = 0, n = cm.GetStockMaidCount(); i < n; i++)
                    {
                        EditSceneMaidUpdate(cm.GetStockMaid(i));
                    }
                }

                // todo 以下を直すこと:
                //      FARMFIX等のスライダーではないトグル操作等を行った場合にコールバックが
                //      呼ばれていない。これを回避するため、とりあえず毎フレーム呼びだすことにする
                //
                MaidVoicePitch_UpdateSliders();
            }
        }
コード例 #3
0
    static bool TagFaceBlend(BaseKagManager baseKagManager, KagTagSupport tag_data)
    {
        Maid maidAndMan = GetMaidAndMan(tag_data);

        if (maidAndMan == null)
        {
            return(false);
        }
        if (ExSaveData.GetBool(maidAndMan, PluginName, "FACEBLEND_OFF", false))
        {
            // Helper.Log("FACEBLEND_OFF() -> match");
            return(false);
        }

        baseKagManager.CheckAbsolutelyNecessaryTag(tag_data, "faceblend", new string[] { "name" });

        string oldName = tag_data.GetTagProperty("name").AsString();

        if (oldName == "なし")
        {
            oldName = "無し";
        }
        string newName = FaceScriptTemplates.ProcFaceBlendName(maidAndMan, PluginName, oldName);

        // Helper.Log("TagFaceBlend({0})->({1})", oldName, newName);

        maidAndMan.FaceBlend(newName);
        return(false);
    }
コード例 #4
0
    static bool TagFaceBlend(BaseKagManager baseKagManager, KagTagSupport tag_data)
    {
        Maid maidAndMan = baseKagManager.GetMaidAndMan(tag_data);

        if (maidAndMan == null)
        {
            return(false);
        }
        if (ExSaveData.GetBool(maidAndMan, PluginName, "FACEBLEND_OFF", false))
        {
            Trace.WriteLine("FACEBLEND_OFF() -> match");
            return(false);
        }

        baseKagManager.CheckAbsolutelyNecessaryTag(tag_data, "faceblend", new string[] { "name" });

        string oldName = tag_data.GetTagProperty("name").AsString();

        if (oldName == "なし")
        {
            oldName = "無し";
        }

        string newName = FaceScriptTemplates.ProcFaceBlendName(maidAndMan, PluginName, oldName);

        Trace.WriteLine(string.Format("TagFaceBlend({0})->({1})", oldName, newName));

        if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "ScenePhotoMode")
        {
            newName = "オリジナル";
        }

        maidAndMan.FaceBlend(newName);
        return(false);
    }
コード例 #5
0
    static bool TagFace(BaseKagManager baseKagManager, KagTagSupport tag_data)
    {
        Maid maidAndMan = GetMaidAndMan(tag_data);

        if (maidAndMan == null)
        {
            return(false);
        }
        if (maidAndMan != null && ExSaveData.GetBool(maidAndMan, PluginName, "FACE_OFF", false))
        {
            // Helper.Log("FACE_OFF() -> match");
            return(false);
        }

        baseKagManager.CheckAbsolutelyNecessaryTag(tag_data, "face", new string[] { "name" });

        string oldName = tag_data.GetTagProperty("name").AsString();
        string newName = FaceScriptTemplates.ProcFaceName(maidAndMan, PluginName, oldName);
        // Helper.Log("TagFace({0})->({1})", oldName, newName);

        WaitEventList waitEventList = GetWaitEventList(baseKagManager, "face");
        int           num           = 0;

        if (tag_data.IsValid("wait"))
        {
            num = tag_data.GetTagProperty("wait").AsInteger();
        }
        if (num > 0)
        {
            waitEventList.Add(() =>
            {
                if (maidAndMan != null && maidAndMan.body0 != null && maidAndMan.body0.isLoadedBody)
                {
                    maidAndMan.FaceAnime(newName, 1f, 0);
                }
            }, num);
        }
        else
        {
            maidAndMan.FaceAnime(newName, 1f, 0);
            waitEventList.Clear();
        }
        return(false);
    }