public Script(Vector2f position, ScriptDef scriptDef) { RectShape = new RectangleShape { Position = position }; ScriptDef = scriptDef; LoadState(ScriptDef.sStartState); }
public ScriptDef(ScriptDef copy) { Name = copy.Name; Ref = copy.Ref; ScriptStates = new Dictionary<string, ScriptState>(); foreach (var copyScriptState in copy.ScriptStates) { ScriptStates.Add(copyScriptState.Key, new ScriptState(copyScriptState.Value)); } Variables = new Dictionary<string, object>(); foreach (var variable in copy.Variables) { Variables.Add(variable.Key, variable.Value); } sFollowCamera = copy.sFollowCamera; sStartState = copy.sStartState; sAttachPhysicsBody = copy.sAttachPhysicsBody; sJumpMaxCount = copy.sJumpMaxCount; sGravity = copy.sGravity; sMaxScript = copy.sMaxScript; sRemoveAtPos0 = copy.sRemoveAtPos0; sDynamic = copy.sDynamic; }
public void AddScriptDef(ScriptDef scriptDef) { ScriptDefs.Add(scriptDef.Ref, scriptDef); }