This site requires JavaScript, please enable it in your browser!
Greenfoot back
ConfusedProgrammer
ConfusedProgrammer wrote ...

2016/2/12

Dr Who Game

ConfusedProgrammer ConfusedProgrammer

2016/2/12

#
so basically, part of my course is to grate a game, and the one i have chosen to make is a games based off of dr who (as said above) and the objective is to reach the tardis, there are 3 levels, so my question is; how on earth do I get it to automatically get to the next level if the user is able to get to the tardis?! i know i can use the method "is touching" but i dont know how??
danpost danpost

2016/2/12

#
Did you create an Actor subclass for the tardis? If you did, and named the class Tardis, then:
if (isTouching(Tardis.class))
would return false until the actor (created from the class this line is placed) touches any object created from the Tardis class.
ConfusedProgrammer ConfusedProgrammer

2016/2/13

#
dude thanks man, now hopefully ill see if that works :)
You need to login to post a reply.