Please enable JavaScript.
Coggle requires JavaScript to display documents.
Peak Demo Project, SnakeMoveManager, SnakeBodyInformationHolder,…
-
SnakeMoveManager
ISnakeMovementAllower
which is actually
SnakeSizeIncrementor
-
-
-
sizeToBeIncremented
Each tick, decrease this value by one and call GridSnakeSizeManager.IncrementSnakeSize().
-
-
-
-
-
ISnakeMovementCalculator
Sets the nextLocation with the GetMoveLocation() of this interface. (reference since on the same gameObject)
-
-
-
if doesnt have the ISnakeMovementAllower, then it assumes it is always allowed. Else, each tick first checks if its movement is allowed.
-
-
-
-
TickManager
-
-
Call a "tickEventChannel" VoidEventChannelSO each tick interval. This will be received by other classes and they will perform their tick operations.
-
-
ISnakeMovementCalculator
-
-
-
GetGridLocation() (int x, int y, int z)
-
GridSnakeSizeManager
HalveSnakeSize()
remove half, add another tail to new tail position.
-
-
-
-
-
tickEC -> snake calculates where the head will go to. This will also calculate what the moved location's item will do. -> snakeMoveEC
snakeMoveEC will attempt to move the snake towards a certain location, the tail may create new snake body parts if applicable.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-