Ejemplo n.º 1
0
        public void AnimateAppearance()
        {
            HandyAnimator anim = HandyAnimator.OfFloat(0, 1, AppearanceDuration);

            anim.Update += (value) => VisiblePart = (float)(value);
            anim.core.Start();
            SoundMaster.PlaySound(SoundMaster.SegmentBornSound);
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public override void OnTouchUp(int x, int y)
 {
     if (disturbed)
     {
         disturbed = false;
         AnimateDivingTo(0);
         SoundMaster.PlaySound(SoundMaster.ButtonSound);
         Pressed?.Invoke();
     }
 }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     TaskRegistrator.CancelAllTasks();
     TouchHandler.RemoveAllListeners();
     HandyAnimator.OnActivityDestroy();
     SoundMaster.StopAllSounds();
     SoundMaster.UnloadSounds();
     RemoveScenes();
     GameView.Instance = null;
     GC.Collect();
 }