Пример #1
0
    public void onReady()
    {
        Debug.Log("onReady -- ");
        if (myInfo.equalsType(Common.USER_TYPE.MASTER))
        {
            if (isAllReady())
            {
                RequestStart req = new RequestStart(gameNo, roomNo);
                SocketManager.Instance().sendMessage(req);
            }
            else
            {
                // GameManager.Instance().showAlert("모두 준비상태가 되어야 시작가능합니다.", false, null,false);
                showAlert("errorStart", "모두 준비상태가 되어야 시작가능합니다.", false, false, (AlertData data, bool isOn, string fieldText) => {
                });
            }
        }
        else
        {
            bool isReady = true;
            if (myInfo.state == (int)Common.USER_STATE.READY)
            {
                isReady = false;
            }

            RequestReady req = new RequestReady(isReady, gameNo, roomNo);
            SocketManager.Instance().sendMessage(req);
        }
    }
        public void ProcessEvent(EventWrittenEventArgs e)
        {
            switch (_eventPairTimerConnections.TryGetDuration(e, out var duration1))
            {
            case DurationResult.Start:
                ConnectionStart?.Invoke(Events.ConnectionStartEvent.Instance);
                break;

            case DurationResult.FinalWithDuration:
                ConnectionStop?.InvokeManyTimes(_samplingRate.SampleEvery, Events.ConnectionStopEvent.GetFrom(duration1));
                break;

            default:
                break;
            }

            switch (_eventPairTimerRequests.TryGetDuration(e, out var duration2))
            {
            case DurationResult.Start:
                ConnectionStart?.Invoke(Events.ConnectionStartEvent.Instance);
                break;

            case DurationResult.FinalWithDuration:
                ConnectionStop?.InvokeManyTimes(_samplingRate.SampleEvery, Events.ConnectionStopEvent.GetFrom(duration2));
                break;

            default:
                break;
            }

            if (e.EventId == EventIdConnectionStart)
            {
                ConnectionStart?.Invoke(Events.ConnectionStartEvent.ParseFrom(e));
                return;
            }

            if (e.EventId == EventIdConnectionStop)
            {
                ConnectionStop?.Invoke(Events.ConnectionStopEvent.ParseFrom(e));
                return;
            }

            if (e.EventId == EventIdRequestStart)
            {
                RequestStart?.Invoke(Events.RequestStartEvent.ParseFrom(e));
                return;
            }

            if (e.EventId == EventIdRequestStop)
            {
                RequestStop?.Invoke(Events.RequestStopEvent.ParseFrom(e));
                return;
            }

            if (e.EventId == EventIdConnectionRejected)
            {
                ConnectionRejected?.Invoke(Events.ConnectionRejectedEvent.ParseFrom(e));
                return;
            }
        }
Пример #3
0
    public void RequestStart()
    {
        player = players[0];
        RequestStart start = new RequestStart();

        start.send(1);
        cManager.send(start);
        Debug.Log("Sent start request");
    }
Пример #4
0
        /// <summary>
        /// Call to request start.
        /// </summary>
        public void RequestStart()
        {
            try
            {
                var r = new RequestStart();
                airTrafficController.aqmRequestProcess(r);
                SetOutput("Started");
            }
            catch (AirTrafficControlException aex)
            {
                HandleAirTrafficControlException(aex);
            }

            UpdateAircraftQueue();
        }
Пример #5
0
 public void InvokeRequestStart(Context ctx) => RequestStart?.Invoke(ctx);
Пример #6
0
 //Solicitud de iniciar el componente
 internal void Start(RequestStart req)
 {
     Builder.Output("Iniciando DbHandler.");
     StartComponent();
     Builder.Output("DbHandler iniciado.");
 }
Пример #7
0
 internal void Start(RequestStart req)
 {
     Builder.Output("Iniciando ClientManager.");
     StartComponent();
     Builder.Output("ClientManager iniciado.");
 }
Пример #8
0
 internal void Start(RequestStart req)
 {
     Builder.Output("Iniciando ZyanServer.");
     StartComponent();
     Builder.Output("ZyanServer iniciado.");
 }
Пример #9
0
 private void Process(RequestStart req)
 {
     EnsureStopped();
     IsRunning = true;
 }