Skip to content

Instantly share code, notes, and snippets.

@pfgithub
Created August 13, 2018 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfgithub/d3ce5cb355253e52db62be733505de2a to your computer and use it in GitHub Desktop.
Save pfgithub/d3ce5cb355253e52db62be733505de2a to your computer and use it in GitHub Desktop.
Mods for GOI

pfgs mods

You Are The Hammer:

PlayerControl Start() Bottom:

base.GetComponent<PolygonCollider2D>().isTrigger = true;
base.transform.Find("PotCollider").GetComponent<PolygonCollider2D>().isTrigger = true;
PolygonCollider2D[] components = base.transform.Find("PotCollider").transform.Find("Sides").GetComponents<PolygonCollider2D>();
for (int i = 0; i < components.Length; i++)
{
	components[i].isTrigger = true;// YOU HAVE TO LOOP IF YOU DON'T SOME ANIMATION FUNCTION SOMEWHERE TRIES TO ACCESS YOUR NONEXISTENT PLAYER
}
SkinnedMeshRenderer[] componentsInChildren = base.transform.Find("dude").gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
for (int j = 0; j < componentsInChildren.Length; j++)
{
	componentsInChildren[j].enabled = false;
}
base.transform.Find("dude").gameObject.SetActive(true);
base.transform.Find("Pot").transform.Find("Mesh").gameObject.SetActive(false);

PlayerSounds Update() Replace Method:

return;

Rolling Over It with Bennett Frodder:

PlayerControl Start() Bottom:

JointAngleLimits2D limits = default(JointAngleLimits2D);
limits.max = 1000000f;
limits.min = -1000000f;
base.GetComponent<HingeJoint2D>().limits = limits;

Ghogenes

PlayerControl Start() Bottom:

SkinnedMeshRenderer[] componentsInChildren = base.transform.Find("dude").gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
for (int j = 0; j < componentsInChildren.Length; j++)
{
	componentsInChildren[j].enabled = false;
}
base.transform.Find("dude").gameObject.SetActive(true);
base.transform.Find("Pot").transform.Find("Mesh").gameObject.SetActive(false);

Moon Gravity

GravityControl Start()

- Physics2D.gravity = new Vector2(0f, -30f);
+ Physics2D.gravity = new Vector2(0f, -15f);

GravityControl OnTriggerStay2D()

- Physics2D.gravity = new Vector2(0f, -30f);
+ Physics2D.gravity = new Vector2(0f, -15f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment