From f6205eb0f973cd839158ee60bed8443e17af2e5d Mon Sep 17 00:00:00 2001 From: reyu <62667231+reyu0722@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:48:15 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AA=AC=E6=98=8E?= =?UTF-8?q?=E3=81=AE=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/Opening.unity | 271 +++++++++++++++++++++++++++++++++++ Assets/Scripts/MenuSelect.cs | 5 + 2 files changed, 276 insertions(+) diff --git a/Assets/Scenes/Opening.unity b/Assets/Scenes/Opening.unity index 74ac264..e679b4c 100644 --- a/Assets/Scenes/Opening.unity +++ b/Assets/Scenes/Opening.unity @@ -594,6 +594,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 797914274} m_CullTransparentMesh: 1 +--- !u!1 &901397877 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 901397878} + - component: {fileID: 901397881} + - component: {fileID: 901397880} + - component: {fileID: 901397879} + m_Layer: 5 + m_Name: Info + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &901397878 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 901397877} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 3.7644267} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2122140916} + m_Father: {fileID: 1988597787} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 847, y: -460} + m_SizeDelta: {x: 226.777, y: 73.405} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &901397879 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 901397877} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 901397880} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1988597788} + m_TargetAssemblyTypeName: MenuSelect, Scripts + m_MethodName: Info + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &901397880 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 901397877} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &901397881 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 901397877} + m_CullTransparentMesh: 1 --- !u!1 &1096684658 GameObject: m_ObjectHideFlags: 0 @@ -1707,6 +1841,7 @@ Transform: - {fileID: 797914275} - {fileID: 1341025850} - {fileID: 1096684659} + - {fileID: 901397878} m_Father: {fileID: 1154942096} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1858,3 +1993,139 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1996456480} m_CullTransparentMesh: 1 +--- !u!1 &2122140915 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2122140916} + - component: {fileID: 2122140918} + - component: {fileID: 2122140917} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2122140916 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2122140915} + 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: 901397878} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2122140917 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2122140915} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u64CD\u4F5C\u8AAC\u660E" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 5248552a0e8765b4aa914649d0b6610d, type: 2} + m_sharedMaterial: {fileID: -3249901459292897369, guid: 5248552a0e8765b4aa914649d0b6610d, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4282726970 + m_fontColor: {r: 0.22745098, g: 0.22745098, b: 0.27058825, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &2122140918 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2122140915} + m_CullTransparentMesh: 1 diff --git a/Assets/Scripts/MenuSelect.cs b/Assets/Scripts/MenuSelect.cs index ec53ce7..1db6359 100644 --- a/Assets/Scripts/MenuSelect.cs +++ b/Assets/Scripts/MenuSelect.cs @@ -30,6 +30,11 @@ public void EndGame() Application.Quit(); } + public void Info() + { + Application.OpenURL("https://gist.github.com/reyu0722/59bd1b973ee70290119f67de7797afb1"); + } + IEnumerator Fadeout() { for (var i = 1f; i >= 0; i -= 0.1f) From c1d79846d71f54c877d8b016d3017c5ab782149b Mon Sep 17 00:00:00 2001 From: reyu <62667231+reyu0722@users.noreply.github.com> Date: Fri, 30 Dec 2022 16:44:51 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=83=90=E3=82=B9=E8=A8=AD=E7=BD=AE?= =?UTF-8?q?=E3=81=AE=E8=A7=92=E5=BA=A6=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Manager/Bus/SetBusManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Manager/Bus/SetBusManager.cs b/Assets/Scripts/Manager/Bus/SetBusManager.cs index a2948bc..704a848 100644 --- a/Assets/Scripts/Manager/Bus/SetBusManager.cs +++ b/Assets/Scripts/Manager/Bus/SetBusManager.cs @@ -51,7 +51,8 @@ void Update() { this.icon.SetAlpha(1.0f); - // TODO: 向きの処理 + var railEuler = obj.transform.rotation.eulerAngles.z + 180; + this.icon.obj.transform.rotation = Quaternion.Euler(0, 0, railEuler); if (Input.GetMouseButtonDown(0) && this.manager.ManageMoney.Expense(Const.Money.BusCost)) { From b5bf7b7f296ff031b3ce1526017c8a9db01c2350 Mon Sep 17 00:00:00 2001 From: reyu <62667231+reyu0722@users.noreply.github.com> Date: Fri, 30 Dec 2022 16:56:46 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=82=AB=E3=83=A1=E3=83=A9=E3=81=AE?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/MainCamera.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/MainCamera.cs b/Assets/Scripts/MainCamera.cs index 8131541..7e84e44 100644 --- a/Assets/Scripts/MainCamera.cs +++ b/Assets/Scripts/MainCamera.cs @@ -21,10 +21,10 @@ public class MainCamera : MonoBehaviour private GameManager manager; - private float Left => transform.position.x - mainCamera.orthographicSize * mainCamera.aspect; - private float Right => transform.position.x + mainCamera.orthographicSize * mainCamera.aspect; - private float Top => transform.position.y + mainCamera.orthographicSize; - private float Bottom => transform.position.y - mainCamera.orthographicSize; + private float Left => this.currentPosition.x - mainCamera.orthographicSize * mainCamera.aspect; + private float Right => this.currentPosition.x + mainCamera.orthographicSize * mainCamera.aspect; + private float Top => this.currentPosition.y + mainCamera.orthographicSize; + private float Bottom => this.currentPosition.y - mainCamera.orthographicSize; private float maxSize; private float minSize = 1.0f; @@ -60,6 +60,7 @@ void Construct(GameManager manager) private void CameraUpdate() { this.mainCamera.orthographicSize = Mathf.Lerp(this.mainCamera.orthographicSize, this.currentSize, 0.1f); + this.transform.position = Vector3.Lerp(this.transform.position, this.currentPosition, 0.3f); } @@ -99,7 +100,7 @@ private void MouseDrag(Vector3 mousePos) return; if (Input.GetMouseButton(1)) - transform.Translate(-diff * moveSpeed * mainCamera.orthographicSize); + this.currentPosition += -diff * moveSpeed / 10 * mainCamera.orthographicSize; preMousePos = mousePos; @@ -110,19 +111,19 @@ private void FitCamera() { if (Left < Const.Map.XMin) { - transform.position += new Vector3(Const.Map.XMin - Left, 0, 0); + this.currentPosition += new Vector3(Const.Map.XMin - Left, 0, 0); } if (Right > Const.Map.XMax) { - transform.position += new Vector3(Const.Map.XMax - Right, 0, 0); + this.currentPosition += new Vector3(Const.Map.XMax - Right, 0, 0); } if (Top > Const.Map.YMax) { - transform.position += new Vector3(0, Const.Map.YMax - Top, 0); + this.currentPosition += new Vector3(0, Const.Map.YMax - Top, 0); } if (Bottom < Const.Map.YMin) { - transform.position += new Vector3(0, Const.Map.YMin - Bottom, 0); + this.currentPosition += new Vector3(0, Const.Map.YMin - Bottom, 0); } } From 6655af17bcf0d9e95baca1953b836a4318bf8a65 Mon Sep 17 00:00:00 2001 From: reyu <62667231+reyu0722@users.noreply.github.com> Date: Fri, 30 Dec 2022 16:58:41 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E3=82=B3=E3=83=9F=E3=83=83=E3=83=88?= =?UTF-8?q?=E5=BF=98=E3=82=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/Game Scene.unity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scenes/Game Scene.unity b/Assets/Scenes/Game Scene.unity index 8ba8637..49b26c0 100644 --- a/Assets/Scenes/Game Scene.unity +++ b/Assets/Scenes/Game Scene.unity @@ -7875,7 +7875,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: wheelSpeed: 3 - moveSpeed: 0.005 + moveSpeed: 0.03 mainCamera: {fileID: 1456269678} --- !u!1001 &1486500831 PrefabInstance: