Exemplo n.º 1
0
        /// <summary>
        /// Go down to state X from last event in previous state.
        /// </summary>
        private static void gotoStateFromEventDown()
        {
            int stateCount = heroObject.states.states.Count;

            if (stateID < stateCount - 1)
            {
                stateID++;
                StateMenuBlock.showBlockContent(stateID);
            }
            else
            {
                gotoVariablesFromStates();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Go up to States from Variables.
        /// </summary>
        private static void gotoStatesFromVariables()
        {
            // if states is expanded and if there are any states, go to the last state.
            // if states is expanded and there are no states, go to states heading
            if (heroObject.states.visible)
            {
                int stateCount = heroObject.states.states.Count;
                if (stateCount > 0)
                {
                    int eventCount = heroObject.states.states[stateCount - 1].heroEvent.Count;

                    // if there are no events in the last state, go to the last state
                    if (eventCount <= 0)
                    {
                        StateMenuBlock.showBlockContent(stateCount - 1);
                    }

                    // if states > state is expanded, go to the last event
                    // if states > state is not expanded, to to the last state
                    else if (eventCount > 0)
                    {
                        // if states > state is expanded, go to the last event
                        if (heroObject.states.states[stateCount - 1].visible)
                        {
                            int actionCount = heroObject.states.states[stateCount - 1].heroEvent[eventCount - 1].actions.Count;

                            // if there are no actions in the last event, go to the last event
                            if (actionCount <= 0)
                            {
                                EventMenuBlock.showBlockContent(eventCount - 1, stateCount - 1);
                            }

                            // if states > state > event is expanded, go to to last action
                            // if states > state > event is not expanded, go to the last event
                            else if (actionCount > 0)
                            {
                                // if state > event is expanded, go to the last action
                                if (heroObject.states.states[stateCount - 1].heroEvent[eventCount - 1].visible)
                                {
                                    ActionMenuBlock.showBlockContent(actionCount - 1, eventCount - 1, stateCount - 1);
                                }
                                else
                                {
                                    EventMenuBlock.showBlockContent(eventCount - 1, stateCount - 1);
                                }
                            }
                        }

                        // if states > state is not expanded, to to the last state
                        else
                        {
                            StateMenuBlock.showBlockContent(stateCount - 1);
                        }
                    }
                }
                else
                {
                    StateMenuBlock.showBlockTitle();
                }
            }

            // go to state heading
            else
            {
                StateMenuBlock.showBlockTitle();
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Go up to state X from Events in that state.
 /// </summary>
 private static void gotoStateFromEventUp()
 {
     StateMenuBlock.showBlockContent(stateID);
 }