protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd)
		{
			LifeBar = new DrawableRectangle(new Vector2(MAX_WIDTH,NORMAL_HEIGHT),new Vector2(-MAX_WIDTH / 2f, -NORMAL_HEIGHT / 2f), IsAlly ? Color.Green: Color.DarkRed);
			AddChild(new DrawableRectangle(new Vector2(MAX_WIDTH + CONTOUR_WIDTH * 2f, NORMAL_HEIGHT + CONTOUR_WIDTH * 2f), 
			                               new Vector2(-(MAX_WIDTH + CONTOUR_WIDTH * 2f)/2f, -(NORMAL_HEIGHT + CONTOUR_WIDTH * 2f)/2f), Color.White));
			AddChild(LifeBar);
		}
예제 #2
0
		protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd)
		{
			Overlay = new DrawableRectangle(new GREATLib.Rect(0, 0, screenService.GameWindowSize.X, screenService.GameWindowSize.Y), Color.White);
			Overlay.Alpha = 0f;
			AddChild(Overlay);

			AddChild(Message = new DrawableLabel(),2);
			Message.Scale = new Vector2(2f);
			Message.RelativeOrigin = new Vector2(0.5f);
			Message.SetPositionInScreenPercent(50, 50);

			base.OnLoad(content, gd);
		}
예제 #3
0
		protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd)
		{
			RedRectangle = new DrawableRectangle(new GREATLib.Rect(0, 0, screenService.GameWindowSize.X, screenService.GameWindowSize.Y), Color.Red);
			RedRectangle.Alpha = 0f;
			AddChild(RedRectangle);

			DrawableLabel deathMessage = new DrawableLabel();
			deathMessage.Text = "You died!";
			deathMessage.Scale = new Vector2(2f);
			deathMessage.RelativeOrigin = new Vector2(0.5f);
			deathMessage.SetPositionInScreenPercent(50, 40);
			AddChild(deathMessage,2);

			DeathTimer = new DrawableLabel();
			DeathTimer.Text = DeathDuration.Seconds.ToString();
			DeathTimer.Scale = new Vector2(2f);
			DeathTimer.RelativeOrigin = new Vector2(0.5f);
			DeathTimer.SetPositionInScreenPercent(50, 50);
			AddChild(DeathTimer,2);
		}
예제 #4
0
		public SpellMenuItem(SpellCastInfo info, DrawableImage icon) : base(new DrawableImage("UIObjects/spellBox"),
		                              new DrawableImage("UIObjects/spellBox"),
		                              new DrawableImage("UIObjects/spellBox"))
        {
			Clickable = false;
			//StateClicking.Position = new Vector2(2, 2);
			AddChild(new DrawableImage("UIObjects/spellBoxDropShadow"){Position = new Vector2(2,2)},0);

			//ClickAction = () => Cast();

			Info = info;

			CoolDown = new DrawableRectangle(new Rectangle((int)NORMAL_WIDTH/2, (int)NORMAL_WIDTH, (int)NORMAL_WIDTH, (int)NORMAL_WIDTH), Color.Aqua);
			CoolDown.RelativeOrigin = new Vector2(0.5f,1f);
			CoolDown.Alpha = 0.3f;
			AddChild(CoolDown,3);

			Icon = icon;
			AddChild(Icon,2);
		}