diff --git a/Assets/Prefabs/炮弹.prefab b/Assets/Prefabs/炮弹.prefab new file mode 100644 index 0000000..c972944 --- /dev/null +++ b/Assets/Prefabs/炮弹.prefab @@ -0,0 +1,125 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6293088924721911990 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6293088924721911988} + - component: {fileID: 6293088924721911991} + - component: {fileID: 8924545551766045615} + - component: {fileID: 7607195361720575763} + m_Layer: 0 + m_Name: "\u70AE\u5F39" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6293088924721911988 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6293088924721911990} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -12.07, y: 0.3648218, 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!212 &6293088924721911991 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6293088924721911990} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!114 &8924545551766045615 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6293088924721911990} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f52e8e7ae8128004eba1db328b38a417, type: 3} + m_Name: + m_EditorClassIdentifier: + shadow: {fileID: 3566358762308528686, guid: 73f23d723f100f54db8c58c86da940eb, type: 3} +--- !u!61 &7607195361720575763 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6293088924721911990} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + 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: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 diff --git a/Assets/Prefabs/炮弹.prefab.meta b/Assets/Prefabs/炮弹.prefab.meta new file mode 100644 index 0000000..521bd01 --- /dev/null +++ b/Assets/Prefabs/炮弹.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bdd288e4cdf08da45b1a42ced9473872 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/阴影.prefab b/Assets/Prefabs/阴影.prefab new file mode 100644 index 0000000..babd711 --- /dev/null +++ b/Assets/Prefabs/阴影.prefab @@ -0,0 +1,84 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3566358762308528686 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3566358762308528684} + - component: {fileID: 3566358762308528685} + m_Layer: 0 + m_Name: "\u9634\u5F71" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3566358762308528684 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3566358762308528686} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -12.152791, y: -2.24, z: 0} + m_LocalScale: {x: 2.66, y: 0.24, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3566358762308528685 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3566358762308528686} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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: -2413806693520163455, guid: ebe73ca9363db456bacf42c025bb4847, type: 3} + m_Color: {r: 0, g: 0, b: 0, a: 0.5882353} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 diff --git a/Assets/Prefabs/阴影.prefab.meta b/Assets/Prefabs/阴影.prefab.meta new file mode 100644 index 0000000..afadd8e --- /dev/null +++ b/Assets/Prefabs/阴影.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 73f23d723f100f54db8c58c86da940eb +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/序章-回忆.unity b/Assets/Scenes/序章-回忆.unity index 1f63c9b..d579bea 100644 --- a/Assets/Scenes/序章-回忆.unity +++ b/Assets/Scenes/序章-回忆.unity @@ -452,7 +452,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.61048114, y: 0.20600002} m_AnchorMax: {x: 0.86200005, y: 0.572} - m_AnchoredPosition: {x: 2.199997, y: -3.9000092} + m_AnchoredPosition: {x: -432, y: -3.9000397} m_SizeDelta: {x: 297, y: 142} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &181444957 @@ -802,8 +802,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 448948445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 7.76, y: -0.45, z: -11.0774} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: -10.7, y: -0.45, z: -11.0774} + m_LocalScale: {x: 2.05, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -1330,6 +1330,129 @@ MonoBehaviour: parentBlock: {fileID: 644217699} suppressBlockAutoSelect: 0 message: "\u8C08\u8BBA\u955C\u5B50" +--- !u!1 &662433328 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 662433329} + - component: {fileID: 662433330} + - component: {fileID: 662433331} + - component: {fileID: 662433332} + m_Layer: 0 + m_Name: "\u6D4B\u8BD5\u8F70\u70B8\u533A" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &662433329 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 662433328} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -21.8, y: -0, z: -2.0323746} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 29 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &662433330 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 662433328} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + 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: 12.8, y: 8.12} + newSize: {x: 24, y: 12} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 22.04, y: 11.35} + m_EdgeRadius: 0 +--- !u!212 &662433331 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 662433328} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + 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: -1 + m_Sprite: {fileID: 21300000, guid: 4cba48f17d83f44828e13c3de6dc3aa1, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 24, y: 12} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!114 &662433332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 662433328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e2f52a87447d5c341a9d697d1cfce340, type: 3} + m_Name: + m_EditorClassIdentifier: + shell: {fileID: 6293088924721911990, guid: bdd288e4cdf08da45b1a42ced9473872, type: 3} --- !u!1 &716192430 GameObject: m_ObjectHideFlags: 0 @@ -1378,7 +1501,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &742864120 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1399,7 +1522,7 @@ BoxCollider2D: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 742864119} - m_Enabled: 1 + m_Enabled: 0 m_Density: 1 m_Material: {fileID: 0} m_IsTrigger: 1 @@ -1459,7 +1582,7 @@ SpriteRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3} - m_Color: {r: 0.24334282, g: 0.8773582, b: 0.8773585, a: 1} + m_Color: {r: 0.24334282, g: 0.8773582, b: 0.8773585, a: 0} m_FlipX: 0 m_FlipY: 0 m_DrawMode: 0 @@ -1738,7 +1861,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 719a8ac4002097e4a8227d8cf97e3fbc, type: 3} m_Name: m_EditorClassIdentifier: - m_interface: {fileID: 0} + m_interface: {fileID: 742864119} itemName: "\u4ED6\u7238" --- !u!1 &817315566 GameObject: @@ -1833,6 +1956,7 @@ GameObject: - component: {fileID: 866289588} - component: {fileID: 866289589} - component: {fileID: 866289590} + - component: {fileID: 866289591} m_Layer: 0 m_Name: "\u4E0E\u7236\u4EB2\u5BF9\u8BDD" m_TagString: Untagged @@ -1855,7 +1979,7 @@ MonoBehaviour: nodeRect: serializedVersion: 2 x: 68 - y: 69 + y: 68 width: 122 height: 40 tint: {r: 1, g: 1, b: 1, a: 1} @@ -1867,6 +1991,7 @@ MonoBehaviour: commandList: - {fileID: 866289589} - {fileID: 866289590} + - {fileID: 866289591} suppressAllAutoSelections: 0 --- !u!114 &866289586 MonoBehaviour: @@ -1895,7 +2020,7 @@ MonoBehaviour: selectedBlocks: - {fileID: 866289585} selectedCommands: - - {fileID: 866289589} + - {fileID: 866289591} variables: [] description: stepPause: 0 @@ -1990,6 +2115,23 @@ MonoBehaviour: stopVoiceover: 1 waitForVO: 0 setSayDialog: {fileID: 582064879} +--- !u!114 &866289591 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 866289584} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 17a200dbd67304446a3019434503338a, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 3 + indentLevel: 0 + targetObject: {fileID: 764281727} + methodName: OnTalkToSonEnd + delay: 0 --- !u!1 &899940056 GameObject: m_ObjectHideFlags: 0 @@ -2152,7 +2294,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.2732673, y: 0.23600002} m_AnchorMax: {x: 0.72315717, y: 0.80067426} - m_AnchoredPosition: {x: 0.5, y: -3.9999695} + m_AnchoredPosition: {x: 0.5, y: -3.999939} m_SizeDelta: {x: -79, y: -26} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &917003919 @@ -2635,9 +2777,10 @@ GameObject: - component: {fileID: 1195339600} - component: {fileID: 1195339599} - component: {fileID: 1195339598} + - component: {fileID: 1195339601} m_Layer: 0 m_Name: "\u5730\u9762" - m_TagString: Untagged + m_TagString: "\u5730\u9762" m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -2727,12 +2870,33 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1195339597} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 6.9569, y: -5.35, z: 0} - m_LocalScale: {x: 51.121704, y: 3.9575, z: 1} + m_LocalPosition: {x: 4.33, y: -5.35, z: 0} + m_LocalScale: {x: 139.94566, y: 3.9575, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!50 &1195339601 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1195339597} + m_BodyType: 1 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 --- !u!1 &1207233237 GameObject: m_ObjectHideFlags: 0 @@ -3124,7 +3288,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Name: m_EditorClassIdentifier: - selectedFlowchart: {fileID: 1132274499} + selectedFlowchart: {fileID: 866289586} --- !u!4 &1463945086 Transform: m_ObjectHideFlags: 1 @@ -4397,7 +4561,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1861856986} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -1.8748164, y: -1.3006797, z: -10} + m_LocalPosition: {x: -1.9299998, y: -1.3, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -4551,10 +4715,17 @@ MonoBehaviour: m_EditorClassIdentifier: playerMoveSpeed: 10 playerJumpSpeed: 10 - bulletSpeed: 0 runSpeedMultiple: 1.5 dotRoLineTime: 0.5 TelephoneNeedTime: 2 + bombingAreaMinimumTimeInterval: 0.5 + bombingAreaMaximumTimeInterval: 2 + bombingAreaMaxOffSetOfShell: 10 + bombingAreaShellHeight: 6 + shellSpeed: 10 + shellFallingTime: 1 + shellShadowRangeOfChange: 0.1 + shellShadowPositionYOffSet: 1.5 --- !u!4 &2039349954 Transform: m_ObjectHideFlags: 0 @@ -4704,7 +4875,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.2732673, y: 0.23600002} m_AnchorMax: {x: 0.72315717, y: 0.80067426} - m_AnchoredPosition: {x: 0.5, y: -3.9999695} + m_AnchoredPosition: {x: 0.5, y: -3.999939} m_SizeDelta: {x: -79, y: -26} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2057909280 @@ -4977,3 +5148,4 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_interface: {fileID: 181444955} + isRepared: 0 diff --git a/Assets/Scripts/BombingArea.cs b/Assets/Scripts/BombingArea.cs new file mode 100644 index 0000000..01d4e66 --- /dev/null +++ b/Assets/Scripts/BombingArea.cs @@ -0,0 +1,71 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class BombingArea : MonoBehaviour +{ + // Start is called before the first frame update + private bool bombing = false;//是否正在轰炸 + public GameObject shell;//炮弹游戏物体 + + private float minimumTimeInterval; + private float maximumTimeInterval;//生成炮弹的最小和最大时间间隔 + + private float maxOffSetOfShell;//生成炮弹离玩家的最大偏移量 + private float leftTime = 0f; + private IndexRecoder indexRecoder; + private M_Player player; + private float shellHeight; + + void Start() + { + Init(); + } + + // Update is called once per frame + void Update() + { + if(bombing) Bomb(); + } + + private void Init() + { + indexRecoder = FindObjectOfType(); + minimumTimeInterval = indexRecoder.bombingAreaMinimumTimeInterval; + maximumTimeInterval = indexRecoder.bombingAreaMaximumTimeInterval; + maxOffSetOfShell = indexRecoder.bombingAreaMaxOffSetOfShell; + shellHeight = indexRecoder.bombingAreaShellHeight; + player = FindObjectOfType(); + } + + + private void Bomb() + { + if(leftTime <= 0f) + { + Instantiate(shell,//生成炮弹 + player.transform.position + //以玩家位置 + new Vector3(Random.Range(-maxOffSetOfShell,maximumTimeInterval),//加上水平方向的偏移量 + shellHeight,0),//竖直方向给高度 + Quaternion.identity); + leftTime = Random.Range(minimumTimeInterval,maximumTimeInterval); + } + else leftTime -= Time.deltaTime; + } + + void OnTriggerEnter2D(Collider2D other) + { + if(other.tag == "Player")//当玩家进入轰炸区 + { + bombing = true; + } + } + + void OnTriggerExit2D(Collider2D other) + { + if(other.tag == "Player")//当玩家退出轰炸区 + { + bombing = false; + } + } +} diff --git a/Assets/Scripts/BombingArea.cs.meta b/Assets/Scripts/BombingArea.cs.meta new file mode 100644 index 0000000..84d36b7 --- /dev/null +++ b/Assets/Scripts/BombingArea.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e2f52a87447d5c341a9d697d1cfce340 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Father.cs b/Assets/Scripts/Father.cs index c63debc..6643acc 100644 --- a/Assets/Scripts/Father.cs +++ b/Assets/Scripts/Father.cs @@ -22,4 +22,13 @@ public class Father : NormalInvestableItems Debug.Log("我触发了和父亲的对话"); Flowchart.BroadcastFungusMessage("与父亲对话"); } + + public void OnTalkToSonEnd() + { + Debug.Log("对话结束,打开电报机页面"); + m_interface.SetActive(true); + M_Player player = FindObjectOfType(); + player.catched = m_interface.GetComponent(); + m_interface.GetComponent().OnCall(); + } } diff --git a/Assets/Scripts/IndexRecoder.cs b/Assets/Scripts/IndexRecoder.cs index f6a55bc..e0de2a4 100644 --- a/Assets/Scripts/IndexRecoder.cs +++ b/Assets/Scripts/IndexRecoder.cs @@ -5,14 +5,35 @@ using UnityEngine; public class IndexRecoder : MonoBehaviour { // Start is called before the first frame update + [Tooltip("角色普通移动速度")] public float playerMoveSpeed;//角色普通移动速度 + [Tooltip("角色跳跃力度")] public float playerJumpSpeed;//角色跳跃力度 - public float bulletSpeed;//子弹速度 + [Tooltip("角色跑步的时候,速度是普通状态的多少倍")] public float runSpeedMultiple;//角色跑步的时候,速度是普通状态的多少倍 - + [Tooltip("判定输入为点还是横线的界限时间")] public float dotRoLineTime;//判定输入为点还是横线的界限时间 - public Dictionary codeBook = new Dictionary(); - public float TelephoneNeedTime; + public Dictionary codeBook = new Dictionary();//摩尔斯电码字典 + [Tooltip("角色修复电话线需要多长时间")] + public float TelephoneNeedTime;//角色修复电话线需要多长时间 + [Tooltip("炮弹生成的最小时间间隔")] + public float bombingAreaMinimumTimeInterval; + [Tooltip("炮弹生成的最大时间间隔")] + public float bombingAreaMaximumTimeInterval; + [Tooltip("生成炮弹位置离玩家的最大偏移量")] + public float bombingAreaMaxOffSetOfShell; + [Tooltip("生成炮弹的高度")] + public float bombingAreaShellHeight; + [Tooltip("炮弹的下落速度")] + public float shellSpeed; + [Tooltip("炮弹的下落时间")] + public float shellFallingTime; + [Tooltip("炮弹阴影的震动幅度")] + public float shellShadowRangeOfChange; + [Tooltip("炮弹阴影的Y值偏移")] + public float shellShadowPositionYOffSet; + + void Start() { GameObject.DontDestroyOnLoad(gameObject); diff --git a/Assets/Scripts/Shell.cs b/Assets/Scripts/Shell.cs new file mode 100644 index 0000000..fc38bee --- /dev/null +++ b/Assets/Scripts/Shell.cs @@ -0,0 +1,71 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Shell : MonoBehaviour +{ + // Start is called before the first frame update + public GameObject shadow;//阴影游戏物体 + private Transform ground;//地面的位置信息 + private float shellSpeed;//炮弹速度 + private IndexRecoder indexRecoder; + private float fallingTime; + private bool isDroping = false; + private Transform m_shadow; + void Start() + { + indexRecoder = FindObjectOfType(); + shellSpeed = indexRecoder.shellSpeed; + fallingTime = indexRecoder.shellFallingTime; + ground = GameObject.FindWithTag("地面").transform; + m_shadow = Instantiate(shadow,//生成一片阴影 + new Vector3(transform.position.x,//在这枚炮弹的X + ground.transform.position.y + //地面的Y + indexRecoder.shellShadowPositionYOffSet,//加上偏移量 + 0), + Quaternion.identity) + .transform; + Invoke("Drop",fallingTime); + } + + // Update is called once per frame + void Update() + { + ShadowShock(); + if(isDroping) + { + transform.position -= new Vector3(0,shellSpeed*Time.deltaTime,0); + } + } + + private void ShadowShock() + { + m_shadow.transform.localScale = new Vector3(m_shadow.localScale.x + + Random.Range(-indexRecoder.shellShadowRangeOfChange, + indexRecoder.shellShadowRangeOfChange), + m_shadow.localScale.y, + m_shadow.localScale.z); + } + + private void Drop() + { + isDroping = true; + } + + void OnTriggerEnter2D(Collider2D other) + { + Debug.Log(other.name); + //当玩家被炮弹击中 + switch (other.tag) + { + case "Player": + //玩家被炮弹击中 + break; + case "地面": + Destroy(m_shadow.gameObject); + Destroy(gameObject); + break; + } + } + +} diff --git a/Assets/Scripts/Shell.cs.meta b/Assets/Scripts/Shell.cs.meta new file mode 100644 index 0000000..53a1fd3 --- /dev/null +++ b/Assets/Scripts/Shell.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f52e8e7ae8128004eba1db328b38a417 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/TelephoneLine.cs b/Assets/Scripts/TelephoneLine.cs index dbec3c8..c9003a8 100644 --- a/Assets/Scripts/TelephoneLine.cs +++ b/Assets/Scripts/TelephoneLine.cs @@ -9,7 +9,7 @@ public class TelephoneLine : Interactive private float allNeedTime; private float hasReparedTime = 0f; private bool isReparing = false; - private bool isRepared = false; + public bool isRepared = false; IndexRecoder indexRecoder; private float process = 0f; diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index b14f697..7bf619f 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -5,6 +5,7 @@ TagManager: serializedVersion: 2 tags: - "\u8FDB\u5EA6\u6761" + - "\u5730\u9762" layers: - Default - TransparentFX diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index ca5d1e5..4832af1 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -18,13 +18,13 @@ EditorUserSettings: value: 22424703114646680e0b0227036cdacaf990d3ea61adddcea8f6fb7df7ee3d2cfb flags: 0 UnityEditor.ShaderGraph.Blackboard: - value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd3c3e302a07a37e0901373ae01e0008f707250d171df81a53a5405d41895ac825e0100ec20313c0d91cddccd3d0c7efcca9bd80908fecb0f9cfddf1eff4e7a1b1eae482f0fdaee1e1928b86d888ed909c968797a7cf + value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4baf5e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9af8ffaeffff8e85dd8390e3949c8899daa7 flags: 0 UnityEditor.ShaderGraph.FloatingWindowsLayout2: - value: 181344140043005e1a220d3b1f364b524c0c5a27130c293326201334cee5322ca0bd30e8eb293a707b0fd0180b3d0a36fc0d3d04e649500d1002ee0b5dbd1d2c27c00ad113cb1e10e41f1addc80993b98d9884a69ae6d8f0d1cda9e8fbfefaf9f9dea3fdb9ade882f0f7b0e1e380cafbf2c3adc18e9cd285a2908b82ec869c8395949c9483d68a8e97ddbd90bf + value: 181344140043005e1a220d3b1f364b524c0c5a27130c293326201334cee5322ca0bd30e8eb293a707b0fd0180b3d0a36fc0d3d04e649500d1002ee0b5dbd1d2c27c00ad113cb1e10e41f1addc80993b98d9884a69ae6d8f0d1cda9e8fbfefaf9f9dea3fdb9ade882f0f7b0e1e380cafbf2c3adc18e9cd285a2908b82ec879c84808fdc8e8ed0818980dbf8daf7dce5bdd1fbf5c4c0ebccf2c4c7c5ea34e4fb31343639a7a1a5 flags: 0 UnityEditor.ShaderGraph.InspectorWindow: - value: 18135939215a0a5004000b0e15254b524c1119263f2d6a722016393ce1eb3d36e5d339f9a5602b2e2c07a37e0901373ae01e0008f707250d171df81a53a5485d41895ac825e0100ec20313c0d91cddccd3d0c7efcca9bd80908fecb0f9cfddf1eff4e7a1b1eae482f0fcaee1e1928b86d888ed969b938797a7cf + value: 18135939215a0a5004000b0e15254b524c1119263f2d6a722016393ce1eb3d36e5d339f9a560393d3511ea7046333e09f7181d02f50a06241708ee0b05bd4a435f95548717f73713d91006c1c309d0effad0d2f9ddffa5828691f0beb6fdd1cbfceba0b9f0b3bed8e8f5ade1ff8c978883d3f59e9e919c89e8828183ef8180838e86d6878bd0c5c6 flags: 0 vcSharedLogLevel: value: 0d5e400f0650