void OnTriggerExit2D(Collider2D other) { if(other.CompareTag ("platform")) GetComponent<Rigidbody2D>().gravityScale = 3.0f; if(other.CompareTag("JumpPad")) jumpTypeState = JumpTypeState.normal; }
void OnTriggerEnter2D(Collider2D other) { if(other.CompareTag ("platform")) GetComponent<Rigidbody2D>().gravityScale = 20.0f; if(other.CompareTag("JumpPad")) jumpTypeState = JumpTypeState.super; if(other.tag == "collectibleIcon") Destroy (other.gameObject); }