private void Awake()
 {
     ClickDispatcher.Inst.SetCurrentCamera(Camera.main);
     UnityEngine.Debug.Log("SentenceExpressionView::Awake(): 第六阶段 主动发表意见");
     this.name = "SentenceExpressionView";
     SentenceExpressionModel.GetInstance().Jiaoshi();
 }
 public void Dispose()
 {
     //Debug.LogError("SentenceExpressionView");
     //销毁、资源释放、监听移除
     if (stACtrl != null)
     {
         stACtrl.Dispose();
     }
     if (stBCtrl != null)
     {
         stBCtrl.Dispose();
     }
     if (stCCtrl != null)
     {
         stCCtrl.Dispose();
     }
     if (stDCtrl != null)
     {
         stDCtrl.Dispose();
     }
     if (tpv != null)
     {
         tpv.Dispose();
     }
     PeopleManager.Instance.Reset();
     UIManager.Instance.GetUI <SwapUI>("SwapUI").ResetUI();
     SentenceExpressionModel.GetInstance().Jiaoshi().SetActive(true);
     RemoveListens();
     Destroy(gameObject);
 }
Example #3
0
    /// <summary>
    /// 初始化桌子上的涂卡
    /// </summary>
    void GetTukaObject()
    {
        PropsObject   pObj = SentenceExpressionModel.GetInstance().GetObj(PropsType.reinforcement); //中性刺激物
        Reinforcement rfc  = new Reinforcement(pObj.pData);                                         //测试代码

        SentenceExpressionModel.GetInstance().CurReinforcement = rfc;                               //设置强化物
        Debug.Log("GetTukaObject");

        gtb = ResManager.GetPrefab("Prefabs/AnimationKa/XH_D_1ST_FBNKT_KA").GetLegacyAnimationOper();         //沟通本
        gtb.transform.SetParent(transform);
        gtb.name = "XH_D_1ST_FBNKT_KA";                                                                       //沟通本更新

        gtbKJ      = ResManager.GetPrefab("Prefabs/AnimationKa/XH_D_3RD_FBNKTK_KA").GetLegacyAnimationOper(); //沟通本
        gtbKJ.name = PropsTag.TY_GTB.ToString();
        gtbKJ.transform.SetParent(transform);
        gtbKJ.name = "XH_D_3RD_FBNKTK_KA";//沟通本更新在日志
        gtbKJ.transform.Find("goutongben").gameObject.SetActive(false);
        //沟通本我要图卡
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_wokanjian.ToString()).GetComponent <MeshRenderer>().materials[1];
        Material matTar    = gtbKJ.transform.Find("XH_judaiA/XH_judaiA 1/tukaB/tukaB1").GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);
        //沟通本之中性刺激物图卡
        string _tuka = "tuka_" + rfc.pData.name;//沟通本里面图卡

        matSource = SentenceExpressionModel.GetInstance().GetTuKa(_tuka).GetComponent <MeshRenderer>().materials[1];
        matTar    = gtbKJ.transform.Find("XH_judaiA/XH_judaiA 1/tukaB/tukaB 1").GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);


        //沟通本我要图卡
        matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_woyao.ToString()).GetComponent <MeshRenderer>().materials[1];
        matTar    = gtb.transform.Find("XH_judaiA/XH_judaiA 1/tukaB/tukaB1").GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        //沟通本之中性刺激物图卡
        _tuka     = "tuka_" + rfc.pData.name;//沟通本里面图卡
        matSource = SentenceExpressionModel.GetInstance().GetTuKa(_tuka).GetComponent <MeshRenderer>().materials[1];
        matTar    = gtb.transform.Find("XH_judaiA/XH_judaiA 1/tukaB/tukaB 1").GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        //设置老师旁边的中性刺激物模型
        string     objName = rfc.pData.name;//
        GameObject obj     = ObjectsManager.instanse.GetQHW();

        obj.name = "QHW";
        obj.transform.SetParent(transform);
        qhwCtrl = obj.GetComponent <QHWCtrl>();
        qhwCtrl.ShowObj(objName);
        //qhwCtrl = obj.GetComponent<QHWCtrl>();
        //qhwCtrl.ShowObj(objName);

        //LS.Complete += ClickmicroPhoneTip;
        //LS.PlayForward("LS_E_1ST_ZB");

        XhTJudai();
    }
