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

2019/2/4

isTouching is not working.

denizkb denizkb

2019/2/4

#
The code below is in my sprite class, when the sprite touches any enemies it goes to the location however the life counter doesn't decrease. When I remove the code below, the sprite doesn't go to the location and goes through the enemies but it decreases the life counter.
if(isTouching(OBSTACLES.class))
        {
            setLocation(25,773);
        }
danpost danpost

2019/2/4

#
denizkb wrote...
The code below is in my sprite class, when the sprite touches any enemies it goes to the location however the life counter doesn't decrease. When I remove the code below, the sprite doesn't go to the location and goes through the enemies but it decreases the life counter. << Code Omitted >>
Please show your current entire checkObstacles method.
You need to login to post a reply.