示例#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
			});
		}
示例#2
0
        public DrawableSpell(ClientLinearSpell spell, Drawable bullet)
        {
			Spell = spell;
			Bullet = bullet;
			Tint = Color.White;

			RemoveWhenDeleted = true;
			ApplyUpdates = true;
        }
示例#3
0
        public DrawableTower(Tower tower, bool isAlly)
			: base(tower)
        {
			Ally = isAlly;

			Position = new Vector2(tower.Rectangle.X + tower.Rectangle.Width / 2f,
			                       tower.Rectangle.Bottom);

			Alerting = false;

			Tower = null;
        }