Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
 public void startplay(Endogine.Scripting.EScript.Executer exec, string sMethod)
 {
     //start a new executer!
 }
Exemplo n.º 5
0
 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!
 }
Exemplo n.º 6
0
 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)
 }
Exemplo n.º 7
0
 public void waitframes(Endogine.Scripting.EScript.Executer exec, int frames)
 {
 }
Exemplo n.º 8
0
 public void waitframe(Endogine.Scripting.EScript.Executer exec)
 {
 }
Exemplo n.º 9
0
        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();
        }
Exemplo n.º 10
0
        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();
        }