Ejemplo n.º 1
0
        //屏幕振动
        public void Shakecamera(float period, float offPeriod, int shakeOrient, float shakeTime, float maxWave, float minWave)
        {
            ShakeCamera shakeCamera = Camera.main.GetComponent <ShakeCamera>();

            if (shakeCamera == null)
            {
                shakeCamera = Camera.main.gameObject.AddComponent <ShakeCamera>();
            }
            shakeCamera.ShakeScreen((ShakeCamera.ShakeOrient)shakeOrient, period, shakeTime, maxWave, minWave, offPeriod);
        }