public void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag == "Player") { ActionUtilities.GetSpikeAction()(col.gameObject.GetComponent <PlayerDeath>()); } }
public void OnCollisionStay2D(Collision2D col) { if (isDeadly && col.gameObject.tag == "Player") { ActionUtilities.GetDeadlyPlatformAction()(col.gameObject.GetComponent <PlayerDeath>()); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player") { ActionUtilities.GetBombAction()(collision.gameObject.GetComponent <PlayerDeath>()); } }
public void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == "Player") { if (isPlatformWin) { if (!hasBeenTouched) { spriteRenderer.color = col.gameObject.GetComponent <SpriteRenderer>().color; WinController.instance.CheckWinCondition(gameObject, col.gameObject); } hasBeenTouched = true; } if (isDeadly) { ActionUtilities.GetDeadlyPlatformAction()(col.gameObject.GetComponent <PlayerDeath>()); } } }