private void OnCollisionEnter(Collision collision) { IEffectable effectable = collision.gameObject.GetComponent <IEffectable>(); if (effectable != null) { if (obsType == ObstacleType.Wall || obsType == ObstacleType.Moving) { effectable.Respawn(); } else if (obsType == ObstacleType.RotatingStick || obsType == ObstacleType.HalfDonut) { effectable.GetStunned(force, transform.right + (transform.up / 2f), ForceMode.Impulse); } } }