Experimental re-imagining of Pixi with less C#
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

44 lignes
1.2KB

  1. using System.Reflection;
  2. using IllusionPlugin;
  3. //using GamecraftModdingAPI;
  4. namespace NPort
  5. {
  6. public class NPortPlugin : IEnhancedPlugin
  7. {
  8. public override string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name;
  9. // To change the name, change the project's name
  10. public override string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString();
  11. // called when Gamecraft shuts down
  12. public override void OnApplicationQuit()
  13. {
  14. // Shutdown this mod
  15. GamecraftModdingAPI.Utility.Logging.LogDebug($"{Name} has shutdown");
  16. // Shutdown the Gamecraft modding API last
  17. GamecraftModdingAPI.Main.Shutdown();
  18. }
  19. // called when Gamecraft starts up
  20. public override void OnApplicationStart()
  21. {
  22. // Initialize the Gamecraft modding API first
  23. GamecraftModdingAPI.Main.Init();
  24. // check out the modding API docs here: https://mod.exmods.org/
  25. // Initialize this mod
  26. GamecraftModdingAPI.Utility.Logging.MetaLog($"{Name} has started up");
  27. }
  28. // unused methods
  29. public override void OnFixedUpdate() { } // called once per physics update
  30. public override void OnUpdate() { } // called once per rendered frame (frame update)
  31. }
  32. }