1234567891011121314151617181920212223242526272829 |
- using UnityEngine;
- using System.Collections;
- public class SpermicidalWave : CondomBase
- {
- protected override void CustomFixedUpdate()
- {
- transform.localPosition += new Vector3(-speed * Time.deltaTime, 0);
- if (transform.localPosition.x < -GameConstants.GAME_WIDTH * 3/2)
- {
- _poolObject.Despawn();
- NotificationCenter.Post(NotificationType.SpermicidalWaveDespawned);
- }
- }
- public override void CapturedEnemy(Enemy enemy)
- {
- NotificationCenter.Post(NotificationType.SpermHitBySpermicidalWave, enemy);
- ProjectileParticleSystem.Instance.Explode(enemy.transform.TransformPoint(enemy.hitOffset));
- enemy.GotHit();
- enemy.Despawn();
- SoundManager.Play(SoundEvent.torpedodestroy);
- }
- public override bool CanCaptureEnemy(Enemy enemy)
- {
- return true; //Can capture everything (including viruses)
- }
- }
|