보스 몬스터 Ai 관련 코드 틀 추가
This commit is contained in:
22
Assets/Scripts/AI/State/EAttackState.cs
Normal file
22
Assets/Scripts/AI/State/EAttackState.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class EAttackState : IEnemyState
|
||||
{
|
||||
public void EnterState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EAttackState에서 EnterState 실행");
|
||||
}
|
||||
|
||||
public void UpdateState(EnemyStateManager enemy)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Tab))
|
||||
{
|
||||
enemy.TransitionToState(new EIdleState());
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EAttackState에서 ExitState 실행");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/AI/State/EAttackState.cs.meta
Normal file
2
Assets/Scripts/AI/State/EAttackState.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8e7338261caaf747acc655ddc6600c0
|
||||
22
Assets/Scripts/AI/State/EChaseState.cs
Normal file
22
Assets/Scripts/AI/State/EChaseState.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class EChaseState : IEnemyState
|
||||
{
|
||||
public void EnterState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EChaseState에서 EnterState 실행");
|
||||
}
|
||||
|
||||
public void UpdateState(EnemyStateManager enemy)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Tab))
|
||||
{
|
||||
enemy.TransitionToState(new EAttackState());
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EChaseState에서 ExitState 실행");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/AI/State/EChaseState.cs.meta
Normal file
2
Assets/Scripts/AI/State/EChaseState.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cf86eba8a247ce44aab23fb33a3c799
|
||||
22
Assets/Scripts/AI/State/EIdleState.cs
Normal file
22
Assets/Scripts/AI/State/EIdleState.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class EIdleState : IEnemyState
|
||||
{
|
||||
public void EnterState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EIdleState에서 EnterState 실행");
|
||||
}
|
||||
|
||||
public void UpdateState(EnemyStateManager enemy)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Tab))
|
||||
{
|
||||
enemy.TransitionToState(new EPatrolState());
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EIdleState에서 ExitState 실행");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/AI/State/EIdleState.cs.meta
Normal file
2
Assets/Scripts/AI/State/EIdleState.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf2076e239e13174599ab45c0c843ecb
|
||||
22
Assets/Scripts/AI/State/EPatrolState.cs
Normal file
22
Assets/Scripts/AI/State/EPatrolState.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class EPatrolState : IEnemyState
|
||||
{
|
||||
public void EnterState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EPatrolState에서 EnterState 실행");
|
||||
}
|
||||
|
||||
public void UpdateState(EnemyStateManager enemy)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Tab))
|
||||
{
|
||||
enemy.TransitionToState(new EChaseState());
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(EnemyStateManager enemy)
|
||||
{
|
||||
Debug.Log("EPatrolState에서 ExitState 실행");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/AI/State/EPatrolState.cs.meta
Normal file
2
Assets/Scripts/AI/State/EPatrolState.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1999129bffd0d544bba613cfcc014cdd
|
||||
Reference in New Issue
Block a user