Implemented Animation Clip asset and animation controller #410
Binary file not shown.
|
@ -0,0 +1,7 @@
|
||||||
|
Name: MD_RigTest01_SkinningTestAnims
|
||||||
|
ID: 203438081
|
||||||
|
Type: 12
|
||||||
|
Sub Assets:
|
||||||
|
Name: Full
|
||||||
|
ID: 231416496
|
||||||
|
Type: 13
|
Binary file not shown.
|
@ -35,3 +35,6 @@ Type: 13
|
||||||
Name: Jump_End
|
Name: Jump_End
|
||||||
ID: 228134756
|
ID: 228134756
|
||||||
Type: 13
|
Type: 13
|
||||||
|
Name: Full
|
||||||
|
ID: 223752972
|
||||||
|
Type: 13
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: 0, y: 0, z: 0}
|
Translate: {x: -0.291508496, y: 0, z: 0}
|
||||||
Rotate: {x: 0, y: 0, z: 0}
|
Rotate: {x: -0, y: 0, z: -0}
|
||||||
Scale: {x: 1, y: 1, z: 1}
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Renderable Component:
|
Renderable Component:
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
Scripts:
|
Scripts:
|
||||||
- Type: SHADE.Test.AnimTest
|
- Type: SHADE.Test.AnimTest
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
fullClip: 223752972
|
||||||
idleClip: 227450439
|
idleClip: 227450439
|
||||||
runClip: 229125027
|
runClip: 229125027
|
||||||
pickUpClip: 219605278
|
pickUpClip: 219605278
|
||||||
|
@ -53,4 +54,29 @@
|
||||||
Perspective: true
|
Perspective: true
|
||||||
FOV: 90
|
FOV: 90
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
|
- EID: 3
|
||||||
|
Name: Leg
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: 0.332949668, y: 0, z: 0}
|
||||||
|
Rotate: {x: -0, y: 0, z: -0}
|
||||||
|
Scale: {x: 0.0710000023, y: 0.0710000023, z: 0.0710000023}
|
||||||
|
IsActive: true
|
||||||
|
Renderable Component:
|
||||||
|
Mesh: 141097368
|
||||||
|
Material: 128805346
|
||||||
|
IsActive: true
|
||||||
|
Animator Component:
|
||||||
|
Rig: 72178939
|
||||||
|
AnimationController: 0
|
||||||
|
IsActive: true
|
||||||
|
Scripts:
|
||||||
|
- Type: SHADE.Test.AnimTest
|
||||||
|
Enabled: true
|
||||||
|
fullClip: 231416496
|
||||||
|
idleClip: 0
|
||||||
|
runClip: 0
|
||||||
|
pickUpClip: 0
|
|
@ -1,9 +1,11 @@
|
||||||
namespace SHADE.Test
|
namespace SHADE.Test
|
||||||
{
|
{
|
||||||
public class AnimTest : Script
|
public class AnimTest : Script
|
||||||
{
|
{
|
||||||
#region Serialized Fields
|
#region Serialized Fields
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
|
private AnimationClipAsset fullClip;
|
||||||
|
[SerializeField]
|
||||||
private AnimationClipAsset idleClip;
|
private AnimationClipAsset idleClip;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private AnimationClipAsset runClip;
|
private AnimationClipAsset runClip;
|
||||||
|
@ -12,7 +14,7 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Components
|
#region Components
|
||||||
public Animator Animator { get; private set; }
|
public Animator Animator { get; private set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Lifecycle Functions
|
#region Lifecycle Functions
|
||||||
|
@ -23,7 +25,11 @@
|
||||||
|
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
if (Input.GetKeyUp(Input.KeyCode.Alpha1))
|
if (Input.GetKeyUp(Input.KeyCode.Equals))
|
||||||
|
{
|
||||||
|
Animator.Play(fullClip);
|
||||||
|
}
|
||||||
|
else if (Input.GetKeyUp(Input.KeyCode.Alpha1))
|
||||||
{
|
{
|
||||||
Animator.Play(idleClip);
|
Animator.Play(idleClip);
|
||||||
}
|
}
|
||||||
|
@ -38,4 +44,4 @@
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue