rowan04 / CW3-Maze-Game

A maze game for the third coursework task of the programming concepts module at BNU for L4 Digital and Technology Solutions.
1 stars 1 forks source link

Add wall breaker #34

Closed rowan04 closed 1 year ago

rowan04 commented 1 year ago

resolves #11

rowan04 commented 1 year ago

this does not add the feature of the wall breaker only showing up when near it - that'll need adding later

Will-Cross1 commented 1 year ago

adding functionality would be very easy

on the bit in player saying you can't pass through damaged walls

make it so you just delete the wall instead

rowan04 commented 1 year ago

adding functionality would be very easy

on the bit in player saying you can't pass through damaged walls

make it so you just delete the wall instead

huh? wdym

Will-Cross1 commented 1 year ago
if (isTouching(Breakable.class))
        {
            setLocation(getX()-dx, getY()-dy);
        }

instead of set location, it. checks if you have a wall breaker and if you do it deletes that actor

rowan04 commented 1 year ago
if (isTouching(Breakable.class))
        {
            setLocation(getX()-dx, getY()-dy);
        }

instead of set location, it. checks if you have a wall breaker and if you do it deletes that actor

it already checks for the wall breaker before that in the if statement. thats the else statement if the player doesnt have a wall breaker, moving the player back from the wall so they dont pass through it.

Will-Cross1 commented 1 year ago

then can you delete the actor from the if statement?

rowan04 commented 1 year ago
if (isTouching(Breakable.class))
        {
            setLocation(getX()-dx, getY()-dy);
        }

instead of set location, it. checks if you have a wall breaker and if you do it deletes that actor

wait actually where are you finding that line. is it not one i removed?

Will-Cross1 commented 1 year ago

might be I was looking it the non committed player file

rowan04 commented 1 year ago

might be I was looking it the non committed player file

probably. the code works, theres no problems there

rowan04 commented 1 year ago

I'm going to merge