示例#1
0
 public override void Update()
 {
     _score.TextAlign = TextAlign.Center;
     _text.TextAlign  = TextAlign.Center;
     _text.SetPosition(_game.HalfWidth, 300);
     _score.SetPosition(_game.HalfWidth, 200);
     _score.CenterOrigin();
     _text.CenterOrigin();
     _text.DefaultOutlineColor     = Color.White;
     _text.DefaultOutlineThickness = 3;
     _text.Refresh();
     _score.Refresh();
 }
示例#2
0
        public HudTitleInfo()
        {
            TextTitle.X   = Game.Instance.HalfWidth;
            TextDetails.X = Game.Instance.HalfWidth;
            TextWebzone.X = Game.Instance.HalfWidth;

            TextTitle.DefaultShadowX      = 3;
            TextTitle.DefaultShadowY      = 3;
            TextTitle.DefaultSineAmpY     = 10;
            TextTitle.DefaultSineRateY    = 10;
            TextTitle.DefaultOffsetAmount = 5;

            TextDetails.DefaultShadowX   = 1;
            TextDetails.DefaultShadowY   = 1;
            TextDetails.DefaultSineAmpX  = 1;
            TextDetails.DefaultSineAmpY  = 2;
            TextDetails.DefaultSineRateX = 5;
            TextDetails.DefaultSineRateY = 5;

            TextWebzone.DefaultCharColor = new Color("749ace");

            TextTitle.Refresh();
            TextDetails.Refresh();
            TextWebzone.Refresh();

            TextTitle.Y   = 200;
            TextDetails.Y = 300;
            TextWebzone.Y = 460;

            TextTitle.CenterOrigin();
            TextDetails.CenterOrigin();
            TextWebzone.CenterOrigin();

            AddGraphics(TextTitle, TextDetails, TextWebzone);

            EventRouter.Subscribe(Events.GameStarted, (EventRouter.Event e) =>
            {
                Tween(this, new { Y = 480 }, 30).Ease(Ease.BackIn);
            });
        }