using UnityEngine; using System.Collections; namespace Thousandto.Code.Global { /// /// 在此类中进行 常量定义,静态定义 /// public static class GameDefine { //怪物闪烁的曲线 public static AnimationCurve MonsterBlinkCurve = new AnimationCurve( new Keyframe(0.0f, 1.02f), new Keyframe(0.18f, 2.48f), new Keyframe(0.54f, 1.74f), new Keyframe(1.0f, 1.02f) ); //怪物闪烁的时间 public static float MonsterBlinkTime = 0.4f; //怪物闪烁的强度 public static float MonsterBlinkPower = 1; //怪物震动的曲线 public static AnimationCurve MonserShakeCurve = new AnimationCurve( new Keyframe(0.0f, 0.0f), new Keyframe(0.06f, 0.28f), new Keyframe(0.12f, -0.14f), new Keyframe(0.21f, 0.17f), new Keyframe(0.26f, -0.09f), new Keyframe(0.34f, 0.11f), new Keyframe(0.38f, -0.07f), new Keyframe(0.45f, 0.07f), new Keyframe(0.52f, -0.03f), new Keyframe(0.65f, 0.0f), new Keyframe(1.0f, 0.01f) ); //怪物震动的时间 public static float MonsterShakeTime = 0.3f; //怪物震动的力度 public static float MonsterShakePower = 0.15f; //怪物渐显的时间 public static float MonsterFadeInTime = 2.0f; //死亡效果曲线 public static AnimationCurve DyingEffectCurve = new AnimationCurve( new Keyframe(0.0f, 0.0f), new Keyframe(0.5f, 1.0f), new Keyframe(1.0f, 0.0f) ); //死亡效果时间 public static float DyingEffectTime = 1f; //死亡效果的力度 public static float DyingEffectPower = 1f; //摄像机震动的曲线0 public static AnimationCurve CameraShakeCurve0 = new AnimationCurve( new Keyframe(0, 0), new Keyframe(0.03f, 0.29f), new Keyframe(0.06f, -0.3f), new Keyframe(0.09f, 0.24f), new Keyframe(0.12f, -0.20f), new Keyframe(0.18f, 0.19f), new Keyframe(0.21f, -0.15f), new Keyframe(0.26f, 0.16f), new Keyframe(0.30f, -0.12f), new Keyframe(0.35f, 0.15f), new Keyframe(0.38f, -0.12f), new Keyframe(0.43f, 0.13f), new Keyframe(0.47f, -0.11f), new Keyframe(0.51f, 0.10f), new Keyframe(0.53f, -0.07f), new Keyframe(0.55f, 0.05f), new Keyframe(0.58f, -0.03f), new Keyframe(0.60f, 0.03f), new Keyframe(0.68f, 0.0f), new Keyframe(1f, 0.0f) ); //摄像机震动曲线1 public static AnimationCurve CameraShakeCurve1 = new AnimationCurve( new Keyframe(.00286145834f, .000791691011f), new Keyframe(.207709253f, .00215172209f), new Keyframe(.240525663f, -.049020499f), new Keyframe(.277893901f, .1972882f), new Keyframe(.282138824f, -.191196516f), new Keyframe(.30895263f, .23411788f), new Keyframe(.360184669f, -.252662688f), new Keyframe(.369529247f, .270057827f), new Keyframe(.40912056f, -.277744025f), new Keyframe(.425533772f, .289491951f), new Keyframe(.447261035f, -.314859122f), new Keyframe(.483038783f, .260558218f), new Keyframe(.493636131f, -.284817636f), new Keyframe(.524803042f, .246979177f), new Keyframe(.554259598f, -.235227361f), new Keyframe(.580078959f, .219205275f), new Keyframe(.597099066f, -.21104385f), new Keyframe(.621209741f, .182257965f), new Keyframe(.646193027f, -.193617091f), new Keyframe(.667373538f, .146689609f), new Keyframe(.691121101f, -.176821306f), new Keyframe(.721702099f, .125082478f), new Keyframe(.75148654f, -.178960815f), new Keyframe(.763221145f, .118967667f), new Keyframe(.796180248f, -.182405457f), new Keyframe(.810846686f, .115622357f), new Keyframe(.840867639f, -.182774261f), new Keyframe(.85116899f, .130688652f), new Keyframe(.880626678f, -.176360562f), new Keyframe(.892588377f, .12531811f), new Keyframe(.92248404f, -.177173302f), new Keyframe(.932090163f, .125738457f), new Keyframe(.955161095f, -.17414172f), new Keyframe(.97323966f, .122781448f), new Keyframe(.995889902f, -.169117436f), new Keyframe(1.00520289f, .112593882f), new Keyframe(1.03272414f, -.176946893f), new Keyframe(1.04092634f, .109299488f), new Keyframe(1.07381773f, -.163487181f), new Keyframe(1.08258832f, .106958114f), new Keyframe(1.1092087f, -.160076573f), new Keyframe(1.12798703f, .103956334f), new Keyframe(1.15277171f, -.15518786f), new Keyframe(1.16347849f, .0943798497f), new Keyframe(1.19182861f, -.151911438f), new Keyframe(1.19830346f, .0943199769f), new Keyframe(1.23005509f, -.149068549f), new Keyframe(1.24720144f, .0927762166f), new Keyframe(1.27119064f, -.148429215f), new Keyframe(1.28255832f, .0814283714f), new Keyframe(1.31337428f, -.142516002f), new Keyframe(1.31792784f, .0721656233f), new Keyframe(1.35290813f, -.114523083f), new Keyframe(1.35355508f, .0664048418f), new Keyframe(1.39669776f, .00103982445f), new Keyframe(1.59634101f, -.00280949287f) ); //摄像机震动曲线2 public static AnimationCurve CameraShakeCurve2 = new AnimationCurve( new Keyframe(.00574633479f, 7.4505806e-09f), new Keyframe(.00768568879f, .00524855405f), new Keyframe(.0292396545f, .249097288f), new Keyframe(.0459455103f, -.198177606f), new Keyframe(.0790079236f, .2258614f), new Keyframe(.096507594f, -.178818613f), new Keyframe(.120939389f, .200653821f), new Keyframe(.154260322f, -.163428158f), new Keyframe(.157331109f, .186687112f), new Keyframe(.197724655f, -.160745442f), new Keyframe(.21560812f, .174449623f), new Keyframe(.262779623f, -.134522051f), new Keyframe(.276715934f, .16738674f), new Keyframe(.311875254f, -.129890561f), new Keyframe(.3392618f, .159872413f), new Keyframe(.369763583f, -.116927631f), new Keyframe(.397201717f, .138109297f), new Keyframe(.437791556f, -.097942844f), new Keyframe(.450408489f, .113371111f), new Keyframe(.486772746f, -.0825080052f), new Keyframe(.503839672f, .0996411145f), new Keyframe(.540451646f, -.0816661939f), new Keyframe(.560877144f, .086804308f), new Keyframe(.587202787f, -.0787797049f), new Keyframe(.607789636f, .0816660151f), new Keyframe(.639985263f, -.0732368082f), new Keyframe(.664039373f, .0690324157f), new Keyframe(.693112254f, -.0621521994f), new Keyframe(.720165372f, .0622194484f), new Keyframe(.746323705f, -.0539627075f), new Keyframe(.765027881f, .0528957061f), new Keyframe(.792262375f, -.037770763f), new Keyframe(.817142904f, .0259127207f), new Keyframe(.857361376f, -.0194732305f), new Keyframe(.878897667f, .0182904936f), new Keyframe(.929263949f, .00107148197f), new Keyframe(1.0004729f, -.00403778534f) ); //摄像机震动曲线3 public static AnimationCurve CameraShakeCurve3 = new AnimationCurve( new Keyframe(0f, 0f), new Keyframe(0.1f, 0.5f), new Keyframe(0.2f, 3f), new Keyframe(0.3333f, 8f), new Keyframe(0.5f, 8f), new Keyframe(0.6666f, 0f), new Keyframe(0.68f, -2.5f), new Keyframe(0.695f, 2f), new Keyframe(0.71f, -1.5f), new Keyframe(0.725f, 1f), new Keyframe(0.74f, -0.5f), new Keyframe(0.755f, 0.0f), new Keyframe(1f, 0f) ); //摄像机震动的力度 public static float CameraShakePower = 1.0f; //摄像机震动的时间 public static float CameraShakeTime = 0.2f; //获取一个摄像机震动曲线 public static AnimationCurve GetCurve(int id) { switch (id) { case 0: return CameraShakeCurve0; case 1: return CameraShakeCurve1; case 2: return CameraShakeCurve2; case 3: return CameraShakeCurve3; default: return CameraShakeCurve0; } } //用于分割作用的下划线 public static char[] SplitUnderline = new char[] { '_' }; //用于分割作用的分号 public static char[] SplitSemicolon = new char[] { ';' }; #if UNITY_STANDALONE_WIN //默认的目标帧率 public static int DefaultTargetFrameRate = 60; #else //默认的目标帧率 public static int DefaultTargetFrameRate = 32; #endif } }