Add AI mode to custom mode
This commit is contained in:
6 files changed
+1022
-63
No files matched your search
@@ -802,6 +802,192 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!1 &152610396
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 152610397}
|
||||
- component: {fileID: 152610402}
|
||||
- component: {fileID: 152610401}
|
||||
- component: {fileID: 152610400}
|
||||
- component: {fileID: 152610399}
|
||||
- component: {fileID: 152610398}
|
||||
m_Layer: 5
|
||||
m_Name: CustomText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &152610397
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 152610396}
|
||||
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: 1811565639}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 247.72, y: 25.005}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &152610398
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 152610396}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73b30df2b3a7144b99b75ce70168fd50, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CustomColorObject
|
||||
type: 4
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!114 &152610399
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 152610396}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &152610400
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 152610396}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73b30df2b3a7144b99b75ce70168fd50, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CustomColorObject
|
||||
type: 4
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!114 &152610401
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 152610396}
|
||||
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: This game play is from the Custom Mode
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 1
|
||||
m_fontSizeMax: 36
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 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 &152610402
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 152610396}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &157908646
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2526,6 +2712,7 @@ MonoBehaviour:
|
||||
jumpButton: {fileID: 293594129}
|
||||
rightButton: {fileID: 1125207522}
|
||||
leftButton: {fileID: 2069651268}
|
||||
aiText: {fileID: 1422150715}
|
||||
--- !u!1 &519900203
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -6356,12 +6543,12 @@ GameObject:
|
||||
- component: {fileID: 1422150717}
|
||||
- component: {fileID: 1422150718}
|
||||
m_Layer: 5
|
||||
m_Name: CustomText
|
||||
m_Name: CustomWithAIText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1422150712
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -6378,8 +6565,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 247.71, y: 25.005}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 585.30005, y: 25.005005}
|
||||
m_SizeDelta: {x: 199.72, y: 30.01}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1422150713
|
||||
MonoBehaviour:
|
||||
@@ -6417,7 +6604,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: This game play is from the Custom Mode
|
||||
m_text: ' with AI mode on'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
@@ -7328,6 +7515,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 152610397}
|
||||
- {fileID: 1422150712}
|
||||
- {fileID: 872476495}
|
||||
- {fileID: 50626625}
|
||||
|
||||
@@ -257,6 +257,92 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 535456}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &14497947
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 14497948}
|
||||
- component: {fileID: 14497949}
|
||||
m_Layer: 5
|
||||
m_Name: AIToggle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &14497948
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 14497947}
|
||||
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:
|
||||
- {fileID: 943778767}
|
||||
- {fileID: 686262424}
|
||||
m_Father: {fileID: 164218987}
|
||||
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: 217.50002, y: -177.5}
|
||||
m_SizeDelta: {x: 100, y: 25}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &14497949
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 14497947}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Toggle
|
||||
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: 943778770}
|
||||
toggleTransition: 1
|
||||
graphic: {fileID: 1218257651}
|
||||
m_Group: {fileID: 0}
|
||||
onValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_IsOn: 0
|
||||
--- !u!1 &22271243
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -798,6 +884,7 @@ RectTransform:
|
||||
- {fileID: 598155838}
|
||||
- {fileID: 1425764567}
|
||||
- {fileID: 656379404}
|
||||
- {fileID: 14497948}
|
||||
m_Father: {fileID: 517161050}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -3041,6 +3128,7 @@ MonoBehaviour:
|
||||
antiBerryChance: {fileID: 1230511725}
|
||||
goldenBerryChance: {fileID: 1809489635}
|
||||
nothingBerryChance: {fileID: 830548777}
|
||||
useAiToggle: {fileID: 14497949}
|
||||
validateTotalText: {fileID: 598155839}
|
||||
--- !u!4 &639162580
|
||||
Transform:
|
||||
@@ -3354,6 +3442,175 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!1 &686262423
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 686262424}
|
||||
- component: {fileID: 686262426}
|
||||
- component: {fileID: 686262425}
|
||||
- component: {fileID: 686262427}
|
||||
- component: {fileID: 686262428}
|
||||
m_Layer: 5
|
||||
m_Name: Label
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &686262424
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 686262423}
|
||||
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: 14497948}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 15, y: 0}
|
||||
m_SizeDelta: {x: -30, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &686262425
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 686262423}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
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: Use AI
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 18
|
||||
m_fontSizeBase: 18
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 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 &686262426
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 686262423}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &686262427
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 686262423}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 0
|
||||
--- !u!114 &686262428
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 686262423}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73b30df2b3a7144b99b75ce70168fd50, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CustomColorObject
|
||||
type: 4
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!1 &725567126
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4640,6 +4897,161 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 936243368}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &943778766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 943778767}
|
||||
- component: {fileID: 943778769}
|
||||
- component: {fileID: 943778770}
|
||||
- component: {fileID: 943778771}
|
||||
m_Layer: 5
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &943778767
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 943778766}
|
||||
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:
|
||||
- {fileID: 1218257648}
|
||||
m_Father: {fileID: 14497948}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 12.5, y: 0}
|
||||
m_SizeDelta: {x: 25, y: 25}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &943778769
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 943778766}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &943778770
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 943778766}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
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: \uf0c8
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 0b50c03e48f9f20d69553c78bfe39a89, type: 2}
|
||||
m_sharedMaterial: {fileID: -353727190107255236, guid: 0b50c03e48f9f20d69553c78bfe39a89, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 25
|
||||
m_fontSizeBase: 25
|
||||
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_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 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!114 &943778771
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 943778766}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73b30df2b3a7144b99b75ce70168fd50, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CustomColorObject
|
||||
type: 3
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!1 &1014167916
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5126,6 +5538,160 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 456.25, y: -209.9}
|
||||
m_SizeDelta: {x: 132.5, y: 45}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1218257647
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1218257648}
|
||||
- component: {fileID: 1218257650}
|
||||
- component: {fileID: 1218257651}
|
||||
- component: {fileID: 1218257652}
|
||||
m_Layer: 5
|
||||
m_Name: Checkmark
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1218257648
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218257647}
|
||||
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: 943778767}
|
||||
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!222 &1218257650
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218257647}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1218257651
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218257647}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
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: \uf00c
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 0b50c03e48f9f20d69553c78bfe39a89, type: 2}
|
||||
m_sharedMaterial: {fileID: -353727190107255236, guid: 0b50c03e48f9f20d69553c78bfe39a89, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontColor: {r: 0, g: 0, b: 0, 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: 15
|
||||
m_fontSizeBase: 15
|
||||
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_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 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!114 &1218257652
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218257647}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73b30df2b3a7144b99b75ce70168fd50, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CustomColorObject
|
||||
type: 9
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!1 &1219795704
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
@@ -45,6 +46,9 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
private float antiBerryChance;
|
||||
private float goldenBerryChance;
|
||||
private float nothingBerryChance;
|
||||
private bool useAI;
|
||||
|
||||
[SerializeField] private TMP_Text aiText;
|
||||
|
||||
void Awake() {
|
||||
Instance = this;
|
||||
@@ -65,66 +69,76 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
antiBerryChance = customGameTempData.antiBerryChance;
|
||||
goldenBerryChance = customGameTempData.goldenBerryChance;
|
||||
nothingBerryChance = customGameTempData.nothingBerryChance;
|
||||
useAI = customGameTempData.useAI;
|
||||
Destroy(customGameTempData.gameObject);
|
||||
if (useAI) aiText.gameObject.SetActive(true);
|
||||
|
||||
var backgroundColor = BazookaManager.Instance.GetColorSettingBackground();
|
||||
Camera.main.backgroundColor = new Color(
|
||||
int.Parse(backgroundColor[0].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[1].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[2].ToString()) / 255f
|
||||
);
|
||||
|
||||
var customIconData = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
SpriteRenderer birdRender = bird.GetComponent<SpriteRenderer>();
|
||||
if (customIconData.Selected == null) {
|
||||
var birdColor = BazookaManager.Instance.GetColorSettingIcon();
|
||||
var overlayColor = BazookaManager.Instance.GetColorSettingOverlay();
|
||||
bird.GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(birdColor[0].ToString()) / 255f,
|
||||
int.Parse(birdColor[1].ToString()) / 255f,
|
||||
int.Parse(birdColor[2].ToString()) / 255f
|
||||
);
|
||||
bird.transform.GetChild(0).GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(overlayColor[0].ToString()) / 255f,
|
||||
int.Parse(overlayColor[1].ToString()) / 255f,
|
||||
int.Parse(overlayColor[2].ToString()) / 255f
|
||||
if (!useAI) {
|
||||
var backgroundColor = BazookaManager.Instance.GetColorSettingBackground();
|
||||
Camera.main.backgroundColor = new Color(
|
||||
int.Parse(backgroundColor[0].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[1].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[2].ToString()) / 255f
|
||||
);
|
||||
|
||||
int icon = BazookaManager.Instance.GetBirdIcon();
|
||||
int iconOverlay = BazookaManager.Instance.GetBirdOverlay();
|
||||
if (icon == 1) {
|
||||
birdRender.sprite = Tools.GetIconForUser(BazookaManager.Instance.GetAccountID() ?? 0);
|
||||
} else {
|
||||
birdRender.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
}
|
||||
if (iconOverlay == 8) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
overlayRender.transform.localPosition = new UnityEngine.Vector3(-0.37f, 0.32f, 0f);
|
||||
} else if (iconOverlay == 11) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
overlayRender.transform.localScale = new UnityEngine.Vector3(1.1f, 1.1f, 1.1f); //yea i didnt feel like doing it for all lmao
|
||||
overlayRender.transform.localPosition = new UnityEngine.Vector3(-0.3141809f, 0.4324968f, 0f);
|
||||
} else if (iconOverlay == 13) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
overlayRender.transform.localPosition = new UnityEngine.Vector3(-0.3559977f, 0.3179995f, 0f);
|
||||
} else {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
}
|
||||
if (birdRender.sprite == null) {
|
||||
birdRender.sprite = Resources.Load<Sprite>("Icons/Icons/bird_1");
|
||||
BazookaManager.Instance.SetBirdIcon(1);
|
||||
}
|
||||
if (overlayRender.sprite == null && iconOverlay != 0) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_1");
|
||||
BazookaManager.Instance.SetBirdOverlay(1);
|
||||
}
|
||||
} else if (customIconData.Selected != null)
|
||||
foreach (var icon in customIconData.Purchased)
|
||||
if (icon == customIconData.Selected) {
|
||||
var waitingForCustomIcon = birdRender.gameObject.AddComponent<WaitingForCustomIcon>();
|
||||
waitingForCustomIcon.ID = customIconData.Selected;
|
||||
CustomIconLoader.Init(new[] { waitingForCustomIcon });
|
||||
var customIconData = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
if (customIconData.Selected == null) {
|
||||
var birdColor = BazookaManager.Instance.GetColorSettingIcon();
|
||||
var overlayColor = BazookaManager.Instance.GetColorSettingOverlay();
|
||||
bird.GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(birdColor[0].ToString()) / 255f,
|
||||
int.Parse(birdColor[1].ToString()) / 255f,
|
||||
int.Parse(birdColor[2].ToString()) / 255f
|
||||
);
|
||||
bird.transform.GetChild(0).GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(overlayColor[0].ToString()) / 255f,
|
||||
int.Parse(overlayColor[1].ToString()) / 255f,
|
||||
int.Parse(overlayColor[2].ToString()) / 255f
|
||||
);
|
||||
|
||||
int icon = BazookaManager.Instance.GetBirdIcon();
|
||||
int iconOverlay = BazookaManager.Instance.GetBirdOverlay();
|
||||
if (icon == 1) {
|
||||
birdRender.sprite = Tools.GetIconForUser(BazookaManager.Instance.GetAccountID() ?? 0);
|
||||
} else {
|
||||
birdRender.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
}
|
||||
if (iconOverlay == 8) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
overlayRender.transform.localPosition = new UnityEngine.Vector3(-0.37f, 0.32f, 0f);
|
||||
} else if (iconOverlay == 11) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
overlayRender.transform.localScale = new UnityEngine.Vector3(1.1f, 1.1f, 1.1f); //yea i didnt feel like doing it for all lmao
|
||||
overlayRender.transform.localPosition = new UnityEngine.Vector3(-0.3141809f, 0.4324968f, 0f);
|
||||
} else if (iconOverlay == 13) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
overlayRender.transform.localPosition = new UnityEngine.Vector3(-0.3559977f, 0.3179995f, 0f);
|
||||
} else {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + iconOverlay);
|
||||
}
|
||||
if (birdRender.sprite == null) {
|
||||
birdRender.sprite = Resources.Load<Sprite>("Icons/Icons/bird_1");
|
||||
BazookaManager.Instance.SetBirdIcon(1);
|
||||
}
|
||||
if (overlayRender.sprite == null && iconOverlay != 0) {
|
||||
overlayRender.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_1");
|
||||
BazookaManager.Instance.SetBirdOverlay(1);
|
||||
}
|
||||
} else if (customIconData.Selected != null)
|
||||
foreach (var icon in customIconData.Purchased)
|
||||
if (icon == customIconData.Selected) {
|
||||
var waitingForCustomIcon = birdRender.gameObject.AddComponent<WaitingForCustomIcon>();
|
||||
waitingForCustomIcon.ID = customIconData.Selected;
|
||||
CustomIconLoader.Init(new[] { waitingForCustomIcon });
|
||||
}
|
||||
} else {
|
||||
birdRender.sprite = Resources.Load<Sprite>("Icons/Icons/bird_1");
|
||||
Destroy(overlayRender.gameObject);
|
||||
var rainbowCam = Camera.main.gameObject.AddComponent<RainbowCamera>();
|
||||
rainbowCam.frequency = 4f;
|
||||
rainbowCam.brightness = 24;
|
||||
}
|
||||
|
||||
lastMoveTime = Time.time;
|
||||
UnityEngine.InputSystem.EnhancedTouch.EnhancedTouchSupport.Enable();
|
||||
@@ -211,7 +225,190 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
if (score != 0) Respawn();
|
||||
}
|
||||
if (antiLeft > 0f || goldenLeft > 0f) {
|
||||
string[] berryTags = { "NormalBerry", "SlowBerry", "UltraBerry", "SpeedyBerry", "CoinBerry", "RandomBerry", "AntiBerry", "GoldenBerry" };
|
||||
string[] berryTags = { "NormalBerry", "SlowBerry", "UltraBerry", "SpeedyBerry", "RandomBerry", "AntiBerry", "GoldenBerry", "NothingBerry" };
|
||||
if (antiLeft > 0f) berryTags.Append("PoisonBerry");
|
||||
foreach (string tag in berryTags) {
|
||||
foreach (var berry in GameObject.FindGameObjectsWithTag(tag)) {
|
||||
UnityEngine.Vector3 dir = berry.transform.position - bird.transform.position;
|
||||
if (dir.magnitude < (antiLeft > 0 ? 3f : 4.5f)) {
|
||||
berry.GetComponent<Rigidbody2D>().linearVelocity = dir.normalized * (antiLeft > 0 ? 5f : -5f);
|
||||
ClampPosition(berry, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MoveBirdAI() {
|
||||
float screenWidth = Camera.main.orthographicSize * 2f * Camera.main.aspect;
|
||||
float baseSpeed = 0.18f * (screenWidth / 20.19257f);
|
||||
bool doMoveRight = false;
|
||||
bool doMoveLeft = false;
|
||||
bool doJump = false;
|
||||
bool doBack = false;
|
||||
float movespeed = baseSpeed;
|
||||
if (boostLeft > 0f || speedyLeft > 0f) {
|
||||
movespeed = baseSpeed * 1.39f;
|
||||
} else if (slownessLeft > 0f) {
|
||||
movespeed = baseSpeed * 0.56f;
|
||||
}
|
||||
CheckIfGrounded();
|
||||
|
||||
float birdX = bird.transform.position.x;
|
||||
float birdY = bird.transform.position.y;
|
||||
|
||||
var berryScores = new System.Collections.Generic.Dictionary<string, float> {
|
||||
{ "NormalBerry", 1f },
|
||||
{ "UltraBerry", 5f },
|
||||
{ "SpeedyBerry", 10f },
|
||||
{ "RandomBerry", 0f },
|
||||
{ "GoldenBerry", 4f },
|
||||
{ "PoisonBerry", -100f },
|
||||
{ "SlowBerry", -1f },
|
||||
{ "AntiBerry", -10f },
|
||||
};
|
||||
|
||||
var allBerries = new System.Collections.Generic.List<(float x, float y, float score)>();
|
||||
foreach (var kvp in berryScores) {
|
||||
foreach (var b in GameObject.FindGameObjectsWithTag(kvp.Key)) {
|
||||
allBerries.Add((b.transform.position.x, b.transform.position.y, kvp.Value));
|
||||
}
|
||||
}
|
||||
|
||||
float collectRadius = 1.5f;
|
||||
|
||||
bool WouldCollideAtX(float testX, float berryX, float berryY, float radius) {
|
||||
float dx = Mathf.Abs(testX - berryX);
|
||||
float dy = Mathf.Abs(birdY - berryY);
|
||||
return dx < radius && dy < radius;
|
||||
}
|
||||
|
||||
bool PathHasDanger(float targetX) {
|
||||
foreach (var (bx, by, score) in allBerries) {
|
||||
if (score >= 0f) continue;
|
||||
float dy = Mathf.Abs(by - birdY);
|
||||
if (dy >= collectRadius) continue;
|
||||
float pathMin = Mathf.Min(birdX, targetX);
|
||||
float pathMax = Mathf.Max(birdX, targetX);
|
||||
if (bx + collectRadius > pathMin && bx - collectRadius < pathMax) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
float closestBadX = float.MaxValue;
|
||||
float closestBadDist = float.MaxValue;
|
||||
float dodgeLookahead = collectRadius + movespeed * 8f;
|
||||
|
||||
foreach (var (bx, by, score) in allBerries) {
|
||||
if (score >= 0f) continue;
|
||||
float dy = Mathf.Abs(by - birdY);
|
||||
if (dy >= collectRadius) continue;
|
||||
float dx = Mathf.Abs(bx - birdX);
|
||||
if (dx < dodgeLookahead && dx < closestBadDist) {
|
||||
closestBadDist = dx;
|
||||
closestBadX = bx;
|
||||
}
|
||||
}
|
||||
|
||||
bool inDanger = closestBadDist < float.MaxValue;
|
||||
|
||||
if (inDanger) {
|
||||
doMoveLeft = closestBadX >= birdX;
|
||||
doMoveRight = closestBadX < birdX;
|
||||
} else {
|
||||
var clusters = new System.Collections.Generic.List<(float x, float y, float score)>();
|
||||
var used = new bool[allBerries.Count];
|
||||
float clusterRadius = 1.8f;
|
||||
|
||||
for (int i = 0; i < allBerries.Count; i++) {
|
||||
if (used[i]) continue;
|
||||
var (ax, ay, aScore, _) = (allBerries[i].x, allBerries[i].y, allBerries[i].score, 0);
|
||||
float wX = ax * Mathf.Abs(aScore), wY = ay, total = aScore, wTotal = Mathf.Abs(aScore);
|
||||
int count = 1;
|
||||
used[i] = true;
|
||||
for (int j = i + 1; j < allBerries.Count; j++) {
|
||||
if (used[j]) continue;
|
||||
var (bx, by, bScore, _) = (allBerries[j].x, allBerries[j].y, allBerries[j].score, 0);
|
||||
float d = Mathf.Sqrt((bx - ax) * (bx - ax) + (by - ay) * (by - ay));
|
||||
if (d < clusterRadius) {
|
||||
wX += bx * Mathf.Abs(bScore); wY += by;
|
||||
total += bScore; wTotal += Mathf.Abs(bScore);
|
||||
count++; used[j] = true;
|
||||
}
|
||||
}
|
||||
clusters.Add((wTotal > 0f ? wX / wTotal : ax, wY / count, total));
|
||||
}
|
||||
|
||||
float bestScore = 0f;
|
||||
float bestX = float.MaxValue;
|
||||
bool foundTarget = false;
|
||||
|
||||
foreach (var (cx, cy, cs) in clusters) {
|
||||
if (cs <= 0f) continue;
|
||||
if (PathHasDanger(cx)) continue;
|
||||
float dist = Mathf.Abs(cx - birdX);
|
||||
float adjusted = cs - dist * 0.05f;
|
||||
if (adjusted > bestScore) {
|
||||
bestScore = adjusted;
|
||||
bestX = cx;
|
||||
foundTarget = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundTarget) {
|
||||
float alignTolerance = collectRadius * 0.6f;
|
||||
if (birdX < bestX - alignTolerance) {
|
||||
doMoveRight = true;
|
||||
} else if (birdX > bestX + alignTolerance) {
|
||||
doMoveLeft = true;
|
||||
} else {
|
||||
bool goodBerryAbove = false;
|
||||
foreach (var (bx, by, score) in allBerries) {
|
||||
if (score > 0f && by > birdY && WouldCollideAtX(birdX, bx, by, collectRadius))
|
||||
goodBerryAbove = true;
|
||||
}
|
||||
if (goodBerryAbove) doJump = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Application.isMobilePlatform) {
|
||||
var touches = UnityEngine.InputSystem.EnhancedTouch.Touch.activeTouches;
|
||||
for (int i = 0; i < touches.Count; i++) {
|
||||
var pos = touches[i].screenPosition;
|
||||
UnityEngine.Vector3 clickPosition = Camera.main.ScreenToWorldPoint(new UnityEngine.Vector3(pos.x, pos.y, 0f));
|
||||
clickPosition.z = 0f;
|
||||
if (pauseButton.GetComponent<HoldableButton>().isPressed) doBack = true;
|
||||
}
|
||||
}
|
||||
if (doMoveLeft && !doMoveRight) {
|
||||
lastMoveTime = Time.time;
|
||||
bird.transform.position += new UnityEngine.Vector3(-movespeed, 0f, 0f);
|
||||
ClampPosition(bird);
|
||||
bird.transform.localScale = new UnityEngine.Vector3(1.35f, 1.35f, 1.35f);
|
||||
}
|
||||
if (doMoveRight && !doMoveLeft) {
|
||||
lastMoveTime = Time.time;
|
||||
bird.transform.position += new UnityEngine.Vector3(movespeed, 0f, 0f);
|
||||
ClampPosition(bird);
|
||||
bird.transform.localScale = new UnityEngine.Vector3(-1.35f, 1.35f, 1.35f);
|
||||
}
|
||||
if (doJump && isGrounded) {
|
||||
lastMoveTime = Time.time;
|
||||
AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Jump"), Camera.main.transform.position, 0.75f * BazookaManager.Instance.GetSettingSFXVolume());
|
||||
if (boostLeft > 0f || speedyLeft > 0f) {
|
||||
rb.linearVelocity = UnityEngine.Vector2.up * 12f;
|
||||
} else if (slownessLeft > 0f) {
|
||||
rb.linearVelocity = UnityEngine.Vector2.up * 6f;
|
||||
} else {
|
||||
rb.linearVelocity = UnityEngine.Vector2.up * 9f;
|
||||
}
|
||||
}
|
||||
if (doBack) {
|
||||
TogglePause();
|
||||
}
|
||||
if (antiLeft > 0f || goldenLeft > 0f) {
|
||||
string[] berryTags = { "NormalBerry", "SlowBerry", "UltraBerry", "SpeedyBerry", "RandomBerry", "AntiBerry", "GoldenBerry", "NothingBerry" };
|
||||
if (antiLeft > 0f) berryTags.Append("PoisonBerry");
|
||||
foreach (string tag in berryTags) {
|
||||
foreach (var berry in GameObject.FindGameObjectsWithTag(tag)) {
|
||||
@@ -244,7 +441,8 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
void FixedUpdate() {
|
||||
SpawnBerries();
|
||||
if (!pausePanel.activeSelf) {
|
||||
MoveBird();
|
||||
if (useAI) MoveBirdAI();
|
||||
else MoveBird();
|
||||
if (boostLeft > 0f) {
|
||||
boostLeft -= Time.deltaTime;
|
||||
boostText.text = "Boost expires in " + string.Format("{0:0.0}", boostLeft) + "s";
|
||||
|
||||
+5
-2
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class CustomGameTempData : MonoBehaviour {
|
||||
public class CustomGameTempData : MonoBehaviour
|
||||
{
|
||||
public float normalBerryChance;
|
||||
public float poisonBerryChance;
|
||||
public float slowBerryChance;
|
||||
@@ -10,8 +11,10 @@ public class CustomGameTempData : MonoBehaviour {
|
||||
public float antiBerryChance;
|
||||
public float goldenBerryChance;
|
||||
public float nothingBerryChance;
|
||||
public bool useAI;
|
||||
|
||||
void Awake() {
|
||||
void Awake()
|
||||
{
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -26,6 +26,7 @@ public class PlayMenu : MonoBehaviour {
|
||||
[SerializeField] private TMP_InputField antiBerryChance;
|
||||
[SerializeField] private TMP_InputField goldenBerryChance;
|
||||
[SerializeField] private TMP_InputField nothingBerryChance;
|
||||
[SerializeField] private Toggle useAiToggle;
|
||||
|
||||
[SerializeField] private TMP_Text validateTotalText;
|
||||
|
||||
@@ -59,6 +60,7 @@ public class PlayMenu : MonoBehaviour {
|
||||
antiBerryChance.text = defaultAntiBerryChance.ToString() + "%";
|
||||
goldenBerryChance.text = defaultGoldenBerryChance.ToString() + "%";
|
||||
nothingBerryChance.text = defaultNothingBerryChance.ToString() + "%";
|
||||
useAiToggle.isOn = false;
|
||||
ValidateTotal();
|
||||
if (DiscordRPCHandler.Instance != null)
|
||||
DiscordRPCHandler.Instance.UpdateRPC("Picking what mode they want to play", "");
|
||||
@@ -175,6 +177,7 @@ public class PlayMenu : MonoBehaviour {
|
||||
customGameTempData.antiBerryChance = GetValueFrom(antiBerryChance);
|
||||
customGameTempData.goldenBerryChance = GetValueFrom(goldenBerryChance);
|
||||
customGameTempData.nothingBerryChance = GetValueFrom(nothingBerryChance);
|
||||
customGameTempData.useAI = useAiToggle.isOn;
|
||||
await SceneManager.LoadSceneAsync("CustomGamePlayer");
|
||||
});
|
||||
autoButton.onClick.AddListener(async () => {
|
||||
@@ -219,6 +222,7 @@ public class PlayMenu : MonoBehaviour {
|
||||
DiscordRPCHandler.Instance.UpdateRPC("Picking what mode they want to play", "");
|
||||
|
||||
if (Tools.GetLevelInfo().level < 5) {
|
||||
useAiToggle.gameObject.SetActive(false);
|
||||
customButton.interactable = false;
|
||||
customButton.transform.GetChild(0).GetComponent<TMP_Text>().text += "\n<size=12>You need level 5 or higher to access this</size>";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user