private void Awake() { rigidBody = GetComponent <Rigidbody>(); playercontroller = GetComponent <RIGbodyMOVE>(); hookshotTransform.gameObject.SetActive(false); state = State.Normal; }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { Pickup(other); } void Pickup(Collider player) { RIGbodyMOVE antiG = player.GetComponent <RIGbodyMOVE>(); antiG.gravity += antigravity; antiG.jumpSpeed += jumpspeed; antiG.antispeed += antiGSpeed; } }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { Pickup(other); } void Pickup(Collider player) { RIGbodyMOVE leap = player.GetComponent <RIGbodyMOVE>(); leap.MAXJUMP += jumps; Destroy(gameObject); } }