예제 #1
0
    public void LoadUnit(TextUnit TU)
    {
        if (!TU)
        {
            return;
        }
        if (GetCurrentUnit())
        {
            GetCurrentUnit().OnEnd();
        }

        TU.OnLoad();
        NextActive   = false;
        ChoiceActive = false;
        CurrentUnit  = TU;
        NextUnit     = TU.GetNextUnit();
        CurrentDelay = TU.GetDelay();
        PastUnits.Add(TU);

        if (TU.UType == UnitType.Player)
        {
            PlayerUnit = TU;
        }
        else
        {
            AIUnit     = TU;
            PlayerUnit = null;
        }

        foreach (TextRenderer TR in Renderers)
        {
            TR.Update();
        }
    }