readme
This commit is contained in:
parent
59a35d1112
commit
bade4554d0
19
README.md
19
README.md
|
@ -12,6 +12,16 @@ It is recommended to subscribe to an event (from Events.cs) to be able to interf
|
|||
|
||||
TestMod.cs:
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using StardewModdingAPI;
|
||||
|
||||
namespace StardewTestMod
|
||||
{
|
||||
public class TestMod : Mod
|
||||
{
|
||||
public override string Name
|
||||
|
@ -40,12 +50,13 @@ It is recommended to subscribe to an event (from Events.cs) to be able to interf
|
|||
Program.LogError("Test Mod can call to Program.cs in the API");
|
||||
Program.LogColour(ConsoleColor.Magenta, "Test Mod is just a tiny DLL file in AppData/Roaming/StardewValley/Mods");
|
||||
|
||||
Events.GameLoaded += Events_GameLoaded;
|
||||
//Subscribe to an event from the modding API
|
||||
Events.KeyPressed += Events_KeyPressed;
|
||||
}
|
||||
|
||||
void Events_GameLoaded()
|
||||
void Events_KeyPressed(Keys key)
|
||||
{
|
||||
|
||||
Program.LogInfo("[Game Loaded Event] I can do things directly to the game now that I am certain it is loaded thanks to events.");
|
||||
Console.WriteLine("TestMod sees that the following key was pressed: " + key);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue