예제 #1
0
        public virtual IEnumerator <ITask> ReplaceHandler(Replace replace)
        {
            _state.Controller.Dispose();

            _state = replace.Body;

            _state.Controller.FindInstance();

            replace.ResponsePort.Post(DefaultReplaceResponseType.Instance);
            yield break;
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
 public Replace(GameControllerState body)
     : base(body)
 {
 }