Hi John,

You can simply use a boolean variable to test if the enemy or item is
in play or not like this.

        if (enemy1.is_killed == false)
        {
                UpdateEnemy1();
        }
        if (item1.is_found == false)
        {
                UpdateItem1();
        }

Do you see how it works. If the flag is false update the item or enemy
objects state. If the item is found or the enemy is killed it is
ignored by your game.

Cheers!


On 8/23/13, john <jpcarnemo...@comcast.net> wrote:
> Hi all,
>       I've finally gotten the general infrastructure of a game
> started, but I've run into an issue with my enemy class. Namely,
> once the enemy is defeated, I have no idea how to remove it from
> the game. Could anybody give me some examples of how you handle
> removing ememies and items from play?
>
> Thanks,
> John.
>
> ---
> Gamers mailing list __ Gamers@audyssey.org
> If you want to leave the list, send E-mail to
> gamers-unsubscr...@audyssey.org.
> You can make changes or update your subscription via the web, at
> http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
> All messages are archived and can be searched and read at
> http://www.mail-archive.com/gamers@audyssey.org.
> If you have any questions or concerns regarding the management of the list,
> please send E-mail to gamers-ow...@audyssey.org.
>

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to