#43 FieldBoss01 Test.ver005

+ 구르기 쿨타임 0.5f 기본 셋팅
This commit is contained in:
NTG_Lenovo 2023-11-30 16:07:04 +09:00
parent 7e0e68abec
commit 6e62080e38
2 changed files with 10 additions and 2 deletions

View File

@ -2097,6 +2097,7 @@ MonoBehaviour:
<UseRigidbody>k__BackingField: 0 <UseRigidbody>k__BackingField: 0
useMouseAttack: 0 useMouseAttack: 0
isRolling: 0 isRolling: 0
enableRoll: 1
isStiffened: 0 isStiffened: 0
beAttacked: 0 beAttacked: 0
isAttacking: 0 isAttacking: 0
@ -2104,6 +2105,7 @@ MonoBehaviour:
angleSpeed: 0.2 angleSpeed: 0.2
rollDuration: 0.5 rollDuration: 0.5
rollForce: 2 rollForce: 2
rollCooldown: 0.5
myActiveSkill: {fileID: 0} myActiveSkill: {fileID: 0}
--- !u!114 &418278343 --- !u!114 &418278343
MonoBehaviour: MonoBehaviour:
@ -3682,7 +3684,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1fbb68ccbcfcf4c4c9f4304a726038e3, type: 3} m_Script: {fileID: 11500000, guid: 1fbb68ccbcfcf4c4c9f4304a726038e3, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
activeSkillDataSo: {fileID: 11400000, guid: 97ebd289c10598a458425fbefd7db39f, type: 2} activeSkillSo: {fileID: 11400000, guid: 97ebd289c10598a458425fbefd7db39f, type: 2}
--- !u!1 &1037586753 --- !u!1 &1037586753
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -89,6 +89,8 @@ namespace BlueWaterProject
[DisableIf("@true")] [DisableIf("@true")]
[SerializeField] private bool isRolling; [SerializeField] private bool isRolling;
[DisableIf("@true")] [DisableIf("@true")]
[SerializeField] private bool enableRoll = true;
[DisableIf("@true")]
[SerializeField] private bool isStiffened; [SerializeField] private bool isStiffened;
[DisableIf("@true")] [DisableIf("@true")]
[SerializeField] private bool beAttacked; [SerializeField] private bool beAttacked;
@ -101,6 +103,7 @@ namespace BlueWaterProject
public float angleSpeed = 0.2f; public float angleSpeed = 0.2f;
public float rollDuration = 0.3f; public float rollDuration = 0.3f;
public float rollForce = 2f; public float rollForce = 2f;
public float rollCooldown = 0.5f;
// 일반 변수 // 일반 변수
private bool usedNormalAttackCoroutine; private bool usedNormalAttackCoroutine;
@ -600,7 +603,7 @@ namespace BlueWaterProject
public void OnRoll() public void OnRoll()
{ {
if (isRolling) return; if (!enableRoll || isRolling) return;
StartCoroutine(nameof(Roll)); StartCoroutine(nameof(Roll));
} }
@ -732,6 +735,7 @@ namespace BlueWaterProject
private IEnumerator Roll() private IEnumerator Roll()
{ {
isRolling = true; isRolling = true;
enableRoll = false;
var time = 0f; var time = 0f;
@ -751,6 +755,7 @@ namespace BlueWaterProject
afterImageTrail.Stop(); afterImageTrail.Stop();
isRolling = false; isRolling = false;
StartCoroutine(Utils.CoolDown(rollCooldown, () => enableRoll = true));
if (movementInput == Vector2.zero) if (movementInput == Vector2.zero)
{ {
@ -766,6 +771,7 @@ namespace BlueWaterProject
afterImageTrail.Clear(); afterImageTrail.Clear();
isRolling = false; isRolling = false;
StartCoroutine(Utils.CoolDown(rollCooldown, () => enableRoll = true));
} }
private void GameOver() private void GameOver()