public void OnSet() { _tween = new TweenSequence(() => GameCore.Instance.SceneManager.SetScene(new OutroScene())); _tween.AddTween(new TweenSleep(30)); _tween.AddTween(new TweenCallback(() => Sfx.Punch.Play(Save.SoundVolume, 0, 0))); _tween.AddTween(new TweenSleep(30)); _tween.AddTween(new TweenCallback(() => Sfx.BodyFall.Play(Save.SoundVolume, 0, 0))); _tween.AddTween(new TweenSleep(150)); }
public void OnSet() { _texture = Gfx.LoadOutroTexture(); _tween = new TweenSequence(); _tween.AddTween(new TweenFloat(0, 1, 60, x => _alpha = x)); _tween.AddTween(new TweenSleep(40 * 60)); _tween.AddTween(new TweenFloat(1, 0, 60, x => _alpha = x)); _tween.AddTween(new TweenCallback(() => GameCore.Instance.Exit())); Sfx.MusicOutro.Play(Save.MusicVolume, 0, 0); }
public void OnSet() { _textColor = Color.White; _textColor.A = 0; _tween.Clear(); _tween.AddTween(new TweenFloat(0, 0, PreWaitDuration)); _tween.AddTween(new TweenFloat(0, 255, FadeDuration, v => _textColor.A = (byte)v)); _tween.AddTween(new TweenFloat(0, 0, WaitDuration)); _tween.AddTween(new TweenFloat(255, 0, FadeDuration, v => _textColor.A = (byte)v)); _tween.AddTween(new TweenFloat(0, 0, PostWaitDuration)); }
private void AddCredit(string header, string body) { _tween.AddTween(new TweenCallback(GetSetTextAction(header, body))); _tween.AddTween(new TweenFloat(0, 1, 30, x => { _header.Alpha = x; _body.Alpha = x; })); _tween.AddTween(new TweenSleep(160)); _tween.AddTween(new TweenFloat(1, 0, 30, x => { _header.Alpha = x; _body.Alpha = x; })); _tween.AddTween(new TweenSleep(30)); }
private void AddTextTween(string text, SoundEffect voiceOver = null, int textDisplayDuration = TextDisplayDuration) { _tweenSequence.AddTween(new TweenCallback(() => _text.Text = text)); _tweenSequence.AddTween(new TweenFloat(0, 1, TextFadeInDuration, alpha => _text.Alpha = alpha)); if (voiceOver != null) { _tweenSequence.AddTween(new TweenCallback(TryToUnloadCurrentSoundInstace)); _tweenSequence.AddTween(new TweenCallback(() => { _voiceOverInstance = voiceOver.CreateInstance(); _voiceOverInstance.Volume = Save.VoiceOverVolume; _voiceOverInstance.Play(); })); } _tweenSequence.AddTween(new TweenSleep(voiceOver != null ? (int)(voiceOver.Duration.TotalSeconds * 60) : textDisplayDuration)); _tweenSequence.AddTween(new TweenFloat(1, 0, TextFadeOutDuration, alpha => _text.Alpha = alpha)); }
public void AddDelay() { _tween.AddTween(new TweenSleep(60)); }