/* * public void Observe(SlugEvents ev) { * if (ev == SlugEvents.HitGround) { * bounceCount++; * ZRotationStepCurrent *= 2; * if (bounceCount >= bouncesToExplode) { * Explode(); * } * } * } */ private void Explode(Collider2D col) { ProjectileUtils.ImpactAnimationAndSound(transform, col, properties); ProjectileUtils.NotifyCollider(col, properties); explosionWave.CastAOE("enemy", transform.position); gameObject.SetActive(false); }
public void OnTriggerEnter2D(Collider2D col) { if (col.tag == properties.victimTag) { ProjectileUtils.ImpactAnimationAndSound(transform, col, properties); ProjectileUtils.NotifyCollider(col, properties); gameObject.SetActive(false); } }
public void OnTriggerEnter2D(Collider2D col) { if (col.tag == "Player") { if (properties.explosionAnimator != null) { ProjectileUtils.ImpactAnimationAndSound(transform, col, properties); } ProjectileUtils.NotifyCollider(col, properties); // NO WE DONT DO THAT FOR BREATH OR ANY AOE PROJ gameObject.SetActive(false); // 2 types de proj se distingue les aoe (leurs effets dure sur la duree et sur un espace) // et les non aoe (bullets) } }