Example #1
0
    public static ScriptCmd CreateDefault(int index)
    {
        string text = string.Empty;

        switch (index)
        {
        case 0:
            text = EnableScript.GetDefaultDescription();
            break;

        case 1:
            text = ShowDialog.GetDefaultDescription();
            break;

        case 2:
            text = PlaySound.GetDefaultDescription();
            break;

        case 3:
            text = Sleep.GetDefaultDescription();
            break;

        case 4:
            text = Exit.GetDefaultDescription();
            break;

        case 5:
            text = ShowScript.GetDefaultDescription();
            break;

        case 6:
            text = GiveWeapon.GetDefaultDescription();
            break;

        case 7:
            text = TakeAwayAll.GetDefaultDescription();
            break;

        case 8:
            text = SetMission.GetDefaultDescription();
            break;
        }
        if (text.Length <= 0)
        {
            return(null);
        }
        return(Create(text));
    }