From 457c30c4a85c05ee603d971c868d504e3b415d33 Mon Sep 17 00:00:00 2001 From: DedMoroz132 Date: Mon, 9 May 2022 23:27:25 +0700 Subject: [PATCH] super karta --- Assets/Models/Flag model.fbx | 4 +- Assets/Models/Map.fbx | 3 + Assets/Models/Map.fbx.meta | 97 +++++++++++++++ .../Primitive scene/Primitive scene.unity | 110 +++++++++++++++--- .../Animators/SciFiWarriorOur.controller | 18 ++- .../Character/scr_CharacterController.cs | 2 +- .../Scripts/Weapons/scr_WeaponController.cs | 1 + Assets/Settings/Game Settings.asset | 4 +- 8 files changed, 218 insertions(+), 21 deletions(-) create mode 100644 Assets/Models/Map.fbx create mode 100644 Assets/Models/Map.fbx.meta diff --git a/Assets/Models/Flag model.fbx b/Assets/Models/Flag model.fbx index b8cc7ed..c459df8 100755 --- a/Assets/Models/Flag model.fbx +++ b/Assets/Models/Flag model.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b248c0d6d584d4617944a7fc734d8d63db7b38fd88addc9d0a43ee0625443841 -size 23276 +oid sha256:903c780e06ca352f15524491e553192f4e5c785f7ab59ff4633748f66f9a6900 +size 23532 diff --git a/Assets/Models/Map.fbx b/Assets/Models/Map.fbx new file mode 100644 index 0000000..0cad3af --- /dev/null +++ b/Assets/Models/Map.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae9b3546340daf489799e4a2b6dded34afa4547cabec4075a04e95a220d89f09 +size 1455739 diff --git a/Assets/Models/Map.fbx.meta b/Assets/Models/Map.fbx.meta new file mode 100644 index 0000000..dad8712 --- /dev/null +++ b/Assets/Models/Map.fbx.meta @@ -0,0 +1,97 @@ +fileFormatVersion: 2 +guid: 9bb2efc62f3c79740b87ce807fd336fb +ModelImporter: + serializedVersion: 19301 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 1 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Primitive scene/Primitive scene.unity b/Assets/Scenes/Primitive scene/Primitive scene.unity index e517e35..2721204 100644 --- a/Assets/Scenes/Primitive scene/Primitive scene.unity +++ b/Assets/Scenes/Primitive scene/Primitive scene.unity @@ -797,7 +797,7 @@ MeshRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 752187221} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 @@ -870,7 +870,7 @@ Transform: - {fileID: 67303197} - {fileID: 1269785725} m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &772385942 GameObject: @@ -1204,7 +1204,7 @@ MeshRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 912660664} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 @@ -1608,17 +1608,17 @@ PrefabInstance: - target: {fileID: 7673487251499544664, guid: c98043d57e0190845b790d7b92990bee, type: 3} propertyPath: m_LocalRotation.x - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7673487251499544664, guid: c98043d57e0190845b790d7b92990bee, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7673487251499544664, guid: c98043d57e0190845b790d7b92990bee, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7673487251499544664, guid: c98043d57e0190845b790d7b92990bee, type: 3} @@ -1668,6 +1668,90 @@ Transform: m_Father: {fileID: 541834960} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1149725778 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalScale.x + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalScale.y + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalScale.z + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 77.8 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalPosition.y + value: -0.1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalPosition.z + value: -31.2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 9bb2efc62f3c79740b87ce807fd336fb, + type: 3} + propertyPath: m_Name + value: Map + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9bb2efc62f3c79740b87ce807fd336fb, type: 3} --- !u!1 &1208130436 GameObject: m_ObjectHideFlags: 0 @@ -1889,7 +1973,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1463388919 GameObject: @@ -2208,7 +2292,7 @@ MeshRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1902232095} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 @@ -2614,7 +2698,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &2051059934 GameObject: @@ -2669,7 +2753,7 @@ MeshRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2051059934} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 @@ -2958,14 +3042,14 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5245491129061629088} m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - m_LocalPosition: {x: 72.68, y: 1, z: 0.48} + m_LocalPosition: {x: 93.09, y: 1, z: 0.48} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 5245491128124451544} - {fileID: 5245491128523089690} - {fileID: 8510909887618635762} m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!33 &5245491129061629115 MeshFilter: @@ -3052,7 +3136,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5245491129269406998} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0, y: 0.273, z: -1.437} + m_LocalPosition: {x: 0, y: 0.273, z: -1.08} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 5245491128124451544} diff --git a/Assets/SciFiWarriorPBRHPPolyart/Animators/SciFiWarriorOur.controller b/Assets/SciFiWarriorPBRHPPolyart/Animators/SciFiWarriorOur.controller index be68788..006efc3 100755 --- a/Assets/SciFiWarriorPBRHPPolyart/Animators/SciFiWarriorOur.controller +++ b/Assets/SciFiWarriorPBRHPPolyart/Animators/SciFiWarriorOur.controller @@ -133,7 +133,10 @@ AnimatorStateTransition: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: [] + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: isWalking + m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: -8363020958252270820} m_Solo: 0 @@ -325,12 +328,18 @@ AnimatorController: m_Name: SciFiWarriorOur serializedVersion: 5 m_AnimatorParameters: + - m_Name: isWalking + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} - m_Name: isSprinting m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -530,7 +539,10 @@ AnimatorStateTransition: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: [] + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: isWalking + m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: -5592003379961038685} m_Solo: 0 diff --git a/Assets/Scripts/Character/scr_CharacterController.cs b/Assets/Scripts/Character/scr_CharacterController.cs index 25fc631..c5a7004 100755 --- a/Assets/Scripts/Character/scr_CharacterController.cs +++ b/Assets/Scripts/Character/scr_CharacterController.cs @@ -147,7 +147,7 @@ public class scr_CharacterController : MonoBehaviour { isSprinting = false; } - if (input_Movement.y <= 0.2f) + if (input_Movement.y <= 0.2f && input_Movement.y <= 0.3f) { isWalking = false; } diff --git a/Assets/Scripts/Weapons/scr_WeaponController.cs b/Assets/Scripts/Weapons/scr_WeaponController.cs index 84e51e1..155c732 100755 --- a/Assets/Scripts/Weapons/scr_WeaponController.cs +++ b/Assets/Scripts/Weapons/scr_WeaponController.cs @@ -76,5 +76,6 @@ public class scr_WeaponController : MonoBehaviour private void SetWeaponAnimation() { weaponAnimator.SetBool("isSprinting", characterController.isSprinting); + weaponAnimator.SetBool("isWalking", characterController.isSprinting); } } diff --git a/Assets/Settings/Game Settings.asset b/Assets/Settings/Game Settings.asset index 3652c35..9eea15c 100755 --- a/Assets/Settings/Game Settings.asset +++ b/Assets/Settings/Game Settings.asset @@ -15,8 +15,8 @@ MonoBehaviour: isTesting: 1 timeToWin: 5 timeOut: 1600 - movementDistance: 50 - movementSpeed: 3 + movementDistance: 1 + movementSpeed: 1 defTeamAI: 0 atcTeamAI: 0 numOfDefenders: 0