void OnTriggerEnter2D(Collider2D col) { SawbladeMovement sawblade = col.GetComponent <SawbladeMovement>(); if (sawblade != null) { if (isGrappling) { currentShredderMove = col.gameObject.tag == "Narrow"? ShredderMove.Comet : col.gameObject.tag == "Wide"? ShredderMove.Meteor : ShredderMove.None ; if (col.gameObject.tag == "Narrow") { ChangeGravity(jumpGravity); } currentShredderVelocity = currentGrappleVelocity; } if (!sawblade.justFired) { Destroy(col.gameObject); GiveSawblade(); } } }
void OnTriggerExit2D(Collider2D col) { SawbladeMovement sawblade = col.GetComponent <SawbladeMovement>(); if (sawblade.justFired) { sawblade.justFired = false; } }
void OnTriggerEnter2D(Collider2D col) { SawbladeMovement sawblade = col.GetComponent <SawbladeMovement>(); if (sawblade != null) { animator.SetInteger(STATE_NAME, STATE_BREAKING); } }