public void spawnNewEnv() { GameObject envObject = new GameObject(); tEnvVar newenv = envObject.AddComponent <tEnvVar>(); newenv.init(this); this.envVariables.Add(newenv); }
public void createInitialEnv() { for (int i = 0; i < this.maxEnv; i++) { GameObject envObject = new GameObject(); tEnvVar newenv = envObject.AddComponent <tEnvVar>(); newenv.init(this); this.envVariables.Add(newenv); } }