feat: add initial People Playground mod development kit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
URL: https://wiki.studiominus.nl/snippets/texturePackSystem.html
|
||||
Title: People Playground Modding - Basic texture pack system
|
||||
==================================================
|
||||
|
||||
Basic texture pack system
|
||||
by Talon
|
||||
public static void Main()
|
||||
{
|
||||
ReplaceTextures("Sword");
|
||||
}
|
||||
|
||||
public static void ReplaceTextures(string ItemToReplace)
|
||||
{
|
||||
ModAPI.FindSpawnable(ItemToReplace).Prefab.GetComponent<SpriteRenderer>().sprite = ModAPI.LoadSprite("sprites/" + ItemToReplace + ".png");
|
||||
ModAPI.FindSpawnable(ItemToReplace).ViewSprite = ModAPI.LoadSprite("sprites/" + ItemToReplace + "Thumb.png");
|
||||
}
|
||||
Reference in New Issue
Block a user