I am making a game. In it I want some form of barrier that the hero can't pass through. I thought maybe I should put this line in the hero class
but I not sure what to put inside the if statement. I want it to be something like the hero will bounce off the wall/barrier if it hits the wall. However, I don't know what code would accomplish what I want it to do.
1 2 3 | if (canSee(Barrier. class )) { } |