daily pastebin goal
54%
SHARE
TWEET

Untitled

a guest Feb 19th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Game {
  2.     Levels: [Level]
  3. }
  4.  
  5. Level {
  6.     Enemies: [{SomeKindOf}Enemy] //Various enemies
  7.     Pickups: [...Pickup] //Various pickups
  8.     Player: Player
  9.     Map: Map
  10. }
  11.  
  12. {SomeKindOf}Enemy : Enemy {
  13.     {Unique Movement Logic}
  14.     {Unique Attack Logic}
  15.     {Unique Death Action}
  16. }
  17.  
  18. {SomeKindOf}Pickup : Entity {
  19.     {Unique Pickup Action}
  20. }
  21.  
  22. Enemy : Entity {
  23.     hp: Number
  24.     Experience: Number
  25. }
  26.  
  27. Player : Entity {
  28.     hp: Number
  29.     Skills: []
  30. }
  31.  
  32. //Static character on a map
  33. NPC : Entity {
  34.     name: String
  35.     interactions: [Function]
  36. }
  37.  
  38. //This is a thing on a map
  39. Entity {
  40.     Position: Point
  41.     w: Number
  42.     h: Number
  43.     sprite: Image
  44.     collidable: Boolean
  45.     onCollision: Function
  46. }
  47.  
  48. //Helper structure
  49. Point {
  50.     x: Number
  51.     y: Number
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top