private void Shoot() { playerSonorEffectsAS.clip = shootAC; playerSonorEffectsAS.pitch = 1f; playerSonorEffectsAS.Play(); Transform newShoot = Instantiate(ShootPrefab).GetComponent <Transform>(); newShoot.position = SelfTransform.position + SelfTransform.up * 7; newShoot.rotation = SelfTransform.rotation; SelfBonusObject = BonusObjects.Nothing; }
public void Bonus() { playerSonorEffectsAS.clip = powerUpAC; playerSonorEffectsAS.pitch = 1f; playerSonorEffectsAS.Play(); if (SelfBonusObject == BonusObjects.Nothing) { SelfBonusObject = (BonusObjects)Random.Range(1, 3); } }