public void CopyFrom(SmoothFollow2 sf2) { this.bControl = sf2.bControl; this.bInUI = sf2.bInUI; this.target = sf2.target; this.targetRoot = sf2.targetRoot; this.baseHeight = sf2.baseHeight; this.height = sf2.height; this.damping = sf2.damping; this.rotationDamping = sf2.rotationDamping; this.CenterOffset = sf2.CenterOffset; this.CamDistance = sf2.CamDistance; this.fieldOfView = sf2.fieldOfView; this.CamPos = sf2.CamPos; this.CamRot = sf2.CamRot; this.FocalPos = sf2.FocalPos; this.LastTargetPos = sf2.LastTargetPos; this.LastWantedRotation = sf2.LastWantedRotation; this.charCtrl = sf2.charCtrl; this.CanScroll = sf2.CanScroll; this.shakeScript = sf2.shakeScript; this.curShakeType = sf2.curShakeType; this.HVByLoadArchive = sf2.HVByLoadArchive; this.offsetScale = sf2.offsetScale; this.TargetCamRot = sf2.TargetCamRot; this.bJolt = sf2.bJolt; this.lastAngleH = sf2.lastAngleH; this.bNeedReturn = sf2.bNeedReturn; this.ReturnSpeed = sf2.ReturnSpeed; this.bUseLeftReturn = sf2.bUseLeftReturn; this.CameraRadius = sf2.CameraRadius; this.InsideFun = sf2.InsideFun; this.horizontalRotSpeed = sf2.horizontalRotSpeed; this.verticalRotSpeed = sf2.verticalRotSpeed; this.angleH = sf2.angleH; this.angleV = sf2.angleV; this.maxVerticalAngle = sf2.maxVerticalAngle; this.minVerticalAngle = sf2.minVerticalAngle; this.m_maxVerticalAngle = sf2.m_maxVerticalAngle; this.m_minVerticalAngle = sf2.m_minVerticalAngle; this.TargetCamDistance = sf2.TargetCamDistance; this.MaxDistance = sf2.MaxDistance; this.MinDistance = sf2.MinDistance; this.currentDistance = sf2.currentDistance; this.elasticSpeed = sf2.elasticSpeed; this.ray = sf2.ray; this.cullPlayer = sf2.cullPlayer; this.posOrig = sf2.posOrig; this.posEnd = sf2.posEnd; this.YSpeed = sf2.YSpeed; this.UseYSpeed = sf2.UseYSpeed; this.curY = sf2.curY; this.BigMap_maxVerticalAngle = sf2.BigMap_maxVerticalAngle; this.BigMap_verticalRotSpeed = sf2.BigMap_verticalRotSpeed; this.BigMap_CamDistanceSpeed = sf2.BigMap_CamDistanceSpeed; this.BigMap_maxVerticalAngleK = sf2.BigMap_maxVerticalAngleK; this.lastDistance = sf2.lastDistance; this.lastVerticalAngle = sf2.lastVerticalAngle; this.MiddleEvent = sf2.MiddleEvent; }
public static PalShake StartShake(GameObject go, Vector3 amount, float speed, float time, bool permanent = false, float intensity = 1f) { PalShake palShake = go.GetComponent <PalShake>(); if (palShake == null || palShake.GonaDestroy) { palShake = go.AddComponent <PalShake>(); } palShake.CurShakeType = ShakeType.Shake; if (palShake.typeList.Contains(ShakeType.Shake)) { palShake.typeList.Remove(ShakeType.Shake); } palShake.typeList.Add(ShakeType.Shake); palShake.StartShake(amount, speed, time, permanent, intensity); palShake.referPos = go.transform.position; return(palShake); }
public static PalShake StartShake(GameObject go, Vector3 hhIntensity, float hhSpeed) { PalShake palShake = go.GetComponent <PalShake>(); if (palShake == null || palShake.GonaDestroy) { palShake = go.AddComponent <PalShake>(); } palShake.CurShakeType = ShakeType.Hand_held; if (palShake.typeList.Contains(ShakeType.Hand_held)) { palShake.typeList.Remove(ShakeType.Hand_held); } palShake.typeList.Add(ShakeType.Hand_held); palShake.handheldIntensity = hhIntensity; palShake.handheldSpeed = hhSpeed; palShake.referPos = go.transform.position; palShake.permanent = true; palShake.lifeSpan = 0f; return(palShake); }
public static PalShake StartShake(GameObject go, Vector3 amount, float speed, int minSpaceTime, int maxSpaceTime, int minShakeTime, int maxShakeTime, float intensity = 1f) { PalShake palShake = go.GetComponent <PalShake>(); if (palShake == null || palShake.GonaDestroy) { palShake = go.AddComponent <PalShake>(); } palShake.CurShakeType = ShakeType.InterimShake; if (palShake.typeList.Contains(ShakeType.InterimShake)) { palShake.typeList.Remove(ShakeType.InterimShake); } palShake.typeList.Add(ShakeType.InterimShake); palShake.StartShake(amount, speed, 0f, true, intensity); palShake.referPos = go.transform.position; palShake.minSpaceTime = minSpaceTime; palShake.maxSpaceTime = maxSpaceTime; palShake.minShakeTime = minShakeTime; palShake.maxShakeTime = maxShakeTime; palShake.curSpaceTime = (float)UnityEngine.Random.Range(minShakeTime, maxShakeTime); return(palShake); }