Example #4
0
 /// <summary>
 /// 结算
 /// </summary>
 void Settle()
 {
     //当前场景处理
     SentenceExpressionModel.GetInstance().Jiaoshi().SetActive(true);
     //模块数据的处理
     //分数统计显示
     gameObject.SetActive(true);
     //分数清零
 }
Example #5
0
    void ShowSpeakJiekaContent()
    {
        CancelInvoke("ClickmicroPhoneJiekaTip");
        Dialog dlog = UIManager.Instance.GetUI <Dialog>("Dialog");

        UIManager.Instance.SetUIDepthTop("Dialog");
        string curObjName = SentenceExpressionModel.GetInstance().CurReinforcement.pData.name_cn;

        dlog.SetDialogMessage("小华要" + curObjName + "呀");
        CancelInvoke("LsGiveInit");
        Invoke("LsGiveInit", 2);
    }
Example #6
0
    void KJShowSpeakJiekaContent()
    {
        CancelInvoke("KJClickmicroPhoneJiekaTip");
        Dialog dlog = UIManager.Instance.GetUI <Dialog>("Dialog");

        UIManager.Instance.SetUIDepthTop("Dialog");
        string curObjName = SentenceExpressionModel.GetInstance().CurneutralStimulator.pData.name_cn;

        dlog.SetDialogMessage("是的,小华看见了" + curObjName + ",小华表现得很好!");
        CancelInvoke("KJLsGiveInit");
        Invoke("KJLsGiveInit", 2);
    }
Example #7
0
    void KJLsGiveObj()
    {
        CancelInvoke("KJClickLsGiveObjTip");
        Debug.Log("教师给物品");
        HighLightCtrl.GetInstance().FlashOff(jshand);
        ClickDispatcher.Inst.EnableClick = false;
        swapUI.SetButtonVisiable(SwapUI.BtnName.microButton, false);

        Transform qhw    = transform.Find("QHW");
        bool      passXh = true;

        LS.timePointEvent = (a) =>                          //老师递给物品
        {
            if (a >= 25 && a <= 27)                         //挂载到老师手上强化物时间点
            {
                LSCtrl lsctrl = LS.GetComponent <LSCtrl>(); //将当前强化物挂在老师手上
                lsctrl.SetJoint(qhw.gameObject);
                //Debug.LogError("ls");
            }

            if (a > 40 && a < 43 && passXh)//小华接卡动画播放延迟
            {
                passXh            = false;
                LS.timePointEvent = null;
                XH.timePointEvent = null;

                LegacyAnimationOper go = ResManager.GetPrefab("Prefabs/AnimationKa/TY_XH_JG_KA").GetLegacyAnimationOper();
                go.name = "TY_XH_JG_KA";
                go.transform.SetParent(transform);

                XH.timePointEvent = (b) =>//小华接过物品 挂载强化物
                {
                    //Debug.Log(b);
                    if (b > 40 && b < 43)//卡在一帧,多帧updae -多次进入该方法-多次执行覆盖,B参数用的上一次
                    {
                        XH.timePointEvent = null;
                        //XHCtrl xhCtrl = XH.GetComponent<XHCtrl>();
                        //xhCtrl.SetJoint(qhw.gameObject);
                        XhQHW  xhqhw = go.GetComponent <XhQHW>();
                        string name  = SentenceExpressionModel.GetInstance().CurReinforcement.pData.name;
                        xhqhw.ShowObj(name);
                        qhw.gameObject.SetActive(false);
                    }
                };
                XH.Complete += KJXHJiewuCallback;
                XH.PlayForward("TY_XH_JG");
                go.PlayForward("TY_XH_JG_KA");
            }
        };

        LS.Complete += KJLsGiveObjCallback;
        LS.PlayForward("TY_LS_DW");
    }
