Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
    public void Bonus()
    {
        playerSonorEffectsAS.clip  = powerUpAC;
        playerSonorEffectsAS.pitch = 1f;
        playerSonorEffectsAS.Play();


        if (SelfBonusObject == BonusObjects.Nothing)
        {
            SelfBonusObject = (BonusObjects)Random.Range(1, 3);
        }
    }