Exemple #1
0
 public Scoreboard(string guidFromMain = "", Classes.CustomSnapshotRoot root = null)
 {
     guid = guidFromMain;
     Classes.Logger.addLog("Opened scoreboard on server -> " + guid);
     InitializeComponent();
     if (root != null)
     {
         Classes.ScoreboardRenderer render = new Classes.ScoreboardRenderer(this, root.snapshot.mapId, root);
         Classes.Logger.addLog("Enabled initial render: ");
     }
     else
     {
         _timer          = new System.Timers.Timer(3000);
         _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);
         _timer.Enabled  = true; // Enable it
         _timer_Elapsed(this, null);
     }
     if (MainWindow.keeperSettings.ScoreboardBackgrounds == false)
     {
         BackgroundAnimation.Stop();
         BackgroundAnimation.Visibility = Visibility.Hidden;
     }
     else
     {
         BackgroundAnimation.Play();
     }
 }
        public void Render(ILayer mainLayer)
        {
            mainLayer.Save();

            if (BackgroundAnimation != null)
            {
                BackgroundAnimation.Render(mainLayer);
            }
            else
            {
                switch (BgSlidingState)
                {
                case BgSlidingState.Left:
                    mainLayer.Translate(0, 0);
                    mainLayer.DrawImage(Assets.Images.Layouts.CloudlessMainBg, 0, 0);
                    break;

                case BgSlidingState.Right:
                    mainLayer.Translate(-384, 0);
                    mainLayer.DrawImage(Assets.Images.Layouts.CloudlessMainBg, 0, 0);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }


            Cloud1Path.Animation.Render(mainLayer);
            Cloud2Path.Animation.Render(mainLayer);
            Cloud3Path.Animation.Render(mainLayer);

            mainLayer.Restore();
        }
Exemple #3
0
        private IEnumerator startBackgroundAnimation()
        {
            yield return(new WaitForSeconds(3f));

            BackgroundAnimation.clip = BackgroundAnimation.GetClip("TitleviewFadeOut");
            BackgroundAnimation.Play();
            StartCoroutine(startPlayerWalkAnimation());
        }
 public void TickLayoutView(TimeSpan elapsedGameTime)
 {
     Cloud1Path.Animation.Tick(elapsedGameTime);
     Cloud2Path.Animation.Tick(elapsedGameTime);
     Cloud3Path.Animation.Tick(elapsedGameTime);
     if (BackgroundAnimation != null)
     {
         BackgroundAnimation.Tick(elapsedGameTime);
     }
 }
Exemple #5
0
 public FirstTimeTutorial()
 {
     InitializeComponent();
     DedicatedStoryBoard.Begin();
     BackgroundAnimation.Begin();
 }
 private void SetPageAnimation(BackgroundAnimation animation, long time)
 {
     SharedTransitionNavigationPage.SetBackgroundAnimation(this, animation);
     SharedTransitionNavigationPage.SetTransitionDuration(this, time);
 }
 public override void NavigatedTo(Windows.UI.Xaml.Navigation.NavigationMode mode, object parameter)
 {
     base.NavigatedTo(mode, parameter);
     BackgroundAnimation.Begin();
 }
Exemple #8
0
 void Awake()
 {
     Instance = this;
 }
Exemple #9
0
 public static T BackgroundAnimation <T>(this T page, BackgroundAnimation value) where T : IRxPage
 {
     page.SetAttachedProperty(SharedTransitionNavigationPage.BackgroundAnimationProperty, value);
     return(page);
 }