Exemple #1
0
    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;
    }
Exemple #2
0
 private void Start()
 {
     mvmtScript = player.GetComponent <MVMT>();
 }