예제 #1
0
        /// <summary>
        /// Go up to event X.
        /// </summary>
        private static void gotoEventUp()
        {
            eventID--;

            // if event is expanded and there are actions inside, go to last action
            if (heroObject.states.states[stateID].heroEvent[eventID].visible)
            {
                int actionsCount = heroObject.states.states[stateID].heroEvent[eventID].actions.Count;
                if (actionsCount > 0)
                {
                    ActionMenuBlock.showBlockContent(actionsCount - 1, eventID, stateID);
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Draw the actions for this event.
        /// </summary>
        /// <param name="eventIndex">ID of this event.</param>
        private static void DrawActionForEvent(int eventIndex)
        {
            // exit early if an event has been removed
            if (eventIndex >= items.Count)
            {
                return;
            }

            // draw the events for this state
            if (items[eventIndex].visible)
            {
                ActionMenuBlock.Block(heroObject, stateIndex, eventIndex);
            }
        }
예제 #3
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();
            }
        }
예제 #4
0
 /// <summary>
 /// Go down to first action in event X.
 /// </summary>
 private static void gotoActionsFromEventDown()
 {
     ActionMenuBlock.showBlockContent(0, eventID, stateID);
 }