Game_Re_creation_Project
Member
[Sorry if this question has already been asked and answered. I searched and couldn't find what I was looking for.]
Is it better to establish an enum in something like a rm_init (first room creation code) or is it safe to establish an enum in the create event of an object which is going to be used multiple times in the game? Would creating an enum over and over again in the create event of an object cause a memory leak because the enum is getting generated over and over?
In the latter case, would a best-practice be to just establish temp vars?
Create:
Rather than:
Is it better to establish an enum in something like a rm_init (first room creation code) or is it safe to establish an enum in the create event of an object which is going to be used multiple times in the game? Would creating an enum over and over again in the create event of an object cause a memory leak because the enum is getting generated over and over?
In the latter case, would a best-practice be to just establish temp vars?
Create:
GML:
var _auto = -1;
var _vert = 0;
var _horz = 1;
GML:
enum OrientationEnum
{
auto = -1,
vert = 0,
horz = 1
}