Ejemplo n.º 1
0
 /// <summary>
 /// Deeply copies an existing <see cref="ControllerRegister"/>.
 /// </summary>
 /// <param name="copy">A <see cref="ControllerRegister"/> to copy.</param>
 public ControllerRegister(ControllerRegister copy)
 {
     if (copy != null)
     {
         ctrl = copy.ctrl;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes internal variables and creates the <see cref="Controller"/> that is specified by
        /// the given <see cref="ControllerInformation"/>.
        /// </summary>
        /// <param name="targetControllerInfo">The <see cref="ControllerInformation"/> to create a
        /// <see cref="Controller"/> from.</param>
        public ControllerUser(ControllerInformation targetControllerInfo)
        {
            this.controllerInfo = targetControllerInfo;
            this.timeElapsed = new Stopwatch();
            this.maxTimeout = Configuration.Global.GetValue<int>("mbc_controller_thread_timeout");

            controller = (Controller)Activator.CreateInstance(targetControllerInfo.Controller);
            controller.ControllerMessageEvent += ReceiveMessage;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Stores the <paramref name="match"/> and <paramref name="id"/> and sets the score to zero.
 /// </summary>
 /// <param name="match">The <see cref="MatchInfo"/> about a match a <see cref="Controller"/> is
 /// entered in.</param>
 /// <param name="id">The unique <see cref="ControllerID"/> of a <see cref="Controller"/> in the match.</param>
 public ControllerRegister(Controller control)
 {
     ctrl = control;
 }