mirror of
https://github.com/zoriya/Mimireisu.git
synced 2025-12-06 06:36:09 +00:00
Adding movement
This commit is contained in:
134
Assets/Prefabs/LineRenderer.prefab
Normal file
134
Assets/Prefabs/LineRenderer.prefab
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1001 &100100000
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications: []
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 0}
|
||||||
|
m_RootGameObject: {fileID: 1508648768264166}
|
||||||
|
m_IsPrefabParent: 1
|
||||||
|
--- !u!1 &1508648768264166
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4188898796244340}
|
||||||
|
- component: {fileID: 120827798564263312}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LineRenderer
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4188898796244340
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 1508648768264166}
|
||||||
|
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_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!120 &120827798564263312
|
||||||
|
LineRenderer:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 1508648768264166}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 0
|
||||||
|
m_LightProbeUsage: 0
|
||||||
|
m_ReflectionProbeUsage: 0
|
||||||
|
m_RenderingLayerMask: 4294967295
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 8533e9d9210f95048b2dfeb0218afdbe, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 0
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_Positions:
|
||||||
|
- {x: 0, y: 0, z: 0}
|
||||||
|
- {x: 2.7, y: 0, z: 1}
|
||||||
|
m_Parameters:
|
||||||
|
serializedVersion: 2
|
||||||
|
widthMultiplier: 1
|
||||||
|
widthCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0.06382942
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
colorGradient:
|
||||||
|
serializedVersion: 2
|
||||||
|
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
ctime0: 0
|
||||||
|
ctime1: 65535
|
||||||
|
ctime2: 0
|
||||||
|
ctime3: 0
|
||||||
|
ctime4: 0
|
||||||
|
ctime5: 0
|
||||||
|
ctime6: 0
|
||||||
|
ctime7: 0
|
||||||
|
atime0: 0
|
||||||
|
atime1: 65535
|
||||||
|
atime2: 0
|
||||||
|
atime3: 0
|
||||||
|
atime4: 0
|
||||||
|
atime5: 0
|
||||||
|
atime6: 0
|
||||||
|
atime7: 0
|
||||||
|
m_Mode: 0
|
||||||
|
m_NumColorKeys: 2
|
||||||
|
m_NumAlphaKeys: 2
|
||||||
|
numCornerVertices: 0
|
||||||
|
numCapVertices: 0
|
||||||
|
alignment: 0
|
||||||
|
textureMode: 0
|
||||||
|
generateLightingData: 0
|
||||||
|
m_UseWorldSpace: 1
|
||||||
|
m_Loop: 0
|
||||||
8
Assets/Prefabs/LineRenderer.prefab.meta
Normal file
8
Assets/Prefabs/LineRenderer.prefab.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d9049d98493194458ec4e41d44ca7dc
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 100100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -24,7 +24,7 @@ GameObject:
|
|||||||
- component: {fileID: 50374050283590292}
|
- component: {fileID: 50374050283590292}
|
||||||
- component: {fileID: 233121803711999886}
|
- component: {fileID: 233121803711999886}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Mi (1)
|
m_Name: Mi
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -137,7 +137,7 @@ HingeJoint2D:
|
|||||||
m_BreakTorque: Infinity
|
m_BreakTorque: Infinity
|
||||||
m_AutoConfigureConnectedAnchor: 1
|
m_AutoConfigureConnectedAnchor: 1
|
||||||
m_Anchor: {x: 0, y: 0}
|
m_Anchor: {x: 0, y: 0}
|
||||||
m_ConnectedAnchor: {x: 7.5485945, y: 0}
|
m_ConnectedAnchor: {x: 0, y: 0}
|
||||||
m_UseMotor: 0
|
m_UseMotor: 0
|
||||||
m_Motor:
|
m_Motor:
|
||||||
m_MotorSpeed: 0
|
m_MotorSpeed: 0
|
||||||
@@ -22,7 +22,7 @@ GameObject:
|
|||||||
- component: {fileID: 212745191675132950}
|
- component: {fileID: 212745191675132950}
|
||||||
- component: {fileID: 58132552094692214}
|
- component: {fileID: 58132552094692214}
|
||||||
- component: {fileID: 50427200981694222}
|
- component: {fileID: 50427200981694222}
|
||||||
m_Layer: 0
|
m_Layer: 8
|
||||||
m_Name: Mi
|
m_Name: Mi
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
@@ -41,7 +41,7 @@ GameObject:
|
|||||||
- component: {fileID: 58718516814500230}
|
- component: {fileID: 58718516814500230}
|
||||||
- component: {fileID: 50828179700473726}
|
- component: {fileID: 50828179700473726}
|
||||||
- component: {fileID: 233088953786502988}
|
- component: {fileID: 233088953786502988}
|
||||||
m_Layer: 0
|
m_Layer: 8
|
||||||
m_Name: Mi
|
m_Name: Mi
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
@@ -60,7 +60,7 @@ GameObject:
|
|||||||
- component: {fileID: 58505671856455974}
|
- component: {fileID: 58505671856455974}
|
||||||
- component: {fileID: 50697521387183508}
|
- component: {fileID: 50697521387183508}
|
||||||
- component: {fileID: 233267708077211818}
|
- component: {fileID: 233267708077211818}
|
||||||
m_Layer: 0
|
m_Layer: 8
|
||||||
m_Name: Tsu
|
m_Name: Tsu
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
@@ -76,7 +76,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 4937824842681064}
|
- component: {fileID: 4937824842681064}
|
||||||
- component: {fileID: 114231868638308982}
|
- component: {fileID: 114231868638308982}
|
||||||
m_Layer: 0
|
m_Layer: 8
|
||||||
m_Name: Mimitsu
|
m_Name: Mimitsu
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
@@ -254,8 +254,13 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 227d16def125efd4fa7f340b2e85a094, type: 3}
|
m_Script: {fileID: 11500000, guid: 227d16def125efd4fa7f340b2e85a094, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
LinePrefab: {fileID: 1508648768264166, guid: 6d9049d98493194458ec4e41d44ca7dc, type: 2}
|
||||||
MiPrefab: {fileID: 1641252540988068, guid: e25098e14089f0c469a810e011a4f80a, type: 2}
|
MiPrefab: {fileID: 1641252540988068, guid: e25098e14089f0c469a810e011a4f80a, type: 2}
|
||||||
force: 10
|
force: 10
|
||||||
|
distance: 20
|
||||||
|
mask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967039
|
||||||
--- !u!212 &212294603624960990
|
--- !u!212 &212294603624960990
|
||||||
SpriteRenderer:
|
SpriteRenderer:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
|
|||||||
76
Assets/Rope.mat
Normal file
76
Assets/Rope.mat
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: Rope
|
||||||
|
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _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}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 0.6792453, g: 0.23389105, b: 0.23389105, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
8
Assets/Rope.mat.meta
Normal file
8
Assets/Rope.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8533e9d9210f95048b2dfeb0218afdbe
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -165,7 +165,7 @@ Camera:
|
|||||||
far clip plane: 1000
|
far clip plane: 1000
|
||||||
field of view: 60
|
field of view: 60
|
||||||
orthographic: 1
|
orthographic: 1
|
||||||
orthographic size: 5
|
orthographic size: 6.0263605
|
||||||
m_Depth: -1
|
m_Depth: -1
|
||||||
m_CullingMask:
|
m_CullingMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -188,12 +188,112 @@ Transform:
|
|||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 545594683}
|
m_GameObject: {fileID: 545594683}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
m_LocalPosition: {x: 0, y: 4.62, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &754468442
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 754468445}
|
||||||
|
- component: {fileID: 754468444}
|
||||||
|
- component: {fileID: 754468443}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Grass-Middle (1)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!61 &754468443
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 754468442}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_SpriteTilingProperty:
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
pivot: {x: 0.5, y: 0.5}
|
||||||
|
oldSize: {x: 0.5, y: 0.5}
|
||||||
|
newSize: {x: 0.5, y: 0.5}
|
||||||
|
adaptiveTilingThreshold: 0.5
|
||||||
|
drawMode: 0
|
||||||
|
adaptiveTiling: 0
|
||||||
|
m_AutoTiling: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 0.5, y: 0.5}
|
||||||
|
m_EdgeRadius: 0
|
||||||
|
--- !u!212 &754468444
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 754468442}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RenderingLayerMask: 4294967295
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 0
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 9c2dea53371f58841be290a540505639, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 0.5, y: 0.5}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
--- !u!4 &754468445
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 754468442}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: -5.26, y: 4.53, z: 0}
|
||||||
|
m_LocalScale: {x: 21.427519, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90}
|
||||||
--- !u!1001 &769213520
|
--- !u!1001 &769213520
|
||||||
Prefab:
|
Prefab:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -330,9 +430,109 @@ Transform:
|
|||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1138483822}
|
m_GameObject: {fileID: 1138483822}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: -0.5, z: 0}
|
m_LocalPosition: {x: -0.31, y: -0.5, z: 0}
|
||||||
m_LocalScale: {x: 21.427519, y: 1, z: 1}
|
m_LocalScale: {x: 11.249455, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1818726003
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1818726006}
|
||||||
|
- component: {fileID: 1818726005}
|
||||||
|
- component: {fileID: 1818726004}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Grass-Middle (2)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!61 &1818726004
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1818726003}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_SpriteTilingProperty:
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
pivot: {x: 0.5, y: 0.5}
|
||||||
|
oldSize: {x: 0.5, y: 0.5}
|
||||||
|
newSize: {x: 0.5, y: 0.5}
|
||||||
|
adaptiveTilingThreshold: 0.5
|
||||||
|
drawMode: 0
|
||||||
|
adaptiveTiling: 0
|
||||||
|
m_AutoTiling: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 0.5, y: 0.5}
|
||||||
|
m_EdgeRadius: 0
|
||||||
|
--- !u!212 &1818726005
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1818726003}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RenderingLayerMask: 4294967295
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 0
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 9c2dea53371f58841be290a540505639, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 0.5, y: 0.5}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
--- !u!4 &1818726006
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1818726003}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 4.55, y: 4.53, z: 0}
|
||||||
|
m_LocalScale: {x: 21.427519, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 4
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
|
||||||
|
|||||||
13
Assets/Scripts/ActionItem.cs
Normal file
13
Assets/Scripts/ActionItem.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ActionItem
|
||||||
|
{
|
||||||
|
public DistanceJoint2D joint;
|
||||||
|
public GameObject line;
|
||||||
|
|
||||||
|
public ActionItem(DistanceJoint2D joint, GameObject line)
|
||||||
|
{
|
||||||
|
this.joint = joint;
|
||||||
|
this.line = line;
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/ActionItem.cs.meta
Normal file
11
Assets/Scripts/ActionItem.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 190994539a850b644a332329f9b28296
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,30 +1,134 @@
|
|||||||
using UnityEngine;
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
public class Earthworm : MonoBehaviour
|
public class Earthworm : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public GameObject LinePrefab;
|
||||||
public GameObject MiPrefab;
|
public GameObject MiPrefab;
|
||||||
public float force = 10;
|
public float force = 10;
|
||||||
private Rigidbody2D rb;
|
public float distance = 20;
|
||||||
|
public LayerMask mask;
|
||||||
|
|
||||||
|
private Vector3 position;
|
||||||
|
private Dictionary<KeyCode, ActionItem> actions = new Dictionary<KeyCode, ActionItem>();
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
rb = transform.GetChild(0).GetComponent<Rigidbody2D>();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update ()
|
void Update ()
|
||||||
{
|
{
|
||||||
float horizontal = Input.GetAxis("Horizontal");
|
position = transform.GetChild(transform.childCount / 2).position;
|
||||||
float vertical = Input.GetAxis("Vertical");
|
|
||||||
Vector2 movement = new Vector2(horizontal, vertical).normalized;
|
#region Manette
|
||||||
//HingeJoint2D joint = new HingeJoint2D();
|
//float horizontal = Input.GetAxis("Horizontal");
|
||||||
//joint.
|
//float vertical = Input.GetAxis("Vertical");
|
||||||
|
//Vector2 direction = new Vector2(horizontal, vertical).normalized;
|
||||||
|
#endregion
|
||||||
|
Vector3 camera = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||||
|
Vector2 direction = camera - position;
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.A))
|
||||||
|
Grab(KeyCode.A, direction);
|
||||||
|
if (Input.GetKeyDown(KeyCode.Z))
|
||||||
|
Grab(KeyCode.Z, direction);
|
||||||
|
if (Input.GetKeyDown(KeyCode.E))
|
||||||
|
Grab(KeyCode.E, direction);
|
||||||
|
if (Input.GetKeyDown(KeyCode.R) && transform.childCount > 3)
|
||||||
|
Grab(KeyCode.R, direction);
|
||||||
|
|
||||||
if (Input.GetKeyDown(KeyCode.Space))
|
if (Input.GetKeyDown(KeyCode.Space))
|
||||||
AddMi();
|
AddMi();
|
||||||
|
|
||||||
if (Input.GetKeyDown(KeyCode.C))
|
if (Input.GetKeyDown(KeyCode.C))
|
||||||
RemoveMi();
|
RemoveMi();
|
||||||
}
|
|
||||||
|
if (Input.GetKeyUp(KeyCode.A) && actions.ContainsKey(KeyCode.A))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.A].joint);
|
||||||
|
Destroy(actions[KeyCode.A].line);
|
||||||
|
actions.Remove(KeyCode.A);
|
||||||
|
}
|
||||||
|
if (Input.GetKeyUp(KeyCode.Z) && actions.ContainsKey(KeyCode.Z))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.Z].joint);
|
||||||
|
Destroy(actions[KeyCode.Z].line);
|
||||||
|
actions.Remove(KeyCode.Z);
|
||||||
|
}
|
||||||
|
if (Input.GetKeyUp(KeyCode.E) && actions.ContainsKey(KeyCode.E))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.E].joint);
|
||||||
|
Destroy(actions[KeyCode.E].line);
|
||||||
|
actions.Remove(KeyCode.E);
|
||||||
|
}
|
||||||
|
if (Input.GetKeyUp(KeyCode.R) && actions.ContainsKey(KeyCode.R))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.R].joint);
|
||||||
|
Destroy(actions[KeyCode.R].line);
|
||||||
|
actions.Remove(KeyCode.R);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(var item in actions)
|
||||||
|
{
|
||||||
|
item.Value.line.GetComponent<LineRenderer>().SetPosition(0, position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Grab(KeyCode key, Vector2 direction)
|
||||||
|
{
|
||||||
|
RaycastHit2D hit = Physics2D.Raycast(position, direction, 20, mask);
|
||||||
|
if (hit.collider != null)
|
||||||
|
{
|
||||||
|
DistanceJoint2D joint = null;
|
||||||
|
switch (key)
|
||||||
|
{
|
||||||
|
case KeyCode.A:
|
||||||
|
joint = (DistanceJoint2D)transform.GetChild(0).gameObject.AddComponent(typeof(DistanceJoint2D));
|
||||||
|
if (actions.ContainsKey(KeyCode.A))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.A].joint);
|
||||||
|
Destroy(actions[KeyCode.A].line);
|
||||||
|
actions.Remove(KeyCode.A);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KeyCode.Z:
|
||||||
|
joint = (DistanceJoint2D)transform.GetChild(transform.childCount == 3 ? 1 : transform.childCount / 4).gameObject.AddComponent(typeof(DistanceJoint2D));
|
||||||
|
if (actions.ContainsKey(KeyCode.Z))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.Z].joint);
|
||||||
|
Destroy(actions[KeyCode.Z].line);
|
||||||
|
actions.Remove(KeyCode.Z);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KeyCode.E:
|
||||||
|
joint = (DistanceJoint2D)transform.GetChild(transform.childCount * 3 / 4).gameObject.AddComponent(typeof(DistanceJoint2D));
|
||||||
|
if (actions.ContainsKey(KeyCode.E))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.E].joint);
|
||||||
|
Destroy(actions[KeyCode.E].line);
|
||||||
|
actions.Remove(KeyCode.E);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KeyCode.R:
|
||||||
|
joint = (DistanceJoint2D)transform.GetChild(transform.childCount - 1).gameObject.AddComponent(typeof(DistanceJoint2D));
|
||||||
|
if (actions.ContainsKey(KeyCode.R))
|
||||||
|
{
|
||||||
|
Destroy(actions[KeyCode.R].joint);
|
||||||
|
Destroy(actions[KeyCode.R].line);
|
||||||
|
actions.Remove(KeyCode.R);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
joint.connectedAnchor = hit.point;
|
||||||
|
joint.maxDistanceOnly = true;
|
||||||
|
|
||||||
|
GameObject line = Instantiate(LinePrefab);
|
||||||
|
LineRenderer renderer = line.GetComponent<LineRenderer>();
|
||||||
|
renderer.SetPositions(new Vector3[] { position, hit.point });
|
||||||
|
|
||||||
|
actions.Add(key, new ActionItem(joint, line));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AddMi()
|
void AddMi()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ TagManager:
|
|||||||
- UI
|
- UI
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
- Player
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
|
|||||||
Reference in New Issue
Block a user