示例#1
0
 void OnTestPaperFinished()
 {
     tpv.evtFinished -= OnTestPaperFinished;
     tpv.evtRedo     -= OnTestPaperRedo;
     tpv.Dispose();
     if (aqCCtrl.gameObject != null)
     {
         Camera cam = aqCCtrl.transform.GetComponentInChildren <Camera>();
         DestroyImmediate(cam.gameObject);
         HighLightCtrl.GetInstance().cameras = null;
         Destroy(aqCCtrl.gameObject);
     }
     //通知当前阶段完成
     AcceptQuestionModel.GetInstance().Jiaoshi().SetActive(true);
     PeopleManager.Instance.Reset();
     GlobalEntity.GetInstance().Dispatch <ModelTasks>(FlowModel.mEvent.FlowStepFinished, ModelTasks.AcceptQuestion);
 }
示例#2
0
    void ShowSpeakJiekaContent()
    {
        CancelInvoke("ClickmicroPhoneJiekaTip");
        Dialog dlog = UIManager.Instance.GetUI <Dialog>("Dialog");

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

        //string behaveMode = "吃";
        //if (curObjName.Equals("小汽车"))
        //{
        //    behaveMode = "玩";
        //}
        dlog.SetDialogMessage("小华要" + curObjName + "呀");
        CancelInvoke("LsGiveInit");
        Invoke("LsGiveInit", 2);
    }
示例#3
0
    /// <summary>
    /// 初始化桌子上的涂卡
    /// </summary>
    void GetTukaObject()
    {
        PropsObject   pObj = AcceptQuestionModel.GetInstance().GetObj(PropsType.reinforcement); //随机强化物
        Reinforcement rfc  = new Reinforcement(pObj.pData);                                     //测试代码

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

        //Transform objectsTr = new GameObject("objectsParent").transform;
        //objectsTr.localPosition = Vector3.zero;
        //objectsTr.localScale = Vector3.one;
        //objectsTr.rotation = Quaternion.identity;
        //objectsTr.SetParent(transform);

        gtb      = ResManager.GetPrefab("Prefabs/AnimationKa/XH_D_2ND_FYFT_KA").GetLegacyAnimationOper(); //通用沟通本
        gtb.name = PropsTag.TY_GTB.ToString();
        gtb.transform.SetParent(transform);
        gtb.name = "XH_D_2ND_FYFT_KA";

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

        matTar.CopyPropertiesFromMaterial(matSource);

        //沟通本强化物图卡
        string _tuka = "tuka_" + rfc.pData.name;//沟通本里面图卡

        matSource = AcceptQuestionModel.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, false);
        qhwCtrl = obj.GetComponent <QHWCtrl>();
        qhwCtrl.ShowObj(objName);

        ClickmicroPhoneTip();
    }
示例#4
0
    //public bool Finished;
    private void Start()
    {
        GlobalEntity.GetInstance().Dispatch <string>(CommonUI.pEvent.LevelChange, "第三关");

        AcceptQuestionModel.GetInstance().Jiaoshi().SetActive(false);

        GameObject market = ResManager.GetPrefab("Scenes/supermarket/chaoshi");

        market.transform.SetParent(transform);
        market.name = "chaoshi";

        Camera cam = transform.GetComponentInChildren <Camera>();

        ClickDispatcher.Inst.cam = cam;
        //HighlightingEffect hf = cam.GetComponent<HighlightingEffect>();
        //if (hf == null)
        //{
        //    hf = cam.gameObject.AddComponent<HighlightingEffect>();
        //    //hf.stencilZBufferDepth = 0;
        //    //hf.downsampleFactor = 1;
        //    //hf.iterations = 2;
        //}
        Init();
    }
示例#5
0
    void LsGiveObj()
    {
        CancelInvoke("ClickLsGiveObjTip");
        Debug.Log("妈妈接卡");
        transform.Find("MM_E_3RD_JG_KA").gameObject.SetActive(false);
        HighLightCtrl.GetInstance().FlashOff(mmhand);
        ClickDispatcher.Inst.EnableClick = false;
        swapUI.SetButtonVisiable(SwapUI.BtnName.microButton, false);

        MM.Complete      += LsGiveObjCallback;
        MM.timePointEvent = (a) =>
        {
            if (a >= 120 && a <= 123)//
            {
                //Debug.LogError("MM");
                MM.timePointEvent = null;
                MMCtrl mctrl = MM.GetComponent <MMCtrl>();
                if (mctrl == null)
                {
                    mctrl = MM.gameObject.AddComponent <MMCtrl>();
                }
                //qhw.SetActive(false);
                //Debug.LogError(qhw.name);
                transform.Find("chaoshi/chaoshi_sw/panzi").GetComponent <PanziCtrl>().ShowObj(qhw.name);
                //mctrl.SetJoint(qhw);
                //qhw.transform.localPosition = Vector3.zero;
                //mctrl.ls_Lf.transform.localPosition = Vector3.zero;
            }
        };
        MM.PlayForward("MM_E_3RE_DY");

        LegacyAnimationOper ka = ResManager.GetPrefab("Prefabs/AnimationKa/MM_E_3RE_DY_KA").GetLegacyAnimationOper();//mm手中卡显示

        ka.transform.SetParent(transform);
        ka.name = "MM_E_3RE_DY_KA";
        Transform par = ka.transform.Find("Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/XH_R2");
        //for (int i = 0; i < par.childCount; i++)
        //{
        //    par.GetChild(i).gameObject.SetActive(false);
        //}
        Transform jd = par.Find("judai2");

        jd.gameObject.SetActive(true);
        Material tkmat = jd.Find("tuka9 1").GetComponent <MeshRenderer>().materials[1];
        //par.Find(AcceptQuestionModel.GetInstance().CurReinforcement.pData.name).gameObject.SetActive(true);

        Reinforcement rfc       = AcceptQuestionModel.GetInstance().CurReinforcement;
        Material      matSource = AcceptQuestionModel.GetInstance().GetTuKa("tuka_" + rfc.pData.name).GetComponent <MeshRenderer>().materials[1];

        tkmat.CopyPropertiesFromMaterial(matSource);

        bool passA = true;
        bool passB = true;

        ka.framePointEvent = (a) =>
        {
            if (a >= 90 && a <= 92 && passB)
            {
                //Debug.LogError("xh");
                passB = false;
                jd.gameObject.SetActive(false);
            }
            if (a >= 118 && a <= 120 && passA)
            {
                passA = false;
                ka.framePointEvent = null;
                //par.Find(rfc.pData.name).gameObject.SetActive(true);
                //qhw.SetActive(false);
                jd.gameObject.SetActive(false);
                XhQHW xhqhw = ka.GetComponent <XhQHW>();
                xhqhw.ShowObj(rfc.pData.name);
            }
        };
        ka.PlayForward("MM_E_3RE_DY_KA");
    }