public void OnDestroy() { if (LastHit != null) { if (type == "alpha pentagon") { LastHit.GainExp(3000); } if (type == "pentagon") { LastHit.GainExp(130); } if (type == "triangle") { LastHit.GainExp(25); } if (type == "square") { LastHit.GainExp(10); if (LastHit.type == "necromancer" && LastHit.drones.Count < LastHit.brst * 2 + 22) { LastHit.drones.Add(new Drone( LastHit.BulletDmg, LastHit.BulletHP * 8, new Vec(), pos.Copy(), size * 1.5f, LastHit.cannons[0] as Spawner)); game.bullets.Add(LastHit.drones[LastHit.drones.Count - 1]); LastHit.drones.Last().Init(game, LastHit); } } } }