realbasic-games
[Top] [All Lists]

Enemies abound

To: Realbasic - Games <REALbasic-Games at lists dot realsoftware dot com>
Subject: Enemies abound
From: Eric <cire- at prodigy dot net>
Date: Wed, 22 Oct 2003 22:54:54 -0500
Hi -

Ok I did the thing with get an enemy on screen and move it.
So I then made a class called PeonClass and moved stuff into it.
Then I made a Peon(0) as PeonClass in module. Then in the Open event
of the window I did some setup of Peon(0)  and did the
attach thing to Sprite Surface. Ok in the Next Frame event  I did
Peon(0).move.

It works!  The enemy moves and animates.

Now I'm not sure if that is the way to go.  It worked fine for
this test but what if I have 25 enemies and Peon(5) gets killed,
I have have to close Peon(5) and I wouldn't want to access Peon(5)
again.  Also setting up 25 peon's by "hand" isn't the best way,  and
since
different levels may have more or less enemies, that could be messy.

Maybe I'm just over thinking this, then I again I didn't get enough
sleep last
night so my brain won't cooperate with me ;-) what's the best way to
handle
this?

I have puzzled my puzzler till it could not be puzzled no more.

Thanks

Eric Richards


 - - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>