IEnumerator WreckingBall(MVMT collidingPlayer) { collidingPlayer.wreckingBall = true; Physics.IgnoreLayerCollision(playerLayer, wallLayer); boxCollider.enabled = false; gameObject.GetComponent <MeshRenderer>().enabled = false; yield return(new WaitForSeconds(delayTillReset)); Physics.IgnoreLayerCollision(playerLayer, wallLayer, false); boxCollider.enabled = true; gameObject.GetComponent <MeshRenderer>().enabled = true; collidingPlayer.wreckingBall = false; }
private void Start() { mvmtScript = player.GetComponent <MVMT>(); }