private void Init() { #region Cover coverCount = 0; coverCountLimit = 100; coverSize = new Vector2(120.0f, 90.0f); coverSizeLimit = new Vector2(200.0f, 200.0f); coverAngle = 0.0f; coverDistanceF = 100.0f; coverDistanceLimit = 200.0f; distanceRange = 0.0f; coverDistanceZ = 0.0f; coverDistanceZLimit = 200.0f; coverDistanceZMode = COVER_DISTANCE_Z_MODE.Disable; #endregion Cover #region Click clickMode = CLICK_MODE.None; #endregion Click #region Texture textureList = new List <Texture>(); textureMode = TEXTURE_MODE.Loop; #endregion Texture #region Drag dragPower = 1.0f; dragPowerLimit = 3.0f; dragMode = DRAG_MODE.OnScreen; dragRect = new Rect(0.0f, 0.0f, 1.0f, 1.0f); isInverseDrag = BOOL.No; isDragOnAxis = BOOL.Yes; #endregion Drag #region Effect After Drag isEffectAfterDrag = BOOL.Yes; isMoveToNearCover = BOOL.Yes; effectAfterDragTime = 1.0f; effectAfterDragTimeLimit = 3.0f; effectAfterDragCurve = new AnimationCurve(new Keyframe[] { new Keyframe(0.0f, 0.0f, 0.0f, 3.0f), new Keyframe(1.0f, 1.0f, 0.0f, 0.0f) }); #endregion Effect After Drag #region Position positionRate = 1.0f; positionRateLimit = 10.0f; positionInfluenceRange = 200.0f; positionInfluenceRangeLimit = 1000.0f; positionCurve = new AnimationCurve(new Keyframe[] { new Keyframe(0.0f, 0.0f, 0.0f, 3.0f), new Keyframe(1.0f, 1.0f, 0.0f, 0.0f) }); #endregion Position #region Rotate isLookatCenter = BOOL.Yes; isRotateOnAxis = BOOL.Yes; rotateRate = 60.0f; rotateRateLimit = 120.0f; rotateInfluenceRange = 100.0f; rotateInfluenceRangeLimit = 200.0f; rotateCurve = new AnimationCurve(new Keyframe[] { new Keyframe(0.0f, 0.0f, 0.0f, 3.0f), new Keyframe(1.0f, 1.0f, 0.0f, 0.0f) }); #endregion Rotate #region Scale scaleRate = 0.5f; scaleRateLimit = new Vector2(-1.0f, 2.0f); scaleInfluenceRange = 100.0f; scaleInfluenceRangeLimit = 200.0f; scaleCurve = AnimationCurve.EaseInOut(0.0f, 0.0f, 1.0f, 1.0f); #endregion Scale #region Alpha alphaRate = 1.0f; alphaRateLimit = 2.0f; alphaInfluenceRange = 300.0f; alphaInfluenceRangeLimit = 600.0f; alphaCurve = AnimationCurve.EaseInOut(0.0f, 0.0f, 1.0f, 1.0f); #endregion Alpha #region Depth panelDepth = 0.0f; panelDepthLimit = new Vector2(0.0f, 100.0f); coverDepth = new Vector2(0.0f, 1000.0f); coverDepthLimit = new Vector2(-1000.0f, 1000.0f); depthInfluenceRange = 500.0f; depthInfluenceRangeLimit = 1000.0f; depthCurve = new AnimationCurve(new Keyframe[] { new Keyframe(0.0f, 0.0f, 0.0f, 3.0f), new Keyframe(1.0f, 1.0f, 0.0f, 0.0f) }); #endregion Depth #region Other isPanelMove = BOOL.No; beginFlowIndex = 0.0f; coverMode = COVER_MODE.Disabled; #endregion Other }
private void LoadFromSaveData(SaveData saveData) { #region Cover coverSize = saveData.coverSize; coverSizeLimit = saveData.coverSizeLimit; coverAngle = saveData.coverAngle; coverDistanceF = saveData.coverDistanceF; coverDistanceLimit = saveData.coverDistanceLimit; coverDistanceZ = saveData.coverDistanceZ; coverDistanceZLimit = saveData.coverDistanceZLimit; coverDistanceZMode = saveData.coverDistanceZMode; #endregion #region Texture textureList = saveData.textureList.GetRange(0, saveData.textureList.Count); textureMode = saveData.textureMode; #endregion #region Drag dragPower = saveData.dragPower; dragPowerLimit = saveData.dragPowerLimit; dragMode = saveData.dragMode; dragRect = saveData.dragRect; isInverseDrag = saveData.isInverseDrag; isDragOnAxis = saveData.isDragOnAxis; #endregion #region Effect After Drag isEffectAfterDrag = saveData.isEffectAfterDrag; isMoveToNearCover = saveData.isMoveToNearCover; effectAfterDragTime = saveData.effectAfterDragTime; effectAfterDragTimeLimit = saveData.effectAfterDragTimeLimit; effectAfterDragCurve = saveData.effectAfterDragCurve; #endregion #region Position positionRate = saveData.positionRate; positionRateLimit = saveData.positionRateLimit; positionInfluenceRange = saveData.positionInfluenceRange; positionInfluenceRangeLimit = saveData.positionInfluenceRangeLimit; positionCurve = saveData.positionCurve; #endregion #region Rotate isLookatCenter = saveData.isLookatCenter; isRotateOnAxis = saveData.isRotateOnAxis; rotateRate = saveData.rotateRate; rotateRateLimit = saveData.rotateRateLimit; rotateInfluenceRange = saveData.rotateInfluenceRange; rotateInfluenceRangeLimit = saveData.rotateInfluenceRangeLimit; rotateCurve = saveData.rotateCurve; #endregion #region Scale scaleRate = saveData.scaleRate; scaleRateLimit = saveData.scaleRateLimit; scaleInfluenceRange = saveData.scaleInfluenceRange; scaleInfluenceRangeLimit = saveData.scaleInfluenceRangeLimit; scaleCurve = saveData.scaleCurve; #endregion #region Alpha alphaRate = saveData.alphaRate; alphaRateLimit = saveData.alphaRateLimit; alphaInfluenceRange = saveData.alphaInfluenceRange; alphaInfluenceRangeLimit = saveData.alphaInfluenceRangeLimit; alphaCurve = saveData.alphaCurve; #endregion #region Depth panelDepth = saveData.panelDepth; panelDepthLimit = saveData.panelDepthLimit; coverDepth = saveData.coverDepth; coverDepthLimit = saveData.coverDepthLimit; depthInfluenceRange = saveData.depthInfluenceRange; depthInfluenceRangeLimit = saveData.depthInfluenceRangeLimit; depthCurve = saveData.depthCurve; #endregion #region Other isPanelMove = saveData.isPanelMove; beginFlowIndex = saveData.beginFlowIndex; #endregion }