override public void Launch()
        {
            base.Launch();
            StartSignal startSignal = (StartSignal)injectionBinder.GetInstance <StartSignal>();

            startSignal.Dispatch();
        }
Example #2
0
        // Override Start so that we can fire the StartSignal
        override public IContext Start()
        {
            base.Start();
            StartSignal startSignal = (StartSignal)injectionBinder.GetInstance <StartSignal>();

            startSignal.Dispatch();
            return(this);
        }
        public override void Launch()
        {
            base.Launch();
            StartSignal startSignal = (StartSignal)injectionBinder.GetInstance <StartSignal>();

            startSignal.Dispatch();
            TestLoadConfig.log.Trace("SignalContext Launch");
        }
Example #4
0
            public void Stop()
            {
                Disconnect();
                FiddlerApplication.Shutdown();
                Thread.Sleep(500);

                StopTime = DateTime.Now;
                StartSignal.Set();
            }
Example #5
0
        /// <summary>
        /// Start the alive process
        /// </summary>
        public void Start()
        {
            StartSignal startSignal = comm.Receive <StartSignal>(0, 0);

            // We wait for the broadcast of the start of the game.

            map         = startSignal.Map;
            currentTile = map.GetTileByCoordinates(startSignal.Position);

            AliveLoop();
        }
Example #6
0
 private void StartSignalExecution(StartSignalExecutionResponse response)
 {
     StartSignal?.Invoke(this, new StartSignalParameters
     {
         Id = response.Id,
         SignalInitParams = response.SignalInitParams,
         Files            = response.Files,
         Login            = response.UserName,
         AccountInfos     = response.AccountInfos
     });
 }
Example #7
0
            public void Start()
            {
                StartSignal.Reset();
                StartTime = DateTime.Now;
                CONFIG.IgnoreServerCertErrors = true;
                FiddlerApplication.Prefs.SetBoolPref("fiddler.network.streaming.ForgetStreamedData", false);
                FiddlerApplication.Prefs.SetBoolPref("fiddler.network.streaming.abortifclientaborts", true);
                Connect();


                FiddlerApplication.Startup(Port, false, true, true);
            }
Example #8
0
 public void PostConstruct()
 {
     if (ContextView.hasAlreadyStart())
     {
         WarmUp();
         Start();
     }
     else
     {
         WarmupSignal.AddOnce(WarmUp);
         StartSignal.AddOnce(Start);
     }
 }
Example #9
0
    public GameController(
        Settings settings,
        PrepareSignal prepareSignal,
        StartSignal startSignal,
        PlayerOneRecoverSignal playerOneRecoverSignal,
        PlayerTwoRecoverSignal playerTwoRecoverSignal)
    {
        _settings      = settings;
        _prepareSignal = prepareSignal;
        _startSignal   = startSignal;

        _playerOneRecoverSignal = playerOneRecoverSignal;
        _playerTwoRecoverSignal = playerTwoRecoverSignal;
    }
 public virtual void PostConstruct()
 {
     if (ContextView.hasAlreadyStart())
     {
         WarmUp();
         //Dans cette situation on n'execute le StartUp que sur la fin sur le onRegister pour permettre aux implementations
         // de StartUp de faire reference à l'acteur du directeur.
     }
     else
     {
         WarmupSignal.AddOnce(WarmUp);
         StartSignal.AddOnce(Start);
     }
 }
Example #11
0
        /// <summary>
        /// Informs every other processes that the game started and provides the map and position informations
        /// </summary>
        private void SignalGameStartToAllActors()
        {
            StartSignal startSignal = new StartSignal {
                Map = map
            };

            lock (comm)
            {
                foreach (ActorProcess actor in actors)
                {
                    startSignal.Position = actor.Position;
                    comm.Send(startSignal, actor.Rank, 0);
                }
            }
        }
Example #12
0
 public override void OnRegister()
 {
     base.OnRegister();
     StartSignal.AddListener(OnStartSignal);
     SimpleButtonSignal.AddListener(OnButtonClicked);
 }
Example #13
0
        public void SendStartSignal()
        {
            StartSignal startSignal = (StartSignal)injectionBinder.GetInstance <StartSignal>();

            startSignal.Dispatch();
        }