Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
Fix banana
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceba1 committed Feb 16, 2019
1 parent 89d8472 commit 8b50321
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Nuterra.BlockInjector/BlockExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -101,11 +106,13 @@ public static void Load()
Component.DestroyImmediate(mes);
continue;
}
Material changemat2 = mes.GetComponent<MeshRenderer>().material;
changemat2.SetTexture("_MainTex", main);
changemat2.SetTexture("_MetallicGlossMap", gloss);
mes.GetComponent<MeshRenderer>().material = changemat2;
}
}
var firedata = banagun.Prefab.GetComponent<FireData>();
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();

Expand Down
Binary file not shown.

0 comments on commit 8b50321

Please # to comment.