Exemplo n.º 1
0
    private void OnEvtLoadingStep(Event evt)
    {
        Logger.Debug("MenuLoading.OnEvtLoadingStep");

        EventSimpleInt nevt = evt as EventSimpleInt;

        if (nevt.val == (int)LoadingStep.Login)
        {
            statusLabel.text = "Login...";
        }
        else if (nevt.val == (int)LoadingStep.Data)
        {
            statusLabel.text = "Loading Data...";
        }
        else if (nevt.val == (int)LoadingStep.Main)
        {
            statusLabel.text = "Loading Main...";
        }
        else if (nevt.val == (int)LoadingStep.Count)
        {
            statusLabel.text = "Click To Enter.";
            _bLoadingDone    = true;
        }

        float percent = nevt.val * 100.0f / (int)LoadingStep.Count;

        progressBar.SetPercent(percent);
    }
Exemplo n.º 2
0
    public void Dispatch(int eventId, int val)
    {
        EventSimpleInt evt = new EventSimpleInt();

        evt.eventId = eventId;
        evt.val     = val;
        Dispatch(evt);
    }