AttackPattern 누락된 추가

This commit is contained in:
Mingu Kim
2025-02-18 15:35:05 +09:00
parent 41234e3e97
commit 8d5f5894f7
3 changed files with 98 additions and 4 deletions

View File

@@ -0,0 +1,83 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TON
{
public class AttackPattern
{
protected MonsterBase _monsterBase;
public AttackPattern(MonsterBase monsterBase)
{
_monsterBase = monsterBase;
}
public virtual void Attack()
{
}
}
public class Monster1AttackPattern : AttackPattern
{
public Monster1AttackPattern(MonsterBase monsterBase) : base(monsterBase)
{
}
public override void Attack()
{
Skill1();
MeleeAttack();
}
private void Skill1()
{
_monsterBase.MonsterSkillLaunch();
}
private void MeleeAttack()
{
_monsterBase.PlayerAttack();
}
}
public class Monster2AttackPattern : AttackPattern
{
public Monster2AttackPattern(MonsterBase monsterBase) : base(monsterBase)
{
}
public override void Attack()
{
Skill1();
Skill2();
MeleeAttack();
}
private void Skill1()
{
}
private void Skill2()
{
}
private void MeleeAttack()
{
_monsterBase.PlayerAttack();
}
}
}