public void waitms(Endogine.Scripting.EScript.Executer exec, int ms) { exec.Paused = true; this.m_exec = exec; this.m_timer = new System.Timers.Timer(ms); this.m_timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); this.m_timer.Start(); }
public void rwd(Endogine.Scripting.EScript.Executer exec) { //stop script execution and restart the method //TODO: how do I solve this in an elegant way? //Call still comes from exec, in the Step() method... So it kinda eats itself. //if it runs forever, the call stack will be infinitely long. Start a new thread? //Temporary, ugly solution: A timer that restarts it. exec.Paused = true; this.m_exec = exec; this.m_shameTimer = new System.Timers.Timer(1); this.m_shameTimer.Elapsed += new System.Timers.ElapsedEventHandler(shameTimer_Elapsed); this.m_shameTimer.Start(); }
public void interpolate(Endogine.Scripting.EScript.Executer exec, object o, string sPropName, float fTo, int ms) { Animation.Animator anim = new Animation.Animator(o, sPropName); Animation.Animator oldAnim = (Animation.Animator) this.m_htCurrentAnimators[sPropName]; if (oldAnim != null) { oldAnim.Dispose(); this.m_htCurrentAnimators.Remove(sPropName); } this.m_htCurrentAnimators.Add(sPropName, anim); anim.TimeInterval = 50; object oCurrent = Serialization.Access.GetProperty(o, sPropName); anim.AddKey(new Animation.AnimationKey(0, Convert.ToSingle(oCurrent))); anim.AddKey(new Animation.AnimationKey((float)ms / anim.TimeInterval, fTo)); }
public void startplay(Endogine.Scripting.EScript.Executer exec, string sMethod) { //start a new executer! }
public void _goto(Endogine.Scripting.EScript.Executer exec, string sMethod) { //stop script execution and start from the designated method //when that method has finished, jump directly to next method in order! }
public void waitforevent(Endogine.Scripting.EScript.Executer exec, object o, string sEvent) { //can be called for objects that implement a specific IWait or something - //e.g. when is sound finished (not playing) }
public void waitframes(Endogine.Scripting.EScript.Executer exec, int frames) { }
public void waitframe(Endogine.Scripting.EScript.Executer exec) { }
public void waitms(Endogine.Scripting.EScript.Executer exec, int ms) { exec.Paused = true; this.m_exec = exec; this.m_timer = new System.Timers.Timer(ms); this.m_timer.Elapsed+=new System.Timers.ElapsedEventHandler(timer_Elapsed); this.m_timer.Start(); }
public void rwd(Endogine.Scripting.EScript.Executer exec) { //stop script execution and restart the method //TODO: how do I solve this in an elegant way? //Call still comes from exec, in the Step() method... So it kinda eats itself. //if it runs forever, the call stack will be infinitely long. Start a new thread? //Temporary, ugly solution: A timer that restarts it. exec.Paused = true; this.m_exec = exec; this.m_shameTimer = new System.Timers.Timer(1); this.m_shameTimer.Elapsed+=new System.Timers.ElapsedEventHandler(shameTimer_Elapsed); this.m_shameTimer.Start(); }