public Meteor(Rectangle position, ContentManager contentRef, int hp) : base(position, contentRef) { if (hp > 0) { velocity = new Vector2((float)rand.Next(-5, 5), (float)(rand.Next(1, 2))); currentVelocity = velocity; totalHP = hp; currentHP = hp; position.Width = 35 + totalHP * 5; position.Height = 35 + totalHP * 5; frozen = false; } else { totalHP = hp; currentHP = hp; velocity = new Vector2(0, 0); currentVelocity.Y = 0; frozen = true; } active = true; frozenTexture = contentRef.Load <Texture2D>("Block3"); texture = contentRef.Load <Texture2D>("Meteor"); fireTexture = contentRef.Load <Texture2D>("vortex"); fireEmitter = new FireEmitter(fireTexture, position, .6f); }
public override void PostInit() { base.PostInit(); Area.Add(emitter = new FireEmitter { Depth = Layers.Wall + 1, Position = new Vector2(CenterX, Y + 1), Scale = 0.5f }); }
public override void PostInit() { base.PostInit(); if (!broken) { Area.Add(emitter = new FireEmitter { Depth = Depth + 1, Position = new Vector2(CenterX, Y + 3), Scale = 0.5f }); } UpdateSprite(); }
public override void PostInit() { base.PostInit(); UpdateSprite(); if (!Broken) { Area.Add(fea = new FireEmitter { Depth = Depth + 1, Position = new Vector2(X + 11, Y + 15), Scale = 0.8f }); Area.Add(feb = new FireEmitter { Depth = Depth + 1, Position = new Vector2(X + 4, Y + 15), Scale = 0.8f }); AddComponent(new LightComponent(this, 32f, new Color(1f, 0.5f, 0f, 1f))); } }
/* public Random randX; * public Random randY; */ public Meteor(Rectangle position, ContentManager contentRef) : base(position, contentRef) { velocity = new Vector2((float)rand.Next(-5, 5), rand.Next(1, 3)); //velocity = new Vector2(0, 1); currentVelocity = velocity; totalHP = rand.Next(1, 5); currentHP = totalHP; position.Width = 35 + totalHP * 5; position.Height = 35 + totalHP * 5; active = true; frozen = false; frozenTexture = contentRef.Load <Texture2D>("Block3"); texture = contentRef.Load <Texture2D>("Meteor"); fireTexture = contentRef.Load <Texture2D>("vortex"); fireEmitter = new FireEmitter(fireTexture, position, .6f); }