Example #8
0
    void MMJieObj()
    {
        CancelInvoke("ClickMMhandTip");
        HighLightCtrl.GetInstance().FlashOff(mmHand);
        ClickDispatcher.Inst.EnableClick = false;

        GameObject ka = ResManager.GetPrefab("Prefabs/AnimationKa/MM_F_4TH_DBY_KA");

        ka.name = "MM_F_4TH_DBY_KA";
        ka.transform.SetParent(transform);

        Material matTar    = ka.transform.Find("judai/tuka1").GetComponent <MeshRenderer>().materials[1];
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_wokanjian.ToString()).GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);

        matTar    = ka.transform.Find("judai/tuka").GetComponent <MeshRenderer>().materials[1];
        matSource = SentenceExpressionModel.GetInstance().GetObj(index).GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        ka.transform.Find("Group/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai3").gameObject.SetActive(false);
        ka.transform.Find("judai/tuka").localEulerAngles  = new Vector3(0, -90, 0);
        ka.transform.Find("judai/tuka1").localEulerAngles = new Vector3(0, -90, 0);

        LegacyAnimationOper lao = ka.GetLegacyAnimationOper();

        lao.PlayForward("MM_F_4TH_DBY_KA");

        bool pass  = true;
        bool pasxh = true;

        MM.timePointEvent = (a) =>
        {
            if (a >= 38 && a <= 40 && pasxh)
            {
                pasxh = false;
                XH.OnContinue();
                transform.Find("XH_F_4TH_FNN_KA").GetComponent <LegacyAnimationOper>().OnContinue();
                //transform.Find("XH_F_4TH_FNN_KA").gameObject.SetActive(false);
            }
            if (a >= 72 && a <= 75 && pass)
            {
                pass = false;
                MM.timePointEvent = null;
                MM.OnPause();
                lao.OnPause();
                DBYCallback();
            }
        };
        MM.PlayForward("MM_F_4TH_DBY");
        //Invoke("ClickmicroPhoneTip", 1);
    }
Example #9
0
    void MMGiveObjCallback()
    {
        CancelInvoke("WyGiveClickMMHandTip");
        HighLightCtrl.GetInstance().FlashOff(mmHand);
        ClickDispatcher.Inst.EnableClick = false;

        transform.Find("MM_F_4TH_DBY_KA").gameObject.SetActive(false);
        UIManager.Instance.GetUI <Dialog>("Dialog").Show(false);

        GameObject ka = transform.Find("MM_F_4TH_DBY_KA").gameObject;

        if (ka != null)
        {
            Destroy(ka);
        }
        //MM.Complete += WYXHJiewu;
        GameObject KA = ResManager.GetPrefab("Prefabs/AnimationKa/MM_F_4TH_DY_KA");

        KA.name = "MM_F_4TH_DY_KA";
        KA.transform.SetParent(transform);
        LegacyAnimationOper lao = KA.GetLegacyAnimationOper();

        bool pass = true;

        MM.timePointEvent = (a) =>
        {
            if (a >= 58 && a <= 60 && pass)
            {
                pass = false;
                MM.timePointEvent = null;
                //MMCtrl ctrl = MM.GetComponent<MMCtrl>();
                int    index = Random.Range(101, 1001) % 4;
                string _name = SentenceExpressionModel.GetInstance().CurReinforcement.pData.name;
                //Debug.LogError(name);
                //GameObject go = Instantiate(SentenceExpressionModel.GetInstance().GetTuKa(name));
                //go.name = "QHW";
                //go.transform.SetParent(transform);
                //go.transform.localEulerAngles = Vector3.zero;
                //ctrl.SetJoint(go);
                XhQHW xhqhw = KA.GetComponent <XhQHW>();
                xhqhw.ShowObj(_name);

                WYXHJiewu();
            }
        };
        MM.transitionTime = 0;
        MM.PlayForward("MM_F_4TH_DY", 0.15f);
        MM.OnContinue();
        //MM.OnContinue();
        lao.PlayForward("MM_F_4TH_DY_KA", 0.15f);
    }
Example #10
0
    void ShowSpeakContent()
    {
        CancelInvoke("ClickmicroPhoneTip");
        MM.Complete += WyXhZka;
        MM.OnContinue();
        transform.Find("MM_F_4TH_DBY_KA").GetComponent <LegacyAnimationOper>().OnContinue();
        Dialog dlog = UIManager.Instance.GetUI <Dialog>("Dialog");

        dlog.transform.localPosition = new Vector3(403, 420, 0);
        UIManager.Instance.SetUIDepthTop("Dialog");
        string curObjName = SentenceExpressionModel.GetInstance().CurReinforcement.pData.name_cn;

        dlog.SetDialogMessage("是的,小华看到了" + curObjName + ", 小华表现的很好。");
    }
