-
Notifications
You must be signed in to change notification settings - Fork 0
Game Classes
jcb121 edited this page Jun 28, 2015
·
10 revisions
The classes Written so far are:
###Tool###
this class is used for weapons in hand
###WorldProp###
this is used for game objects, possibly backgrounds also
var pistolWorldProps = { image:"PathtToImage.png", width:32, //drawn size, height:32, //drawn size, bearing:45, //bearing from north collectable:true, //does it go into the inventory? collisions:{ player:function(player){ var pistol1handed = new tool(pistol1handedProps); var pistol2handed = new tool(pistol2handedProps); pistol1handed.parent = player; pistol2handed.parent = player; player.inventory.push( pistol1handed ); player.inventory.push( pistol2handed ); } }, };
###WorldArea###
this is a rectangular area of the map
###Player
This is the most complex class as It houses animations.