/// <summary>
 ///     Called when the state of this entities script is changed.
 /// </summary>
 /// <param name="process">Process that had its state changed.</param>
 /// <param name="sate">New state.</param>
 public void OnStateChange(ScriptProcess process, StateSymbol state)
 {
     _tickFunction = (state == null ? null : (state.FindSymbol("OnTick", SymbolType.Function) as FunctionSymbol));
 }
Example #2
0
        /// <summary>
        ///     Called when the state of this entities script is changed.
        /// </summary>
        /// <param name="process">Process that had its state changed.</param>
        /// <param name="sate">New state.</param>
        public void OnStateChange(ScriptProcess process, StateSymbol state)
        {
            if (_isServer == true) return;

            if (_mapScriptProcess != null && process == _mapScriptProcess.Process)
                _window.MapScriptRenderFunction = state.FindSymbol("OnRender", SymbolType.Function) as FunctionSymbol;
            else if (_gameScriptProcess != null && process == _gameScriptProcess.Process)
                _window.GameScriptRenderFunction = state.FindSymbol("OnRender", SymbolType.Function) as FunctionSymbol;
        }