Example #11
0
    void WYXhBYSpeak()
    {
        CancelInvoke("WYXhBYTip");

        swapUI.SetButtonVisiable(SwapUI.BtnName.microButton, false);

        MM.OnContinue();
        transform.Find("MM_F_4TH_DBY_KA").gameObject.GetLegacyAnimationOper().OnContinue();

        Dialog dlog = UIManager.Instance.GetUI <Dialog>("Dialog");

        UIManager.Instance.SetUIDepthTop("Dialog");
        string curObjName = SentenceExpressionModel.GetInstance().CurReinforcement.pData.name_cn;

        //Debug.LogError(curObjName);
        dlog.SetDialogMessage("好的,小华要" + curObjName + "呀");
    }
Example #12
0
    /// <summary>
    /// 看见模块初始化
    /// </summary>
    void InitKanjian()
    {
        PropsObject   pObj = SentenceExpressionModel.GetInstance().GetObj(PropsType.neutralStimulator); //中性刺激物
        Reinforcement rfc  = new Reinforcement(pObj.pData);                                             //测试代码

        SentenceExpressionModel.GetInstance().CurneutralStimulator = rfc;                               //设置强化物
        Debug.Log("中性刺激物  " + rfc.pData.name);

        string     objName = rfc.pData.name;//桌子上中兴刺激物
        GameObject obj     = Instantiate(SentenceExpressionModel.GetInstance().GetTuKa(objName));

        obj.name = "neutralStimulator";
        obj.transform.SetParent(transform, false);
        obj.transform.localPosition = new Vector3(2.453f, 0.578f, 0.798f);
        obj.transform.localScale    = Vector3.one * 0.6F;

        string   _tuka     = "tuka_" + rfc.pData.name;//沟通本里面图卡
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(_tuka).GetComponent <MeshRenderer>().materials[1];
        Material matTar    = gtbKJ.transform.Find("XH_judaiA/XH_judaiA 1/tukaB/tukaB 1").GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);

        gtbKJ.transform.Find("goutongben").gameObject.SetActive(true);



        //设置老师旁边的中性刺激物模型
        pObj = SentenceExpressionModel.GetInstance().GetObj(PropsType.reinforcement); //强化物
        rfc  = new Reinforcement(pObj.pData);                                         //测试代码
        SentenceExpressionModel.GetInstance().CurReinforcement = rfc;                 //设置强化物
        objName = rfc.pData.name;                                                     //

        obj      = ObjectsManager.instanse.GetQHW();
        obj.name = "QHW";
        obj.transform.SetParent(transform);
        qhwCtrl = obj.GetComponent <QHWCtrl>();
        qhwCtrl.ShowObj(objName);

        ClickmicroPhoneTip();
    }
