収穫数表示+吸収演出実装
This commit is contained in:
parent
27edf3e392
commit
4050f78c7d
|
|
@ -154,182 +154,6 @@ Transform:
|
||||||
m_Father: {fileID: 1501215306}
|
m_Father: {fileID: 1501215306}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &242576838
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 242576839}
|
|
||||||
- component: {fileID: 242576842}
|
|
||||||
- component: {fileID: 242576841}
|
|
||||||
- component: {fileID: 242576840}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Text (TMP)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &242576839
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 242576838}
|
|
||||||
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_Children: []
|
|
||||||
m_Father: {fileID: 2138129848}
|
|
||||||
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_AnchoredPosition: {x: 0, y: 0.8}
|
|
||||||
m_SizeDelta: {x: 1.8557076, y: 1.0995677}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &242576840
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 242576838}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_text: 999
|
|
||||||
m_isRightToLeft: 0
|
|
||||||
m_fontAsset: {fileID: 11400000, guid: 1ecb91d9b4f7d1b4d9ac80b14e928555, type: 2}
|
|
||||||
m_sharedMaterial: {fileID: 5374284371091958195, guid: 1ecb91d9b4f7d1b4d9ac80b14e928555,
|
|
||||||
type: 2}
|
|
||||||
m_fontSharedMaterials: []
|
|
||||||
m_fontMaterial: {fileID: 0}
|
|
||||||
m_fontMaterials: []
|
|
||||||
m_fontColor32:
|
|
||||||
serializedVersion: 2
|
|
||||||
rgba: 4283487482
|
|
||||||
m_fontColor: {r: 0.98039216, g: 0.83137256, b: 0.3137255, 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: 4.76
|
|
||||||
m_fontSizeBase: 4.76
|
|
||||||
m_fontWeight: 400
|
|
||||||
m_enableAutoSizing: 0
|
|
||||||
m_fontSizeMin: 2
|
|
||||||
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: 0
|
|
||||||
m_wordWrappingRatios: 0.4
|
|
||||||
m_overflowMode: 1
|
|
||||||
m_linkedTextComponent: {fileID: 0}
|
|
||||||
parentLinkedComponent: {fileID: 0}
|
|
||||||
m_enableKerning: 1
|
|
||||||
m_enableExtraPadding: 0
|
|
||||||
checkPaddingRequired: 0
|
|
||||||
m_isRichText: 1
|
|
||||||
m_parseCtrlCharacters: 1
|
|
||||||
m_isOrthographic: 0
|
|
||||||
m_isCullingEnabled: 0
|
|
||||||
m_horizontalMapping: 0
|
|
||||||
m_verticalMapping: 0
|
|
||||||
m_uvLineOffset: 0
|
|
||||||
m_geometrySortingOrder: 0
|
|
||||||
m_IsTextObjectScaleStatic: 0
|
|
||||||
m_VertexBufferAutoSizeReduction: 1
|
|
||||||
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_renderer: {fileID: 242576842}
|
|
||||||
m_maskType: 0
|
|
||||||
_SortingLayerID: 0
|
|
||||||
_SortingOrder: 0
|
|
||||||
--- !u!222 &242576841
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 2
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 242576838}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!23 &242576842
|
|
||||||
MeshRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 242576838}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_CastShadows: 0
|
|
||||||
m_ReceiveShadows: 0
|
|
||||||
m_DynamicOccludee: 1
|
|
||||||
m_MotionVectors: 1
|
|
||||||
m_LightProbeUsage: 1
|
|
||||||
m_ReflectionProbeUsage: 1
|
|
||||||
m_RayTracingMode: 2
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_RendererPriority: 0
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 5374284371091958195, guid: 1ecb91d9b4f7d1b4d9ac80b14e928555, 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: 3
|
|
||||||
m_MinimumChartSize: 4
|
|
||||||
m_AutoUVMaxDistance: 0.5
|
|
||||||
m_AutoUVMaxAngle: 89
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 30
|
|
||||||
--- !u!1001 &279224989
|
--- !u!1001 &279224989
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -476,205 +300,10 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 126d56890a16475f8bb5bf49970a50c8, type: 3}
|
m_Script: {fileID: 11500000, guid: 126d56890a16475f8bb5bf49970a50c8, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
cornCounter: {fileID: 242576840}
|
harvestedSpawnTransform: {fileID: 895001959}
|
||||||
harvestedPrefab: {fileID: 2111766585493962378, guid: d52f3514ed7fd461b8ab77a202c122c6,
|
harvestedPrefab: {fileID: 2111766585493962378, guid: d52f3514ed7fd461b8ab77a202c122c6,
|
||||||
type: 3}
|
type: 3}
|
||||||
thrust: 40
|
thrust: 40
|
||||||
--- !u!1 &330258337
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 330258338}
|
|
||||||
- component: {fileID: 330258340}
|
|
||||||
- component: {fileID: 330258339}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Text_StockCoin
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &330258338
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 330258337}
|
|
||||||
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_Children: []
|
|
||||||
m_Father: {fileID: 349630808}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 0, y: 100}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &330258339
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 330258337}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 351b4ffae35e149bf81549887561d561, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 0.3372549, g: 0.21960784, b: 0.14117648, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_FontData:
|
|
||||||
m_Font: {fileID: 12800000, guid: b5532e9ce15694f55a0893a76a98cd78, type: 3}
|
|
||||||
m_FontSize: 45
|
|
||||||
m_FontStyle: 0
|
|
||||||
m_BestFit: 1
|
|
||||||
m_MinSize: 45
|
|
||||||
m_MaxSize: 45
|
|
||||||
m_Alignment: 4
|
|
||||||
m_AlignByGeometry: 0
|
|
||||||
m_RichText: 1
|
|
||||||
m_HorizontalOverflow: 0
|
|
||||||
m_VerticalOverflow: 0
|
|
||||||
m_LineSpacing: 1
|
|
||||||
m_Text: "12345\uFF0B350 "
|
|
||||||
--- !u!222 &330258340
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 330258337}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!1 &349630807
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 349630808}
|
|
||||||
- component: {fileID: 349630812}
|
|
||||||
- component: {fileID: 349630811}
|
|
||||||
- component: {fileID: 349630810}
|
|
||||||
- component: {fileID: 349630809}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: StockCorn
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &349630808
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 349630807}
|
|
||||||
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_Children:
|
|
||||||
- {fileID: 1167044235}
|
|
||||||
- {fileID: 330258338}
|
|
||||||
m_Father: {fileID: 387414334}
|
|
||||||
m_RootOrder: 7
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 25.999992, y: -141.79994}
|
|
||||||
m_SizeDelta: {x: 0, y: 74}
|
|
||||||
m_Pivot: {x: 0, y: 1}
|
|
||||||
--- !u!114 &349630809
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 349630807}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Padding:
|
|
||||||
m_Left: 42
|
|
||||||
m_Right: 30
|
|
||||||
m_Top: -10
|
|
||||||
m_Bottom: 0
|
|
||||||
m_ChildAlignment: 0
|
|
||||||
m_Spacing: 54
|
|
||||||
m_ChildForceExpandWidth: 1
|
|
||||||
m_ChildForceExpandHeight: 1
|
|
||||||
m_ChildControlWidth: 1
|
|
||||||
m_ChildControlHeight: 0
|
|
||||||
m_ChildScaleWidth: 0
|
|
||||||
m_ChildScaleHeight: 0
|
|
||||||
--- !u!114 &349630810
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 349630807}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_HorizontalFit: 2
|
|
||||||
m_VerticalFit: 0
|
|
||||||
--- !u!114 &349630811
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 349630807}
|
|
||||||
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: 0
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 04bf5df3d5854e646a010dcc268e68a4, type: 3}
|
|
||||||
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 &349630812
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 349630807}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!4 &371589523 stripped
|
--- !u!4 &371589523 stripped
|
||||||
Transform:
|
Transform:
|
||||||
m_CorrespondingSourceObject: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c,
|
m_CorrespondingSourceObject: {fileID: 8524901521850801685, guid: e642499b3643dab4ba05b02e8c6bde1c,
|
||||||
|
|
@ -1690,6 +1319,7 @@ MonoBehaviour:
|
||||||
type: 3}
|
type: 3}
|
||||||
harvestInsertPosition: {fileID: 895001959}
|
harvestInsertPosition: {fileID: 895001959}
|
||||||
cornHarvester: {fileID: 282523124}
|
cornHarvester: {fileID: 282523124}
|
||||||
|
counterView: {fileID: 1507187603938887411}
|
||||||
plantLines:
|
plantLines:
|
||||||
- {fileID: 1656378502}
|
- {fileID: 1656378502}
|
||||||
- {fileID: 1192216301}
|
- {fileID: 1192216301}
|
||||||
|
|
@ -2230,80 +1860,6 @@ Transform:
|
||||||
m_Father: {fileID: 1501215306}
|
m_Father: {fileID: 1501215306}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &943356348
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 943356349}
|
|
||||||
- component: {fileID: 943356351}
|
|
||||||
- component: {fileID: 943356350}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image_corn
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &943356349
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 943356348}
|
|
||||||
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_Children: []
|
|
||||||
m_Father: {fileID: 1167044235}
|
|
||||||
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_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 86, y: 92}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &943356350
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 943356348}
|
|
||||||
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: 0
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 40c2a554423b4db41b31e40d87597443, type: 3}
|
|
||||||
m_Type: 0
|
|
||||||
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 &943356351
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 943356348}
|
|
||||||
m_CullTransparentMesh: 0
|
|
||||||
--- !u!1 &970886835
|
--- !u!1 &970886835
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -2803,62 +2359,6 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1133743351}
|
m_GameObject: {fileID: 1133743351}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
--- !u!1 &1167044234
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1167044235}
|
|
||||||
- component: {fileID: 1167044236}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Icon_corn
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1167044235
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1167044234}
|
|
||||||
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_Children:
|
|
||||||
- {fileID: 943356349}
|
|
||||||
m_Father: {fileID: 349630808}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 0, y: 92}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!95 &1167044236
|
|
||||||
Animator:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1167044234}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Avatar: {fileID: 0}
|
|
||||||
m_Controller: {fileID: 9100000, guid: b58e166a9b3c4eb4abf8809d6c518dc3, type: 2}
|
|
||||||
m_CullingMode: 0
|
|
||||||
m_UpdateMode: 0
|
|
||||||
m_ApplyRootMotion: 0
|
|
||||||
m_LinearVelocityBlending: 0
|
|
||||||
m_WarningMessage:
|
|
||||||
m_HasTransformHierarchy: 1
|
|
||||||
m_AllowConstantClipSamplingOptimization: 1
|
|
||||||
m_KeepAnimatorControllerStateOnDisable: 0
|
|
||||||
--- !u!114 &1192216301 stripped
|
--- !u!114 &1192216301 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 3767471200807653374, guid: 5e326851a49dc4fd9b51d54fb58f4e02,
|
m_CorrespondingSourceObject: {fileID: 3767471200807653374, guid: 5e326851a49dc4fd9b51d54fb58f4e02,
|
||||||
|
|
@ -3789,8 +3289,7 @@ Transform:
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: -4.88, z: 0}
|
m_LocalPosition: {x: 0, y: -4.88, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children: []
|
||||||
- {fileID: 242576839}
|
|
||||||
m_Father: {fileID: 282523123}
|
m_Father: {fileID: 282523123}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|
@ -3870,6 +3369,182 @@ BoxCollider2D:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 8.225426, y: 1.4617157}
|
m_Size: {x: 8.225426, y: 1.4617157}
|
||||||
m_EdgeRadius: 0
|
m_EdgeRadius: 0
|
||||||
|
--- !u!1001 &1507187603938887410
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 387414334}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 1507187602806663289, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187602806663289, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187602806663289, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187602806663289, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703909, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: StockCorn
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Pivot.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Pivot.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 7
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 74
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 25.999992
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: -141.79994
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604136703914, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604180242768, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604180242768, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604180242768, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604180242768, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1507187604180242768, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 21599f8e6d1104a07b0b14b49f8c1429, type: 3}
|
||||||
|
--- !u!114 &1507187603938887411 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7502336535358982107, guid: 21599f8e6d1104a07b0b14b49f8c1429,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 1507187603938887410}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5679af969476421ebe68e352455c525f, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1001 &3833948995124101854
|
--- !u!1001 &3833948995124101854
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@ public class Basket : MonoBehaviour
|
||||||
{
|
{
|
||||||
private void OnTriggerExit2D(Collider2D other)
|
private void OnTriggerExit2D(Collider2D other)
|
||||||
{
|
{
|
||||||
Destroy(other.gameObject, 2f);
|
other.enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ public class CornField : MonoBehaviour
|
||||||
[SerializeField] private GameObject harvestPrefab;
|
[SerializeField] private GameObject harvestPrefab;
|
||||||
[SerializeField] private Transform harvestInsertPosition;
|
[SerializeField] private Transform harvestInsertPosition;
|
||||||
[SerializeField] private CornHarvester cornHarvester;
|
[SerializeField] private CornHarvester cornHarvester;
|
||||||
|
[SerializeField] private HarvestedCounterView counterView;
|
||||||
[Space]
|
[Space]
|
||||||
[SerializeField] private List<PlantLine> plantLines = new List<PlantLine>();
|
[SerializeField] private List<PlantLine> plantLines = new List<PlantLine>();
|
||||||
private readonly List<PlantLine> availableLines = new List<PlantLine>();
|
private readonly List<PlantLine> availableLines = new List<PlantLine>();
|
||||||
|
|
@ -28,20 +29,25 @@ public class CornField : MonoBehaviour
|
||||||
private static readonly int minPeriod = 45;
|
private static readonly int minPeriod = 45;
|
||||||
private static readonly int harvestedFrameInterval = 3;
|
private static readonly int harvestedFrameInterval = 3;
|
||||||
private static readonly float harvestedDistance = .6f;
|
private static readonly float harvestedDistance = .6f;
|
||||||
|
private static readonly int animationLimit = 100;
|
||||||
|
private static readonly float countThrottle = .6f;
|
||||||
|
|
||||||
private readonly CompositeDisposable compositeDisposable = new CompositeDisposable();
|
private readonly CompositeDisposable compositeDisposable = new CompositeDisposable();
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
compositeDisposable.AddTo(this);
|
compositeDisposable.AddTo(this);
|
||||||
|
#if UNITY_EDITOR
|
||||||
this.UpdateAsObservable()
|
this.UpdateAsObservable()
|
||||||
.Where(_ => Input.GetKeyDown(KeyCode.R))
|
.Where(_ => Input.GetKeyDown(KeyCode.R))
|
||||||
.Take(1)
|
.Take(1)
|
||||||
.Subscribe(_ => TransitionManager.Instance.LoadScene(GameScenes.CornField)).AddTo(this);
|
.Subscribe(_ => TransitionManager.Instance.LoadScene(GameScenes.CornField)).AddTo(this);
|
||||||
|
#endif
|
||||||
|
|
||||||
// データ
|
// データ
|
||||||
var gameData = GameDataManager.GameData;
|
var gameData = GameDataManager.GameData;
|
||||||
CoinManager.Instance.ChangeCoin(gameData.coin);
|
CoinManager.Instance.ChangeCoin(gameData.coin);
|
||||||
|
counterView.Initialize(gameData.cornSeed);
|
||||||
SetData();
|
SetData();
|
||||||
|
|
||||||
// 畑リセット
|
// 畑リセット
|
||||||
|
|
@ -66,6 +72,52 @@ public class CornField : MonoBehaviour
|
||||||
}
|
}
|
||||||
GameDataManager.SaveGameData();
|
GameDataManager.SaveGameData();
|
||||||
|
|
||||||
|
// 収穫カウンター
|
||||||
|
var currentHarvestedCount = 0;
|
||||||
|
cornHarvester.FinishHarvested
|
||||||
|
.Scan((list, newList) => list.Concat(newList).ToList())
|
||||||
|
.Throttle(TimeSpan.FromSeconds(countThrottle))
|
||||||
|
.Take(1)
|
||||||
|
.RepeatUntilDestroy(this)
|
||||||
|
.Subscribe(x =>
|
||||||
|
{
|
||||||
|
|
||||||
|
var count = currentHarvestedCount;
|
||||||
|
// カゴ外のやつ分ける
|
||||||
|
var destroyList = x.Where(c => c.enabled == false).ToList();
|
||||||
|
var stayList = x.Except(destroyList).ToList();
|
||||||
|
// 間引く
|
||||||
|
var animationList = stayList.RandomChoose(animationLimit);
|
||||||
|
// 間引かれた分は破棄
|
||||||
|
var culledList = stayList.Except(animationList).ToList();
|
||||||
|
var culledCount = 1;
|
||||||
|
var divisor = Mathf.CeilToInt((float)culledList.Count / animationLimit);
|
||||||
|
culledList.ForEach(c => Destroy(c.gameObject, .01f * Mathf.FloorToInt((float)culledCount++ / divisor)));
|
||||||
|
destroyList.ForEach(c => Destroy(c.gameObject, 2f));
|
||||||
|
var j = 0;
|
||||||
|
animationList.ForEach(harvested =>
|
||||||
|
{
|
||||||
|
this.CallWaitForSeconds(.01f * j, () =>
|
||||||
|
{
|
||||||
|
harvested.enabled = false;
|
||||||
|
var beginPos = harvested.transform.position;
|
||||||
|
this.CallLerp(.3f, f =>
|
||||||
|
{
|
||||||
|
harvested.transform.position = Vector2.Lerp(beginPos, counterView.transform.position, f.EaseInQuadratic());
|
||||||
|
}, () =>
|
||||||
|
{
|
||||||
|
// カウンター到着でDestroy
|
||||||
|
Destroy(harvested.gameObject);
|
||||||
|
counterView.PlayEffect();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
j++;
|
||||||
|
});
|
||||||
|
this.CallWaitForSeconds(.01f * j + .3f, () =>
|
||||||
|
{
|
||||||
|
counterView.SetHarvestedCount(count);
|
||||||
|
});
|
||||||
|
}).AddTo(this);
|
||||||
// 株設定
|
// 株設定
|
||||||
foreach (var line in availableLines)
|
foreach (var line in availableLines)
|
||||||
{
|
{
|
||||||
|
|
@ -90,6 +142,7 @@ public class CornField : MonoBehaviour
|
||||||
var harvestCount = GetHarvestCount(lineData.Seedlings[index].Level);
|
var harvestCount = GetHarvestCount(lineData.Seedlings[index].Level);
|
||||||
var harvestedCorn = GetHarvestedCornCount(gameData.MachineLevel);
|
var harvestedCorn = GetHarvestedCornCount(gameData.MachineLevel);
|
||||||
gameData.cornSeed += harvestedCorn * harvestCount;
|
gameData.cornSeed += harvestedCorn * harvestCount;
|
||||||
|
currentHarvestedCount += harvestedCorn * harvestCount;
|
||||||
var seedlingTransform = seedling.transform;
|
var seedlingTransform = seedling.transform;
|
||||||
for (int j = 0; j < harvestCount; j++)
|
for (int j = 0; j < harvestCount; j++)
|
||||||
{
|
{
|
||||||
|
|
@ -102,9 +155,9 @@ public class CornField : MonoBehaviour
|
||||||
this.CallWaitForFrame(harvestedFrameInterval * j, () =>
|
this.CallWaitForFrame(harvestedFrameInterval * j, () =>
|
||||||
{
|
{
|
||||||
var harvestAnimation = Instantiate(harvestPrefab, pos, Quaternion.identity, seedlingTransform);
|
var harvestAnimation = Instantiate(harvestPrefab, pos, Quaternion.identity, seedlingTransform);
|
||||||
|
var beginPos = harvestAnimation.transform.position;
|
||||||
this.CallWaitForSeconds(.5f, () =>
|
this.CallWaitForSeconds(.5f, () =>
|
||||||
{
|
{
|
||||||
var beginPos = harvestAnimation.transform.position;
|
|
||||||
this.CallLerp(.4f, f =>
|
this.CallLerp(.4f, f =>
|
||||||
{
|
{
|
||||||
harvestAnimation.transform.position = Vector3.Lerp(beginPos, harvestInsertPosition.position, f.EaseInQuadratic());
|
harvestAnimation.transform.position = Vector3.Lerp(beginPos, harvestInsertPosition.position, f.EaseInQuadratic());
|
||||||
|
|
@ -158,11 +211,13 @@ public class CornField : MonoBehaviour
|
||||||
{
|
{
|
||||||
var gameData = GameDataManager.GameData;
|
var gameData = GameDataManager.GameData;
|
||||||
// 解放済みの畑
|
// 解放済みの畑
|
||||||
if (gameData.PlantLines == null || gameData.PlantLines.Count == 0)
|
// if (gameData.PlantLines == null || gameData.PlantLines.Count == 0)
|
||||||
{
|
{
|
||||||
gameData.PlantLines = new List<PlantLineData>
|
gameData.PlantLines = new List<PlantLineData>
|
||||||
{
|
{
|
||||||
|
new PlantLineData(PlantLineType.Top, CornFieldRank.Rank3),
|
||||||
new PlantLineData(PlantLineType.Center, CornFieldRank.Rank1),
|
new PlantLineData(PlantLineType.Center, CornFieldRank.Rank1),
|
||||||
|
new PlantLineData(PlantLineType.Bottom, CornFieldRank.Rank2),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (gameData.SeedlingDataList == null || gameData.SeedlingDataList.Count == 0)
|
if (gameData.SeedlingDataList == null || gameData.SeedlingDataList.Count == 0)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
|
|
@ -8,43 +9,39 @@ using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class CornHarvester : MonoBehaviour
|
public class CornHarvester : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private TextMeshPro cornCounter;
|
[SerializeField] private Transform harvestedSpawnTransform;
|
||||||
[SerializeField] private GameObject harvestedPrefab;
|
[SerializeField] private GameObject harvestedPrefab;
|
||||||
[SerializeField] private float thrust = 100f;
|
[SerializeField] private float thrust = 100f;
|
||||||
private float duration = .5f;
|
|
||||||
private int maxCorn = 100; // 収穫演出で出るコーンの数を制限
|
private int maxCorn = 100; // 収穫演出で出るコーンの数を制限
|
||||||
private string counterFormat = "{0}";
|
|
||||||
private Coroutine animationCoroutine;
|
|
||||||
|
|
||||||
private readonly ReactiveProperty<int> count = new ReactiveProperty<int>(0);
|
private readonly ReactiveProperty<int> count = new ReactiveProperty<int>(0);
|
||||||
|
private readonly Subject<List<Collider2D>> finishHarvested = new Subject<List<Collider2D>>();
|
||||||
|
public Subject<List<Collider2D>> FinishHarvested => finishHarvested;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
finishHarvested.AddTo(this);
|
||||||
count.AddTo(this);
|
count.AddTo(this);
|
||||||
cornCounter.text = "0";
|
count.BatchFrame()
|
||||||
count
|
|
||||||
.BatchFrame()
|
|
||||||
.Select(x => x.Last())
|
.Select(x => x.Last())
|
||||||
.Pairwise()
|
.Pairwise()
|
||||||
.Subscribe(x =>
|
.Subscribe(x =>
|
||||||
{
|
{
|
||||||
this.SafeStopCoroutine(animationCoroutine);
|
StartCoroutine(Harvested(Mathf.Min(maxCorn, x.Current - x.Previous)));
|
||||||
animationCoroutine = this.CallLerpSmooth(duration, lerp => {
|
}).AddTo(this);
|
||||||
cornCounter.text = string.Format(counterFormat, (int)Mathf.Lerp(x.Previous, x.Current, lerp));
|
|
||||||
});
|
|
||||||
|
|
||||||
StartCoroutine(Harvested(Mathf.Min(maxCorn, x.Current - x.Previous)));
|
|
||||||
}).AddTo(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator Harvested(int cnt)
|
private IEnumerator Harvested(int cnt)
|
||||||
{
|
{
|
||||||
|
var finishedList = new List<Collider2D>();
|
||||||
for (int i = 0; i < cnt; i++)
|
for (int i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
var corn = Instantiate(harvestedPrefab, cornCounter.transform.position, Quaternion.identity);
|
var corn = Instantiate(harvestedPrefab, harvestedSpawnTransform.position, Quaternion.identity);
|
||||||
corn.GetComponent<Rigidbody2D>().AddForce(new Vector2(Random.Range(-0.3f, 0.3f), -1).normalized * thrust, ForceMode2D.Impulse);
|
corn.GetComponent<Rigidbody2D>().AddForce(new Vector2(Random.Range(-0.3f, 0.3f), -1).normalized * thrust, ForceMode2D.Impulse);
|
||||||
|
finishedList.Add(corn.GetComponent<Collider2D>());
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
finishHarvested.OnNext(finishedList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddCount(int value)
|
public void AddCount(int value)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
using UniRx;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class HarvestedCounterView : MonoBehaviour
|
||||||
|
{
|
||||||
|
private static readonly float triggerThrottle = .1f;
|
||||||
|
private static readonly int Add = Animator.StringToHash("Add");
|
||||||
|
[SerializeField] private Animator counterAnimator;
|
||||||
|
[SerializeField] private TextWithCountUpInt counter;
|
||||||
|
private static readonly string harvestedCountFormat = "+{0}";
|
||||||
|
private static readonly string hasCountFormat = "{0}";
|
||||||
|
private string hasCountText;
|
||||||
|
private static readonly float duration = .5f;
|
||||||
|
private readonly Subject<Unit> playEffectObserve = new Subject<Unit>();
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
playEffectObserve.AddTo(this);
|
||||||
|
playEffectObserve
|
||||||
|
.ThrottleFirst(TimeSpan.FromSeconds(triggerThrottle))
|
||||||
|
.Subscribe(_ =>
|
||||||
|
{
|
||||||
|
counterAnimator.SetTrigger(Add);
|
||||||
|
}).AddTo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialize(int count)
|
||||||
|
{
|
||||||
|
hasCountText = string.Format(hasCountFormat, count.ToString());
|
||||||
|
counter.ChangeValue(hasCountText, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetHarvestedCount(int count)
|
||||||
|
{
|
||||||
|
counter.CountUpAnimation($"{hasCountText}{harvestedCountFormat}", count, duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayEffect()
|
||||||
|
{
|
||||||
|
playEffectObserve.OnNext(default);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5679af969476421ebe68e352455c525f
|
||||||
|
timeCreated: 1631792655
|
||||||
Loading…
Reference in New Issue