コード例 #1
0
        /// <summary>
        /// Adding dying animation for each Invader object.
        /// </summary>
        private static void addDyingAnimation()
        {
            /// Dying animation for enemies
            SpinAnimation     spinAnimationForEnemies   = new SpinAnimation("Spin", sr_dyingTimeForEnemies, sr_dyingSpinsForEnemies, sr_commonOrigin);
            ShrinkAnimation   shrinkAnimationForEnemies = new ShrinkAnimation("Shrink", sr_dyingTimeForEnemies);
            AnimationsLibrary enemyDyingAnimation       = new AnimationsLibrary("Enemy Dying", sr_dyingTimeForEnemies);

            enemyDyingAnimation.AddAnimation(spinAnimationForEnemies, shrinkAnimationForEnemies);
            s_animationsManager.AddAnimationToManager(enemyDyingAnimation);
            /// Attacked animation for spaceships
            bool              v_FinalVisibility           = true;
            BlinkAnimation    blinkAnimationForSpaceships = new BlinkAnimation("Blink", sr_attackedTimeForSpaceships, sr_attackedBlinksForSpaceships, v_FinalVisibility);
            AnimationsLibrary spaceshipAttackedAnimation  = new AnimationsLibrary("Spaceship Attacked", sr_attackedTimeForSpaceships);

            spaceshipAttackedAnimation.AddAnimation(blinkAnimationForSpaceships);
            s_animationsManager.AddAnimationToManager(spaceshipAttackedAnimation);
            /// Dying animation for spaceships
            SpinAnimation     spinAnimationForSpaceships   = new SpinAnimation("Spin", sr_dyingTimeForSpaceships, sr_dyingSpinsForSpaceships, sr_commonOrigin);
            FadeOutAnimation  fadeOutAnimationForSpaceship = new FadeOutAnimation("Fade Out", sr_dyingTimeForSpaceships);
            AnimationsLibrary spaceshipDyingAnimation      = new AnimationsLibrary("Spaceship Dying", sr_dyingTimeForSpaceships);

            spaceshipDyingAnimation.AddAnimation(spinAnimationForSpaceships, fadeOutAnimationForSpaceship);
            s_animationsManager.AddAnimationToManager(spaceshipDyingAnimation);
            /// Attacked animation for motherships
            ShrinkAnimation   shrinkAnimationForMotherships = new ShrinkAnimation("Shrink", sr_attackedTimeForMotherships);
            BlinkAnimation    blinkAnimationForMotherships  = new BlinkAnimation("Blink", sr_attackedTimeForMotherships, sr_attackedBlinksForMotherships);
            FadeOutAnimation  fadeOutAnimationForMothership = new FadeOutAnimation("Fade Out", sr_attackedTimeForMotherships);
            AnimationsLibrary mothershipDyingAnimation      = new AnimationsLibrary("Mothership Attacked", sr_attackedTimeForMotherships);

            mothershipDyingAnimation.AddAnimation(shrinkAnimationForMotherships, blinkAnimationForMotherships, fadeOutAnimationForMothership);
            s_animationsManager.AddAnimationToManager(mothershipDyingAnimation);
        }
コード例 #2
0
        private void shrinkplayarea()
        {
            ShrinkAnimation.Begin();
            Shrink.Glyph = "\uE738";
            ToolTipService.SetToolTip(Shrink, "陛下,真不能再小了");
            AlbumCover.Visibility            = Visibility.Collapsed;
            SongPLayingName.Visibility       = Visibility.Collapsed;
            SongPLayingSingerName.Visibility = Visibility.Collapsed;
            RelativePanel.SetAlignHorizontalCenterWithPanel(CommandButtons, false);

            RelativePanel.SetAlignRightWithPanel(PlayProcess, false);
            RelativePanel.SetAbove(CommandButtons, null);
            RelativePanel.SetAlignLeftWith(PlayProcess, null);
            RelativePanel.SetAlignLeftWithPanel(CommandButtons, true);
            RelativePanel.SetAlignBottomWithPanel(CommandButtons, true);
            RelativePanel.SetRightOf(PlayProcess, CommandButtons);
            RelativePanel.SetLeftOf(PlayProcess, Expand);
        }
コード例 #3
0
 private void SearchBox_OnPointerExited(object sender, RoutedEventArgs routedEventArgs)
 {
     ShrinkAnimation.Begin();
 }