public void AnimateAppearance() { HandyAnimator anim = HandyAnimator.OfFloat(0, 1, AppearanceDuration); anim.Update += (value) => VisiblePart = (float)(value); anim.core.Start(); SoundMaster.PlaySound(SoundMaster.SegmentBornSound); }
public void Show(Side fromSide) { pivot.X = (fromSide == Side.Left) ? -GameView.CanonWidth : GameView.CanonWidth; pivot.X *= GameView.scaleFactor; ReleaseAnimation(); BeforeShow(); AnimateSwitch(pivot.X, 0, AfterShow); SoundMaster.PlaySound(SoundMaster.SceneSwitchSound); }
public override void OnTouchUp(int x, int y) { if (disturbed) { disturbed = false; AnimateDivingTo(0); SoundMaster.PlaySound(SoundMaster.ButtonSound); Pressed?.Invoke(); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); SoundMaster.LoadSounds(); InitScenes(); HandyAnimator delayAnim = HandyAnimator.OfNothing(500); delayAnim.After += () => LogoScene.Instance.Show(Side.Right); delayAnim.core.Start(); }
public void AnimateAppearance() { HandyAnimator apAnim = HandyAnimator.OfFloat(0, 1, BirthDuration); apAnim.core.SetInterpolator(new OvershootInterpolator(2)); apAnim.core.StartDelay = (int)(random.NextDouble() * MaxBirthDelay); apAnim.Update += (value) => BirthScaleFactor = (float)value; apAnim.core.AnimationStart += (sender, e) => SoundMaster.PlaySound(SoundMaster.PointBornSound); apAnim.core.Start(); }
protected override void OnDestroy() { base.OnDestroy(); TaskRegistrator.CancelAllTasks(); TouchHandler.RemoveAllListeners(); HandyAnimator.OnActivityDestroy(); SoundMaster.StopAllSounds(); SoundMaster.UnloadSounds(); RemoveScenes(); GameView.Instance = null; GC.Collect(); }