OctoCore 0.0.1
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7a18bc4bcd1fa545b15847be1caca1f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d98ebfcec71f3a247b658908e9fee900, type: 3}
|
||||
m_Name: language_audio
|
||||
m_EditorClassIdentifier:
|
||||
Id: language_audio
|
||||
Value:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a186262be747dae448e59cbe43ebe286
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d98ebfcec71f3a247b658908e9fee900, type: 3}
|
||||
m_Name: language_written
|
||||
m_EditorClassIdentifier:
|
||||
Id: language_written
|
||||
Value:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70ce020f0ed1ad24a94c854da5d6538e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,154 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c12f834718fa7c2479f8a954db0682ec, type: 3}
|
||||
m_Name: settings_global
|
||||
m_EditorClassIdentifier:
|
||||
Save:
|
||||
Booleans: []
|
||||
Integers: []
|
||||
Floats: []
|
||||
Strings:
|
||||
- {fileID: 11400000, guid: a186262be747dae448e59cbe43ebe286, type: 2}
|
||||
- {fileID: 11400000, guid: 70ce020f0ed1ad24a94c854da5d6538e, type: 2}
|
||||
Vectors: []
|
||||
Mapping:
|
||||
InputActionAsset: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
ActionMaps:
|
||||
- Name: Player
|
||||
Map: 0
|
||||
Actions:
|
||||
- Name: Move
|
||||
Action: 0
|
||||
Reference: {fileID: -1680190386980627800, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Look
|
||||
Action: 1
|
||||
Reference: {fileID: -5630151704836100654, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Attack
|
||||
Action: 2
|
||||
Reference: {fileID: 1120369429361536294, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Interact
|
||||
Action: 3
|
||||
Reference: {fileID: 1781555164194001046, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Crouch
|
||||
Action: 4
|
||||
Reference: {fileID: 7040659881675835329, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Jump
|
||||
Action: 5
|
||||
Reference: {fileID: -2099379676528639254, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Previous
|
||||
Action: 6
|
||||
Reference: {fileID: 2411907206095950430, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Next
|
||||
Action: 7
|
||||
Reference: {fileID: 7476244043514120974, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Sprint
|
||||
Action: 8
|
||||
Reference: {fileID: -7471211009204490832, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: UI
|
||||
Map: 1
|
||||
Actions:
|
||||
- Name: Navigate
|
||||
Action: 9
|
||||
Reference: {fileID: -8784545083839296357, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Submit
|
||||
Action: 10
|
||||
Reference: {fileID: 392368643174621059, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Cancel
|
||||
Action: 11
|
||||
Reference: {fileID: 7727032971491509709, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Point
|
||||
Action: 12
|
||||
Reference: {fileID: -1654692200621890270, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: Click
|
||||
Action: 13
|
||||
Reference: {fileID: 3001919216989983466, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: RightClick
|
||||
Action: 14
|
||||
Reference: {fileID: -4090225696740746782, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: MiddleClick
|
||||
Action: 15
|
||||
Reference: {fileID: -2185481485913320682, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: ScrollWheel
|
||||
Action: 16
|
||||
Reference: {fileID: 6240969308177333660, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: TrackedDevicePosition
|
||||
Action: 17
|
||||
Reference: {fileID: 6564999863303420839, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
- Name: TrackedDeviceOrientation
|
||||
Action: 18
|
||||
Reference: {fileID: 7970375526676320489, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
Icon:
|
||||
UseName: 1
|
||||
Sprite: {fileID: 0}
|
||||
Languages:
|
||||
Default: 1
|
||||
SaveWritten: {fileID: 11400000, guid: 70ce020f0ed1ad24a94c854da5d6538e, type: 2}
|
||||
SaveAudio: {fileID: 11400000, guid: a186262be747dae448e59cbe43ebe286, type: 2}
|
||||
Overrides: []
|
||||
Ui:
|
||||
ReferenceSize: {x: 1440, y: 3120}
|
||||
IconsBackground:
|
||||
DefaultButton: {fileID: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fc9111689f694145b60db4014028b18
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c7b241b78956b74ebf9b66fc8388c1c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d6c36933f532c143affffb1d4c87fd5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,115 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4ee9e9425025a7409c3fbd040c04853
|
||||
ModelImporter:
|
||||
serializedVersion: 24200
|
||||
internalIDToNameTable: []
|
||||
externalObjects:
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: standardSurface1
|
||||
second: {fileID: 2100000, guid: 213f1a4f73614884ba6a065aa06283b5, type: 2}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
generateMeshLods: 0
|
||||
meshLodGenerationFlags: 0
|
||||
maximumMeshLod: -1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,139 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-6241688233005360601
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: mat_arms
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 3
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.9245283, g: 0.85435545, b: 0.75444996, a: 1}
|
||||
- _Color: {r: 0.9245283, g: 0.85435545, b: 0.75444996, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 213f1a4f73614884ba6a065aa06283b5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e7e85ad5befd6a4da94af5bf167f28a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,257 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!206 &-6296890662589978932
|
||||
BlendTree:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BlendTree
|
||||
m_Childs:
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 8886403592489223659}
|
||||
m_Threshold: 0
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 1827226128182048838, guid: 23000d32d75602d479f8506239cdb0ed, type: 3}
|
||||
m_Threshold: 1
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
m_BlendParameter: run
|
||||
m_BlendParameterY: Blend
|
||||
m_MinThreshold: 0
|
||||
m_MaxThreshold: 1
|
||||
m_UseAutomaticThresholds: 0
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 0
|
||||
--- !u!206 &-4879062819497881735
|
||||
BlendTree:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BlendTree
|
||||
m_Childs:
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 1827226128182048838, guid: 151f05c2bf688504d9122a65a1cc4ed2, type: 3}
|
||||
m_Threshold: 0
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 1827226128182048838, guid: 072a284256ac39848aae7bb60b492d7b, type: 3}
|
||||
m_Threshold: 1
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
m_BlendParameter: backward
|
||||
m_BlendParameterY: Blend
|
||||
m_MinThreshold: 0
|
||||
m_MaxThreshold: 1
|
||||
m_UseAutomaticThresholds: 1
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 0
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: dad
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: trigger_move
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: move
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: backward
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: side
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: run
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 6350601263350617281}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &5484812774151747158
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: move
|
||||
m_Speed: 1.2
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
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: 5926010261774489586}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &5508769876683809156
|
||||
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: 5484812774151747158}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!206 &5926010261774489586
|
||||
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: 1827226128182048838, guid: 3119dee0e86de7941add52db7b9e4a52, type: 3}
|
||||
m_Threshold: 0
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Move
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: -6296890662589978932}
|
||||
m_Threshold: 1
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
m_BlendParameter: move
|
||||
m_BlendParameterY: forward
|
||||
m_MinThreshold: 0
|
||||
m_MaxThreshold: 1
|
||||
m_UseAutomaticThresholds: 0
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 0
|
||||
--- !u!1107 &6350601263350617281
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 5484812774151747158}
|
||||
m_Position: {x: 320, y: 110, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: 5508769876683809156}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 40, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 5484812774151747158}
|
||||
--- !u!206 &8886403592489223659
|
||||
BlendTree:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BlendTree
|
||||
m_Childs:
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 1827226128182048838, guid: ed67f1662f580074fafcd867dd2b1030, type: 3}
|
||||
m_Threshold: -1
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: -4879062819497881735}
|
||||
m_Threshold: 0
|
||||
m_Position: {x: -0.96, y: 0.26}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 1827226128182048838, guid: 7aa89e63df46be74fbd171c1fb1845ad, type: 3}
|
||||
m_Threshold: 1
|
||||
m_Position: {x: 0, y: 1}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: move
|
||||
m_Mirror: 0
|
||||
m_BlendParameter: side
|
||||
m_BlendParameterY: backward
|
||||
m_MinThreshold: -1
|
||||
m_MaxThreshold: 1
|
||||
m_UseAutomaticThresholds: 0
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c91374d232ed57a468afca1fcbeaa451
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df51a8861bd93f24ba2f00ec49e869fa
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,136 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3119dee0e86de7941add52db7b9e4a52
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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:
|
||||
- serializedVersion: 16
|
||||
name: idle
|
||||
takeName: Take 001
|
||||
internalID: 1827226128182048838
|
||||
firstFrame: 0
|
||||
lastFrame: 300
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,136 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23000d32d75602d479f8506239cdb0ed
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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:
|
||||
- serializedVersion: 16
|
||||
name: run
|
||||
takeName: Take 001
|
||||
internalID: 1827226128182048838
|
||||
firstFrame: 0
|
||||
lastFrame: 45
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,136 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 151f05c2bf688504d9122a65a1cc4ed2
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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:
|
||||
- serializedVersion: 16
|
||||
name: walk
|
||||
takeName: Take 001
|
||||
internalID: 1827226128182048838
|
||||
firstFrame: 0
|
||||
lastFrame: 60
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,136 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 072a284256ac39848aae7bb60b492d7b
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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:
|
||||
- serializedVersion: 16
|
||||
name: walkBack
|
||||
takeName: Take 001
|
||||
internalID: 1827226128182048838
|
||||
firstFrame: 0
|
||||
lastFrame: 60
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,136 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed67f1662f580074fafcd867dd2b1030
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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:
|
||||
- serializedVersion: 16
|
||||
name: walkLeft
|
||||
takeName: Take 001
|
||||
internalID: 1827226128182048838
|
||||
firstFrame: 0
|
||||
lastFrame: 60
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,136 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7aa89e63df46be74fbd171c1fb1845ad
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
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:
|
||||
- serializedVersion: 16
|
||||
name: walkRight
|
||||
takeName: Take 001
|
||||
internalID: 1827226128182048838
|
||||
firstFrame: 0
|
||||
lastFrame: 60
|
||||
wrapMode: 0
|
||||
orientationOffsetY: 0
|
||||
level: 0
|
||||
cycleOffset: 0
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
curves: []
|
||||
events: []
|
||||
transformMask: []
|
||||
maskType: 3
|
||||
maskSource: {instanceID: 0}
|
||||
additiveReferencePoseFrame: 0
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
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
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "OctoCore.Runtime",
|
||||
"rootNamespace": "OctoCore",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fba19c621e5d56141bc742c55d17e06a
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ac0ffdd8fd350d439d43e3609561b13
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73480b78f75094a4da6b76dedb392ae9
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,67 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8589544845245727413
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6194350059673118374}
|
||||
- component: {fileID: 4562949134636194362}
|
||||
m_Layer: 0
|
||||
m_Name: OctoCore
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6194350059673118374
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8589544845245727413}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4562949134636194362
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8589544845245727413}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a699f971e869ebf46915f66af5dc8102, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::OctoCore.OctoCore
|
||||
Settings: {fileID: 11400000, guid: 1fc9111689f694145b60db4014028b18, type: 2}
|
||||
_platform:
|
||||
_current: 0
|
||||
_controller: 0
|
||||
_save:
|
||||
Booleans: []
|
||||
Integers: []
|
||||
Floats: []
|
||||
Strings: []
|
||||
Vectors: []
|
||||
_inputs:
|
||||
CurrentMap: 0
|
||||
ActionMaps: []
|
||||
_localization:
|
||||
WrittenLanguage: 0
|
||||
AudioLanguage: 0
|
||||
_ui:
|
||||
GlobalScale: 1
|
||||
ScreenSize: {x: 0, y: 0}
|
||||
_development:
|
||||
Log: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f413f8119a5cdd64c8656e6435b59b59
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4347882179124040567
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 136799558801349280}
|
||||
- component: {fileID: 6424964998645044441}
|
||||
m_Layer: 0
|
||||
m_Name: OctoEvents
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &136799558801349280
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4347882179124040567}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6424964998645044441
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4347882179124040567}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86cab3031ee84484985b55a4e37af012, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::OctoCoreEvents
|
||||
_onPlatformInitialized:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
_onSaveInitialized:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
_onInputsInitialized:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
_onLocalizationInitialized:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
_onUiInitialized:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
_onOctoCoreInitialized:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d08067eb94e2c34fb6b009ecd525a81
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3352382525843710285
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2854166076162324619}
|
||||
- component: {fileID: 417140402366356801}
|
||||
m_Layer: 0
|
||||
m_Name: OctoLink
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2854166076162324619
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3352382525843710285}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &417140402366356801
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3352382525843710285}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: aca1ddad5b073a9488d37617a5fd8d9a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::OctoLink
|
||||
_octoCore: {fileID: 8589544845245727413, guid: f3027fc87ba642145bb3792f69dcfb95, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c2f8ec75148b91418d31eba541cc81f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,498 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2101508725665932610
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1836339402272228918}
|
||||
- component: {fileID: 3666612565151794712}
|
||||
- component: {fileID: 6053283114444666027}
|
||||
- component: {fileID: 6989128982853398086}
|
||||
m_Layer: 0
|
||||
m_Name: Camera Player
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1836339402272228918
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2101508725665932610}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1.562, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8725966219179855439}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!20 &3666612565151794712
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2101508725665932610}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.1
|
||||
far clip plane: 1000
|
||||
field of view: 80
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!81 &6053283114444666027
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2101508725665932610}
|
||||
m_Enabled: 1
|
||||
--- !u!114 &6989128982853398086
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2101508725665932610}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
m_Version: 2
|
||||
--- !u!1 &8162540767767967414
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8725966219179855439}
|
||||
- component: {fileID: 1735456339091181674}
|
||||
- component: {fileID: 5295567073180248356}
|
||||
m_Layer: 0
|
||||
m_Name: OctoPlayerFP
|
||||
m_TagString: Player
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8725966219179855439
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8162540767767967414}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1836339402272228918}
|
||||
- {fileID: 2639365499984405449}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!143 &1735456339091181674
|
||||
CharacterController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8162540767767967414}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Height: 1.8
|
||||
m_Radius: 0.3
|
||||
m_SlopeLimit: 45
|
||||
m_StepOffset: 0.3
|
||||
m_SkinWidth: 0.08
|
||||
m_MinMoveDistance: 0.001
|
||||
m_Center: {x: 0, y: 0.94, z: 0}
|
||||
--- !u!114 &5295567073180248356
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8162540767767967414}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c85c0434d95406f4da8daa149ba90838, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: OctoCore.Runtime::OctoCore.Components.OctoPlayer
|
||||
_references:
|
||||
Controller: {fileID: 1735456339091181674}
|
||||
_settings:
|
||||
Mode: 0
|
||||
Orientation: 1
|
||||
WalkSpeed: 10
|
||||
RunSpeed: 20
|
||||
JumpDuration: 0.4
|
||||
JumpHeight: 0.4
|
||||
Gravity: 9.8
|
||||
_mapping:
|
||||
MoveAction: -560403583
|
||||
LookAction: -916633937
|
||||
RunAction: 1115268836
|
||||
JumpAction: -1877919292
|
||||
_firstPerson:
|
||||
Camera: {fileID: 3666612565151794712}
|
||||
SensitivityX: 0.1
|
||||
SensitivityY: 0.1
|
||||
MinPitch: -80
|
||||
MaxPitch: 80
|
||||
--- !u!1001 &2564566619627430770
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 8725966219179855439}
|
||||
m_Modifications:
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 880987313172909187, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: _settings.LayerMask.m_Bits
|
||||
value: 128
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 899615586671794689, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Arms
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.2685
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.2737
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: -0.3780753
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.44424582
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.5555247
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0.5925345
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 161.191
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -89.278015
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 905104535459292698, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 84.124
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2656140929319940858, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.9961947
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2656140929319940858, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.08715578
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2656140929319940858, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2736084570026017097, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.9961947
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2736084570026017097, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.08715578
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2736084570026017097, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3193146119612198720, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.35385045
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3193146119612198720, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.112266205
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3193146119612198720, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.058453187
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3193146119612198720, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0.92669815
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3193146119612198720, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: -1.655
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3193146119612198720, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 14.451
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3193146119612198720, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 137.992
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4194213612049569317, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.11226625
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4194213612049569317, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.35385033
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4194213612049569317, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.92669827
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4194213612049569317, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.05845286
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4194213612049569317, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 1.655
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4194213612049569317, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 165.549
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4194213612049569317, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -42.008
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.2685
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.2737
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.44424608
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.37807533
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.59253436
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0.5555246
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 198.809
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -90.721985
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6729180175069464909, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -95.87601
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6868471396772723999, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.9622502
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6868471396772723999, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.084186025
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6868471396772723999, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.25783423
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6868471396772723999, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.02255758
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6868471396772723999, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 30
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7939001859543297587, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.9622502
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7939001859543297587, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.084186025
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7939001859543297587, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.25783414
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7939001859543297587, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0.022557573
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7939001859543297587, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -30
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
--- !u!4 &2639365499984405449 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 520098895314436283, guid: 73480b78f75094a4da6b76dedb392ae9, type: 3}
|
||||
m_PrefabInstance: {fileID: 2564566619627430770}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfb9a06a57603714ca245d62fcd622f1
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4ad5e19e21e4074a9cd5f09c5c7fe24
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63017153b92a8844fb10983e8151eb0d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,101 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace OctoCore.Components
|
||||
{
|
||||
public class OctoCharacterAnimation : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Animator animator;
|
||||
[SerializeField] private float walkSpeed = 8;
|
||||
[SerializeField] private float runSpeed = 15;
|
||||
[SerializeField, Range(1, 10)] private int sampling = 5;
|
||||
|
||||
private bool backward;
|
||||
private float backwardSmooth;
|
||||
private float sideSmooth;
|
||||
private float smoothSpeed;
|
||||
private Vector4[] positions;
|
||||
private Vector3 lastStep;
|
||||
private Vector3 direction;
|
||||
|
||||
private float step = .1f;
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
Gizmos.color = Color.cyan;
|
||||
Gizmos.DrawRay(transform.position + Vector3.up, transform.forward);
|
||||
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawRay(transform.position + Vector3.up, direction);
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
positions = new Vector4[sampling + 1];
|
||||
for (int i = 0; i < sampling; i++)
|
||||
{
|
||||
positions[i] = transform.position;
|
||||
positions[i].z = .002f;
|
||||
}
|
||||
|
||||
direction = transform.forward;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (lastStep != transform.position && Vector3.Distance(lastStep, transform.position) > step)
|
||||
{
|
||||
Vector3 offset = (lastStep - transform.position).normalized * step;
|
||||
lastStep = transform.position + offset;
|
||||
}
|
||||
|
||||
direction = Vector3.Lerp(direction, (transform.position - lastStep).normalized, Time.deltaTime * 10);
|
||||
|
||||
float speed = GetSpeed();
|
||||
smoothSpeed = Mathf.Lerp(smoothSpeed, speed, Time.deltaTime * 10);
|
||||
|
||||
float move = Mathf.Clamp01(smoothSpeed / walkSpeed);
|
||||
float run = Mathf.Clamp01((smoothSpeed - walkSpeed) / (runSpeed - walkSpeed));
|
||||
|
||||
float dot = Vector3.Dot(transform.forward, direction.normalized);
|
||||
Vector3 crs = Vector3.Cross(transform.forward, direction.normalized);
|
||||
|
||||
backward = dot < 0;
|
||||
backwardSmooth = Mathf.Lerp(backwardSmooth, backward ? 1 : 0, Time.deltaTime * 10);
|
||||
|
||||
sideSmooth = Mathf.Lerp(sideSmooth, (1 - Mathf.Abs(dot)) * Mathf.Sign(transform.InverseTransformDirection(crs).y) * direction.magnitude, Time.deltaTime * 20);
|
||||
|
||||
run *= 1 - backwardSmooth;
|
||||
run *= 1 - Mathf.Abs(sideSmooth);
|
||||
|
||||
//Debug.Log(dot);
|
||||
|
||||
animator.SetFloat("move", Mathf.Sqrt(move));
|
||||
animator.SetFloat("run", run);
|
||||
animator.SetFloat("backward", backwardSmooth);
|
||||
animator.SetFloat("side", sideSmooth);
|
||||
}
|
||||
|
||||
float GetSpeed()
|
||||
{
|
||||
float offset = 0;
|
||||
float delta = 0;
|
||||
|
||||
for (int i = 0; i < positions.Length - 1; i++)
|
||||
{
|
||||
offset += Vector3.Distance(positions[i], positions[i + 1]);
|
||||
delta += positions[i].w;
|
||||
}
|
||||
|
||||
for (int i = positions.Length - 1; i > 0; i--)
|
||||
positions[i] = positions[i - 1];
|
||||
|
||||
positions[0] = transform.position;
|
||||
positions[0].w = Time.deltaTime;
|
||||
|
||||
if (offset > 0 && delta > 0)
|
||||
return offset / (delta / 3.6f);
|
||||
else return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4b0dbb024f42dc4c8c80d40a271d6d3
|
||||
@@ -0,0 +1,205 @@
|
||||
using UnityEngine;
|
||||
using static UnityEngine.GraphicsBuffer;
|
||||
|
||||
public class OctoIkArms : MonoBehaviour
|
||||
{
|
||||
private class RaycastInfos
|
||||
{
|
||||
public bool HasHit;
|
||||
public float Distance;
|
||||
public float MaxDistance;
|
||||
public Vector3 Position;
|
||||
public Vector3 Normal;
|
||||
public Transform Transform;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class RaycastRig
|
||||
{
|
||||
public Transform Root;
|
||||
public float Distance = 1;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class ArmRig
|
||||
{
|
||||
public bool Enabled;
|
||||
public OctoIkLimb Arm;
|
||||
public Vector3 RotationOffset;
|
||||
public RaycastRig[] Raycasts;
|
||||
|
||||
[HideInInspector] public Vector3 TargetOriginPos;
|
||||
[HideInInspector] public Quaternion TargetOriginRot;
|
||||
[HideInInspector] public Vector3 PoleOriginPos;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
if (Arm)
|
||||
{
|
||||
if (Arm.Target)
|
||||
{
|
||||
TargetOriginPos = Arm.Target.localPosition;
|
||||
TargetOriginRot = Arm.Target.localRotation;
|
||||
}
|
||||
|
||||
if (Arm.Pole)
|
||||
{
|
||||
PoleOriginPos = Arm.Pole.localPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class Settings
|
||||
{
|
||||
public LayerMask LayerMask;
|
||||
}
|
||||
|
||||
[SerializeField] private ArmRig _leftArm;
|
||||
[SerializeField] private ArmRig _rightArm;
|
||||
[SerializeField] private Settings _settings;
|
||||
|
||||
private ArmRig[] _arms;
|
||||
private RaycastInfos[][] _raycasts = new RaycastInfos[2][];
|
||||
private RaycastInfos[] _nearHitRaycasts = new RaycastInfos[2];
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_arms = new ArmRig[2] { _leftArm, _rightArm };
|
||||
foreach (ArmRig armRig in _arms)
|
||||
armRig.Init();
|
||||
|
||||
_raycasts = new RaycastInfos[_arms.Length][];
|
||||
for (int i = 0; i < _arms.Length; i++)
|
||||
{
|
||||
_raycasts[i] = new RaycastInfos[_arms[i].Raycasts.Length];
|
||||
for (int u = 0; u < _raycasts[i].Length; u++)
|
||||
_raycasts[i][u] = new RaycastInfos() { MaxDistance = 1 };
|
||||
}
|
||||
|
||||
_nearHitRaycasts = new RaycastInfos[_arms.Length];
|
||||
for (int i = 0; i < _nearHitRaycasts.Length; i++)
|
||||
_nearHitRaycasts[i] = new RaycastInfos() { MaxDistance = 1 };
|
||||
}
|
||||
|
||||
void OnDrawGizmos()//Selected()
|
||||
{
|
||||
if (Application.isPlaying || !enabled) return;
|
||||
|
||||
foreach (ArmRig armRig in new ArmRig[2] { _leftArm, _rightArm })
|
||||
{
|
||||
for (int i = 0; i < armRig.Raycasts.Length; i++)
|
||||
{
|
||||
RaycastRig raycastRig = armRig.Raycasts[i];
|
||||
Debug.DrawRay(raycastRig.Root.position, raycastRig.Root.TransformDirection(Vector3.forward) * raycastRig.Distance, Color.red);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Get raycats infos
|
||||
|
||||
for (int i = 0; i < _arms.Length; i++)
|
||||
{
|
||||
ArmRig armRig = _arms[i];
|
||||
|
||||
if (!armRig.Enabled)
|
||||
continue;
|
||||
|
||||
for (int u = 0; u < armRig.Raycasts.Length; u++)
|
||||
{
|
||||
RaycastRig raycastRig = armRig.Raycasts[u];
|
||||
RaycastInfos raycastInfos = _raycasts[i][u];
|
||||
|
||||
RaycastHit hit;
|
||||
|
||||
if (Physics.Raycast(raycastRig.Root.position, raycastRig.Root.TransformDirection(Vector3.forward), out hit, raycastRig.Distance, _settings.LayerMask))
|
||||
{
|
||||
Debug.DrawRay(raycastRig.Root.position, raycastRig.Root.TransformDirection(Vector3.forward) * hit.distance, Color.green);
|
||||
|
||||
raycastInfos.HasHit = true;
|
||||
raycastInfos.Distance = hit.distance;
|
||||
raycastInfos.MaxDistance = raycastRig.Distance;
|
||||
raycastInfos.Position = hit.point;
|
||||
raycastInfos.Normal = hit.normal;
|
||||
raycastInfos.Transform = hit.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.DrawRay(raycastRig.Root.position, raycastRig.Root.TransformDirection(Vector3.forward) * raycastRig.Distance, Color.red);
|
||||
|
||||
raycastInfos.HasHit = false;
|
||||
raycastInfos.Distance = 1;
|
||||
raycastInfos.MaxDistance = 1;
|
||||
raycastInfos.Position = Vector3.zero;
|
||||
raycastInfos.Normal = Vector3.zero;
|
||||
raycastInfos.Transform = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Evaluate near hit
|
||||
|
||||
for (int i = 0; i < _arms.Length; i++)
|
||||
{
|
||||
ArmRig armRig = _arms[i];
|
||||
_nearHitRaycasts[i].HasHit = false;
|
||||
|
||||
for (int u = 0; u < armRig.Raycasts.Length; u++)
|
||||
{
|
||||
RaycastInfos raycastInfos = _raycasts[i][u];
|
||||
|
||||
if (raycastInfos.HasHit)
|
||||
{
|
||||
_nearHitRaycasts[i].HasHit = raycastInfos.HasHit;
|
||||
_nearHitRaycasts[i].Distance = _raycasts[i][u].Distance;
|
||||
_nearHitRaycasts[i].MaxDistance = _raycasts[i][u].MaxDistance;
|
||||
_nearHitRaycasts[i].Position = _raycasts[i][u].Position;
|
||||
_nearHitRaycasts[i].Normal = _raycasts[i][u].Normal;
|
||||
_nearHitRaycasts[i].Transform = _raycasts[i][u].Transform;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Move hands
|
||||
|
||||
for (int i = 0; i < _arms.Length; i++)
|
||||
{
|
||||
ArmRig armRig = _arms[i];
|
||||
RaycastInfos raycastInfos = _nearHitRaycasts[i];
|
||||
|
||||
Vector3 targetPos = armRig.TargetOriginPos;
|
||||
Quaternion targetRot = armRig.TargetOriginRot;
|
||||
|
||||
float sticknessPos = 0;
|
||||
float sticknessRot = 0;
|
||||
|
||||
if (raycastInfos.HasHit)
|
||||
{
|
||||
float doorForward = transform.InverseTransformDirection(raycastInfos.Transform.forward).z;
|
||||
bool isGoodArm = i == 0 ? (doorForward < 0) : (doorForward > 0);
|
||||
|
||||
if (isGoodArm)
|
||||
{
|
||||
targetPos = armRig.Arm.Target.parent.InverseTransformPoint(raycastInfos.Position);
|
||||
targetRot = Quaternion.LookRotation(-armRig.Arm.Target.parent.InverseTransformDirection(raycastInfos.Normal), transform.up) * Quaternion.Euler(armRig.RotationOffset);
|
||||
|
||||
float t = 1 - Mathf.Clamp01(raycastInfos.Distance / raycastInfos.MaxDistance);
|
||||
|
||||
sticknessPos = Mathf.SmoothStep(0, .7f, t);
|
||||
sticknessRot = Mathf.SmoothStep(.5f, .9f, t);
|
||||
}
|
||||
}
|
||||
|
||||
float tPos = Mathf.SmoothStep(Time.deltaTime * 3, 1, sticknessPos);
|
||||
float tRot = Mathf.SmoothStep(Time.deltaTime * 5, 1, sticknessRot);
|
||||
|
||||
armRig.Arm.Target.localPosition = Vector3.Lerp(armRig.Arm.Target.localPosition, targetPos, tPos);
|
||||
armRig.Arm.Target.localRotation = Quaternion.Lerp(armRig.Arm.Target.localRotation, targetRot, tRot);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 015ed493fd8775f479bf25c92aa04e57
|
||||
@@ -0,0 +1,303 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Two-bone IK solver for a single limb (arm or leg).
|
||||
/// Works with or without an Animator.
|
||||
/// Assumes a 3-bone chain: start -> mid -> end.
|
||||
/// Bones are assumed to point along a configurable local primary axis,
|
||||
/// with a configurable local secondary axis used as "bend up".
|
||||
/// </summary>
|
||||
public class OctoIkLimb : MonoBehaviour
|
||||
{
|
||||
public enum Axis
|
||||
{
|
||||
XPlus,
|
||||
XMinus,
|
||||
YPlus,
|
||||
YMinus,
|
||||
ZPlus,
|
||||
ZMinus
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class Joints
|
||||
{
|
||||
[Tooltip("start joint of the limb (e.g. shoulder or hip).")]
|
||||
public Transform Start;
|
||||
|
||||
[Tooltip("Middle joint of the limb (e.g. elbow or knee).")]
|
||||
public Transform Mid;
|
||||
|
||||
[Tooltip("End joint of the limb (e.g. wrist or foot).")]
|
||||
public Transform End;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class Controllers
|
||||
{
|
||||
[Tooltip("Target the end joint should try to reach.")]
|
||||
public Transform Target;
|
||||
|
||||
[Tooltip("Optional pole to control the bending direction of the limb (e.g. elbow or knee direction).")]
|
||||
public Transform Pole;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class Settings
|
||||
{
|
||||
[Tooltip("Local primary axis pointing toward the next bone.")]
|
||||
public Axis PrimaryAxis = Axis.YPlus;
|
||||
|
||||
[Tooltip("Local secondary axis defining the bend 'up' direction.")]
|
||||
public Axis SecondaryAxis = Axis.XMinus;
|
||||
|
||||
[Header("Settings")]
|
||||
|
||||
[Tooltip("Global IK blend weight (0 = no IK, 1 = full IK).")]
|
||||
[Range(0f, 1f)]
|
||||
public float Weight = 1;
|
||||
|
||||
[Tooltip("Apply the target rotation to the end joint.")]
|
||||
public bool OrientEnd = true;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class VisualDebug
|
||||
{
|
||||
[Tooltip("Enable or disable IK debug gizmos.")]
|
||||
public bool Gizmos = true;
|
||||
|
||||
[Tooltip("Scale of the axis gizmos drawn at each joint.")]
|
||||
public float Size = 0.1f;
|
||||
}
|
||||
|
||||
[SerializeField] private Joints _joints;
|
||||
[SerializeField] private Controllers _controllers;
|
||||
[SerializeField] private Settings _settings;
|
||||
[SerializeField] private VisualDebug _debug;
|
||||
|
||||
public Transform Target => _controllers.Target;
|
||||
public Transform Pole => _controllers.Pole;
|
||||
|
||||
private float _upperLength;
|
||||
private float _lowerLength;
|
||||
private float _maxReach;
|
||||
|
||||
private Quaternion _axesCorrection = Quaternion.identity;
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
void OnValidate()
|
||||
{
|
||||
RecalculateLengths();
|
||||
RecalculateAxesCorrection();
|
||||
}
|
||||
#endif
|
||||
|
||||
void Awake()
|
||||
{
|
||||
RecalculateLengths();
|
||||
RecalculateAxesCorrection();
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
Solve();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recomputes bone lengths and max reach.
|
||||
/// </summary>
|
||||
private void RecalculateLengths()
|
||||
{
|
||||
if (_joints.Start && _joints.Mid && _joints.End)
|
||||
{
|
||||
_upperLength = Vector3.Distance(_joints.Start.position, _joints.Mid.position);
|
||||
_lowerLength = Vector3.Distance(_joints.Mid.position, _joints.End.position);
|
||||
_maxReach = Mathf.Max(0f, _upperLength + _lowerLength - 0.0001f);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Precomputes a local correction rotation so that:
|
||||
/// - local primary axis is treated as +Z (forward)
|
||||
/// - local secondary axis is treated as +Y (up)
|
||||
/// </summary>
|
||||
private void RecalculateAxesCorrection()
|
||||
{
|
||||
Vector3 pLocal = AxisToVector(_settings.PrimaryAxis).normalized;
|
||||
Vector3 sLocal = AxisToVector(_settings.SecondaryAxis).normalized;
|
||||
|
||||
// Step 1: rotate primary axis to +Z
|
||||
Quaternion qPrimary = Quaternion.FromToRotation(pLocal, Vector3.forward);
|
||||
|
||||
// Step 2: after this, rotate around Z so that secondary goes to +Y
|
||||
Vector3 s1 = qPrimary * sLocal;
|
||||
Vector3 s1Proj = Vector3.ProjectOnPlane(s1, Vector3.forward);
|
||||
|
||||
if (s1Proj.sqrMagnitude < 0.000001f)
|
||||
{
|
||||
_axesCorrection = qPrimary;
|
||||
return;
|
||||
}
|
||||
|
||||
s1Proj.Normalize();
|
||||
Quaternion qTwist = Quaternion.FromToRotation(s1Proj, Vector3.up);
|
||||
|
||||
// This maps (primary, secondary) -> (Z+, Y+)
|
||||
_axesCorrection = qTwist * qPrimary;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Solves IK for the current limb configuration.
|
||||
/// Can be called manually if autoSolve is disabled.
|
||||
/// </summary>
|
||||
public void Solve()
|
||||
{
|
||||
if (_settings.Weight <= 0f)
|
||||
return;
|
||||
|
||||
if (!_joints.Start || !_joints.Mid || !_joints.End || !_controllers.Target)
|
||||
return;
|
||||
|
||||
if (_upperLength <= 0f || _lowerLength <= 0f)
|
||||
RecalculateLengths();
|
||||
|
||||
Vector3 startPos = _joints.Start.position;
|
||||
Vector3 midPos = _joints.Mid.position;
|
||||
Vector3 endPos = _joints.End.position;
|
||||
|
||||
Vector3 startToTarget = _controllers.Target.position - startPos;
|
||||
float dist = startToTarget.magnitude;
|
||||
if (dist < 0.0001f)
|
||||
return;
|
||||
|
||||
dist = Mathf.Min(dist, _maxReach);
|
||||
Vector3 dirToTarget = startToTarget.normalized;
|
||||
|
||||
Vector3 bendNormal;
|
||||
|
||||
if (_controllers.Pole)
|
||||
{
|
||||
Vector3 startToPole = (_controllers.Pole.position - startPos);
|
||||
Vector3 side = Vector3.ProjectOnPlane(startToPole, dirToTarget);
|
||||
if (side.sqrMagnitude < 0.000001f)
|
||||
{
|
||||
// Fallback if pole is collinear with forward
|
||||
side = Vector3.right;
|
||||
}
|
||||
side.Normalize();
|
||||
|
||||
// Bend normal is perpendicular to forward and to that side
|
||||
bendNormal = Vector3.Cross(dirToTarget, side);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: use start.up to define a side, then build a normal
|
||||
Vector3 side = Vector3.ProjectOnPlane(_joints.Start.up, dirToTarget);
|
||||
if (side.sqrMagnitude < 0.000001f)
|
||||
side = Vector3.right;
|
||||
side.Normalize();
|
||||
|
||||
bendNormal = Vector3.Cross(dirToTarget, side);
|
||||
}
|
||||
|
||||
if (bendNormal.sqrMagnitude < 0.000001f)
|
||||
return;
|
||||
|
||||
bendNormal.Normalize();
|
||||
|
||||
// Bend direction lies in the plane defined by dirToTarget and bendNormal
|
||||
Vector3 bendDir = Vector3.Cross(bendNormal, dirToTarget).normalized;
|
||||
|
||||
float a = _upperLength;
|
||||
float b = _lowerLength;
|
||||
float c = dist;
|
||||
|
||||
// Law of cosines to compute start angle
|
||||
float cos0 = Mathf.Clamp((a * a + c * c - b * b) / (2f * a * c), -1f, 1f);
|
||||
float angle0 = Mathf.Acos(cos0);
|
||||
|
||||
float along = Mathf.Cos(angle0) * a;
|
||||
float height = Mathf.Sin(angle0) * a;
|
||||
|
||||
Vector3 desiredMid = startPos + dirToTarget * along + bendDir * height;
|
||||
Vector3 desiredEnd = _controllers.Target.position;
|
||||
|
||||
// Canonical solver rotations assuming +Z forward, +Y up
|
||||
Quaternion startVirtual = Quaternion.LookRotation(desiredMid - startPos, bendNormal);
|
||||
Quaternion midVirtual = Quaternion.LookRotation(desiredEnd - desiredMid, bendNormal);
|
||||
|
||||
// Map canonical frame to bone-local frame using axesCorrection
|
||||
// (we expect bones to point along primaryAxis and bend using secondaryAxis)
|
||||
Quaternion startDesired = startVirtual * _axesCorrection;
|
||||
Quaternion midDesired = midVirtual * _axesCorrection;
|
||||
|
||||
_joints.Start.rotation = Quaternion.Slerp(_joints.Start.rotation, startDesired, _settings.Weight);
|
||||
_joints.Mid.rotation = Quaternion.Slerp(_joints.Mid.rotation, midDesired, _settings.Weight);
|
||||
|
||||
if (_settings.OrientEnd)
|
||||
{
|
||||
_joints.End.rotation = Quaternion.Slerp(_joints.End.rotation, _controllers.Target.rotation, _settings.Weight);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a LocalAxis6 enum to a unit Vector3.
|
||||
/// </summary>
|
||||
private Vector3 AxisToVector(Axis axis)
|
||||
{
|
||||
switch (axis)
|
||||
{
|
||||
default: return Vector3.forward;
|
||||
case Axis.XPlus: return Vector3.right;
|
||||
case Axis.XMinus: return Vector3.left;
|
||||
case Axis.YPlus: return Vector3.up;
|
||||
case Axis.YMinus: return Vector3.down;
|
||||
case Axis.ZMinus: return Vector3.back;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
if (!_debug.Gizmos)
|
||||
return;
|
||||
|
||||
if (!_joints.Start || !_joints.Mid || !_joints.End)
|
||||
return;
|
||||
|
||||
// Bones to Controllers
|
||||
Gizmos.color = Color.yellow;
|
||||
if (_controllers.Target)
|
||||
Gizmos.DrawLine(_joints.End.position, _controllers.Target.position);
|
||||
if (_controllers.Pole)
|
||||
Gizmos.DrawLine(_joints.Mid.position, _controllers.Pole.position);
|
||||
|
||||
// Bones
|
||||
Gizmos.color = Color.white;
|
||||
Gizmos.DrawLine(_joints.Start.position, _joints.Mid.position);
|
||||
Gizmos.DrawLine(_joints.Mid.position, _joints.End.position);
|
||||
Gizmos.matrix = _joints.Start.localToWorldMatrix;
|
||||
Gizmos.DrawWireSphere(Vector3.zero, _debug.Size * .15f);
|
||||
Gizmos.matrix = _joints.Mid.localToWorldMatrix;
|
||||
Gizmos.DrawWireSphere(Vector3.zero, _debug.Size * .15f);
|
||||
Gizmos.matrix = _joints.End.localToWorldMatrix;
|
||||
Gizmos.DrawWireSphere(Vector3.zero, _debug.Size * .15f);
|
||||
|
||||
// Target
|
||||
if (_controllers.Target)
|
||||
{
|
||||
Gizmos.color = Color.yellow;
|
||||
Gizmos.matrix = _controllers.Target.localToWorldMatrix;
|
||||
Gizmos.DrawWireCube(Vector3.zero, Vector3.one * _debug.Size);
|
||||
}
|
||||
|
||||
// Pole
|
||||
if (_controllers.Pole)
|
||||
{
|
||||
Gizmos.color = Color.yellow;
|
||||
Gizmos.matrix = _controllers.Pole.localToWorldMatrix;
|
||||
Gizmos.DrawWireCube(Vector3.zero, Vector3.one * _debug.Size * .5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f5a9786856021274fbe10be8b0cef721
|
||||
@@ -0,0 +1,49 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class OctoIkRaycast : MonoBehaviour
|
||||
{
|
||||
public float _distance = 1;
|
||||
public Vector3 rotationOffset;
|
||||
public Transform _target;
|
||||
public LayerMask _layerMask;
|
||||
|
||||
Vector3 originPos;
|
||||
Vector3 targetPos;
|
||||
Quaternion originRot;
|
||||
Quaternion targetRot;
|
||||
|
||||
void Start()
|
||||
{
|
||||
originPos = targetPos = _target.localPosition;
|
||||
originRot = targetRot = _target.localRotation;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
float deltaPos = Time.deltaTime * 3f;
|
||||
float deltaRot = Time.deltaTime * 3f;
|
||||
|
||||
RaycastHit hit;
|
||||
|
||||
if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, _distance, _layerMask))
|
||||
{
|
||||
Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * hit.distance, Color.yellow);
|
||||
|
||||
targetPos = transform.InverseTransformPoint(hit.point);
|
||||
targetRot = Quaternion.LookRotation(-transform.InverseTransformDirection(hit.normal), transform.up) * Quaternion.Euler(rotationOffset);
|
||||
|
||||
deltaPos = Mathf.Lerp(1, deltaPos, Mathf.Clamp01(hit.distance / _distance));
|
||||
deltaRot = Mathf.Lerp(.1f, deltaRot, Mathf.Clamp01(hit.distance / _distance));
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * _distance, Color.white);
|
||||
|
||||
targetPos = originPos;
|
||||
targetRot = originRot;
|
||||
}
|
||||
|
||||
_target.localPosition = Vector3.Lerp(_target.localPosition, targetPos, deltaPos);
|
||||
_target.localRotation = Quaternion.Lerp(_target.localRotation, targetRot, deltaRot);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99a9ae539a68f554cbab92ca6eb4e7e5
|
||||
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace OctoCore
|
||||
{
|
||||
[DefaultExecutionOrder(-102)]
|
||||
public class OctoLink : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Object _octoCore;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (!OctoCore.Instance && _octoCore)
|
||||
Instantiate(_octoCore);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aca1ddad5b073a9488d37617a5fd8d9a
|
||||
@@ -0,0 +1,297 @@
|
||||
using OctoCore.Inputs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace OctoCore.Components
|
||||
{
|
||||
public class OctoPlayer : MonoBehaviour
|
||||
{
|
||||
public static OctoPlayer Instance { get; private set; }
|
||||
|
||||
public enum PlayerModes { FirstPerson, ThirdPerson }
|
||||
public enum Orientations { World, Camera }
|
||||
|
||||
[System.Serializable]
|
||||
private class References
|
||||
{
|
||||
public CharacterController Controller;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class Settings
|
||||
{
|
||||
public PlayerModes Mode = PlayerModes.FirstPerson;
|
||||
public Orientations Orientation = Orientations.Camera;
|
||||
|
||||
[Tooltip("Walk speed (km/h).")]
|
||||
public float WalkSpeed = 10;
|
||||
|
||||
[Tooltip("Run speed (km/h).")]
|
||||
public float RunSpeed = 20;
|
||||
|
||||
[Tooltip("Jump duration (seconds).")]
|
||||
public float JumpDuration = .4f;
|
||||
|
||||
[Tooltip("Maximum jump height reached at the apex (meters).")]
|
||||
public float JumpHeight = .4f;
|
||||
|
||||
[Tooltip("Downward acceleration applied to the player (m/s²).")]
|
||||
public float Gravity = 9.8f;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class Mapping
|
||||
{
|
||||
public OctoActions MoveAction;
|
||||
public OctoActions LookAction;
|
||||
public OctoActions RunAction;
|
||||
public OctoActions JumpAction;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class FirstPerson
|
||||
{
|
||||
[Header("References")]
|
||||
|
||||
public Camera Camera;
|
||||
|
||||
[Header("Settings")]
|
||||
|
||||
[Tooltip("Horizontal sensitivity (Yaw).")]
|
||||
public float SensitivityX = 0.1f;
|
||||
|
||||
[Tooltip("Vertical sensitivity (Pitch).")]
|
||||
public float SensitivityY = 0.1f;
|
||||
|
||||
[Tooltip("Minimum pitch (looking down).")]
|
||||
public float MinPitch = -80f;
|
||||
|
||||
[Tooltip("Maximum pitch (looking up).")]
|
||||
public float MaxPitch = 80f;
|
||||
}
|
||||
|
||||
[SerializeField] private References _references;
|
||||
[SerializeField] private Settings _settings;
|
||||
[SerializeField] private Mapping _mapping;
|
||||
[SerializeField] private FirstPerson _firstPerson;
|
||||
|
||||
private bool _isPaused;
|
||||
private bool _jumpInput;
|
||||
private bool _jumpping;
|
||||
private bool _runInput;
|
||||
private float _runInertia;
|
||||
private float _yaw;
|
||||
private float _pitch;
|
||||
private float _jumpLerp;
|
||||
private float _jumpTime;
|
||||
private float _jumpAltitude;
|
||||
private Vector2 _moveInput;
|
||||
private Vector2 _lookInput;
|
||||
private Vector3 _moveInertia;
|
||||
private Vector3 _moveDirection;
|
||||
|
||||
public bool IsPaused => _isPaused;
|
||||
public float Radius => _references.Controller ? _references.Controller.radius : 0;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (!Instance) Instance = this;
|
||||
else Destroy(gameObject);
|
||||
|
||||
OctoCore.Instance.Inputs.SubscribeAction(_mapping.MoveAction, Move);
|
||||
OctoCore.Instance.Inputs.SubscribeAction(_mapping.LookAction, Look);
|
||||
OctoCore.Instance.Inputs.SubscribeAction(_mapping.RunAction, Run);
|
||||
OctoCore.Instance.Inputs.SubscribeAction(_mapping.JumpAction, Jump);
|
||||
|
||||
_yaw = transform.eulerAngles.y;
|
||||
|
||||
Pause(_isPaused);
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
OctoCore.Instance.Inputs.UnsubscribeAction(_mapping.MoveAction, Move);
|
||||
OctoCore.Instance.Inputs.UnsubscribeAction(_mapping.RunAction, Run);
|
||||
OctoCore.Instance.Inputs.UnsubscribeAction(_mapping.JumpAction, Jump);
|
||||
|
||||
if (Instance == this) Instance = null;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
_moveInput = _isPaused ? Vector2.zero : Vector2.ClampMagnitude(_moveInput, 1);
|
||||
Camera cam = (_firstPerson.Camera && _firstPerson.Camera.enabled && _firstPerson.Camera.gameObject.activeInHierarchy) ? _firstPerson.Camera : Camera.main;
|
||||
|
||||
bool accelerating = _moveInput.magnitude > .1f;
|
||||
bool isGrounded = _references.Controller ? _references.Controller.isGrounded : true;
|
||||
float t = Time.deltaTime / 3.6f;
|
||||
|
||||
// Move
|
||||
|
||||
Vector3 move = new Vector3(_moveInput.x, 0, _moveInput.y);
|
||||
|
||||
if (_settings.Orientation == Orientations.Camera && cam)
|
||||
{
|
||||
Vector3 camForward = cam.transform.forward;
|
||||
camForward.y = 0;
|
||||
camForward.Normalize();
|
||||
|
||||
Vector3 camRight = cam.transform.right;
|
||||
camRight.y = 0;
|
||||
camRight.Normalize();
|
||||
|
||||
move = camRight * move.x + camForward * move.z;
|
||||
}
|
||||
|
||||
float deltaSmooth = t * (accelerating ? 30 : 15);
|
||||
_moveDirection = Vector3.Lerp(_moveDirection, move, deltaSmooth * 1.5f);
|
||||
|
||||
deltaSmooth *= 1 - Vector3.Cross(_moveInertia, _moveDirection).magnitude;
|
||||
_moveInertia = Vector3.Lerp(_moveInertia, move, deltaSmooth);
|
||||
|
||||
if (!accelerating && _moveInertia.magnitude < .01f) _moveInertia = Vector3.zero;
|
||||
|
||||
_runInertia = Mathf.Lerp(_runInertia, _runInput ? 1 : 0, t * (accelerating ? 5 : 3));
|
||||
|
||||
Vector3 moveDelta = _moveInertia * t * Mathf.Lerp(_settings.WalkSpeed, _settings.RunSpeed, _runInertia);
|
||||
|
||||
if (isGrounded && _jumpInput && !_jumpping)
|
||||
{
|
||||
_jumpInput = false;
|
||||
_jumpping = true;
|
||||
_jumpLerp = 0;
|
||||
_jumpTime = Time.timeSinceLevelLoad;
|
||||
_jumpAltitude = transform.position.y;
|
||||
}
|
||||
|
||||
float jumpOffset = 0;
|
||||
|
||||
if (_jumpping)
|
||||
{
|
||||
_jumpLerp = (Time.timeSinceLevelLoad - _jumpTime) / _settings.JumpDuration;
|
||||
|
||||
if (_jumpLerp >= 1 || (_jumpLerp > .3f && isGrounded))
|
||||
{
|
||||
_jumpping = false;
|
||||
_jumpLerp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
float x = _jumpLerp;
|
||||
x = x * 2 - 1f;
|
||||
|
||||
float y;
|
||||
if (x < 0) y = Mathf.Sqrt(1f - x * x);
|
||||
else y = Mathf.Cos(x * .5f * Mathf.PI);
|
||||
y = _jumpAltitude + y * _settings.JumpHeight;
|
||||
|
||||
jumpOffset = y - transform.position.y;
|
||||
}
|
||||
}
|
||||
|
||||
if (_jumpping)
|
||||
moveDelta.y = jumpOffset;
|
||||
else
|
||||
moveDelta.y -= _settings.Gravity * Time.deltaTime;
|
||||
|
||||
if (_references.Controller)
|
||||
_references.Controller.Move(moveDelta);
|
||||
else
|
||||
transform.position += moveDelta;
|
||||
|
||||
// Rotate
|
||||
|
||||
switch (_settings.Mode)
|
||||
{
|
||||
case PlayerModes.FirstPerson:
|
||||
if (cam && !_isPaused)
|
||||
{
|
||||
Vector2 delta = _lookInput;
|
||||
|
||||
float mouseX = delta.x * _firstPerson.SensitivityX;
|
||||
float mouseY = delta.y * _firstPerson.SensitivityY * -1;
|
||||
|
||||
_yaw += mouseX;
|
||||
_pitch = Mathf.Clamp(_pitch + mouseY, _firstPerson.MinPitch, _firstPerson.MaxPitch);
|
||||
|
||||
transform.rotation = Quaternion.Euler(0, _yaw, 0);
|
||||
cam.transform.localRotation = Quaternion.Euler(_pitch, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case PlayerModes.ThirdPerson:
|
||||
{
|
||||
Quaternion targetRot = transform.rotation;
|
||||
if (_moveInertia.magnitude > .002f)
|
||||
{
|
||||
Vector3 offset = _moveInertia - _moveDirection;
|
||||
offset *= _moveInertia.magnitude * _runInertia;
|
||||
offset = Vector3.ClampMagnitude(offset * 1f, 1f);
|
||||
Vector3 up = (Vector3.up - offset).normalized;
|
||||
Quaternion lookRot = Quaternion.LookRotation(_moveInertia, up);
|
||||
targetRot = Quaternion.Lerp(targetRot, lookRot, t * 30);
|
||||
}
|
||||
transform.rotation = targetRot;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset
|
||||
|
||||
_moveInput = Vector2.zero;
|
||||
_lookInput = Vector2.zero;
|
||||
_runInput = false;
|
||||
}
|
||||
|
||||
public void Teleport(Vector3 position, Quaternion rotation)
|
||||
{
|
||||
_isPaused = _jumpInput = _jumpping = _runInput = false;
|
||||
_runInertia = _jumpLerp = _jumpTime = _jumpAltitude = 0;
|
||||
_moveInput = _lookInput = Vector2.zero;
|
||||
_moveInertia = _moveDirection = Vector3.zero;
|
||||
_yaw = rotation.eulerAngles.y;
|
||||
_pitch = 0;
|
||||
|
||||
if (_references.Controller)
|
||||
_references.Controller.enabled = false;
|
||||
|
||||
transform.position = position;
|
||||
transform.rotation = rotation;
|
||||
|
||||
if (_references.Controller)
|
||||
_references.Controller.enabled = true;
|
||||
}
|
||||
|
||||
public void Pause(bool pause)
|
||||
{
|
||||
_isPaused = pause;
|
||||
|
||||
if (OctoCore.Instance)
|
||||
OctoCore.Instance.UI.SetCursor();
|
||||
}
|
||||
|
||||
private void Move(Vector2 value) { _moveInput = value; }
|
||||
private void Look(Vector2 value) { _lookInput = value; }
|
||||
private void Run() { _runInput = true; }
|
||||
private void Jump() { _jumpInput = true; }
|
||||
|
||||
private void SetMode()
|
||||
{
|
||||
switch (_settings.Mode)
|
||||
{
|
||||
case PlayerModes.FirstPerson:
|
||||
// Activate First Person Camera
|
||||
break;
|
||||
|
||||
case PlayerModes.ThirdPerson:
|
||||
// Activate Third Person Camera
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*public static float Arc(float x)
|
||||
{
|
||||
x = Mathf.Clamp01(x) * 2 - 1f;
|
||||
return Mathf.Sqrt(1f - x * x);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c85c0434d95406f4da8daa149ba90838
|
||||
@@ -0,0 +1,194 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using OctoCore.Save.Data;
|
||||
|
||||
namespace OctoCore.Components
|
||||
{
|
||||
public class OctoSaveEvent : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private OctoData data;
|
||||
|
||||
[SerializeField] private bool invertValue;
|
||||
|
||||
[SerializeField] private UnityEvent<bool> onInitBool;
|
||||
[SerializeField] private UnityEvent<int> onInitInt;
|
||||
[SerializeField] private UnityEvent<float> onInitFloat;
|
||||
[SerializeField] private UnityEvent<string> onInitString;
|
||||
[SerializeField] private UnityEvent<Vector4> onInitVector;
|
||||
|
||||
[SerializeField] private UnityEvent<bool> onChangeBool;
|
||||
[SerializeField] private UnityEvent<int> onChangeInt;
|
||||
[SerializeField] private UnityEvent<float> onChangeFloat;
|
||||
[SerializeField] private UnityEvent<string> onChangeString;
|
||||
[SerializeField] private UnityEvent<Vector4> onChangeVector;
|
||||
|
||||
private Action<bool> onValueChangedBool;
|
||||
private Action<int> onValueChangedInt;
|
||||
private Action<float> onValueChangedFloat;
|
||||
private Action<string> onValueChangedString;
|
||||
private Action<Vector4> onValueChangedVector;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (!OctoCore.Instance) return;
|
||||
|
||||
if (data)
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case global::OctoCore.Save.Data.OctoDataBool:
|
||||
OnValueInit(OctoCore.Instance.Save.GetBool(data.Id));
|
||||
OctoCore.Instance.Save.Subscribe(data, onValueChangedBool = OnValueChanged);
|
||||
break;
|
||||
|
||||
case global::OctoCore.Save.Data.OctoDataInt:
|
||||
OnValueInit(OctoCore.Instance.Save.GetInt(data.Id));
|
||||
OctoCore.Instance.Save.Subscribe(data, onValueChangedInt = OnValueChanged);
|
||||
break;
|
||||
|
||||
case global::OctoCore.Save.Data.OctoDataFloat:
|
||||
OnValueInit(OctoCore.Instance.Save.GetFloat(data.Id));
|
||||
OctoCore.Instance.Save.Subscribe(data, onValueChangedFloat = OnValueChanged);
|
||||
break;
|
||||
|
||||
case global::OctoCore.Save.Data.OctoDataString:
|
||||
OnValueInit(OctoCore.Instance.Save.GetString(data.Id));
|
||||
OctoCore.Instance.Save.Subscribe(data, onValueChangedString = OnValueChanged);
|
||||
break;
|
||||
|
||||
case global::OctoCore.Save.Data.OctoDataVector:
|
||||
OnValueInit(OctoCore.Instance.Save.GetVector(data.Id));
|
||||
OctoCore.Instance.Save.Subscribe(data, onValueChangedVector = OnValueChanged);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (OctoCore.Instance.Development.Log)
|
||||
Debug.Log($"Unsupported data: {data.Id}");
|
||||
break;
|
||||
}
|
||||
|
||||
if (OctoCore.Instance.Development.Log && data)
|
||||
Debug.Log($"{name} subscribed on: {data.Id}");
|
||||
}
|
||||
else if (OctoCore.Instance.Development.Log && data)
|
||||
{
|
||||
Debug.Log($"Data is null");
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (!OctoCore.Instance) return;
|
||||
|
||||
if (data)
|
||||
{
|
||||
if (onValueChangedBool != null)
|
||||
{
|
||||
OctoCore.Instance.Save.Unsubscribe(data, onValueChangedBool);
|
||||
onValueChangedBool = null;
|
||||
}
|
||||
|
||||
if (onValueChangedInt != null)
|
||||
{
|
||||
OctoCore.Instance.Save.Unsubscribe(data, onValueChangedInt);
|
||||
onValueChangedInt = null;
|
||||
}
|
||||
|
||||
if (onValueChangedFloat != null)
|
||||
{
|
||||
OctoCore.Instance.Save.Unsubscribe(data, onValueChangedFloat);
|
||||
onValueChangedFloat = null;
|
||||
}
|
||||
|
||||
if (onValueChangedString != null)
|
||||
{
|
||||
OctoCore.Instance.Save.Unsubscribe(data, onValueChangedString);
|
||||
onValueChangedString = null;
|
||||
}
|
||||
|
||||
if (onValueChangedVector != null)
|
||||
{
|
||||
OctoCore.Instance.Save.Unsubscribe(data, onValueChangedVector);
|
||||
onValueChangedVector = null;
|
||||
}
|
||||
|
||||
if (OctoCore.Instance.Development.Log && data)
|
||||
Debug.Log($"{name} unsubscribed on: {data.Id}");
|
||||
}
|
||||
}
|
||||
|
||||
void OnValueInit()
|
||||
{
|
||||
if (OctoCore.Instance.Development.Log && data)
|
||||
Debug.Log($"Value initialized on: {data.Id}");
|
||||
}
|
||||
|
||||
void OnValueInit(bool value)
|
||||
{
|
||||
onInitBool?.Invoke(invertValue ? !value : value);
|
||||
OnValueInit();
|
||||
}
|
||||
|
||||
void OnValueInit(int value)
|
||||
{
|
||||
onInitInt?.Invoke(value);
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
void OnValueInit(float value)
|
||||
{
|
||||
onInitFloat?.Invoke(value);
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
void OnValueInit(string value)
|
||||
{
|
||||
onInitString?.Invoke(value);
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
void OnValueInit(Vector4 value)
|
||||
{
|
||||
onInitVector?.Invoke(value);
|
||||
OnValueInit();
|
||||
}
|
||||
|
||||
void OnValueChanged()
|
||||
{
|
||||
if (OctoCore.Instance.Development.Log && data)
|
||||
Debug.Log($"Value changed on: {data.Id}");
|
||||
}
|
||||
|
||||
void OnValueChanged(bool value)
|
||||
{
|
||||
onChangeBool?.Invoke(invertValue ? !value : value);
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
void OnValueChanged(int value)
|
||||
{
|
||||
onChangeInt?.Invoke(value);
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
void OnValueChanged(float value)
|
||||
{
|
||||
onChangeFloat?.Invoke(value);
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
void OnValueChanged(string value)
|
||||
{
|
||||
onChangeString?.Invoke(value);
|
||||
OnValueChanged();
|
||||
}
|
||||
|
||||
void OnValueChanged(Vector4 value)
|
||||
{
|
||||
onChangeVector?.Invoke(value);
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2978f4ffc9fdd0f4387d6b5e41746646
|
||||
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
using OctoCore.Save.Data;
|
||||
|
||||
namespace OctoCore.Components
|
||||
{
|
||||
public class OctoSaveProxy : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private OctoData data;
|
||||
|
||||
public void SetData(OctoData data)
|
||||
{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public void SetBool(bool value)
|
||||
{
|
||||
if (OctoCore.Instance)
|
||||
OctoCore.Instance.Save.Set(data as global::OctoCore.Save.Data.OctoDataBool, value);
|
||||
}
|
||||
public void SetInt(int value)
|
||||
{
|
||||
if (OctoCore.Instance)
|
||||
OctoCore.Instance.Save.Set(data as global::OctoCore.Save.Data.OctoDataInt, value);
|
||||
}
|
||||
public void SetFloat(float value)
|
||||
{
|
||||
if (OctoCore.Instance)
|
||||
OctoCore.Instance.Save.Set(data as global::OctoCore.Save.Data.OctoDataFloat, value);
|
||||
}
|
||||
public void SetString(string value)
|
||||
{
|
||||
if (OctoCore.Instance)
|
||||
OctoCore.Instance.Save.Set(data as global::OctoCore.Save.Data.OctoDataString, value);
|
||||
}
|
||||
public void SetVector(Vector4 value)
|
||||
{
|
||||
if (OctoCore.Instance)
|
||||
OctoCore.Instance.Save.Set(data as global::OctoCore.Save.Data.OctoDataVector, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1b0281cf6e469a43ad8ef7171913dad
|
||||
@@ -0,0 +1,201 @@
|
||||
using OctoCore.Inputs;
|
||||
using OctoCore.Utilities;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace OctoCore.Components
|
||||
{
|
||||
public class OctoWorldEvent : MonoBehaviour
|
||||
{
|
||||
public enum Conditions { None, Player, Tags, Targets }
|
||||
|
||||
//[SerializeField] private InputActionAsset _actionAsset;
|
||||
//[SerializeField] private InputActionReference _actionReference;
|
||||
//[Space(10)]
|
||||
|
||||
[SerializeField] private Utilities.OctoEvents _trigger;
|
||||
[SerializeField] private OctoActions _action;
|
||||
[SerializeField] private Conditions _condition;
|
||||
[SerializeField] private string[] _tags;
|
||||
[SerializeField] private GameObject[] _targets;
|
||||
[SerializeField] private UnityEvent _onTrigger;
|
||||
|
||||
private bool _playerInside;
|
||||
private bool[] _tagsInside;
|
||||
private bool[] _targetsInside;
|
||||
|
||||
private const string PlayerTag = "Player";
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_tagsInside = new bool[_tags.Length];
|
||||
_targetsInside = new bool[_targets.Length];
|
||||
|
||||
switch (_trigger)
|
||||
{
|
||||
case Utilities.OctoEvents.Awake:
|
||||
SetTrigger();
|
||||
break;
|
||||
|
||||
case Utilities.OctoEvents.Action:
|
||||
OctoCore.Instance.Inputs.SubscribeAction(_action, SetTrigger);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.OnEnable)
|
||||
SetTrigger();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.Start)
|
||||
SetTrigger();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.Update)
|
||||
SetTrigger();
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.LateUpdate)
|
||||
SetTrigger();
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.FixedUpdate)
|
||||
SetTrigger();
|
||||
}
|
||||
void OnDisable()
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.OnDisable)
|
||||
SetTrigger();
|
||||
|
||||
_playerInside = false;
|
||||
_tagsInside = new bool[_tags.Length];
|
||||
_targetsInside = new bool[_targets.Length];
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
switch (_trigger)
|
||||
{
|
||||
case Utilities.OctoEvents.OnDestroy:
|
||||
SetTrigger();
|
||||
break;
|
||||
|
||||
case Utilities.OctoEvents.Action:
|
||||
OctoCore.Instance?.Inputs.UnsubscribeAction(_action, SetTrigger);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider col)
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.OnTriggerEnter)
|
||||
{
|
||||
EvaluateTrigger(col);
|
||||
SetTrigger();
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerStay(Collider col)
|
||||
{
|
||||
EvaluateTrigger(col);
|
||||
if (_trigger == Utilities.OctoEvents.OnTriggerStay)
|
||||
SetTrigger();
|
||||
}
|
||||
|
||||
void OnTriggerExit(Collider col)
|
||||
{
|
||||
if (_trigger == Utilities.OctoEvents.OnTriggerExit)
|
||||
SetTrigger();
|
||||
EvaluateTrigger(col, false);
|
||||
}
|
||||
|
||||
public void SetTrigger()
|
||||
{
|
||||
switch (_condition)
|
||||
{
|
||||
case Conditions.None:
|
||||
_onTrigger?.Invoke();
|
||||
break;
|
||||
|
||||
case Conditions.Player:
|
||||
if (_playerInside)
|
||||
_onTrigger?.Invoke();
|
||||
break;
|
||||
|
||||
case Conditions.Tags:
|
||||
for (int i = 0; i < _tagsInside.Length; i++)
|
||||
{
|
||||
if (_tagsInside[i])
|
||||
{
|
||||
_onTrigger?.Invoke();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Conditions.Targets:
|
||||
for (int i = 0; i < _targetsInside.Length; i++)
|
||||
{
|
||||
if (_targetsInside[i])
|
||||
{
|
||||
_onTrigger?.Invoke();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void EvaluateTrigger(Collider col, bool inside = true)
|
||||
{
|
||||
switch (_condition)
|
||||
{
|
||||
case Conditions.Player:
|
||||
if (col.tag == PlayerTag)
|
||||
_playerInside = inside;
|
||||
break;
|
||||
|
||||
case Conditions.Tags:
|
||||
if (_tags.Contains(col.tag))
|
||||
{
|
||||
for (int i = 0; i < _tags.Length; i++)
|
||||
{
|
||||
bool tagMatch = col.tag == _tags[i];
|
||||
if (tagMatch)
|
||||
{
|
||||
_tagsInside[i] = inside ? tagMatch : !tagMatch;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Conditions.Targets:
|
||||
if (_targets.Contains(col.gameObject))
|
||||
{
|
||||
for (int i = 0; i < _targets.Length; i++)
|
||||
{
|
||||
bool targetMatch = col.gameObject == _targets[i];
|
||||
if (targetMatch)
|
||||
{
|
||||
_targetsInside[i] = inside ? targetMatch : !targetMatch;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5170627695bd877419928fa9ca37865d
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 086b0be20b6bc5e42b2fe80f2ce8e863
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,37 @@
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace OctoCore.Development
|
||||
{
|
||||
/// <summary>
|
||||
/// Development and debugging module.
|
||||
/// Provides settings for in-game logging.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class OctoDevelopment : IOctoModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether to enable debug logging throughout the framework.
|
||||
/// </summary>
|
||||
public bool Log;
|
||||
|
||||
public void Init(OctoSettings settings)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnSceneChanged(Scene current, Scene next)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnQuit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21618ec4511f27a43975352bde789bb6
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e051aab1fc4e4e243b307fd7f0b0756f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1be27ce87e441a545bd6f3fdd3c18b61
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,65 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace OctoCore.Dialogue.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Component to trigger dialogue events.
|
||||
/// Listens to dialogue start/end and invokes UnityEvents.
|
||||
/// </summary>
|
||||
public class OctoDialogueEvent : MonoBehaviour
|
||||
{
|
||||
[SerializeField, Tooltip("Dialogue data to listen for")]
|
||||
private Data.OctoDialogueData _dialogue;
|
||||
|
||||
[SerializeField, Tooltip("Called when the specified dialogue starts")]
|
||||
private UnityEvent _onDialogueStarted;
|
||||
|
||||
[SerializeField, Tooltip("Called when the specified dialogue ends")]
|
||||
private UnityEvent _onDialogueEnded;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (OctoDialogueManager.Instance != null)
|
||||
{
|
||||
// Subscribe to manager events
|
||||
OctoDialogueManager.Instance.GetComponent<OctoDialogueManager>()
|
||||
._events.OnDialogueStarted.AddListener(OnDialogueStarted);
|
||||
OctoDialogueManager.Instance.GetComponent<OctoDialogueManager>()
|
||||
._events.OnDialogueEnded.AddListener(OnDialogueEnded);
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (OctoDialogueManager.Instance != null)
|
||||
{
|
||||
// Unsubscribe from manager events
|
||||
OctoDialogueManager.Instance.GetComponent<OctoDialogueManager>()
|
||||
._events.OnDialogueStarted.RemoveListener(OnDialogueStarted);
|
||||
OctoDialogueManager.Instance.GetComponent<OctoDialogueManager>()
|
||||
._events.OnDialogueEnded.RemoveListener(OnDialogueEnded);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDialogueStarted()
|
||||
{
|
||||
if (OctoDialogueManager.Instance == null)
|
||||
return;
|
||||
|
||||
var currentDialogue = OctoDialogueManager.Instance.GetCurrentDialogue();
|
||||
if (currentDialogue == _dialogue)
|
||||
{
|
||||
_onDialogueStarted?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDialogueEnded()
|
||||
{
|
||||
// Dialogue already ended, so we check if it was our dialogue
|
||||
// Note: This might not work perfectly if dialogue changes rapidly
|
||||
// A better implementation would track the last active dialogue
|
||||
_onDialogueEnded?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7c573c7064e10f4ba4855e8f448ee81
|
||||
@@ -0,0 +1,291 @@
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
using OctoCore.Localization;
|
||||
using OctoCore.Components;
|
||||
|
||||
namespace OctoCore.Dialogue.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialogue manager component.
|
||||
/// Singleton that handles dialogue display and flow.
|
||||
/// Uses UI Text components if assigned, otherwise falls back to GUI.
|
||||
/// </summary>
|
||||
public class OctoDialogueManager : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Singleton instance.
|
||||
/// </summary>
|
||||
public static OctoDialogueManager Instance { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// References to UI components.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class References
|
||||
{
|
||||
[Tooltip("Legacy UI Text component (optional)")]
|
||||
public Text Text;
|
||||
|
||||
[Tooltip("TextMeshPro component (optional)")]
|
||||
public TextMeshPro TextMeshPro;
|
||||
|
||||
[Tooltip("TextMeshPro UGUI component (optional)")]
|
||||
public TextMeshProUGUI TextMeshProUGUI;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dialogue events.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class Events
|
||||
{
|
||||
[Tooltip("Called when a dialogue starts")]
|
||||
public UnityEvent OnDialogueStarted;
|
||||
|
||||
[Tooltip("Called when a new entry starts displaying")]
|
||||
public UnityEvent OnEntryStarted;
|
||||
|
||||
[Tooltip("Called when a choice is selected")]
|
||||
public UnityEvent OnChoiceSelected;
|
||||
|
||||
[Tooltip("Called when a dialogue ends")]
|
||||
public UnityEvent OnDialogueEnded;
|
||||
}
|
||||
|
||||
[SerializeField] private References _references;
|
||||
[SerializeField] public Events _events;
|
||||
|
||||
private Data.OctoDialogueData _currentDialogue;
|
||||
private int _currentEntryIndex;
|
||||
private List<OctoDialogueChoice> _availableChoices = new List<OctoDialogueChoice>();
|
||||
private bool _isActive;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (Instance == this)
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a new dialogue.
|
||||
/// Automatically displays the first entry.
|
||||
/// </summary>
|
||||
public void StartDialogue(Data.OctoDialogueData dialogue)
|
||||
{
|
||||
if (dialogue == null || dialogue.Entries == null || dialogue.Entries.Length == 0)
|
||||
{
|
||||
Debug.LogWarning("[OctoDialogueManager] Cannot start dialogue: null or empty");
|
||||
return;
|
||||
}
|
||||
|
||||
_currentDialogue = dialogue;
|
||||
_currentEntryIndex = 0;
|
||||
_isActive = true;
|
||||
|
||||
_events.OnDialogueStarted?.Invoke();
|
||||
if (OctoPlayer.Instance) OctoPlayer.Instance.Pause(true); // TMP
|
||||
DisplayCurrentEntry();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display the current dialogue entry.
|
||||
/// </summary>
|
||||
private void DisplayCurrentEntry()
|
||||
{
|
||||
if (_currentDialogue == null || _currentEntryIndex >= _currentDialogue.Entries.Length)
|
||||
{
|
||||
EndDialogue();
|
||||
return;
|
||||
}
|
||||
|
||||
OctoDialogueEntry entry = _currentDialogue.Entries[_currentEntryIndex];
|
||||
|
||||
_events.OnEntryStarted?.Invoke();
|
||||
|
||||
// Display text
|
||||
string text = OctoLocalization.GetLocalizedText(entry.Text);
|
||||
SetText(text);
|
||||
|
||||
// Build available choices
|
||||
_availableChoices.Clear();
|
||||
if (entry.Choices != null)
|
||||
{
|
||||
foreach (var choice in entry.Choices)
|
||||
{
|
||||
if (choice.IsAvailable())
|
||||
{
|
||||
_availableChoices.Add(choice);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select a choice by index.
|
||||
/// </summary>
|
||||
public void SelectChoice(int choiceIndex)
|
||||
{
|
||||
if (!_isActive || choiceIndex < 0 || choiceIndex >= _availableChoices.Count)
|
||||
return;
|
||||
|
||||
OctoDialogueChoice choice = _availableChoices[choiceIndex];
|
||||
|
||||
_events.OnChoiceSelected?.Invoke();
|
||||
|
||||
if (choice.NextDialogue != null)
|
||||
{
|
||||
StartDialogue(choice.NextDialogue);
|
||||
}
|
||||
else
|
||||
{
|
||||
EndDialogue();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Continue to next entry (when no choices available).
|
||||
/// </summary>
|
||||
public void Continue()
|
||||
{
|
||||
if (!_isActive)
|
||||
return;
|
||||
|
||||
if (_availableChoices.Count == 0)
|
||||
{
|
||||
_currentEntryIndex++;
|
||||
DisplayCurrentEntry();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// End the current dialogue.
|
||||
/// </summary>
|
||||
private void EndDialogue()
|
||||
{
|
||||
_isActive = false;
|
||||
_currentDialogue = null;
|
||||
_currentEntryIndex = 0;
|
||||
_availableChoices.Clear();
|
||||
|
||||
if (OctoPlayer.Instance) OctoPlayer.Instance.Pause(false); // TMP
|
||||
_events.OnDialogueEnded?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set text using available UI component or GUI fallback.
|
||||
/// </summary>
|
||||
private void SetText(string text)
|
||||
{
|
||||
if (_references.Text != null)
|
||||
{
|
||||
_references.Text.text = text;
|
||||
}
|
||||
else if (_references.TextMeshPro != null)
|
||||
{
|
||||
_references.TextMeshPro.text = text;
|
||||
}
|
||||
else if (_references.TextMeshProUGUI != null)
|
||||
{
|
||||
_references.TextMeshProUGUI.text = text;
|
||||
}
|
||||
// GUI fallback handled in OnGUI
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
// Only use GUI if no text component is assigned
|
||||
if (_references.Text != null || _references.TextMeshPro != null || _references.TextMeshProUGUI != null)
|
||||
return;
|
||||
|
||||
if (!_isActive || _currentDialogue == null)
|
||||
return;
|
||||
|
||||
if (_currentEntryIndex >= _currentDialogue.Entries.Length)
|
||||
return;
|
||||
|
||||
OctoDialogueEntry entry = _currentDialogue.Entries[_currentEntryIndex];
|
||||
|
||||
GUILayout.BeginArea(new Rect(50, Screen.height - 200, Screen.width - 100, 150));
|
||||
GUILayout.Box("", GUILayout.Width(Screen.width - 100), GUILayout.Height(150));
|
||||
|
||||
GUILayout.BeginArea(new Rect(10, 10, Screen.width - 120, 130));
|
||||
|
||||
// Speaker name
|
||||
if (entry.Speaker != null && entry.Speaker.Name != null)
|
||||
{
|
||||
string speakerName = OctoLocalization.GetLocalizedText(entry.Speaker.Name);
|
||||
GUILayout.Label(speakerName, GUI.skin.box);
|
||||
}
|
||||
|
||||
// Dialogue text
|
||||
string text = OctoLocalization.GetLocalizedText(entry.Text);
|
||||
GUILayout.Label(text, GUILayout.ExpandHeight(true));
|
||||
|
||||
// Choices
|
||||
if (_availableChoices.Count > 0)
|
||||
{
|
||||
GUILayout.Space(10);
|
||||
for (int i = 0; i < _availableChoices.Count; i++)
|
||||
{
|
||||
string choiceText = OctoLocalization.GetLocalizedText(_availableChoices[i].Text);
|
||||
if (GUILayout.Button(choiceText))
|
||||
{
|
||||
SelectChoice(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Space(10);
|
||||
if (GUILayout.Button("→"))
|
||||
{
|
||||
Continue();
|
||||
}
|
||||
}
|
||||
|
||||
GUILayout.EndArea();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get current dialogue data.
|
||||
/// </summary>
|
||||
public Data.OctoDialogueData GetCurrentDialogue()
|
||||
{
|
||||
return _currentDialogue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get available choices for current entry.
|
||||
/// </summary>
|
||||
public List<OctoDialogueChoice> GetAvailableChoices()
|
||||
{
|
||||
return new List<OctoDialogueChoice>(_availableChoices);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if dialogue is currently active.
|
||||
/// </summary>
|
||||
public bool IsActive()
|
||||
{
|
||||
return _isActive;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a41b5f79f61ad94c9479c28b4397de4
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be1a654d39699564cb1dc1342aa93085
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace OctoCore.Dialogue.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialogue data containing a sequence of entries.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "dialogue_", menuName = "OctoCore/Dialogue/Dialogue Data", order = 1)]
|
||||
public class OctoDialogueData : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Sequence of dialogue entries.
|
||||
/// First entry starts automatically.
|
||||
/// </summary>
|
||||
[Tooltip("Sequence of dialogue entries")]
|
||||
public OctoDialogueEntry[] Entries;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c6fdb9b9b4581f4b912b64147fa3969
|
||||
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using OctoCore.Localization;
|
||||
|
||||
namespace OctoCore.Dialogue.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Speaker data for dialogue system.
|
||||
/// Contains localized name and sprite.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "speaker_", menuName = "OctoCore/Dialogue/Speaker Data", order = 0)]
|
||||
public class OctoSpeakerData : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Localized name of the speaker.
|
||||
/// </summary>
|
||||
[Tooltip("Localized name of the speaker")]
|
||||
public OctoLocalizedTextData Name;
|
||||
|
||||
/// <summary>
|
||||
/// Speaker portrait sprite.
|
||||
/// </summary>
|
||||
[Tooltip("Speaker portrait sprite")]
|
||||
public Sprite Sprite;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a14c37f184ae07b4b8f641e7e2896ed7
|
||||
@@ -0,0 +1,43 @@
|
||||
using UnityEngine;
|
||||
using OctoCore.Localization;
|
||||
|
||||
namespace OctoCore.Dialogue
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialogue choice with condition and next dialogue.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class OctoDialogueChoice
|
||||
{
|
||||
/// <summary>
|
||||
/// Localized text for this choice.
|
||||
/// </summary>
|
||||
[Tooltip("Localized text for this choice")]
|
||||
public OctoLocalizedTextData Text;
|
||||
|
||||
/// <summary>
|
||||
/// Condition to display this choice.
|
||||
/// If null or condition is true, choice is available.
|
||||
/// </summary>
|
||||
[Tooltip("Condition to display this choice (null = always show)")]
|
||||
public OctoDialogueCondition Condition;
|
||||
|
||||
/// <summary>
|
||||
/// Next dialogue to load when this choice is selected.
|
||||
/// If null, dialogue ends.
|
||||
/// </summary>
|
||||
[Tooltip("Next dialogue when selected (null = end dialogue)")]
|
||||
public Data.OctoDialogueData NextDialogue;
|
||||
|
||||
/// <summary>
|
||||
/// Check if this choice should be available.
|
||||
/// </summary>
|
||||
public bool IsAvailable()
|
||||
{
|
||||
if (Condition == null)
|
||||
return true;
|
||||
|
||||
return Condition.Evaluate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b828f206b626c94a964cbb5e4aaddc4
|
||||
@@ -0,0 +1,90 @@
|
||||
using UnityEngine;
|
||||
using OctoCore.Save.Data;
|
||||
|
||||
namespace OctoCore.Dialogue
|
||||
{
|
||||
/// <summary>
|
||||
/// Condition for dialogue choices.
|
||||
/// Supports OctoDataBool, OctoDataInt, and OctoDataFloat.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class OctoDialogueCondition
|
||||
{
|
||||
/// <summary>
|
||||
/// Source data to evaluate (OctoDataBool, OctoDataInt, or OctoDataFloat).
|
||||
/// </summary>
|
||||
[Tooltip("Source data to evaluate")]
|
||||
public OctoData Source;
|
||||
|
||||
/// <summary>
|
||||
/// Operation to perform.
|
||||
/// </summary>
|
||||
[Tooltip("Operation to perform")]
|
||||
public OctoDialogueOperation Operation = OctoDialogueOperation.Equal;
|
||||
|
||||
/// <summary>
|
||||
/// Value to compare against.
|
||||
/// For bool: 0 = false, 1 = true
|
||||
/// For int/float: direct comparison
|
||||
/// </summary>
|
||||
[Tooltip("Value to compare against (bool: 0=false, 1=true)")]
|
||||
public float Value;
|
||||
|
||||
/// <summary>
|
||||
/// Evaluate if the condition is met.
|
||||
/// </summary>
|
||||
public bool Evaluate()
|
||||
{
|
||||
if (Source == null)
|
||||
return true; // No condition = always true
|
||||
|
||||
float sourceValue = GetSourceValue();
|
||||
|
||||
switch (Operation)
|
||||
{
|
||||
case OctoDialogueOperation.Equal:
|
||||
return Mathf.Approximately(sourceValue, Value);
|
||||
|
||||
case OctoDialogueOperation.NotEqual:
|
||||
return !Mathf.Approximately(sourceValue, Value);
|
||||
|
||||
case OctoDialogueOperation.GreaterThan:
|
||||
return sourceValue > Value;
|
||||
|
||||
case OctoDialogueOperation.GreaterOrEqual:
|
||||
return sourceValue >= Value;
|
||||
|
||||
case OctoDialogueOperation.LessThan:
|
||||
return sourceValue < Value;
|
||||
|
||||
case OctoDialogueOperation.LessOrEqual:
|
||||
return sourceValue <= Value;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private float GetSourceValue()
|
||||
{
|
||||
if (!OctoCore.Instance)
|
||||
return 0f;
|
||||
|
||||
if (Source is OctoDataBool dataBool)
|
||||
{
|
||||
return OctoCore.Instance.Save.Get(dataBool) ? 1f : 0f;
|
||||
}
|
||||
else if (Source is OctoDataInt dataInt)
|
||||
{
|
||||
return OctoCore.Instance.Save.Get(dataInt);
|
||||
}
|
||||
else if (Source is OctoDataFloat dataFloat)
|
||||
{
|
||||
return OctoCore.Instance.Save.Get(dataFloat);
|
||||
}
|
||||
|
||||
Debug.LogWarning("[OctoDialogueCondition] Unsupported data type: " + Source.GetType().Name);
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 553d5d510ff034f44b70a8a032565a4e
|
||||
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using OctoCore.Localization;
|
||||
|
||||
namespace OctoCore.Dialogue
|
||||
{
|
||||
/// <summary>
|
||||
/// Single dialogue entry with speaker, text, and choices.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class OctoDialogueEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Speaker for this entry.
|
||||
/// </summary>
|
||||
[Tooltip("Speaker for this entry")]
|
||||
public Data.OctoSpeakerData Speaker;
|
||||
|
||||
/// <summary>
|
||||
/// Localized dialogue text.
|
||||
/// </summary>
|
||||
[Tooltip("Localized dialogue text")]
|
||||
public OctoLocalizedTextData Text;
|
||||
|
||||
/// <summary>
|
||||
/// Available choices for this entry.
|
||||
/// If empty, dialogue continues automatically or ends.
|
||||
/// </summary>
|
||||
[Tooltip("Available choices (empty = auto-continue or end)")]
|
||||
public OctoDialogueChoice[] Choices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec95cc134f0fa214eb3cd8c0e9016347
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace OctoCore.Dialogue
|
||||
{
|
||||
/// <summary>
|
||||
/// Operations for dialogue conditions.
|
||||
/// </summary>
|
||||
public enum OctoDialogueOperation
|
||||
{
|
||||
/// <summary>Equal (bool, int, float)</summary>
|
||||
Equal,
|
||||
|
||||
/// <summary>Not equal (bool, int, float)</summary>
|
||||
NotEqual,
|
||||
|
||||
/// <summary>Greater than (int, float only)</summary>
|
||||
GreaterThan,
|
||||
|
||||
/// <summary>Greater or equal (int, float only)</summary>
|
||||
GreaterOrEqual,
|
||||
|
||||
/// <summary>Less than (int, float only)</summary>
|
||||
LessThan,
|
||||
|
||||
/// <summary>Less or equal (int, float only)</summary>
|
||||
LessOrEqual
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4c04f460edc6d949933bd4237fb2e0a
|
||||
@@ -0,0 +1,36 @@
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace OctoCore
|
||||
{
|
||||
/// <summary>
|
||||
/// Base interface for all OctoCore modules.
|
||||
/// Defines the lifecycle methods that all modules must implement.
|
||||
/// </summary>
|
||||
public interface IOctoModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes the module with global settings.
|
||||
/// Called once during OctoCore startup.
|
||||
/// </summary>
|
||||
/// <param name="settings">Global settings configuration.</param>
|
||||
void Init(OctoSettings settings);
|
||||
|
||||
/// <summary>
|
||||
/// Called every frame to update the module.
|
||||
/// </summary>
|
||||
void Tick();
|
||||
|
||||
/// <summary>
|
||||
/// Called when a scene change occurs.
|
||||
/// </summary>
|
||||
/// <param name="current">The scene being left.</param>
|
||||
/// <param name="next">The scene being loaded.</param>
|
||||
void OnSceneChanged(Scene current, Scene next);
|
||||
|
||||
/// <summary>
|
||||
/// Called when the application is quitting.
|
||||
/// Use this for cleanup and saving final state.
|
||||
/// </summary>
|
||||
void OnQuit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15167e6c98ed86e448464574144f40f4
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb7efa3243ed91043a79bc110b57e653
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// Generated by OctoSettings
|
||||
// Backup saved in: Assets/OctoCore/Generated/OctoActions.json
|
||||
// To regenerate: OctoSettings > Mapping > Click 'Generate Inputs'
|
||||
// Generated from: PlayerController
|
||||
// Generated on: 2026-02-09 21:55:05
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
namespace OctoCore.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Actions from Unity Input Actions.
|
||||
/// Generated from: PlayerController
|
||||
/// Format: ActionMap_ActionName
|
||||
/// Values are stable hashes to prevent serialization issues when regenerating.
|
||||
/// </summary>
|
||||
public enum OctoActions
|
||||
{
|
||||
/// <summary>Player > Move</summary>
|
||||
Player_Move = -560403583,
|
||||
/// <summary>Player > Look</summary>
|
||||
Player_Look = -916633937,
|
||||
/// <summary>Player > Attack</summary>
|
||||
Player_Attack = -350647692,
|
||||
/// <summary>Player > Interact</summary>
|
||||
Player_Interact = -2066596810,
|
||||
/// <summary>Player > Crouch</summary>
|
||||
Player_Crouch = 510396034,
|
||||
/// <summary>Player > Jump</summary>
|
||||
Player_Jump = -1877919292,
|
||||
/// <summary>Player > Previous</summary>
|
||||
Player_Previous = -1566477299,
|
||||
/// <summary>Player > Next</summary>
|
||||
Player_Next = -1266215613,
|
||||
/// <summary>Player > Sprint</summary>
|
||||
Player_Sprint = 1115268836,
|
||||
/// <summary>Player > Diapason</summary>
|
||||
Player_Diapason = -1931519977,
|
||||
/// <summary>Player > Fire</summary>
|
||||
Player_Fire = 380421744,
|
||||
/// <summary>UI > Navigate</summary>
|
||||
UI_Navigate = -1768796602,
|
||||
/// <summary>UI > Submit</summary>
|
||||
UI_Submit = -1966140153,
|
||||
/// <summary>UI > Cancel</summary>
|
||||
UI_Cancel = 728645621,
|
||||
/// <summary>UI > Point</summary>
|
||||
UI_Point = 1869126131,
|
||||
/// <summary>UI > Click</summary>
|
||||
UI_Click = -468029055,
|
||||
/// <summary>UI > RightClick</summary>
|
||||
UI_RightClick = -1344942599,
|
||||
/// <summary>UI > MiddleClick</summary>
|
||||
UI_MiddleClick = 1604886768,
|
||||
/// <summary>UI > ScrollWheel</summary>
|
||||
UI_ScrollWheel = 207319517,
|
||||
/// <summary>UI > TrackedDevicePosition</summary>
|
||||
UI_TrackedDevicePosition = 1110904968,
|
||||
/// <summary>UI > TrackedDeviceOrientation</summary>
|
||||
UI_TrackedDeviceOrientation = 1632432327
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84cdf2dfd7a86434b9cd00c7a43c58e8
|
||||
@@ -0,0 +1,366 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using static OctoCore.OctoSettings;
|
||||
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
using UnityEngine.InputSystem;
|
||||
#endif
|
||||
|
||||
namespace OctoCore.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Input management module that wraps Unity's Input System.
|
||||
/// Provides enum-based API with automatic enable/disable based on subscriptions.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class OctoInputs : IOctoModule
|
||||
{
|
||||
[System.Serializable]
|
||||
public class ActionInfo
|
||||
{
|
||||
[HideInInspector]
|
||||
public string Name;
|
||||
|
||||
[HideInInspector]
|
||||
public string MapName;
|
||||
|
||||
public bool Enabled;
|
||||
|
||||
[Tooltip("List of registered callbacks")]
|
||||
public string[] Callbacks;
|
||||
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
[System.NonSerialized]
|
||||
public InputActionReference Reference;
|
||||
|
||||
[System.NonSerialized]
|
||||
public List<Action> CallbacksList = new List<Action>();
|
||||
|
||||
[System.NonSerialized]
|
||||
public List<Action<Vector2>> CallbacksVector2List = new List<Action<Vector2>>();
|
||||
|
||||
[System.NonSerialized]
|
||||
public Vector2 LastValue = Vector2.zero;
|
||||
#endif
|
||||
|
||||
public ActionInfo(string name, string mapName)
|
||||
{
|
||||
Name = name;
|
||||
MapName = mapName;
|
||||
Enabled = false;
|
||||
Callbacks = new string[0];
|
||||
}
|
||||
}
|
||||
|
||||
[Header("Actions")]
|
||||
public List<ActionInfo> Actions = new List<ActionInfo>();
|
||||
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
private MappingSettings _mappingData;
|
||||
private Dictionary<OctoActions, ActionInfo> _actionsDict = new Dictionary<OctoActions, ActionInfo>();
|
||||
private Dictionary<string, InputActionMap> _actionMaps = new Dictionary<string, InputActionMap>();
|
||||
private bool _initialized;
|
||||
#endif
|
||||
|
||||
public void Init(OctoSettings settings)
|
||||
{
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
_mappingData = settings.Mapping;
|
||||
|
||||
if (_mappingData == null)
|
||||
{
|
||||
Debug.LogError("[OctoInputs] No mapping settings found in OctoSettings.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_mappingData.InputActionAsset == null)
|
||||
{
|
||||
Debug.LogError("[OctoInputs] No InputActionAsset assigned in OctoSettings.");
|
||||
return;
|
||||
}
|
||||
|
||||
BuildActions();
|
||||
_initialized = true;
|
||||
|
||||
if (OctoCore.Instance.Development.Log)
|
||||
Debug.Log($"[OctoInputs] Initialized with {_actionsDict.Count} actions.");
|
||||
#else
|
||||
Debug.LogWarning("[OctoInputs] Input System Package is not enabled.");
|
||||
#endif
|
||||
|
||||
// Callback OctoEvents
|
||||
if (OctoEvents.Instance)
|
||||
OctoEvents.Instance.SetInputsInitialized();
|
||||
}
|
||||
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
private void BuildActions()
|
||||
{
|
||||
Actions.Clear();
|
||||
_actionsDict.Clear();
|
||||
_actionMaps.Clear();
|
||||
|
||||
// Cache all action maps
|
||||
foreach (var map in _mappingData.InputActionAsset.actionMaps)
|
||||
{
|
||||
_actionMaps[map.name] = map;
|
||||
}
|
||||
|
||||
// Build actions list
|
||||
foreach (var actionData in _mappingData.Actions)
|
||||
{
|
||||
var actionInfo = new ActionInfo(actionData.Name, actionData.MapName);
|
||||
actionInfo.Reference = actionData.Reference;
|
||||
|
||||
Actions.Add(actionInfo);
|
||||
_actionsDict[actionData.Action] = actionInfo;
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableAction(OctoActions action)
|
||||
{
|
||||
if (!_actionsDict.TryGetValue(action, out var actionInfo))
|
||||
return;
|
||||
|
||||
if (actionInfo.Enabled || actionInfo.Reference == null)
|
||||
return;
|
||||
|
||||
actionInfo.Reference.action.Enable();
|
||||
actionInfo.Enabled = true;
|
||||
|
||||
// Enable parent action map if needed
|
||||
if (_actionMaps.TryGetValue(actionInfo.MapName, out var actionMap))
|
||||
{
|
||||
if (!actionMap.enabled)
|
||||
{
|
||||
actionMap.Enable();
|
||||
if (OctoCore.Instance.Development.Log)
|
||||
Debug.Log($"[OctoInputs] Enabled action map: {actionInfo.MapName}");
|
||||
}
|
||||
}
|
||||
|
||||
if (OctoCore.Instance.Development.Log)
|
||||
Debug.Log($"[OctoInputs] Enabled action: {action}");
|
||||
}
|
||||
|
||||
private void DisableAction(OctoActions action)
|
||||
{
|
||||
if (!_actionsDict.TryGetValue(action, out var actionInfo))
|
||||
return;
|
||||
|
||||
if (!actionInfo.Enabled || actionInfo.Reference == null)
|
||||
return;
|
||||
|
||||
// Check if there are still callbacks
|
||||
int totalCallbacks = actionInfo.CallbacksList.Count + actionInfo.CallbacksVector2List.Count;
|
||||
if (totalCallbacks > 0)
|
||||
return;
|
||||
|
||||
actionInfo.Reference.action.Disable();
|
||||
actionInfo.Enabled = false;
|
||||
|
||||
// Check if we should disable the action map
|
||||
CheckActionMapState(actionInfo.MapName);
|
||||
|
||||
if (OctoCore.Instance.Development.Log)
|
||||
Debug.Log($"[OctoInputs] Disabled action: {action}");
|
||||
}
|
||||
|
||||
private void CheckActionMapState(string mapName)
|
||||
{
|
||||
if (!_actionMaps.TryGetValue(mapName, out var actionMap))
|
||||
return;
|
||||
|
||||
// Check if any actions in this map are still enabled
|
||||
bool hasActiveActions = false;
|
||||
foreach (var actionInfo in Actions)
|
||||
{
|
||||
if (actionInfo.MapName == mapName && actionInfo.Enabled)
|
||||
{
|
||||
hasActiveActions = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Disable map if no active actions
|
||||
if (!hasActiveActions && actionMap.enabled)
|
||||
{
|
||||
actionMap.Disable();
|
||||
if (OctoCore.Instance.Development.Log)
|
||||
Debug.Log($"[OctoInputs] Disabled action map: {mapName}");
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateCallbacksList(OctoActions action)
|
||||
{
|
||||
if (!_actionsDict.TryGetValue(action, out var actionInfo))
|
||||
return;
|
||||
|
||||
var callbackNames = new List<string>();
|
||||
|
||||
foreach (var callback in actionInfo.CallbacksList)
|
||||
{
|
||||
if (callback != null)
|
||||
callbackNames.Add($"{callback.Method.DeclaringType?.Name}.{callback.Method.Name}");
|
||||
}
|
||||
|
||||
foreach (var callback in actionInfo.CallbacksVector2List)
|
||||
{
|
||||
if (callback != null)
|
||||
callbackNames.Add($"{callback.Method.DeclaringType?.Name}.{callback.Method.Name} (Vector2)");
|
||||
}
|
||||
|
||||
actionInfo.Callbacks = callbackNames.ToArray();
|
||||
}
|
||||
#endif
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
if (!_initialized)
|
||||
return;
|
||||
|
||||
// Poll continuous actions (Vector2 callbacks)
|
||||
foreach (var kvp in _actionsDict)
|
||||
{
|
||||
var actionInfo = kvp.Value;
|
||||
|
||||
// Only poll enabled actions with callbacks
|
||||
if (actionInfo.Enabled &&
|
||||
actionInfo.Reference != null &&
|
||||
(actionInfo.CallbacksList.Count > 0 || actionInfo.CallbacksVector2List.Count > 0) &&
|
||||
actionInfo.Reference.action.IsPressed())
|
||||
{
|
||||
// Call Action callbacks
|
||||
foreach (var callback in actionInfo.CallbacksList.ToArray())
|
||||
{
|
||||
callback?.Invoke();
|
||||
}
|
||||
|
||||
// Call Vector2 callbacks
|
||||
foreach (var callback in actionInfo.CallbacksVector2List.ToArray())
|
||||
{
|
||||
Vector2 value = actionInfo.Reference.action.ReadValue<Vector2>();
|
||||
callback?.Invoke(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public void OnSceneChanged(Scene current, Scene next)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnQuit()
|
||||
{
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
if (_mappingData != null && _mappingData.InputActionAsset != null)
|
||||
{
|
||||
_mappingData.InputActionAsset.Disable();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subscribe to an action with no parameters (button press).
|
||||
/// </summary>
|
||||
public void SubscribeAction(OctoActions action, Action callback, bool subscribe = true)
|
||||
{
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
if (!_initialized || callback == null)
|
||||
return;
|
||||
|
||||
if (!_actionsDict.TryGetValue(action, out var actionInfo))
|
||||
{
|
||||
Debug.LogWarning($"[OctoInputs] Action {action} not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (actionInfo.Reference == null)
|
||||
{
|
||||
Debug.LogWarning($"[OctoInputs] InputActionReference is null for {action}.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (subscribe)
|
||||
{
|
||||
if (!actionInfo.CallbacksList.Contains(callback))
|
||||
{
|
||||
actionInfo.CallbacksList.Add(callback);
|
||||
|
||||
EnableAction(action);
|
||||
UpdateCallbacksList(action);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actionInfo.CallbacksList.Remove(callback);
|
||||
|
||||
DisableAction(action);
|
||||
UpdateCallbacksList(action);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subscribe to an action with Vector2 parameter (movement, look).
|
||||
/// Uses continuous polling in Tick() to call the callback while pressed.
|
||||
/// </summary>
|
||||
public void SubscribeAction(OctoActions action, Action<Vector2> callback, bool subscribe = true)
|
||||
{
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
if (!_initialized || callback == null)
|
||||
return;
|
||||
|
||||
if (!_actionsDict.TryGetValue(action, out var actionInfo))
|
||||
{
|
||||
Debug.LogWarning($"[OctoInputs] Action {action} not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (actionInfo.Reference == null)
|
||||
{
|
||||
Debug.LogWarning($"[OctoInputs] InputActionReference is null for {action}.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (subscribe)
|
||||
{
|
||||
if (!actionInfo.CallbacksVector2List.Contains(callback))
|
||||
{
|
||||
actionInfo.CallbacksVector2List.Add(callback);
|
||||
|
||||
EnableAction(action);
|
||||
UpdateCallbacksList(action);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actionInfo.CallbacksVector2List.Remove(callback);
|
||||
|
||||
DisableAction(action);
|
||||
UpdateCallbacksList(action);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unsubscribe from an action.
|
||||
/// </summary>
|
||||
public void UnsubscribeAction(OctoActions action, Action callback)
|
||||
{
|
||||
SubscribeAction(action, callback, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unsubscribe from an action with Vector2.
|
||||
/// </summary>
|
||||
public void UnsubscribeAction(OctoActions action, Action<Vector2> callback)
|
||||
{
|
||||
SubscribeAction(action, callback, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5ddaafd81189174185c64028547631d
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50247461158afe041a87e1db4ab8a806
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e212b1c0974558f40ac2ccaa96db495d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace OctoCore.LevelBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Data for ceiling tiles.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "Ceiling_", menuName = "Octo/Level Builder/Ceiling")]
|
||||
public class OctoLevelBuilderCeilingData : OctoLevelBuilderData
|
||||
{
|
||||
public GameObject Prefab;
|
||||
|
||||
public override GameObject GetPrefab(int angle, WallShape shape = WallShape.Straight)
|
||||
{
|
||||
return Prefab;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 663b230d0aa40fb448ac219c0c7d57f6
|
||||
@@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace OctoCore.LevelBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for tile data.
|
||||
/// </summary>
|
||||
public abstract class OctoLevelBuilderData : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// The referenece grid for the tile.
|
||||
/// </summary>
|
||||
public OctoLevelBuilderGridData Grid;
|
||||
|
||||
/// <summary>
|
||||
/// Get the prefab to instantiate for this tile configuration.
|
||||
/// </summary>
|
||||
public abstract GameObject GetPrefab(int angle, WallShape shape = WallShape.Straight);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8ed7c7ac825b7e49aa3695b5393da29
|
||||
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace OctoCore.LevelBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Data for fence tiles.
|
||||
/// Similar to walls but typically lower and more decorative.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "Fence_", menuName = "Octo/Level Builder/Fence")]
|
||||
public class OctoLevelBuilderFenceData : OctoLevelBuilderData
|
||||
{
|
||||
[Header("Fence Prefabs")]
|
||||
public GameObject FenceStraight;
|
||||
public GameObject FenceCorner;
|
||||
public GameObject FenceT;
|
||||
public GameObject FenceDeadEnd;
|
||||
|
||||
public override GameObject GetPrefab(int angle, WallShape shape = WallShape.Straight)
|
||||
{
|
||||
return shape switch
|
||||
{
|
||||
WallShape.Straight => FenceStraight,
|
||||
WallShape.Corner => FenceCorner,
|
||||
WallShape.T => FenceT,
|
||||
WallShape.DeadEnd => FenceDeadEnd,
|
||||
_ => FenceStraight
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d87d7d32e3833944be2a3972446de25
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user