Enemy animations working
This commit is contained in:
parent
e98baf5b9f
commit
4cccb5218a
|
@ -69,13 +69,13 @@ AnimatorController:
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 9100000}
|
||||||
- m_Name: Strangle
|
- m_Name: Strangle
|
||||||
m_Type: 9
|
m_Type: 9
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 9100000}
|
||||||
m_AnimatorLayers:
|
m_AnimatorLayers:
|
||||||
- serializedVersion: 5
|
- serializedVersion: 5
|
||||||
m_Name: Base Layer
|
m_Name: Base Layer
|
||||||
|
@ -149,7 +149,10 @@ AnimatorStateTransition:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_Conditions: []
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 1
|
||||||
|
m_ConditionEvent: Strangle
|
||||||
|
m_EventTreshold: 0
|
||||||
m_DstStateMachine: {fileID: 0}
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_DstState: {fileID: 4778432799953724235}
|
m_DstState: {fileID: 4778432799953724235}
|
||||||
m_Solo: 0
|
m_Solo: 0
|
||||||
|
@ -159,8 +162,8 @@ AnimatorStateTransition:
|
||||||
m_TransitionDuration: 0.25
|
m_TransitionDuration: 0.25
|
||||||
m_TransitionOffset: 0
|
m_TransitionOffset: 0
|
||||||
m_ExitTime: 0.75
|
m_ExitTime: 0.75
|
||||||
m_HasExitTime: 1
|
m_HasExitTime: 0
|
||||||
m_HasFixedDuration: 1
|
m_HasFixedDuration: 0
|
||||||
m_InterruptionSource: 0
|
m_InterruptionSource: 0
|
||||||
m_OrderedInterruption: 1
|
m_OrderedInterruption: 1
|
||||||
m_CanTransitionToSelf: 1
|
m_CanTransitionToSelf: 1
|
||||||
|
@ -184,7 +187,7 @@ AnimatorStateTransition:
|
||||||
m_TransitionDuration: 0.25
|
m_TransitionDuration: 0.25
|
||||||
m_TransitionOffset: 0
|
m_TransitionOffset: 0
|
||||||
m_ExitTime: 0
|
m_ExitTime: 0
|
||||||
m_HasExitTime: 1
|
m_HasExitTime: 0
|
||||||
m_HasFixedDuration: 1
|
m_HasFixedDuration: 1
|
||||||
m_InterruptionSource: 0
|
m_InterruptionSource: 0
|
||||||
m_OrderedInterruption: 1
|
m_OrderedInterruption: 1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dbb100609945c1542badad290ab80bd8
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -8,20 +8,13 @@ public class EnemyAnimationHandler : MonoBehaviour
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
animator = GetComponentInChildren<Animator>();
|
animator = GetComponentInChildren<Animator>();
|
||||||
if (animator == animator.enabled)
|
if (animator != animator.enabled)
|
||||||
animator.enabled = false;
|
animator.enabled = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
if (Input.GetKeyDown(KeyCode.F))
|
|
||||||
Strangle();
|
|
||||||
if (Input.GetKeyDown(KeyCode.G))
|
|
||||||
Die();
|
|
||||||
}
|
|
||||||
public void Strangle()
|
public void Strangle()
|
||||||
{
|
{
|
||||||
animator.enabled = true;
|
animator.SetTrigger("Die");
|
||||||
}
|
}
|
||||||
public void Die()
|
public void Die()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue