Esempio n. 1
0
    public void EventHandler(SCG_Event e)
    {
        Event_EnemyBulletHit bH = e as Event_EnemyBulletHit;

        if (bH != null)
        {
            oneShotSource.PlayOneShot(gameModel.sfx_EnemyBulletHit);
        }

        Event_PlayerShieldBlock sB = e as Event_PlayerShieldBlock;

        if (sB != null)
        {
            oneShotSource.PlayOneShot(gameModel.sfx_Shield_Block);
        }

        Event_PlayerExplode pE = e as Event_PlayerExplode;

        if (pE != null)
        {
            oneShotSource.PlayOneShot(gameModel.sfx_ShipExplode);
        }

        Event_LanceHit lH = e as Event_LanceHit;

        if (lH != null)
        {
            GameObject g = gameAssets.Make(MyGameAsset.SFX, lH.location);
            g.GetComponent <AudioSource>().PlayOneShot(gameModel.sfx_LanceHit);
        }
    }
    public void EventHandler(SCG_Event e)
    {
        Event_EnemyBulletHit bH = e as Event_EnemyBulletHit;

        if (bH != null)
        {
            Vector2 shakeRotOffset = popMagnitudeMax * Vector3.Normalize(Random.insideUnitCircle);
            Vector3 eulerToPush    = holoPlay.eulerAngles;
            eulerToPush      += (Vector3)shakeRotOffset;
            holoPlay.rotation = Quaternion.Euler(eulerToPush);
        }
    }
Esempio n. 3
0
    public void EventHandler(SCG_Event e)
    {
        Event_EnemyBulletHit eBH = e as Event_EnemyBulletHit;

        if (eBH != null)
        {
            jPBImage.color = gameModel.c_Hot;
            hpFill.color   = lifeHit;
        }

        Event_LifeUpTick lUT = e as Event_LifeUpTick;

        if (lUT != null)
        {
            hpFill.color = lifeTick;
        }
    }
Esempio n. 4
0
    public void EventHandler(SCG_Event e)
    {
        Event_PlayerShieldBlock psb = e as Event_PlayerShieldBlock;

        if (psb != null)
        {
            c0 = playModel.appliedBulletColor;
            c1 = playModel.appliedBulletColor;
            return;
        }

        Event_EnemyBulletHit ebb = e as Event_EnemyBulletHit;

        if (ebb != null)
        {
            playerShotPS.Emit(10);
        }
    }