예제 #1
0
        private void onTriggerDelete(SaveFileItemPanel fileItem)
        {
            var filePath = GlobalPath.save + fileItem.Name + ".save";

            System.IO.File.Delete(filePath);

            fileItem.QueueFree();
        }
예제 #2
0
 internal void GenerateFileItems(bool enableLoad, Action <string> onTriggerLoad, Action <string> onTriggerDelete)
 {
     foreach (var filePath in System.IO.Directory.EnumerateFiles(GlobalPath.save, "*.save"))
     {
         var fileItem = SaveFileItemPanel.Instance(this, enableLoad, filePath);
         fileItem.actTriggerLoad   = onTriggerLoad;
         fileItem.actTriggerDelete = onTriggerDelete;
     }
 }
예제 #3
0
 private void onTriggerLoad(SaveFileItemPanel fileItem)
 {
     EmitSignal(nameof(LoadSaveFile), fileItem.Name);
     fileItem.QueueFree();
 }