Thug anim fix

This commit is contained in:
KrolMel 2023-01-05 13:24:58 +01:00
parent dee01d65e6
commit 76ae5271e6
2 changed files with 7 additions and 6 deletions

View File

@ -35,7 +35,6 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 3.6720886, z: 10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -51,7 +50,6 @@ SpriteRenderer:
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
@ -157,7 +155,7 @@ BoxCollider2D:
m_EdgeRadius: 0
--- !u!95 &4006076606190978598
Animator:
serializedVersion: 4
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -170,7 +168,6 @@ Animator:
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
@ -224,13 +221,15 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
anim: {fileID: 4006076606190978598}
shouldRotate: 0
dir: {x: 0, y: 0, z: 0}
homePosition: {x: 0, y: 0, z: 0}
targetPosition: {fileID: 0}
agent: {fileID: 0}
isDuringFollowing: 0
approaching: 0
isAfterAction: 0
chasingRadius: 6
chasingRadius: 7
attackingRadius: 1.5
hit: 0
firstAttack: 0

View File

@ -133,7 +133,7 @@ public class ThugNPCFollowing : MonoBehaviour
if (approaching)
{
approaching = false;
anim.SetBool("isRunning", false);
anim.SetBool("isRunning", true);
gameObject.GetComponent<NPC>().State = NPCStateEnum.Walking;
}
}
@ -196,7 +196,9 @@ public class ThugNPCFollowing : MonoBehaviour
}
else
{
anim.SetBool("isRunning", false);
gameObject.GetComponent<NPC>().State = NPCStateEnum.Pending;
}
}
}