public static List<ICollidable> BadMoved(Enemy Obj) { if(Obj.isDying && BadGuys[Obj.OldGrid].Contains(Obj)) BadGuys[Obj.OldGrid].Remove(Obj); short newGrid = (short)((int)(Obj.Position.X / 100) * 8 + (int)(Obj.Position.Y / 100)); if (newGrid > 63 || newGrid < 0) return new List<ICollidable>(); if (newGrid != Obj.OldGrid && Obj.OldGrid > -1 && BadGuys[Obj.OldGrid].Contains(Obj)) BadGuys[Obj.OldGrid].Remove(Obj); BadGuys[newGrid].Add(Obj); //Debug.Print("Hi"); return GoodGuys[newGrid]; }
public OrbitEnemy(Enemy parent, float angle, float orbitRadius) : base() { this.parent = parent; this.angle = angle; this.orbitRadius = orbitRadius; sprite = new Sprite(Utility.ContentStorageManager.Get<Texture2D>("Ship01"), parent.Position); //Temp sprite.Rotation = 3.14159f; this.Position = parent.Position; this.velocity = parent.velocity; }
public void UseNewShip(Enemy closest) { bodyTimer = 900; //// TODO: Remove enemy controlShip.isDying = false; controlShip.s.texture = closest.sprite.texture; controlShip.s.Color = Color.Red; controlShip.isInvuln = 180; isDying = false; controlShip.Position =Position; //controlShip.lastFired = 0; //controlShip.bulletType.Clear(); isDetached = false; }