using System.Collections; using System.Collections.Generic; using DragonLi.Core; using DragonLi.Frame; using UnityEngine; public class EnemyTa : Enemy,IDamagable { public Transform[] enemyPos; public Transform bossPos; public Transform bossDoorPos; public override void Init() { base.Init(); for (int i = 0; i < enemyPos.Length; i++) { var go=GameManager.Ins.CreateEnemy(1,enemyPos[i].position,Vector3.zero,false); go.GetComponent().SetShowWaitTime(4); } var boss = GameManager.Ins.CreateEnemy(7,bossPos.position,Vector3.zero, true); boss.GetComponent().FirstShow(GameManager.Ins.BossPosDataDic[0].DoorPos); isShield = true; MonoSingleton.Instance.WaitSecondTodo(() => { isShield = false; },6f); isDie = false; } public override void ChangeHp(float value, object info, Transform _sender) { base.ChangeHp(value, info, _sender); } public bool isDie; public override void Update() { base.Update(); if (GameManager.Ins.GetCurEnemyListCount() <= 0&& !isDie) { Dead(); } } public override void Dead() { base.Dead(); isDie = true; GameManager.Ins.CurLevelWin(); GameInit.Ins.PlayAudio("1.7",GameInit.Ins.self.transform,true); } }