public virtual IEnumerator <ITask> ReplaceHandler(Replace replace)
        {
            _state.Controller.Dispose();

            _state = replace.Body;

            _state.Controller.FindInstance();

            replace.ResponsePort.Post(DefaultReplaceResponseType.Instance);
            yield break;
        }
        /// <summary>
        /// Service Start
        /// </summary>
        protected override void Start()
        {
            if (_state == null)
            {
                _state = new GameControllerState();
            }
            base.Start();

            // post a replace message to ourself, this causes the correct initialization
            Replace replace = new Replace(_state);

            _mainPort.Post(replace);

            // start the timer
            Spawn(DateTime.Now, TimerHandler);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Data constructor.
 /// </summary>
 /// <param name="body"></param>
 public Replace(GameControllerState body)
     : base(body)
 {
 }