Example #1
0
        public void AddShakeEvent(float amplitude, float frequency, float duration, AnimationCurve blendOverLifetime,
                                  ShakeTransformEventData.Target target)
        {
            ShakeTransformEventData data = ShakeTransformEventData.CreateInstance <ShakeTransformEventData>();

            data.Init(amplitude, frequency, duration, blendOverLifetime, target);

            AddShakeEvent(data);
        }
Example #2
0
            public ShakeEvent(ShakeTransformEventData data)
            {
                this.data = data;

                duration      = data.duration;
                timeRemaining = duration;

                float rand = 32.0f;

                noiseOffset.x = Random.Range(0.0f, rand);
                noiseOffset.y = Random.Range(0.0f, rand);
                noiseOffset.z = Random.Range(0.0f, rand);
            }
Example #3
0
 public void AddShakeEvent(ShakeTransformEventData data)
 {
     shakeEvents.Add(new ShakeEvent(data));
 }