protected override void Explode() { if (!MirvDestroyedByFriendlyMissile) { EnemyAiController controller = (EnemyAiController)Object.FindObjectOfType(typeof(EnemyAiController)); controller.RapidDeployMissilesFromPosition(4, transform.position); } base.Explode(); }
public Enemy(SpacePartitioner world, Sprite sprite, float hitboxRadius, float scale, float speed, float health, float armor, float damage, float layerDepth) : base(world) { Sprite = sprite; HitboxRadius = hitboxRadius; Scale = scale; Speed = speed; Health = health; Armor = armor; Damage = damage; LayerDepth = layerDepth + ExtraDepth; AiController = new EnemyAiController(this); ExtraDepth += 0.00001f; }
void Start() { EnemyAiController = EnemyAiController.GetComponent <EnemyAiController>(); NextLevel(); }