Open PCRedHot opened 1 year ago
https://github.com/saraaaaras/Redo-YYY-New/blob/7d2da933fc6a144d62eb12a0f94cc54c3e474cad/Assets/Inport/script/GameEngine.cs#L36-L41
These variables are constant, and in this case, static too. Use const and static to reduce memory usage and avoid unintended modification to the variables
const
static
https://github.com/saraaaaras/Redo-YYY-New/blob/7d2da933fc6a144d62eb12a0f94cc54c3e474cad/Assets/Inport/script/GameEngine.cs#L32
https://github.com/saraaaaras/Redo-YYY-New/blob/7d2da933fc6a144d62eb12a0f94cc54c3e474cad/Assets/Inport/script/GameEngine.cs#L25
Think about the nature of the variables, and group them together in one place. It helps you to understand the logic / code more.
https://github.com/saraaaaras/Redo-YYY-New/blob/7d2da933fc6a144d62eb12a0f94cc54c3e474cad/Assets/Inport/script/GameEngine.cs#L36-L41
These variables are constant, and in this case, static too. Use
const
andstatic
to reduce memory usage and avoid unintended modification to the variables