Advertisement
Guest User

Untitled

a guest
Nov 28th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class spaceship is entity, positionable, canfire, collidecheck
  2. func oncollide(entity) {
  3. if (entity is smashable) {
  4. entity.smash()
  5. }
  6. }
  7. func fire() // fires a bullet
  8. func pos() (x, y) // returns the X and Y position of spaceship
  9.  
  10. class rock is entity, positionable, smashable
  11. func smash() {
  12. this.destroy()
  13. }
  14. func pos() (x, y) // returns the X and Y position of the bullet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement