fliXNA_xbox.FlxCamera.shake C# (CSharp) Method

shake() public method

Shake the screen
public shake ( float Intensity = 0.05f, float Duration = 0.5f, System.Action OnComplete = null, bool Force = true, uint Direction = SHAKE_BOTH_AXES ) : void
Intensity float
Duration float
OnComplete System.Action
Force bool
Direction uint
return void
        public void shake(float Intensity = 0.05f, float Duration = 0.5f, Action OnComplete=null, bool Force=true, uint Direction=SHAKE_BOTH_AXES)
        {
            if (!Force && ((_fxShakeOffset.x != 0) || (_fxShakeOffset.y != 0)))
                return;
            _fxShakeIntensity = Intensity;
            _fxShakeDuration = Duration;
            _fxShakeComplete = OnComplete;
            _fxShakeDirection = Direction;
            _fxShakeOffset.make();
        }