예제 #1
0
    public void showEvent(int id, int step, OnEventOver over)
    {
        onEventOver = over;

        if (isShow)
        {
            return;
        }

        if (GameRPGManager.instance.ActiveRPGStage.Event.Length > id)
        {
            if (GameRPGManager.instance.ActiveRPGStage.Event[id].Event.Length > step)
            {
                activeID    = id;
                activeStep  = step;
                activeEvent = GameRPGManager.instance.ActiveRPGStage.Event[id].Event[step];

                isShow = true;

                doEvent();
            }
        }
    }
예제 #2
0
    public void nextEvent()
    {
        if (GameRPGManager.instance.ActiveRPGStage.Event[activeID].Event.Length > activeStep + 1)
        {
            activeStep++;
            activeEvent = GameRPGManager.instance.ActiveRPGStage.Event[activeID].Event[activeStep];
            doEvent();
        }
        else
        {
// end event
//             activeStep = 0;
//             activeID++;
//
//             if ( GameRPGManager.instance.ActiveRPGStage.Event.Length > activeID )
//             {
//                 if ( GameRPGManager.instance.ActiveRPGStage.Event[ activeID ].Event.Length > activeStep )
//                 {
//                     activeEvent = GameRPGManager.instance.ActiveRPGStage.Event[ activeID ].Event[ activeStep ];
//                     doEvent();
//                     return;
//                 }
//             }

            if (onEventOver != null)
            {
                onEventOver();
            }

            isShow = false;

#if UNITY_EDITOR
            Debug.Log(" end event.");
#endif
        }
    }