Closed rowan04 closed 1 year ago
this does not add the feature of the wall breaker only showing up when near it - that'll need adding later
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
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
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
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.
then can you delete the actor from the if statement?
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?
might be I was looking it the non committed player file
might be I was looking it the non committed player file
probably. the code works, theres no problems there
I'm going to merge
resolves #11