Skip to content
Snippets Groups Projects
Commit 1443f0fa authored by Daniel Egiant Sitanggang's avatar Daniel Egiant Sitanggang
Browse files

feat: ally pet action animation

parent 53faf63b
1 merge request!36feat: ally pet action animation
...@@ -124,9 +124,9 @@ AnimatorStateTransition: ...@@ -124,9 +124,9 @@ AnimatorStateTransition:
m_Mute: 0 m_Mute: 0
m_IsExit: 0 m_IsExit: 0
serializedVersion: 3 serializedVersion: 3
m_TransitionDuration: 0.2500006 m_TransitionDuration: 0.5442685
m_TransitionOffset: 0 m_TransitionOffset: 0.84050137
m_ExitTime: 0.84693843 m_ExitTime: 0.31502604
m_HasExitTime: 1 m_HasExitTime: 1
m_HasFixedDuration: 1 m_HasFixedDuration: 1
m_InterruptionSource: 0 m_InterruptionSource: 0
...@@ -149,9 +149,9 @@ AnimatorStateTransition: ...@@ -149,9 +149,9 @@ AnimatorStateTransition:
m_Mute: 0 m_Mute: 0
m_IsExit: 0 m_IsExit: 0
serializedVersion: 3 serializedVersion: 3
m_TransitionDuration: 0.25 m_TransitionDuration: 0.25179565
m_TransitionOffset: 0 m_TransitionOffset: 1.3310483
m_ExitTime: 0.96511626 m_ExitTime: 0.06373558
m_HasExitTime: 0 m_HasExitTime: 0
m_HasFixedDuration: 1 m_HasFixedDuration: 1
m_InterruptionSource: 0 m_InterruptionSource: 0
......
This diff is collapsed.
This diff is collapsed.
...@@ -43,17 +43,21 @@ namespace Nightmare ...@@ -43,17 +43,21 @@ namespace Nightmare
{ {
if (IsDead()) if (IsDead())
{ {
//TODO: Add a death animation, set rigidbody to kinematic, and sink the pet into the ground StartSinking();
Destroy(gameObject); transform.Translate (-Vector3.up * sinkSpeed * Time.deltaTime);
if (transform.position.y < -10f)
// transform.Translate (-Vector3.up * sinkSpeed * Time.deltaTime); {
// if (transform.position.y < -10f) Destroy(gameObject);
// { }
// Destroy(gameObject);
// }
} }
} }
void StartSinking ()
{
GetComponent <UnityEngine.AI.NavMeshAgent> ().enabled = false;
SetKinematics(true);
}
public void TakeDamage (int amount) public void TakeDamage (int amount)
{ {
if (!IsDead()) if (!IsDead())
...@@ -77,5 +81,8 @@ namespace Nightmare ...@@ -77,5 +81,8 @@ namespace Nightmare
{ {
isCheatFullHPPet = isActive; isCheatFullHPPet = isActive;
} }
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment