Esempio n. 1
0
    public void DeleteCurrentCreatureSave()
    {
        var selectedCreatureIndex = dropDown.value;
        var options = CreateDropDownOptions();

        var currentCreatureName = options[selectedCreatureIndex];

        if (currentCreatureName.ToUpper() != "CREATURE")
        {
            deleteConfirmation.ConfirmDeletionFor(currentCreatureName, delegate(string name) {
                CreatureSaver.DeleteCreatureSave(currentCreatureName);

                creatureBuilder.DeleteCreature();
                SetupDropDown();
                dropDown.value = 0;
            });
        }
    }
    public void PromptSavefileDelete()
    {
        var filename = dropdown.options[dropdown.value].text;

        if (filename == NO_SAVE_FILES)
        {
            return;
        }

        filename += ".txt";

        //deleteConfirmation.ConfirmDeletionFor(filename);
        deleteConfirmation.ConfirmDeletionFor(filename, delegate(string name) {
            EvolutionSaver.DeleteSaveFile(filename);

            SetupDropDown();
            dropdown.value = 0;
        });
    }