Added attacking move

This commit is contained in:
Jakub Sztuba 2022-05-31 23:53:48 +02:00
parent 4fd0eb8c0e
commit 23e7a288c0
5 changed files with 228 additions and 40 deletions

View File

@ -2,8 +2,10 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LangVersion>latest</LangVersion>
<CscToolPath>C:\Program Files\Unity\Hub\Editor\2020.3.32f1\Editor\Data\Tools\RoslynScripts</CscToolPath>
<CscToolExe>unity_csc.bat</CscToolExe>
<_TargetFrameworkDirectories>non_empty_path_generated_by_unity.rider.package</_TargetFrameworkDirectories>
<_FullFrameworkReferenceAssemblyPaths>non_empty_path_generated_by_unity.rider.package</_FullFrameworkReferenceAssemblyPaths>
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts>
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -11,7 +13,8 @@
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<RootNamespace></RootNamespace>
<ProjectGuid>{F58AF4E0-3E6D-54B1-523D-8F755DC8E665}</ProjectGuid>
<ProjectGuid>{951fac91-10b1-c9cb-e811-6cc5e294fc3b}</ProjectGuid>
<ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>Assembly-CSharp</AssemblyName>
@ -27,8 +30,9 @@
<DefineConstants>DEBUG;TRACE;UNITY_2020_3_32;UNITY_2020_3;UNITY_2020;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;USE_SEARCH_ENGINE_API;SCENE_TEMPLATE_MODULE;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_MONO_BDWGC;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;PLATFORM_STANDALONE;PLATFORM_STANDALONE_WIN;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_STANDARD_2_0;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
<NoWarn></NoWarn>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -36,8 +40,9 @@
<OutputPath>Temp\bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
<NoWarn></NoWarn>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<NoConfig>true</NoConfig>
@ -656,94 +661,94 @@
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.3.32f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Animation.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.InternalAPIEngineBridge.001">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll</HintPath>
</Reference>
<Reference Include="Unity.VSCode.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.PixelPerfect">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Tilemap.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath>
</Reference>
<Reference Include="PsdPlugin">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/PsdPlugin.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/PsdPlugin.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.VisualStudio.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.Timeline">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.IK.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Sprite.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Psdimporter.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Path.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.InternalAPIEditorBridge.001">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.UI">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
</Reference>
<Reference Include="Unity.PlasticSCM.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.Rider.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.Mathematics.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.IK.Runtime">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Animation.Triangle.Runtime">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Animation.Runtime">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.PixelPerfect.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.Timeline.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Common.Runtime">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.SpriteShape.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.Common.Editor">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.2D.SpriteShape.Runtime">
<HintPath>C:/Users/alicj/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll</HintPath>
<HintPath>C:/PI/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -59,6 +59,7 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: 3178665442510596103}
- {fileID: 2663480789015550344}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@ -74,6 +75,31 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-5632725443533880303
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: attack
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 764129659546702357}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.40000004
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-5572165365293705200
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -99,6 +125,53 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!206 &-1633676018275584126
BlendTree:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blend Tree
m_Childs:
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: 2f980ae4637ab33478d95c20fc6ebda8, type: 2}
m_Threshold: 0
m_Position: {x: 0, y: -0.1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: moveX
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: 2f980ae4637ab33478d95c20fc6ebda8, type: 2}
m_Threshold: 0.33333334
m_Position: {x: 0, y: 0.1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: moveX
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: 691a3cb3a74b1fe4e978d1969f59d358, type: 2}
m_Threshold: 0.6666667
m_Position: {x: 0.1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: moveX
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: 94fcb34d793f89c459712b9cc54cbeff, type: 2}
m_Threshold: 1
m_Position: {x: -0.1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: moveX
m_Mirror: 0
m_BlendParameter: moveX
m_BlendParameterY: moveY
m_MinThreshold: 0
m_MaxThreshold: 1
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 1
--- !u!206 &-1054270578012958368
BlendTree:
m_ObjectHideFlags: 1
@ -185,6 +258,12 @@ AnimatorController:
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: attack
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@ -198,6 +277,58 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &764129659546702357
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 7551231252227633570}
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: -1633676018275584126}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &2663480789015550344
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: attack
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 764129659546702357}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &3178665442510596103
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -235,6 +366,7 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: -5572165365293705200}
- {fileID: -5632725443533880303}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@ -250,6 +382,28 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &7551231252227633570
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 7257817922151744131}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1107 &9041107495391884788
AnimatorStateMachine:
serializedVersion: 6
@ -265,6 +419,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: -5678147287597586547}
m_Position: {x: 360, y: 0, z: 0}
- serializedVersion: 1
m_State: {fileID: 764129659546702357}
m_Position: {x: 760, y: 40, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []

View File

@ -11,7 +11,7 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -4755548940222940691}
m_Position: {x: 200, y: 0, z: 0}
m_Position: {x: 230, y: 10, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []

View File

@ -12,13 +12,34 @@ public class Player : MonoBehaviour
float inputHorizontal;
float inputVertical;
public FloatValue currentHealth;
private bool attack;
void Start()
{
rb = gameObject.GetComponent<Rigidbody2D>();
myAnimator = GetComponent<Animator>();
}
private void HandleAttacks()
{
if (attack)
{
myAnimator.SetTrigger("attack");
}
}
private void HandleInput()
{
if (Input.GetKeyDown(KeyCode.Space))
{
attack = true;
}
}
private void ResetValues()
{
attack = false;
}
void Update()
{
inputHorizontal = Input.GetAxisRaw("Horizontal");
@ -44,6 +65,8 @@ public class Player : MonoBehaviour
myAnimator.SetFloat("lastMoveX", inputHorizontal);
myAnimator.SetFloat("lastMoveY", inputVertical);
}
HandleInput();
}
void FixedUpdate()
@ -61,6 +84,9 @@ public class Player : MonoBehaviour
{
rb.velocity = new Vector2(0f, 0f);
}
HandleAttacks();
ResetValues();
}
}

View File

@ -30,10 +30,10 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c72111f19352f223d667d6d0a1532f0e1372ce7f518e8ea3f7129370bfb25
flags: 0
RecentlyUsedScenePath-8:
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
flags: 0
RecentlyUsedScenePath-9:
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650