/// <summary> /// 点击教师的手回调 /// </summary> /// <param name="cobj"></param> private void OnClickTeacherHandFirst(ClickedObj cobj) { #if UNITY_EDITOR F3DDebug.Log(cobj.objname, new System.Diagnostics.StackTrace(true)); #else Debug.Log("DistinguishPictureCtrlA::OnClickTeacherHandFirst():教师接图卡"); #endif if (cobj.objname == "shou") { ChooseDo.Instance.Clicked(); CancelInvoke("ClickTeachersPromptFirst"); GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, OnClickTeacherHandFirst); ClickDispatcher.Inst.EnableClick = false; HighLightCtrl.GetInstance().OffAllObjs(); //播放老师接图卡动画 int start = 47; int end = 48; bool passA = false; bool passB = false; bool passC = false; teacherAnim.timePointEvent = (t) => { if (t >= start && t <= end && !passA) { passA = true; xhctrl.r_tuka2.SetActive(false); lsCtrl.ls_tuka2.SetActive(true); xiaohuaAnim.OnContinue(); } if (t >= 81 && t <= 83 && !passB) { passB = true; //老师放下图卡 lsCtrl.ls_tuka2.SetActive(false); tukaB.SetActive(true); tukaB.transform.parent.localPosition = new Vector3(2.5f, 0.5466f, 0.388f); tukaB.transform.localPosition = Vector3.zero; } if (t >= 94 && t <= 96 && !passC) { passC = true; //老师接图卡动画结束 teacherAnim.timePointEvent = null; teacherAnim.OnPause(); OnReceiveTuKa(); } }; teacherAnim.PlayForward("TY_LS_JKDW"); } }
// Use this for initialization private void Awake() { Singletone = this; _debugText = GetComponent <Text>(); if (_debugText == null) { return; } _debugText.text = string.Empty; }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.Alpha0)) { Time.timeScale += Time.deltaTime * 3; Time.timeScale = Mathf.Clamp01(Time.timeScale); if (Log) { F3DDebug.LogFloat("TimeScale", Time.timeScale); } } else if (Input.GetKey(KeyCode.Alpha9)) { Time.timeScale -= Time.deltaTime * 3; Time.timeScale = Mathf.Clamp01(Time.timeScale); if (Log) { F3DDebug.LogFloat("TimeScale", Time.timeScale); } } }