Пример #1
0
 public Choice(List <byte> options, Color highlight, HandleChoiceDelegate handle, HandleCancelDelegate cancel)
 {
     Options   = options;
     Highlight = highlight;
     Handle    = handle;
     Cancel    = cancel;
 }
    public Choice GetChoice(byte index, HandleChoiceDelegate handle, HandleCancelDelegate cancel)
    {
        Choice retVal = new Choice(index, handle, cancel);

        gameTimer.AddMainTimerDelegate(
            delegate
        {
            PurgeChoice(retVal);
        });

        decisionQueue.Add(retVal);
        ShowChoice();
        return(retVal);
    }
 public Choice(byte index, HandleChoiceDelegate handle, HandleCancelDelegate cancel)
 {
     Index  = index;
     Handle = handle;
     Cancel = cancel;
 }
Пример #4
0
    public Choice GetChoice(List <byte> options, Color highlight, HandleChoiceDelegate handle, HandleCancelDelegate cancel, bool mainTimerBound = true)
    {
        Choice choice = new Choice(options, highlight, handle, cancel);

        if (mainTimerBound)
        {
            gameTimer.AddMainTimerDelegate(
                delegate
            {
                PurgeChoice(choice);
            });
        }
        else
        {
            gameTimer.AddSubTimerDelegate(
                delegate
            {
                PurgeChoice(choice);
            });
        }

        decisionQueue.Add(choice);
        ShowChoice();
        return(choice);
    }