Skip to content

Commit

Permalink
Merge pull request #171 from traPortation/feat/misc
Browse files Browse the repository at this point in the history
調整
  • Loading branch information
reyu0722 authored Dec 30, 2022
2 parents 8c1a34d + 6655af1 commit b0ee03a
Show file tree
Hide file tree
Showing 5 changed files with 289 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Assets/Scenes/Game Scene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -7875,7 +7875,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
wheelSpeed: 3
moveSpeed: 0.005
moveSpeed: 0.03
mainCamera: {fileID: 1456269678}
--- !u!1001 &1486500831
PrefabInstance:
Expand Down
271 changes: 271 additions & 0 deletions Assets/Scenes/Opening.unity
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
19 changes: 10 additions & 9 deletions Assets/Scripts/MainCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}


Expand Down Expand Up @@ -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;

Expand All @@ -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);
}
}

Expand Down
3 changes: 2 additions & 1 deletion Assets/Scripts/Manager/Bus/SetBusManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
5 changes: 5 additions & 0 deletions Assets/Scripts/MenuSelect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b0ee03a

Please sign in to comment.