raycaster
raycaster copied to clipboard
Refactor IsWall into class Map
- The refactor in #3 was not good enough, so I came up with another one. In this new refactor, raycaster only needs
a reference to the Map object instead of the whole
Gameobject. This still allowsGameto useIsWall()from Map object, which can be used to implement wall collision. - Wrapping the map in a class also enable possible feature like switching map in the future.
- some macro in
raycaster.hare moved to other places to avoid circular include.
I defer to @RinHizakura .
I have checked those commits and also applied them to execute for testing. To my knowledge, they could work as same as the codes we used before. The duplicates of IsWall() can be correctly removed by these changes.