94 lines
3.2 KiB
C#
94 lines
3.2 KiB
C#
using System;
|
|
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
public class Boss_Minotos : BossMobActor
|
|
{
|
|
public GameObject[] gos_attackeffect;
|
|
[Header("스킬1 쿨타임")]
|
|
public float Skill1CoolTime = 15f;
|
|
[Header("스킬1 데미지")]
|
|
public float Skill1Dmg = 1.2f;
|
|
[Header("---------------------------------------")]
|
|
public bool Perforation_Line;
|
|
[Header("스킬2 쿨타임")]
|
|
public float Skill2CoolTime = 25f;
|
|
[Header("스킬2 지속시간")]
|
|
public float Skill2LifeTime = 15f;
|
|
[Header("스킬2 이동속도 증가량")]
|
|
public float Skill2MoveSpeed = 0.5f;
|
|
[Header("스킬2 공격속도 증가량")]
|
|
public float Skill2AttackSpeed = 0.5f;
|
|
|
|
public override void Set(bool isEnemy, Actor owner, ServerData sdata, int _id, bool _stop, bool _ui = false)
|
|
{
|
|
base.Set(isEnemy, owner, sdata, _id, _stop, _ui);
|
|
DSUtil.InActivateGameObjects(gos_attackeffect);
|
|
IndicatorInfo.Ins.Make_Indicator("Revive30_Indicator", null);
|
|
|
|
CoolTime_Skill1 = 1f;
|
|
CoolTime_Skill2 = 2f;
|
|
}
|
|
|
|
protected override void Init(bool initSkill1CoolTime, bool initSkill2CoolTime)
|
|
{
|
|
base.Init(initSkill1CoolTime, initSkill2CoolTime);
|
|
if (initSkill1CoolTime) CoolTime_Skill1 = Skill1CoolTime;
|
|
if (initSkill2CoolTime) CoolTime_Skill2 = Skill2CoolTime;
|
|
}
|
|
|
|
protected override void Update()
|
|
{
|
|
base.Update();
|
|
if (IsDead() || IsStop) return;
|
|
|
|
if (UseSkillIndex == 1 && MobStatus != eMobStatus.Skill)
|
|
StartCoroutine(Co_Skill1());
|
|
else if (UseSkillIndex == 2 && MobStatus != eMobStatus.Skill)
|
|
StartCoroutine(Co_Skill2());
|
|
}
|
|
|
|
IEnumerator Co_Skill1()
|
|
{
|
|
Change_MobStatus(eMobStatus.Skill);
|
|
AnimationPlay("boss_skill1start");
|
|
InGameInfo.Ins.Show_Effect("Effect_MinotosSkill1Charging", this);
|
|
yield return new WaitForSeconds(1.0f);
|
|
AnimationPlay("boss_skill1");
|
|
Init(true, false);
|
|
}
|
|
|
|
IEnumerator Co_Skill2()
|
|
{
|
|
Change_MobStatus(eMobStatus.Skill);
|
|
AnimationPlay("boss_skill2start");
|
|
InGameInfo.Ins.Show_Effect("Effect_MinotosSkill2Charging", this);
|
|
yield return new WaitForSeconds(1.0f);
|
|
|
|
AnimationPlay("boss_skill2");
|
|
Buff_or_Debuff(eCC.MOVSPD_Up, Skill2LifeTime, Skill2MoveSpeed);
|
|
Buff_or_Debuff(eCC.ATKSPD_Up, Skill2LifeTime, Skill2AttackSpeed);
|
|
InGameInfo.Ins.Show_Effect("Effect_MinotosSkill2", this, eEffectLocation.Bottom, Skill2LifeTime);
|
|
yield return new WaitForSeconds(0.5f);
|
|
Check_Battle();
|
|
Init(false, true);
|
|
}
|
|
|
|
protected override float Get_Skill1Dmg() { return Skill1Dmg; }
|
|
protected override Vector3 Get_Skill1Pos() { return Get_Center_position(); }
|
|
|
|
public override void Play_Attack(int _attack, float _as, Action actsuccess = null)
|
|
{
|
|
base.Play_Attack(_attack, _as, Show_AttackEffect);
|
|
}
|
|
public void Show_AttackEffect()
|
|
{
|
|
gos_attackeffect[0].SetActive(false);
|
|
gos_attackeffect[0].SetActive(true);
|
|
CoroutineMgr.Ins.Set_Coroutine(() =>
|
|
{
|
|
gos_attackeffect[1].SetActive(false);
|
|
gos_attackeffect[1].SetActive(true);
|
|
}, Time.deltaTime * 2f);
|
|
}
|
|
} |