//a new list to store items that are colliding with the bulletist<QT.IQuadTreeItem> collideItems = new List<QT.IQuadTreeItem>(10); foreach (Actors.Projectile item in projectileItems) { collideItems.Clear(); //will put all quadtreeitems which collide with projectile item in list quadTree.Query(item.BoundingBox, ref collideItems); ///////////////////////////////// //This is the area which im trying to find all the zombie-only items that are in the collide list (the list includes the projectile //item) and it is fussing about not being able to convert the projectile to a zombie. foreach (Actors.Enemies.Zombie collideQTItem in collideItems) { //here is code to deal the projectile damage to the zombie } }
Is there a way to do this? Thanks for looking guys.
Ed