warring 경고 제거
This commit is contained in:
@@ -25190,7 +25190,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 866829734583457878, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
- target: {fileID: 866829734583457878, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
||||||
propertyPath: m_CategoryHash
|
propertyPath: m_CategoryHash
|
||||||
value: 0.009161512
|
value: 1.0429618e-14
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 866829734583457880, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
- target: {fileID: 866829734583457880, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
||||||
propertyPath: m_FlipX
|
propertyPath: m_FlipX
|
||||||
@@ -25199,7 +25199,7 @@ PrefabInstance:
|
|||||||
- target: {fileID: 866829734583457880, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
- target: {fileID: 866829734583457880, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
||||||
propertyPath: m_Sprite
|
propertyPath: m_Sprite
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 4723107735738678597, guid: 8c818873fb8d4ad3bb40ebb62d906a1d, type: 3}
|
objectReference: {fileID: 1856677538, guid: 8c818873fb8d4ad3bb40ebb62d906a1d, type: 3}
|
||||||
- target: {fileID: 866829735663616562, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
- target: {fileID: 866829735663616562, guid: 1e126f96ebcf4245a3328353992d46f6, type: 3}
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: BlueDragon
|
value: BlueDragon
|
||||||
@@ -50707,7 +50707,7 @@ Rigidbody2D:
|
|||||||
m_Simulated: 1
|
m_Simulated: 1
|
||||||
m_UseFullKinematicContacts: 0
|
m_UseFullKinematicContacts: 0
|
||||||
m_UseAutoMass: 0
|
m_UseAutoMass: 0
|
||||||
m_Mass: 1
|
m_Mass: 0.0001
|
||||||
m_LinearDrag: 0
|
m_LinearDrag: 0
|
||||||
m_AngularDrag: 0.05
|
m_AngularDrag: 0.05
|
||||||
m_GravityScale: 1
|
m_GravityScale: 1
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
@@ -67,7 +68,11 @@ namespace TON
|
|||||||
// todo : 충돌 했으면 attack 전환 (바로 그냥 공격하게 따라가지 말고)
|
// todo : 충돌 했으면 attack 전환 (바로 그냥 공격하게 따라가지 말고)
|
||||||
// todo : 시야를 벗어났으면 idle 전환
|
// todo : 시야를 벗어났으면 idle 전환
|
||||||
|
|
||||||
_isDetect = false;
|
if (_isDetect)
|
||||||
|
{
|
||||||
|
_animator.SetTrigger("Attack");
|
||||||
|
_isWalking = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (_isWalking)
|
if (_isWalking)
|
||||||
{
|
{
|
||||||
@@ -98,13 +103,6 @@ namespace TON
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (_isHit)
|
|
||||||
// {
|
|
||||||
// _animator.SetBool("Attack", _isDetect);
|
|
||||||
//
|
|
||||||
// _isWalking = false;
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
_animator.SetBool("Walk", _isWalking); // 걷기 애니메이션
|
_animator.SetBool("Walk", _isWalking); // 걷기 애니메이션
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,6 +141,7 @@ namespace TON
|
|||||||
|
|
||||||
void MonsterAttack(GameObject player)
|
void MonsterAttack(GameObject player)
|
||||||
{
|
{
|
||||||
|
_animator.SetTrigger("Attack");
|
||||||
// 임시 반영 수정 예정
|
// 임시 반영 수정 예정
|
||||||
DamageCalculator damageCalculator = new DamageCalculator();
|
DamageCalculator damageCalculator = new DamageCalculator();
|
||||||
|
|
||||||
@@ -158,20 +157,17 @@ namespace TON
|
|||||||
|
|
||||||
private void OnCollisionEnter2D(Collision2D other)
|
private void OnCollisionEnter2D(Collision2D other)
|
||||||
{
|
{
|
||||||
_isDetect = true;
|
|
||||||
|
|
||||||
if (other.collider.CompareTag("Player"))
|
if (other.collider.CompareTag("Player"))
|
||||||
{
|
{
|
||||||
|
_isDetect = true;
|
||||||
_animator.SetBool("Attack", true); // 공격 애니메이션 재생
|
|
||||||
MonsterAttack(other.gameObject); // 플레이어에게 공격
|
MonsterAttack(other.gameObject); // 플레이어에게 공격
|
||||||
Debug.Log("감지됨");
|
Debug.Log("감지됨");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!other.collider.CompareTag("Player"))
|
private void OnCollisionExit2D(Collision2D other)
|
||||||
{
|
{
|
||||||
_isDetect = false;
|
_isDetect = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -191,28 +191,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
Continuous: 0
|
Continuous: 0
|
||||||
Active: 0
|
Active: 0
|
||||||
--- !u!1101 &-2848854086711600340
|
|
||||||
AnimatorStateTransition:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name:
|
|
||||||
m_Conditions: []
|
|
||||||
m_DstStateMachine: {fileID: 0}
|
|
||||||
m_DstState: {fileID: 3188460960225426455}
|
|
||||||
m_Solo: 0
|
|
||||||
m_Mute: 0
|
|
||||||
m_IsExit: 0
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransitionDuration: 0.25
|
|
||||||
m_TransitionOffset: 0
|
|
||||||
m_ExitTime: 0.75
|
|
||||||
m_HasExitTime: 0
|
|
||||||
m_HasFixedDuration: 1
|
|
||||||
m_InterruptionSource: 0
|
|
||||||
m_OrderedInterruption: 1
|
|
||||||
m_CanTransitionToSelf: 1
|
|
||||||
--- !u!1102 &-1793952159812074963
|
--- !u!1102 &-1793952159812074963
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
@@ -583,28 +561,6 @@ AnimatorStateMachine:
|
|||||||
m_ExitPosition: {x: 20, y: 220, z: 0}
|
m_ExitPosition: {x: 20, y: 220, z: 0}
|
||||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
m_DefaultState: {fileID: -1674859921881163369}
|
m_DefaultState: {fileID: -1674859921881163369}
|
||||||
--- !u!1101 &3032347272367370037
|
|
||||||
AnimatorStateTransition:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name:
|
|
||||||
m_Conditions: []
|
|
||||||
m_DstStateMachine: {fileID: 0}
|
|
||||||
m_DstState: {fileID: -56690746207215259}
|
|
||||||
m_Solo: 0
|
|
||||||
m_Mute: 0
|
|
||||||
m_IsExit: 0
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransitionDuration: 0.25
|
|
||||||
m_TransitionOffset: 0
|
|
||||||
m_ExitTime: 0.39999998
|
|
||||||
m_HasExitTime: 1
|
|
||||||
m_HasFixedDuration: 1
|
|
||||||
m_InterruptionSource: 0
|
|
||||||
m_OrderedInterruption: 1
|
|
||||||
m_CanTransitionToSelf: 1
|
|
||||||
--- !u!1102 &3188460960225426455
|
--- !u!1102 &3188460960225426455
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
@@ -615,9 +571,7 @@ AnimatorState:
|
|||||||
m_Name: Attack
|
m_Name: Attack
|
||||||
m_Speed: 1
|
m_Speed: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions:
|
m_Transitions: []
|
||||||
- {fileID: 4658846137002246010}
|
|
||||||
- {fileID: 3032347272367370037}
|
|
||||||
m_StateMachineBehaviours:
|
m_StateMachineBehaviours:
|
||||||
- {fileID: 4517560952412984766}
|
- {fileID: 4517560952412984766}
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
@@ -676,7 +630,7 @@ AnimatorStateMachine:
|
|||||||
m_Position: {x: 630, y: 130, z: 0}
|
m_Position: {x: 630, y: 130, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 4602458092277031176}
|
m_State: {fileID: 4602458092277031176}
|
||||||
m_Position: {x: 1070, y: 280, z: 0}
|
m_Position: {x: 1060, y: 280, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -4838633882212068965}
|
m_State: {fileID: -4838633882212068965}
|
||||||
m_Position: {x: 1060, y: 350, z: 0}
|
m_Position: {x: 1060, y: 350, z: 0}
|
||||||
@@ -685,17 +639,16 @@ AnimatorStateMachine:
|
|||||||
m_Position: {x: 490, y: 240, z: 0}
|
m_Position: {x: 490, y: 240, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -136569306282141652}
|
m_State: {fileID: -136569306282141652}
|
||||||
m_Position: {x: 760, y: 290, z: 0}
|
m_Position: {x: 1060, y: 220, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -7991831788900291451}
|
m_State: {fileID: -7991831788900291451}
|
||||||
m_Position: {x: 760, y: 340, z: 0}
|
m_Position: {x: 1060, y: 410, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions:
|
m_AnyStateTransitions: []
|
||||||
- {fileID: -2848854086711600340}
|
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
m_StateMachineTransitions: {}
|
m_StateMachineTransitions: {}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_AnyStatePosition: {x: 210, y: 250, z: 0}
|
m_AnyStatePosition: {x: 210, y: 240, z: 0}
|
||||||
m_EntryPosition: {x: 20, y: 140, z: 0}
|
m_EntryPosition: {x: 20, y: 140, z: 0}
|
||||||
m_ExitPosition: {x: 1000, y: 130, z: 0}
|
m_ExitPosition: {x: 1000, y: 130, z: 0}
|
||||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
@@ -754,28 +707,6 @@ AnimatorState:
|
|||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
--- !u!1101 &4658846137002246010
|
|
||||||
AnimatorStateTransition:
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name:
|
|
||||||
m_Conditions: []
|
|
||||||
m_DstStateMachine: {fileID: 0}
|
|
||||||
m_DstState: {fileID: 6342953676309033787}
|
|
||||||
m_Solo: 0
|
|
||||||
m_Mute: 0
|
|
||||||
m_IsExit: 0
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransitionDuration: 0.25
|
|
||||||
m_TransitionOffset: 0
|
|
||||||
m_ExitTime: 0.39999998
|
|
||||||
m_HasExitTime: 1
|
|
||||||
m_HasFixedDuration: 1
|
|
||||||
m_InterruptionSource: 0
|
|
||||||
m_OrderedInterruption: 1
|
|
||||||
m_CanTransitionToSelf: 1
|
|
||||||
--- !u!1102 &6342953676309033787
|
--- !u!1102 &6342953676309033787
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
|
|||||||
Reference in New Issue
Block a user