Ring Buffers

Read Time:34 Second

Goal: We have a limited number of towers and we want them to stick around in the game.

Here is the new tower detection method. I wanted to avoid having the Tower and the Waypoint store references to each other so I added colliders to the Tower and then did a little Overlap Sphere looking for things in the Towers layer. If we find something then that means the waypoint already has a tower.

These are the new ring buffer methods for the Friendly Base. The original list has been disposed of in favor of the ring buffer queue and a new variable to track the maximum number of towers.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleppy
Sleppy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *