Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class spaceship is entity, positionable, canfire, collidecheck
- func oncollide(entity) {
- if (entity is smashable) {
- entity.smash()
- }
- }
- func fire() // fires a bullet
- func pos() (x, y) // returns the X and Y position of spaceship
- class rock is entity, positionable, smashable
- func smash() {
- this.destroy()
- }
- func pos() (x, y) // returns the X and Y position of the bullet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement