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(); }
public GameOverScreen(string titulo, string descricao) : base() { ImageEntity a = new ImageEntity(640, 360, "Images/rsz_bg.jpg"); a.Graphic.Alpha = 0.3f; Add(a); this.titulo = new RichText(titulo, 50); this.titulo.TextAlign = TextAlign.Center; this.titulo.SetPosition(10, -300); this.titulo.CenterOrigin(); this.titulo.Color = Color.White; this.titulo.DefaultOutlineColor = Color.Black; this.titulo.DefaultOutlineThickness = 30; a.AddGraphic(this.titulo); desc = new RichText(descricao, 30); desc.TextAlign = TextAlign.Center; desc.SetPosition(10, -100); desc.CenterOrigin(); desc.Color = Color.White; desc.DefaultOutlineColor = Color.Black; desc.DefaultOutlineThickness = 2; a.AddGraphic(desc); stats = new RichText("Seus Status: " + "\n Ecologia : " + PlayerStats.stats.Eco + "\n População: " + PlayerStats.stats.Pop + "\n Tecnologia: " + PlayerStats.stats.Tech + "\n Felicidade: " + PlayerStats.stats.Mood + "\n ANO: " + PlayerStats.stats.Year, 30); stats.TextAlign = TextAlign.Center; stats.SetPosition(10, 200); stats.CenterOrigin(); stats.Color = Color.White; stats.DefaultOutlineColor = Color.Black; stats.DefaultOutlineThickness = 30; a.AddGraphic(stats); }
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); }); }