public void Init(DeltinScript deltinScript) { DeltinScript = deltinScript; _toWorkshop = deltinScript.WorkshopConverter; bool assignExtended = false; // Assign workshop variables. DoGetCurrent = DeltinScript.VarCollection.Assign("pathfinderDoGetCurrent", false, assignExtended); Current = DeltinScript.VarCollection.Assign("pathfinderCurrent", false, assignExtended); PathmapReference = DeltinScript.VarCollection.Assign("pathmapReference", false, assignExtended); ParentArray = DeltinScript.VarCollection.Assign("parentArray", false, assignExtended); Destination = DeltinScript.VarCollection.Assign("destination", false, assignExtended); CurrentAttribute = DeltinScript.VarCollection.Assign("lastAttribute", false, assignExtended); if (TrackTimeSinceLastNode) { DistanceToNextNode = DeltinScript.VarCollection.Assign("distanceToNextNode", false, assignExtended); TimeSinceLastNode = DeltinScript.VarCollection.Assign("timeSinceLastNode", false, assignExtended); } var pathfinderTypes = DeltinScript.GetComponent <PathfinderTypesComponent>(); if (TrackNextAttribute) { NextAttribute = DeltinScript.VarCollection.Assign("nextAttribute", false, assignExtended); } // Get the PathResolve instance and the Pathmap instance. PathmapInstance = pathfinderTypes.Pathmap; // Get the resolve subroutine. GetResolveCurrentRule(); GetNextNodeRule(); }
public void InitStatic() { foreach (var staticVariable in DeltinScript.GetComponent <StaticVariableCollection>().StaticVariables) { DeltinScript.DefaultIndexAssigner.Add( staticVariable.Provider, staticVariable .GetAssigner(new GetVariablesAssigner(DeltinScript.InitialGlobal.ActionSet)) .GetValue(new GettableAssignerValueInfo(DeltinScript.InitialGlobal.ActionSet)) ); } }
public PathResolveClass(DeltinScript deltinScript) { _supplier = deltinScript.Types; _pathfinderTypes = deltinScript.GetComponent <PathfinderTypesComponent>(); Provider = new SelfContainedClassProvider(deltinScript, this); }
public T GetComponent <T>() where T : IComponent, new() => DeltinScript.GetComponent <T>();
public BakemapClass(DeltinScript deltinScript) : base() { _deltinScript = deltinScript; _pathfinderTypes = _deltinScript.GetComponent <PathfinderTypesComponent>(); Provider = new SelfContainedClassProvider(deltinScript, this); }