示例#1
0
    public SelectableOption GetOptionEast()
    {
        if (eastOption == null || wasInspected)
        {
            return(null);
        }

        if (optionActive)
        {
            return(eastOption);
        }
        SelectableOption optionToReturn = null;

        if (eastOption != null)
        {
            wasInspected   = true;
            optionToReturn = eastOption.GetOptionEast();
            wasInspected   = false;
        }
        return(optionToReturn);
    }
示例#2
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="hInput"></param>
    /// <param name="vInput"></param>
    protected void SetNextOption(int hInput, int vInput)
    {
        if (hInput > 0)
        {
            SelectNextOption(currentlySelectedOption.GetOptionEast());
        }
        else if (hInput < 0)
        {
            SelectNextOption(currentlySelectedOption.GetOptionWest());
        }


        if (vInput > 0)
        {
            SelectNextOption(currentlySelectedOption.GetOptionNorth());
        }
        else if (vInput < 0)
        {
            SelectNextOption(currentlySelectedOption.GetOptionSouth());
        }
    }