Exemplo n.º 1
0
 /// <summary>pauses execution of this script (or, optionally, another script) forever.</summary>
 public void sleep_forever(IScriptMethodReference script = null)
 {
     if (script == null)
     {
         this.executionOrchestrator.SetStatus(ScriptStatus.Terminated);
     }
     else
     {
         this.executionOrchestrator.SetStatus(script.GetId(), ScriptStatus.Terminated);
     }
 }
Exemplo n.º 2
0
        /// <summary>pauses execution of this script (or, optionally, another script) for the specified number of ticks.</summary>
        public async Task sleep(short ticks, IScriptMethodReference script = null)
        {
            if (ticks <= 0)
            {
                ticks = 1;
            }

            if (script == null)
            {
                await this.executionOrchestrator.Delay(ticks);
            }
            else
            {
                await this.executionOrchestrator.Delay(script.GetId(), ticks);
            }
        }
Exemplo n.º 3
0
 /// <summary>wakes a sleeping script in the next update.</summary>
 public void wake(IScriptMethodReference script_name)
 {
     this.executionOrchestrator.SetStatus(script_name.GetId(), ScriptStatus.RunOnce);
 }