public override void ResetPoint(bool bRealInfo) { if (bRealInfo) _normalInfo = _realInfo; else _normalInfo = _saveInfo; }
public override void ResetPoint(bool bRealInfo) { if (bRealInfo) _normalInfo = _realInfo; else _normalInfo = _saveInfo; //恢复视角 objMainCamera.LRAnge -= _normalInfo.norInfo.rotationLR; objMainCamera.distance -= _normalInfo.norInfo.distance; objMainCamera.UDAngle -= _normalInfo.norInfo.rotationUD; objMainCamera.calculatePos(false); }
public override void SavePoint() { _saveInfo = _normalInfo; }
public override void ModInfo() { SavePoint(); _realInfo = _saveInfo; }
/// /////////////////////////////// 功能函数 /////////////////////////////////////////////////////////////// private void SmoothTarget(Transform sTarget, paramInfo pmInfo) { _paramHash.Clear(); _paramHash.Add("time", time); _paramHash.Add("rotation", pmInfo.directEulerAngles); _paramHash.Add("easetype", pmInfo.easetype); // _paramHash.Add("oncomplete", "OnProxyFinish"); // _paramHash.Add("oncompleteparams", this); // _paramHash.Add("oncompletetarget", _baseCtrl.objProxy.gameObject); iTween.RotateTo(sTarget.gameObject, _paramHash); }
/// /////////////////////////////// 功能函数 /////////////////////////////////////////////////////////////// private void SmoothTarget(paramInfo pmInfo) { _paramHash.Clear(); _paramHash.Add("time", time); _paramHash.Add("amount", pmInfo.amount); _paramHash.Add("easetype", iTween.EaseType.linear); // _paramHash.Add("oncomplete", "OnProxyFinish"); // _paramHash.Add("oncompleteparams", this); // _paramHash.Add("oncompletetarget", _baseCtrl.objProxy.gameObject); if (pmInfo.type == 0) iTween.CameraFadeTo(_paramHash); else if(pmInfo.type == 1) { iTween.CameraFadeFrom(_paramHash); } else { Debug.Log("StoryTweenFadeCtrl not have dwType:" + pmInfo.type); } }
/// /////////////////////////////// 功能函数 /////////////////////////////////////////////////////////////// private void OnCameraSmooth(paramInfo pInfo) { if (pInfo.type == 0) { objMainCamera.ClearParam(); objMainCamera.AddParam("time", time); objMainCamera.AddParam("oncomplete", "oncomplete"); objMainCamera.AddParam("oncompleteparams", new LuaObjWithCallFun()); objMainCamera.AddParam("easetype", pInfo.easetype); //EventDelegate.Add(objMainCamera.onTweenStop, OnFinish); objMainCamera.onTweenStop += OnFinish; if (pInfo.step > 1) { float lrRange = (pInfo.norInfo.rotationLR) / pInfo.step; float udRange = (pInfo.norInfo.rotationUD) / pInfo.step; Vector3[] path = new Vector3[pInfo.step]; for (int i = 1; i <= pInfo.step; i++) { float lr = objMainCamera.LRAnge + i * lrRange; float ud = objMainCamera.UDAngle + i * udRange; path[i - 1] = objMainCamera.virtualPos(objMainCamera.distance, lr, ud); } objMainCamera.AddParam("path", path); } objMainCamera.distance += pInfo.norInfo.distance; objMainCamera.UDAngle += pInfo.norInfo.rotationUD; objMainCamera.LRAnge += pInfo.norInfo.rotationLR; objMainCamera.calculatePos(true); } else if(pInfo.type == 1) { objMainCamera.StopTween(); _pathTarget.Stop(); _pathTarget.SetAnimTarget(objMainCamera.transform); _pathTarget.Play(); } else if (pInfo.type == 2) { objMainCamera.target = null; objMainCamera.StopTween(); objMainCamera.transform.localPosition = Vector3.zero; objMainCamera.transform.localEulerAngles = Vector3.zero; _pathTarget.Stop(); _pathTarget.SetAnimTarget(objMainCamera.proxyParent); _pathTarget.Play(); } else if (pInfo.type == 3) { _pathTarget.Stop(); _pathTarget.SetAnimTarget(_shotCtrl.actor.target.transform); _pathTarget.Play(); } }