diff --git a/Nuterra.BlockInjector/BlockExamples.cs b/Nuterra.BlockInjector/BlockExamples.cs index 56f28db..afd65dc 100644 --- a/Nuterra.BlockInjector/BlockExamples.cs +++ b/Nuterra.BlockInjector/BlockExamples.cs @@ -75,6 +75,11 @@ public static void Load() Texture2D main = GameObjectJSON.ImageFromFile(Properties.Resources.banana_material_png); Texture2D gloss = GameObjectJSON.ImageFromFile(Properties.Resources.banana_gloss_material_png); + Material changemat2 = GameObjectJSON.MaterialFromShader(); + + changemat2.SetTexture("_MainTex", main); + changemat2.SetTexture("_MetallicGlossMap", gloss); + foreach (MeshFilter mes in componentsInChildren2) { string name = mes.name; @@ -101,11 +106,13 @@ public static void Load() Component.DestroyImmediate(mes); continue; } - Material changemat2 = mes.GetComponent().material; - changemat2.SetTexture("_MainTex", main); - changemat2.SetTexture("_MetallicGlossMap", gloss); + mes.GetComponent().material = changemat2; } } + var firedata = banagun.Prefab.GetComponent(); + firedata.m_MuzzleVelocity *= 1.5f; + firedata.m_BulletSprayVariance *= 0.5f; + firedata.m_KickbackStrength *= 1.25f; banagun.SetIcon(GameObjectJSON.SpriteFromImage(GameObjectJSON.ImageFromFile(Properties.Resources.banana_icon_png))) .RegisterLater(); diff --git a/Nuterra.BlockInjector/bin/Debug/Nuterra.BlockInjector/BlockInjector.dll b/Nuterra.BlockInjector/bin/Debug/Nuterra.BlockInjector/BlockInjector.dll index c1c20c2..d733abb 100644 Binary files a/Nuterra.BlockInjector/bin/Debug/Nuterra.BlockInjector/BlockInjector.dll and b/Nuterra.BlockInjector/bin/Debug/Nuterra.BlockInjector/BlockInjector.dll differ