Ejemplo n.º 1
0
        private static void OnGameBeingSaved(string path, string fileName)
        {
            var args = new GameSaveLoadEventArgs(path, fileName);

            foreach (var behaviour in _registeredHandlers)
            {
                try
                {
                    behaviour.Key.OnGameSave(args);
                }
                catch (Exception e)
                {
                    KoikatuAPI.Logger.LogError(e);
                }
            }

            try
            {
                GameSave?.Invoke(KoikatuAPI.Instance, args);
            }
            catch (Exception e)
            {
                KoikatuAPI.Logger.LogError(e);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Triggered right before game state is saved to a file.
 /// </summary>
 protected internal virtual void OnGameSave(GameSaveLoadEventArgs args)
 {
 }
 protected internal override void OnGameSave(GameSaveLoadEventArgs args)
 {
     KoikatuAPI.Logger.Log(LogLevel.Warning | LogLevel.Message, "GameController - OnGameSave - Path:" + args.FullFilename);
 }