private void OnCollisionEnter(Collision collision) { if (collision.transform.tag == Utilities.Constants.TagBall) { if (WallState == Utilities.WallState.Creating) { if (wallCreation == null) { wallCreation = FindObjectOfType <WallCreationScript>(); } wallCreation.SetWallHittedOnCreation(gameObject); } } }
private void Start() { wallCreation = GetComponent <WallCreationScript>(); ballManagers = new List <BallManager>(); }