Example #1
0
        protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd)
        {
            base.OnLoad(content, gd);

            if (Structure.Team == Teams.Left)
            {
                AddChild(Tower = new DrawableImage("MapObjects/tower1")
                {
                    RelativeOrigin = new Vector2(0.5f, 0.95f)
                }, 2);
            }
            else
            {
                AddChild(Tower = new DrawableImage("MapObjects/tower2")
                {
                    RelativeOrigin = new Vector2(0.5f, 0.95f)
                }, 2);
                AddChild(new ParticleSystem(70, null, new TimeSpan(0, 0, 3))
                {
                    Tint = Color.White,
                    ParticleInitialVelocity = new Vector2(5, 20),
                    ParticleForce           = new Vector2(-5, 2),
                    Position = new Vector2(0, -135)
                }, 1);
            }

            AddChild(LifeBar = new DrawableTowerLifeBar(Ally)
            {
                Position  = new Vector2(0f, -Structure.Rectangle.Height * 1.1f),
                Health    = Structure.Health,
                MaxHealth = Structure.MaxHealth
            });
        }
Example #2
0
		protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd)
		{
			base.OnLoad(content, gd);

			if (Structure.Team == Teams.Left) {
				AddChild(Tower =  new DrawableImage("MapObjects/tower1") {
					RelativeOrigin = new Vector2(0.5f, 0.95f)
				}, 2);
			} else {
				AddChild(Tower = new DrawableImage("MapObjects/tower2") {
					RelativeOrigin = new Vector2(0.5f, 0.95f)
				}, 2);
				AddChild(new ParticleSystem(70,null,new TimeSpan(0,0,3)) {
				Tint = Color.White,
				ParticleInitialVelocity = new Vector2(5, 20),
				ParticleForce = new Vector2(-5, 2),
				Position = new Vector2(0,-135)},1);
			}

			AddChild(LifeBar = new DrawableTowerLifeBar(Ally) {
				Position = new Vector2(0f, -Structure.Rectangle.Height * 1.1f),
				Health = Structure.Health,
				MaxHealth = Structure.MaxHealth
			});
		}