[AGDev-newbies] moving things around in world arrays with C#
Sean Mealin
seanpm at triad.rr.com
Mon Jan 15 04:22:18 GMT 2007
HA so you do have to redraw the array each time.... or, at least the objects
that move. I thought it might be something like that; just like redrawing
the graphics for a video game.
Just one more question; (well.... at least for now <smile>) how can I make
an array visible to every class in my program?
Thanks Tom, once again you have cleared up a lot.
-----Original Message-----
From: agdev-newbies-bounces at lists.agdev.org
[mailto:agdev-newbies-bounces at lists.agdev.org] On Behalf Of Thomas Ward
Sent: Sunday, January 14, 2007 10:49 PM
To: Friendly informal list for those new to AG development
Subject: Re: [AGDev-newbies] moving things around in world arrays with C#
Hi Sean,
Actually, the way this is done is your class for the player holds the x
y z coordinates for your player. You then draw in the array where the
player is based on what is in the variable.
When the player changes location you clear the old player location from
the array and update the array with the new x y location based on the x
y z location in the player's location variables.
You should actually have two sets of variables. Such as x1 y1 z1 and x2
y2 and z2. The 1 variables holds where the player was so you can clear
out the array and the 2 variable holds where the player will be or is now.
_______________________________________________
AGDev-newbies mailing list
AGDev-newbies at lists.agdev.org
http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies
More information about the AGDev-newbies
mailing list