public void Init() { ClassIndexes = DeltinScript.VarCollection.Assign(ClassIndexesTag, true, false); DeltinScript.InitialGlobal.ActionSet.AddAction(ClassIndexes.SetVariable(0, null, Constants.MAX_ARRAY_LENGTH)); //set the first element to -1. This makes it so that no instance == 0 DeltinScript.InitialGlobal.ActionSet.AddAction(ClassIndexes.SetVariable(-1, null, 0)); }
public void SetupClasses() { if (ClassesWereSetUp) { return; } globalTranslate.Actions.AddRange(ClassIndexes.SetVariable(new V_EmptyArray())); ClassesWereSetUp = true; }
public void GetClassIndex(int classIdentifier, IndexReference classReference, ActionSet actionSet) { actionSet.AddAction(classReference.SetVariable( Element.Part <V_IndexOfArrayValue>( ClassIndexes.GetVariable(), new V_Number(0) ) )); actionSet.AddAction(ClassIndexes.SetVariable( classIdentifier, null, (Element)classReference.GetVariable() )); }
public void Init() { ClassIndexes = DeltinScript.VarCollection.Assign("_classIndexes", true, false); DeltinScript.InitialGlobal.ActionSet.AddAction(ClassIndexes.SetVariable(0, null, Constants.MAX_ARRAY_LENGTH)); }