From ff0a7dd796507d654006d5bc61580776caaf6f65 Mon Sep 17 00:00:00 2001 From: Lorenzo Balugani Date: Sun, 28 Apr 2019 18:45:59 +0200 Subject: [PATCH] Speedy boy --- Assets/Animations.meta | 2 +- Assets/Animators.meta | 2 +- Assets/Prefabs/Player.prefab | 25 +++++++++++++++++++++---- Assets/Scripts/EntityPlayer.cs | 2 ++ Assets/Sprites/ChMov1.png.meta | 2 +- Assets/Sprites/ChMov2.png.meta | 2 +- Assets/Sprites/ChMov3.png.meta | 2 +- Assets/Sprites/ChMov4.png.meta | 2 +- Assets/Sprites/ChMov5.png.meta | 2 +- Assets/Sprites/ChMov6.png.meta | 2 +- Assets/Sprites/ChMov7.png.meta | 2 +- Assets/Sprites/ChMov8.png.meta | 2 +- 12 files changed, 33 insertions(+), 14 deletions(-) diff --git a/Assets/Animations.meta b/Assets/Animations.meta index b2a79e2..798ead3 100644 --- a/Assets/Animations.meta +++ b/Assets/Animations.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ef3d86d84c224344a94715cdfa9fe32c +guid: d20feba0ba6d3004e9661ec362ff8adf folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Animators.meta b/Assets/Animators.meta index 7ff80b8..40db4cc 100644 --- a/Assets/Animators.meta +++ b/Assets/Animators.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 043f304edcc831c4ea9fcf0e1a2e520d +guid: 6ddfc92cd5c88894c871039099aec051 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index 0e27d8e..74e6235 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -95,6 +95,7 @@ GameObject: - component: {fileID: -5893075763862095451} - component: {fileID: 2935319493830293413} - component: {fileID: 8856581523727923621} + - component: {fileID: 7684473867237801912} m_Layer: 0 m_Name: Player m_TagString: Player @@ -162,7 +163,7 @@ SpriteRenderer: m_Size: {x: 1, y: 1} m_AdaptiveModeThreshold: 0.5 m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 + m_WasSpriteAssigned: 0 m_MaskInteraction: 0 m_SpriteSortPoint: 0 --- !u!114 &2935319493830293413 @@ -180,9 +181,6 @@ MonoBehaviour: hpMax: 10 overlappable: 0 hp: 0 - sprite: {fileID: 0} - exp: 0 - level: 0 --- !u!114 &8856581523727923621 MonoBehaviour: m_ObjectHideFlags: 0 @@ -196,3 +194,22 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: damage: 1 +--- !u!95 &7684473867237801912 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2935319493830293412} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 0244ec06741e55843a3d81c7be8ca98d, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 diff --git a/Assets/Scripts/EntityPlayer.cs b/Assets/Scripts/EntityPlayer.cs index b68b814..89b9f76 100644 --- a/Assets/Scripts/EntityPlayer.cs +++ b/Assets/Scripts/EntityPlayer.cs @@ -29,10 +29,12 @@ public class EntityPlayer : Entity if(Input.GetKeyDown(KeyCode.Escape)) { controlMode = ControlMode.Move; messageBar.Write("Control mode: Move", Color.cyan); + animator.SetBool("IsWalking", true); } if(Input.GetKeyDown(KeyCode.A)) { controlMode = ControlMode.Attack; messageBar.Write("Control mode: Attack", Color.cyan); + animator.SetBool("IsWalking", false); } } diff --git a/Assets/Sprites/ChMov1.png.meta b/Assets/Sprites/ChMov1.png.meta index 66c087a..c99cdae 100644 --- a/Assets/Sprites/ChMov1.png.meta +++ b/Assets/Sprites/ChMov1.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/Sprites/ChMov2.png.meta b/Assets/Sprites/ChMov2.png.meta index ad0eb38..4b0e0b7 100644 --- a/Assets/Sprites/ChMov2.png.meta +++ b/Assets/Sprites/ChMov2.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/Sprites/ChMov3.png.meta b/Assets/Sprites/ChMov3.png.meta index 434cd8e..e5c92ad 100644 --- a/Assets/Sprites/ChMov3.png.meta +++ b/Assets/Sprites/ChMov3.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/Sprites/ChMov4.png.meta b/Assets/Sprites/ChMov4.png.meta index 7bb0363..74c9be4 100644 --- a/Assets/Sprites/ChMov4.png.meta +++ b/Assets/Sprites/ChMov4.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/Sprites/ChMov5.png.meta b/Assets/Sprites/ChMov5.png.meta index b1ae9ee..66f1465 100644 --- a/Assets/Sprites/ChMov5.png.meta +++ b/Assets/Sprites/ChMov5.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/Sprites/ChMov6.png.meta b/Assets/Sprites/ChMov6.png.meta index f6438c3..09d157c 100644 --- a/Assets/Sprites/ChMov6.png.meta +++ b/Assets/Sprites/ChMov6.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/Sprites/ChMov7.png.meta b/Assets/Sprites/ChMov7.png.meta index f98568d..26dbbf7 100644 --- a/Assets/Sprites/ChMov7.png.meta +++ b/Assets/Sprites/ChMov7.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/Sprites/ChMov8.png.meta b/Assets/Sprites/ChMov8.png.meta index 3447166..2555a0e 100644 --- a/Assets/Sprites/ChMov8.png.meta +++ b/Assets/Sprites/ChMov8.png.meta @@ -45,7 +45,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 30 + spritePixelsToUnits: 35 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1