Exemplo n.º 1
0
 public AeroImpactFeatures(
     ImpactParticles noImpacto,
     AttacksTrails trail,
     ToutchingFloor toque,
     PrepareJump prepara,
     FinalAeroImpact final,
     SoundEffectID onPrepareSound     = SoundEffectID.rajadaDeAgua,
     SoundEffectID onTouchGroundSound = SoundEffectID.rajadaDeAgua,
     bool parentearNoOsso             = true
     )
 {
     this.noImpacto          = noImpacto;
     this.trail              = trail;
     this.toque              = toque;
     this.prepara            = prepara;
     this.final              = final;
     this.parentearNoOsso    = parentearNoOsso;
     this.onPrepareSound     = onPrepareSound;
     this.onTouchGroundSound = onTouchGroundSound;
 }
    public static void OnTriggerEnterEnemyProjectile(Collider2D collision,
                                                     GameObject gameObject,
                                                     GameObject Particle,
                                                     SoundEffectID SomDeImpacto)
    {
        Transform transform = gameObject.transform;

        if (collision.tag == "Player")
        {
            bool sentidoPositivo = transform.position.x - collision.transform.position.x > 0;
            EventAgregator.Publish(new StandardSendGameEvent(gameObject, EventKey.heroDamage, sentidoPositivo, 25));
        }

        Debug.Log(collision.tag + " : " + collision.name);

        if (collision.tag != "Enemy" && collision.tag != "triggerGeral" && collision.tag != "attackCollisor" && collision.gameObject.layer != 12)
        {
            InstanciaLigando.Instantiate(Particle, transform.position, 2);
            EventAgregator.Publish(new StandardSendGameEvent(gameObject, EventKey.request3dSound, SomDeImpacto, 1f));
            Destroy(gameObject);
        }
    }
Exemplo n.º 3
0
 public SoundEffectInstance GetSoundEffectRef(SoundEffectID whichSoundEffect)
 {
     return(m_sounds[(int)whichSoundEffect].GetNextAvailableInstance());
 }
Exemplo n.º 4
0
 public SoundEffectInstance GetSoundEffectRef(SoundEffectID whichSoundEffect)
 {
     return m_sounds[(int)whichSoundEffect].GetNextAvailableInstance();
 }
Exemplo n.º 5
0
 public void DisparaAudio(SoundEffectID s)
 {
     DisparaAudio(s.ToString());
 }
Exemplo n.º 6
0
 public void Instantiate3dSound(Transform T, SoundEffectID som, float spartial = 1)
 {
     Instantiate3dSound(T, (AudioClip)Resources.Load(som.ToString()), spartial);
 }
Exemplo n.º 7
0
 public void PlaySfx(SoundEffectID s)
 {
     PlaySfx(s.ToString());
 }
 public void IniciarProjetilInimigo(Vector3 dir, GameObject particle, float velocidade, SoundEffectID som = SoundEffectID.nulo)
 {
     SomDeImpacto = som;
     Iniciar(dir, particle, velocidade);
 }
Exemplo n.º 9
0
 public void Instantiate3dSound(Vector3 pos, SoundEffectID som, float spartial = 1)
 {
     Instantiate3dSound(pos, (AudioClip)Resources.Load(som.ToString()), spartial);
 }