mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
Merge pull request #10 from frizbee19/beni
Fix animations + jumping animation
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: seiden-move-airborne
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves:
|
||||
- curve:
|
||||
- time: 0
|
||||
value: {fileID: 1747070116146791987, guid: 73ae3db8a07b2424caf7884baa7964f8, type: 3}
|
||||
attribute: m_Sprite
|
||||
path:
|
||||
classID: 212
|
||||
script: {fileID: 0}
|
||||
m_SampleRate: 4
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 0
|
||||
script: {fileID: 0}
|
||||
typeID: 212
|
||||
customType: 23
|
||||
isPPtrCurve: 1
|
||||
pptrCurveMapping:
|
||||
- {fileID: 1747070116146791987, guid: 73ae3db8a07b2424caf7884baa7964f8, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.25
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0b1316cf42d54331930284f81512c6d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -105,6 +105,31 @@ AnimatorState:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-832109783450187487
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: Airborne
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 0}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 1
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 0
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-725505904537309351
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -141,21 +166,25 @@ AnimatorStateMachine:
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -1236971542150945798}
|
||||
m_Position: {x: 390, y: 0, z: 0}
|
||||
m_Position: {x: 360, y: -60, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -8077888743940160789}
|
||||
m_Position: {x: 170, y: 10, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5184000313039322506}
|
||||
m_Position: {x: 610, y: 0, z: 0}
|
||||
m_Position: {x: 530, y: -10, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 5309719437208521675}
|
||||
m_Position: {x: 840, y: -20, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: 8467386414634264506}
|
||||
- {fileID: 1435758169152787585}
|
||||
- {fileID: 555184098878639659}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 510, y: -80, z: 0}
|
||||
m_AnyStatePosition: {x: 510, y: -170, z: 0}
|
||||
m_EntryPosition: {x: 190, y: -70, z: 0}
|
||||
m_ExitPosition: {x: 510, y: 80, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
@@ -174,7 +203,13 @@ AnimatorController:
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: Airborne
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
@@ -188,6 +223,31 @@ AnimatorController:
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &555184098878639659
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Airborne
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 5309719437208521675}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 0
|
||||
--- !u!1101 &1435758169152787585
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -213,6 +273,33 @@ AnimatorStateTransition:
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 0
|
||||
--- !u!1102 &5309719437208521675
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: seiden-move-airborne
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -832109783450187487}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: b0b1316cf42d54331930284f81512c6d, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &8467386414634264506
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
|
||||
@@ -15,7 +15,7 @@ public class Movement : MonoBehaviour
|
||||
[SerializeField] private Collider2D m_CrouchDisableCollider; // A collider that will be disabled when crouching
|
||||
|
||||
const float k_GroundedRadius = .2f; // Radius of the overlap circle to determine if grounded
|
||||
private bool m_Grounded; // Whether or not the player is grounded.
|
||||
public bool m_Grounded; // Whether or not the player is grounded.
|
||||
const float k_CeilingRadius = .2f; // Radius of the overlap circle to determine if the player can stand up
|
||||
private Rigidbody2D m_Rigidbody2D;
|
||||
private bool m_FacingRight = true; // For determining which way the player is currently facing.
|
||||
@@ -162,4 +162,3 @@ public class Movement : MonoBehaviour
|
||||
transform.localScale = theScale;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
public class PlayerMovement : MonoBehaviour
|
||||
{
|
||||
public Movement controller;
|
||||
//public Animator animator;
|
||||
public Animator animator;
|
||||
public float runSpeed = 40f;
|
||||
float horizontalMove = 0f;
|
||||
bool jump = false;
|
||||
@@ -13,9 +13,6 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
// Update is called once per frame
|
||||
void Update() {
|
||||
// Horizontal value is for the animation state machine. No code required, wow!
|
||||
//animator.SetFloat("Horizontal", Input.GetAxis("Horizontal"));
|
||||
|
||||
horizontalMove = Input.GetAxisRaw("Horizontal") * runSpeed;
|
||||
|
||||
if (Input.GetButtonDown("Jump")) {
|
||||
@@ -27,8 +24,12 @@ public class PlayerMovement : MonoBehaviour
|
||||
} else if (Input.GetKeyUp(KeyCode.LeftShift)) {
|
||||
crouch = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (animator != null) {
|
||||
animator.SetFloat("Horizontal", Input.GetAxis("Horizontal"));
|
||||
animator.SetBool("Airborne", !controller.m_Grounded);
|
||||
}
|
||||
}
|
||||
void FixedUpdate()
|
||||
{
|
||||
controller.Move(horizontalMove * Time.fixedDeltaTime, crouch, jump);
|
||||
|
||||
@@ -257,6 +257,17 @@ Animator:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!114 &264267745 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5439994587591701584, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
m_PrefabInstance: {fileID: 5439994587558609906}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 90da90214d3bb324a8ed8f5b046ba4b9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &967738952
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -526,6 +537,11 @@ BoxCollider2D:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 22.02, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!95 &2140781242 stripped
|
||||
Animator:
|
||||
m_CorrespondingSourceObject: {fileID: 5439994586602100319, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
m_PrefabInstance: {fileID: 5439994587558609906}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1517753708608174288
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -543,7 +559,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1517753707384060330, guid: 87a461560d9a85d45a9200acb45c6ac6, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1517753707384060330, guid: 87a461560d9a85d45a9200acb45c6ac6, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@@ -638,5 +654,25 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5439994587591701584, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
propertyPath: OnLandEvent.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5439994587591701584, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
propertyPath: OnLandEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5439994587591701584, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
propertyPath: OnLandEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5439994587591701612, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
propertyPath: animator
|
||||
value:
|
||||
objectReference: {fileID: 2140781242}
|
||||
- target: {fileID: 5439994587591701612, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
propertyPath: controller
|
||||
value:
|
||||
objectReference: {fileID: 264267745}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: faf72c53445dba543b9e5a89dc76b3e1, type: 3}
|
||||
|
||||
Reference in New Issue
Block a user