Example #13
0
    /// <summary>
    /// 初始化桌子上的涂卡
    /// </summary>
    void GetTukaObject()
    {
        PropsObject   pObj = SentenceExpressionModel.GetInstance().GetObj(PropsType.neutralStimulator); //中性刺激物
        Reinforcement rfc  = new Reinforcement(pObj.pData);                                             //测试代码

        SentenceExpressionModel.GetInstance().CurneutralStimulator = rfc;                               //设置强化物
        Debug.Log("中性刺激物  " + rfc.pData.name);

        string     objName = rfc.pData.name;//桌子上中兴刺激物
        GameObject obj     = Instantiate(SentenceExpressionModel.GetInstance().GetTuKa(objName));

        obj.name = "neutralStimulator";
        obj.transform.SetParent(transform, false);
        obj.transform.localPosition = new Vector3(2.453f, 0.578f, 0.867f);
        obj.transform.localScale    = Vector3.one * 0.6F;

        gtb      = ResManager.GetPrefab("Prefabs/AnimationKa/XH_D_1ST_FBNKT_KA").GetLegacyAnimationOper();
        gtb.name = PropsTag.TY_GTB.ToString();
        gtb.transform.SetParent(transform);
        gtb.name = "XH_D_1ST_FBNKT_KA";
        gtb.transform.SetParent(transform);

        //沟通本我看见图卡
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_wokanjian.ToString()).GetComponent <MeshRenderer>().materials[1];
        Material matTar    = gtb.transform.Find("XH_judaiA/XH_judaiA 1/tukaB/tukaB1").GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);

        //沟通本之中性刺激物图卡
        string _tuka = "tuka_" + rfc.pData.name;//沟通本里面图卡

        matSource = SentenceExpressionModel.GetInstance().GetTuKa(_tuka).GetComponent <MeshRenderer>().materials[1];
        matTar    = gtb.transform.Find("XH_judaiA/XH_judaiA 1/tukaB/tukaB 1").GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        //设置老师旁边的强化物模型

        pObj = SentenceExpressionModel.GetInstance().GetObj(PropsType.reinforcement); //强化物
        rfc  = new Reinforcement(pObj.pData);                                         //测试代码
        SentenceExpressionModel.GetInstance().CurReinforcement = rfc;                 //设置强化物
        objName = rfc.pData.name;                                                     //

        obj      = ObjectsManager.instanse.GetQHW();
        obj.name = "QHW";
        obj.transform.SetParent(transform);
        qhwCtrl = obj.GetComponent <QHWCtrl>();
        qhwCtrl.ShowObj(objName);
        //qhwCtrl = obj.GetComponent<QHWCtrl>();
        //qhwCtrl.ShowObj(objName);

        //LS.Complete += ClickmicroPhoneTip;
        //LS.PlayForward("LS_E_1ST_ZB");
        //
        bool passPoint = true;

        LS.timePointEvent = (a) =>
        {
            if (a >= 40 && a <= 45 && passPoint)//
            {
                passPoint = false;
                LS.OnPause();
                ClickmicroPhoneTip();
            }
        };
        LS.PlayForward("LS_F_1ST_ZCJW");
        //Debug.Log("ls");
    }
Example #14
0
 private void Awake()
 {
     this.name = "SentenceCtrlD";
     SentenceExpressionModel.GetInstance().Jiaoshi().SetActive(false);
 }
Example #15
0
    //public bool Finished;
    private void Start()
    {
        GlobalEntity.GetInstance().Dispatch <string>(CommonUI.pEvent.LevelChange, "第四关");

        Transform park = ResManager.GetPrefab("Scenes/park/park").transform;

        park.SetParent(transform);
        GameObject         cam = transform.Find("park(Clone)/Camera").gameObject;
        HighlightingEffect hf  = cam.GetComponent <HighlightingEffect>();

        if (hf == null)
        {
            hf = cam.gameObject.AddComponent <HighlightingEffect>();
            //hf.stencilZBufferDepth = 0;
            //hf.downsampleFactor = 1;
            //hf.iterations = 2;
        }

        if (swapUI == null)
        {
            swapUI = UIManager.Instance.GetUI <SwapUI>("SwapUI");
            //swapUI.chooseEvent += ChooseBtnClickCallback;
            swapUI.speakEvent += SpeakBtnClickCallback;
            swapUI.SetButtonVisiable(SwapUI.BtnName.microButton, false);
            swapUI.SetButtonVisiable(SwapUI.BtnName.chooseButton, false);
        }
        UIManager.Instance.GetUI <Dialog>("Dialog").SetPos(new Vector3(-55, -490, 0));
        MM = ResManager.GetPrefab("Scenes/park/MM").GetAnimatorOper();
        MM.transform.SetParent(park);

        PeopleManager.Instance.Reset();
        PeopleManager.Instance.GetPeople(PeopleTag.FDLS_BD).transform.localPosition = new Vector3(0, 0, 10000);
        PeopleManager.Instance.GetPeople(PeopleTag.LS_BD).transform.localPosition   = new Vector3(0, 0, 10000);
        XH = PeopleManager.Instance.GetPeople(PeopleTag.XH_BD).GetAnimatorOper();
        bool pass = true;

        XH.timePointEvent = (a) =>
        {
            if (a >= 1 && a <= 3 && pass)
            {
                pass = false;
                XH.timePointEvent = null;
                XH.OnPause();
            }
        };
        XH.PlayForward("XH_F_4TH_FNN");

        LegacyAnimationOper dog = ResManager.GetPrefab("Scenes/park/dog").GetLegacyAnimationOper();

        dog.transform.SetParent(park);
        dog.transform.localScale    = Vector3.one * 2;
        dog.transform.localPosition = new Vector3(-1.205f, 0, 0);
        dog.PlayForward("idle");
        dog.SetWrapMode = WrapMode.Loop;

        MM.PlayForward("idle");
        //XH.PlayForward("idle");
        //XH.PlayForward("XH_F_4TH_FNN");
        PropsObject   pObj = SentenceExpressionModel.GetInstance().GetObj(PropsType.neutralStimulator); //中性刺激物
        Reinforcement rfc  = new Reinforcement(pObj.pData);                                             //测试代码

        SentenceExpressionModel.GetInstance().CurReinforcement = rfc;                                   //设置强化物
        Debug.Log("GetTukaObject");

        XHTZka();
        //Invoke("XHTZka", 1);
    }
Example #16
0
    /// <summary>
    /// 小华拿出我要字卡
    /// </summary>
    void WyXhZka()
    {
        GameObject k = transform.Find("MM_F_4TH_DBY_KA").gameObject;

        if (k != null)
        {
            Destroy(k);
        }

        MM.PlayForward("idle");
        UIManager.Instance.GetUI <Dialog>("Dialog").Show(false);

        List <int> indexList = new List <int> {
            0, 2, 3
        };
        int           index = SentenceExpressionModel.GetInstance().GetIndex(indexList);
        PropsObject   pObj  = SentenceExpressionModel.GetInstance().GetObj(index).GetComponent <PropsObject>(); //强化物
        Reinforcement rfc   = new Reinforcement(pObj.pData);                                                    //测试代码

        SentenceExpressionModel.GetInstance().CurReinforcement = rfc;                                           //设置强化物
        Debug.Log("GetTukaObject  " + rfc.pData.name);


        XH.transitionTime = 0;
        //XH.Complete += XHTZkaCallback;
        XH.PlayForward("XH_F_4TH_FNN");
        bool pass = true;

        XH.timePointEvent = (a) =>//
        {
            if (a > 613 && a < 617 && pass)
            {
                pass = false;
                XH.timePointEvent = null;
                XH.OnPause();

                WyXhZkaCallback();//mm高亮
            }
        };

        GameObject kaa = transform.Find("XH_F_4TH_FNN_KA").gameObject;

        if (kaa != null)
        {
            DestroyImmediate(kaa);
        }
        GameObject ka = ResManager.GetPrefab("Prefabs/AnimationKa/XH_F_4TH_FNN_KA");

        ka.name = "XH_F_4TH_FNN_KA";
        ka.transform.SetParent(transform);
        //ka.name = "XH_F_4TH_FNN_KA";
        //ka.transform.SetParent(transform);

        //我要
        Material matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_02/tuka5").GetComponent <MeshRenderer>().materials[1];
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_woyao.ToString()).GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk10 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka10");

        tk10.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk10.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_03/tuka7").GetComponent <MeshRenderer>().materials[1];
        matSource = SentenceExpressionModel.GetInstance().GetTuKa("tuka_" + rfc.pData.name).GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk9 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka9");

        tk9.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk9.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        Transform tk8  = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/tuka8");
        Material  mat8 = tk8.GetComponent <MeshRenderer>().materials[1];

        mat8.CopyPropertiesFromMaterial(matSource);

        LegacyAnimationOper lao = ka.GetLegacyAnimationOper();
        bool kpass = true;

        lao.framePointEvent = (a) =>
        {
            if (a >= 613 && a <= 617 && kpass)
            {
                kpass = false;
                lao.framePointEvent = null;
                lao.OnPause();
            }
        };
        //Debug.LogError("ka");
        lao.PlayForward("XH_F_4TH_FNN_KA");
    }
