public double generate(SymbolTable table) { List <Script> prototype = table.getPrototype(); List <Script> loadList = table.getLoadList(); Script scriptX = null; foreach (Script script in prototype) { if (script.title.Equals(scriptName)) { scriptX = script.clone(); break; } } if (scriptX == null) { LogWriter.WriteErrText("Script Name : " + scriptName + " Unfound"); return(0); } for (int i = 0; i < pars.Count; i++) { scriptX.preExp.Add( Exp.getInstance(Exp.getInstance("arg" + i), Exp.getInstance(pars[i].generate(table)), Exp_Operator.EQUAL)); } loadList.Add(scriptX); return(0); }
public void initialize() { symbolTable = new SymbolTable(); symbolTable.getPrototype().AddRange(prototype); currentList.Clear(); gameTime = maxCoObject = 0; Script main = findScriptByName("main"); if (main == null) { LogWriter.WriteErrText("main unsolved"); } else { addObject(main.clone()); } d_x = width / 2; d_y = height / 2; symbolTable.setBound(d_x, d_y); if (imageCache != null) { imageCache.Dispose(); } imageCache = new ImageCache(); enemyGroup.Clear(); friendGroup.Clear(); removelist.Clear(); collideList.Clear(); }