Skip to content

Commit

Permalink
Game Prototype V0.22.8 Random Wheel
Browse files Browse the repository at this point in the history
- Fix Scale Random Wheel
  • Loading branch information
Kong-TH committed Feb 24, 2024
1 parent e3c84ee commit dfe8b44
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 36 deletions.
94 changes: 72 additions & 22 deletions Assets/Font/NotoSansThai-Medium SDF.asset

Large diffs are not rendered by default.

73 changes: 59 additions & 14 deletions Assets/Prefabs/UI/Character/RandomCharacterStatusSpinWheelUI.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ GameObject:
- component: {fileID: 7748829777402260037}
- component: {fileID: 7748829778748867400}
- component: {fileID: 7748829777402260035}
- component: {fileID: 6072664768614622960}
m_Layer: 5
m_Name: SpinWheel
m_TagString: Untagged
Expand All @@ -210,10 +211,10 @@ RectTransform:
m_Father: {fileID: 7409976683039769982}
m_RootOrder: 1
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_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 200}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7748829777402260037
CanvasRenderer:
Expand All @@ -238,11 +239,11 @@ MonoBehaviour:
m_fontAsset: {fileID: 11400000, guid: ee45a45177e768646b7f6a49ac8181ea, type: 2}
m_fontStyles: 0
m_fontWeight: 500
m_fontSize: 10
m_fontSize: 22
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_textAlignment: 513
m_line: -60
textSize: {x: 70, y: 150}
textSize: {x: 200, y: 125}
m_pickerResult: {fileID: 5078053030838884883}
m_pickerTextResult: {fileID: 5881716743744676588}
m_OnEnd:
Expand Down Expand Up @@ -285,6 +286,20 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &6072664768614622960
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7748829777402260038}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AspectMode: 2
m_AspectRatio: 1
--- !u!1 &7748829777812606877
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -296,6 +311,7 @@ GameObject:
- component: {fileID: 7748829777812606874}
- component: {fileID: 7748829777812606872}
- component: {fileID: 7748829777812606875}
- component: {fileID: 5805562906415407968}
m_Layer: 5
m_Name: FGWheel
m_TagString: Untagged
Expand All @@ -318,10 +334,10 @@ RectTransform:
m_Father: {fileID: 7409976683039769982}
m_RootOrder: 2
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_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 210, y: 210}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7748829777812606872
CanvasRenderer:
Expand Down Expand Up @@ -361,6 +377,20 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5805562906415407968
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7748829777812606877}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AspectMode: 2
m_AspectRatio: 1
--- !u!1 &7748829778496659863
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -372,6 +402,7 @@ GameObject:
- component: {fileID: 7748829778496659860}
- component: {fileID: 7748829778496659858}
- component: {fileID: 7748829778496659861}
- component: {fileID: 5187936754035824194}
m_Layer: 5
m_Name: BGWheel
m_TagString: Untagged
Expand All @@ -394,10 +425,10 @@ RectTransform:
m_Father: {fileID: 7409976683039769982}
m_RootOrder: 0
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_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 210, y: 210}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7748829778496659858
CanvasRenderer:
Expand Down Expand Up @@ -437,6 +468,20 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5187936754035824194
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7748829778496659863}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AspectMode: 2
m_AspectRatio: 1
--- !u!1 &7748829778939500841
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -511,10 +556,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 720, y: 320}
m_ReferenceResolution: {x: 1280, y: 720}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
Expand Down Expand Up @@ -601,7 +646,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 210, y: -450}
m_SizeDelta: {x: 210, y: -300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5055097421095722201
CanvasRenderer:
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Systems/UI/SpinWheelUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ protected virtual Image CreatePicker(string namePicker, out TextMeshProUGUI pick
GameObject picker = new GameObject(namePicker);
picker.transform.parent = transform;
picker.transform.localPosition = Vector3.zero;
picker.transform.localScale = Vector3.one;

RectTransform pickerRect = picker.AddComponent<RectTransform>();
pickerRect.anchorMin = Vector2.zero;
Expand Down

0 comments on commit dfe8b44

Please sign in to comment.