AttackPattern 누락된 추가
This commit is contained in:
83
Gameton-06/Assets/Gameton/Scripts/Monster/AttackPattern.cs
Normal file
83
Gameton-06/Assets/Gameton/Scripts/Monster/AttackPattern.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user