Example #17
0
    void MMGiveObj()//接卡给物
    {
        GameObject ka = ResManager.GetPrefab("Prefabs/AnimationKa/MM_F_4TH_DBY_KA");

        ka.name = "MM_F_4TH_DBY_KA";
        ka.transform.SetParent(transform);

        string name = SentenceExpressionModel.GetInstance().CurReinforcement.pData.name;

        //Debug.LogError(name);
        ka.transform.Find("judai/tuka1").localEulerAngles = new Vector3(0, -90, 0);
        Material matTar    = ka.transform.Find("judai/tuka1").GetComponent <MeshRenderer>().materials[1];
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_woyao.ToString()).GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);

        ka.transform.Find("judai/tuka").localEulerAngles = new Vector3(0, -90, 0);
        matTar    = ka.transform.Find("judai/tuka").GetComponent <MeshRenderer>().materials[1];
        matSource = SentenceExpressionModel.GetInstance().GetTuKa("tuka_" + name).GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        ka.transform.Find("Group/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai3").gameObject.SetActive(false);

        ka.gameObject.SetActive(true);
        LegacyAnimationOper lao = ka.GetLegacyAnimationOper();

        bool passxh = true;
        bool passmm = true;
        bool pass   = true;

        MM.timePointEvent = (a) =>
        {
            if (a >= 38 && a <= 40 && passxh)
            {
                passxh = false;
                XH.OnContinue();
                Transform fnnka = transform.Find("XH_F_4TH_FNN_KA");
                fnnka.GetComponent <LegacyAnimationOper>().OnContinue();
                fnnka.gameObject.SetActive(false);
                fnnka.gameObject.SetActive(true);
                Transform xhr1 = XH.GetComponent <XHCtrl>().XH_R2.transform.parent.Find("XH_R1");
                fnnka.SetParent(xhr1);
                fnnka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L").gameObject.SetActive(false);
                //transform.Find("XH_F_4TH_FNN_KA").gameObject.SetActive(false);
            }
            if (a >= 72 && a <= 75 && pass)
            {
                pass = false;
                MM.OnPause();
                lao.OnPause();
                //Debug.LogError("WYXhBYTip");
                WYXhBYTip();
            }
            if (a >= 160 && a <= 162 && passmm)
            {
                passmm            = false;
                MM.timePointEvent = null;
                MM.OnPause();
                //MMGiveObjCallback();
                WyGiveClickMMHandTip();
            }
        };
        MM.PlayForward("MM_F_4TH_DBY");
        lao.PlayForward("MM_F_4TH_DBY_KA");
    }
Example #18
0
    /// <summary>
    /// 小华贴字体动画
    /// </summary>
    void XHTZka()
    {
        GameObject ka = ResManager.GetPrefab("Prefabs/AnimationKa/XH_F_4TH_FNN_KA");

        ka.name = "XH_F_4TH_FNN_KA";
        ka.transform.SetParent(transform);
        //我看见
        Material matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_02/tuka5").GetComponent <MeshRenderer>().materials[1];
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_wokanjian.ToString()).GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk10 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka10");

        Transform Wrist_L = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L");//拿卡
        Material  matk6   = Wrist_L.Find("tuka6").GetComponent <MeshRenderer>().materials[1];

        matk6.CopyPropertiesFromMaterial(matSource);

        Material mattk4 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_01/tuka4").GetComponent <MeshRenderer>().materials[1];

        mattk4.CopyPropertiesFromMaterial(matSource);


        tk10.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk10.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        //实物
        index = Random.Range(101, 1001) % 3 + 25;
        Debug.Log(index);
        matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_03/tuka7").GetComponent <MeshRenderer>().materials[1];
        matSource = SentenceExpressionModel.GetInstance().GetObj(index).GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk9 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka9");

        tk9.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk9.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        Transform tk8  = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/tuka8");
        Material  mat8 = tk8.GetComponent <MeshRenderer>().materials[1];

        mat8.CopyPropertiesFromMaterial(matSource);

        PropsObject   pObj = SentenceExpressionModel.GetInstance().GetObj(index).GetComponent <PropsObject>();
        Reinforcement rfc  = new Reinforcement(pObj.pData);           //测试代码

        SentenceExpressionModel.GetInstance().CurReinforcement = rfc; //设置强化物
        Debug.Log(rfc.pData.name_cn);

        XH.transitionTime = 0;
        //XH.Complete += XHTZkaCallback;
        XH.OnContinue();
        XH.timePointEvent = (a) =>//
        {
            if (a >= 615 && a <= 617)
            {
                XH.timePointEvent = null;
                XH.OnPause();
                //Debug.LogError("pause");
                XHTZkaCallback();//mm高亮
            }
        };

        LegacyAnimationOper lao = ka.GetLegacyAnimationOper();
        bool pass = true;

        lao.framePointEvent = (a) =>
        {
            if (a >= 615 && a <= 617 && pass)
            {
                lao.framePointEvent = null;
                pass = false;
                lao.OnPause();
            }
        };
        lao.PlayForward("XH_F_4TH_FNN_KA");
    }