void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { if (blackShape == false || (blackShape == true && player.powerup == true)) { if (!onlyOnce) { blockSoundManager sm = GameObject.FindObjectOfType(typeof(blockSoundManager)) as blockSoundManager; sm.tapSound(); // Destroy(other.gameObject); applyForce(); startMoving = true; if (levelClear) { player.levelCleared = true; player.powerup = false; cameraFollow.followPlayer = false; frameManager pl = GameObject.FindObjectOfType(typeof(frameManager)) as frameManager; pl.showNextScreen(); } //bulletStrike = true; onlyOnce = true; // an.enabled = true; manager mn = GameObject.FindObjectOfType(typeof(manager)) as manager; mn.increaseScore(); } } if (blackShape == true && player.powerup == false) { blockSoundManager sm = GameObject.FindObjectOfType(typeof(blockSoundManager)) as blockSoundManager; sm.tapSound(); goDown = true; mc.isTrigger = false; } } }
public void pointerUp() { screenPressed = false; blockSoundManager sm = GameObject.FindObjectOfType(typeof(blockSoundManager)) as blockSoundManager; sm.pitchBackToNull(); }