|
-
Sep 3rd, 2012, 07:29 AM
#6
Re: RPG Game Making a Play Space with Arrays - How?
Sorry, I got somewhat distracted in that last post. To continue from the first paragraph - if each tile can contain a 'thing', and that thing can be one of three different things (an immovable tree, an enenmy or the player), then that suggests either a Class called Thing that you then have three classes (Tree, Enemy and Player) Inherit from, or alternatively you have an Interface called IThing that the three classes Implement. The Tile can then contain a Thing/IThing, and not worry about exactly what sort of Thing it is. The Enemy class instance holds the level/health/gold of that enemy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|