Compare commits

...

2 Commits

Author SHA1 Message Date
yulong 5dd955ec30 Merge branch 'master' of http://172.16.1.12/yulong/NewN_UAVPlane 2023-10-23 09:36:36 +08:00
yulong b04c7218d9 加了日历 2023-10-23 09:35:58 +08:00
45 changed files with 6376 additions and 3662 deletions

8
Assets/3rdParty/ZCalendar.meta vendored Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2b79cb8acd7af41419c8fa2aaa49250d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/3rdParty/ZCalendar/Image.meta vendored Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7ca395aa862c9604496e61bd2b5e3c85
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/3rdParty/ZCalendar/Image/left.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: fd6358fcbee733b44b15bee48ff5da25
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 1
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 512
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 1
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 564149d3def55524bb228278c2a8ccb4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,514 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4855692544049522536
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4422868810081672178}
- component: {fileID: 3791486597156192686}
- component: {fileID: 6854959998623053467}
- component: {fileID: 1035151178387485448}
m_Layer: 5
m_Name: IsOnImage
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &4422868810081672178
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4855692544049522536}
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: 8511059428512709373}
m_RootOrder: 1
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 &3791486597156192686
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4855692544049522536}
m_CullTransparentMesh: 0
--- !u!114 &6854959998623053467
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4855692544049522536}
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: 0.16019939, g: 0.754717, b: 0.60608757, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
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!114 &1035151178387485448
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4855692544049522536}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &5826690893173768726
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2055977960934777649}
- component: {fileID: 8559282517749591150}
- component: {fileID: 3872258193302724776}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2055977960934777649
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5826690893173768726}
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: 8511059428512709373}
m_RootOrder: 2
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: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8559282517749591150
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5826690893173768726}
m_CullTransparentMesh: 0
--- !u!114 &3872258193302724776
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5826690893173768726}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 1
--- !u!1 &7414480571885003036
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3228297675192425485}
- component: {fileID: 6127502410886167558}
- component: {fileID: 1444944916867235591}
m_Layer: 5
m_Name: Lunar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &3228297675192425485
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7414480571885003036}
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: 8511059428512709373}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 50, y: -62}
m_SizeDelta: {x: 27, y: 16}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &6127502410886167558
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7414480571885003036}
m_CullTransparentMesh: 0
--- !u!114 &1444944916867235591
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7414480571885003036}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 12
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text:
--- !u!1 &8346910064367883534
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8511059428512709373}
- component: {fileID: 1258009940849303471}
- component: {fileID: 7335958525366379957}
- component: {fileID: 5034161459917478037}
- component: {fileID: -6822051776532858958}
- component: {fileID: 7056650036416418544}
m_Layer: 5
m_Name: ZCalendarDayItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8511059428512709373
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8346910064367883534}
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: 5113020995767453699}
- {fileID: 4422868810081672178}
- {fileID: 2055977960934777649}
- {fileID: 3228297675192425485}
m_Father: {fileID: 0}
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: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1258009940849303471
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8346910064367883534}
m_CullTransparentMesh: 0
--- !u!114 &7335958525366379957
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8346910064367883534}
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: 0.9579922, g: 0.959044, b: 0.9811321, a: 0}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 8905299fb524a4e45912e333c559f933, 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!114 &5034161459917478037
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8346910064367883534}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
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: 7335958525366379957}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &-6822051776532858958
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8346910064367883534}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 792356d2f5ab2e6448c2c8722ffec197, type: 3}
m_Name:
m_EditorClassIdentifier:
imgBk: {fileID: 4855692544049522536}
rangeBk: {fileID: 8447146625433974230}
txt: {fileID: 3872258193302724776}
btn: {fileID: 5034161459917478037}
lunarTxt: {fileID: 1444944916867235591}
--- !u!114 &7056650036416418544
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8346910064367883534}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 5
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
--- !u!1 &8447146625433974230
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5113020995767453699}
- component: {fileID: 5949438878825097122}
- component: {fileID: 7463482845090633659}
- component: {fileID: 8045494078297773533}
m_Layer: 5
m_Name: RangeImageBak
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5113020995767453699
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8447146625433974230}
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: 8511059428512709373}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -4, y: -4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5949438878825097122
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8447146625433974230}
m_CullTransparentMesh: 0
--- !u!114 &7463482845090633659
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8447146625433974230}
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: 0.16078429, g: 0.6562998, b: 0.7529412, a: 0.22745098}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
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!114 &8045494078297773533
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8447146625433974230}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b05d30992a88f744c80c4c6cf457300e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 22bc9feab5f32e34588ce2ac0e376f34
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e8a45508a4e7dbf42a687be4cb7968cb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,149 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ZTools
{
[RequireComponent(typeof(ZCalendarModel))]
public class ZCalendar : MonoBehaviour
{
/// <summary>
/// 数据更新时,可获取到每一个日期,并对其进行操作
/// </summary>
public event Action<ZCalendarDayItem> UpdateDateEvent;
/// <summary>
/// 可以获取到点击的某一天
/// </summary>
public event Action<ZCalendarDayItem> ChoiceDayEvent;
/// <summary>
/// 选择区间时间事件
/// </summary>
public event Action<ZCalendarDayItem, ZCalendarDayItem> RangeTimeEvent;
/// <summary>
/// 日历加载结束
/// </summary>
public event Action CompleteEvent;
/// <summary>
/// 获取当前选中的天对象
/// </summary>
public ZCalendarDayItem CrtTime { get; set; }
/// <summary>
/// model
/// </summary>
private ZCalendarModel zCalendarModel;
/// <summary>
/// controller
/// </summary>
private ZCalendarController zCalendarController;
/// <summary>
/// 入口
/// </summary>
private void Start()
{
zCalendarModel = this.GetComponent<ZCalendarModel>();
zCalendarController = new ZCalendarController()
{
zCalendar = this,
zCalendarModel = zCalendarModel,
pos = this.transform.localPosition
};
zCalendarController.Init();
// 开启时自动初始化
if (zCalendarModel.awake2Init)
{
Init();
}
}
/// <summary>
/// 按照现在时间初始化
/// </summary>
public void Init()
{
zCalendarController.InitDate(DateTime.Now);
}
/// <summary>
/// 按照DateTime格式初始化日历
/// </summary>
public void Init(DateTime dateTime)
{
zCalendarController.InitDate(dateTime);
}
/// <summary>
/// 按照YYYY-MM-DD格式初始化日历
/// </summary>
public void Init(string dateTime)
{
string[] dateTimes = dateTime.Split('-');
zCalendarController.InitDate(new DateTime(int.Parse(dateTimes[0]), int.Parse(dateTimes[1]), int.Parse(dateTimes[2])));
}
/// <summary>
/// 显示弹窗
/// </summary>
public void Show()
{
zCalendarController.Show();
}
/// <summary>
/// 隐藏弹窗
/// </summary>
public void Hide()
{
Debug.Log("调用了");
zCalendarController.Hide();
}
/// <summary>
/// 切换时间
/// </summary>
/// <param name="obj"></param>
[Obsolete("事件触发器请使用UpdateDateEvent获取切换月份时加载的时间对象")]
public void UpdateDate(ZCalendarDayItem obj)
{
if (null != UpdateDateEvent)
{
UpdateDateEvent.Invoke(obj);
}
}
/// <summary>
/// 日期点击
/// </summary>
[Obsolete("事件触发器请使用ChoiceDayEvent获取当前选择的时间")]
public void DayClick(ZCalendarDayItem dayItem)
{
if (null != ChoiceDayEvent)
{
ChoiceDayEvent.Invoke(dayItem);
}
CrtTime = dayItem;
}
/// <summary>
/// 加载结束
/// </summary>
[Obsolete("事件触发器请使用CompleteEvent获取日历加载完成事件")]
public void DateComplete()
{
if (null != CompleteEvent)
{
CompleteEvent.Invoke();
}
}
/// <summary>
/// 区间日期选择
/// </summary>
/// <param name="firstDay"></param>
/// <param name="secondDay"></param>
[Obsolete("事件触发器请使用RangeTimeEvent获取区间时间")]
public void RangeCalendar(ZCalendarDayItem firstDay, ZCalendarDayItem secondDay )
{
if (null != RangeTimeEvent)
{
RangeTimeEvent.Invoke(firstDay, secondDay);
}
}
private void OnDestroy()
{
zCalendarController = null;
GC.Collect();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 84ab4cb62f6e612478246a8e7769365b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,315 @@
/*
* Created by JacobKay - 2022.08.24
*/
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ZTools
{
public class ZCalendarController
{
public int Year { set; get; }
public int Month { set; get; }
public int Day { set; get; }
/// <summary>
/// 当前是否在区间选择状态
/// </summary>
private bool isInRange = false;
public bool IsInRange { get { return isInRange; } }
private string week;
private DateTime now;
private int days;
/// <summary>
/// 当前选中的位置
/// </summary>
public Vector3 pos;
private int lastMonthDays;
private int nextMonthDays;
public ZCalendar zCalendar;
public ZCalendarModel zCalendarModel;
public DateTime nowTime = DateTime.Today;
private int lastMonthEmptyDays;
bool isShow = true;
public bool isInit = false;
/// <summary>
/// 保存文字颜色
/// </summary>
public Color greyColor;
public System.Globalization.ChineseLunisolarCalendar cncld = new System.Globalization.ChineseLunisolarCalendar();
/// <summary>
/// 农历月
/// </summary>
public string[] lunarMonths = { "正", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "腊" };
public string[] lunarDaysT = { "初", "十", "廿", "三" };
/// <summary>
/// 农历日
/// </summary>
public string[] lunarDays = { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十" };
DateTime monthFirstDay;
/// <summary>
/// 初始化
/// </summary>
/// <param name="date"></param>
public void Init()
{
zCalendarModel.zCalendarController = this;
zCalendarModel.Init();
if (zCalendarModel.isStaticCalendar) return;
// 动态日历,可关闭
if (zCalendarModel.isPopupCalendar)
{
zCalendarModel.btnClose.onClick.AddListener(() =>
{
Hide();
});
}
zCalendarModel.btnLastYear.onClick.AddListener(LastYear);
zCalendarModel.btnNextYear.onClick.AddListener(NextYear);
zCalendarModel.btnLastMonth.onClick.AddListener(LastMonth);
zCalendarModel.btnNextMonth.onClick.AddListener(NextMonth);
}
/// <summary>
/// 按照规定时间初始化日历
/// </summary>
public void InitDate(DateTime date)
{
now = date;
DestroyAllChildren();
UpdateYear();
UpdateMonth();
UpdateDays();
UpdateData();
if (!isInit)
{
isInit = true;
zCalendar.DateComplete();
}
}
void LastYear()
{
now = now.AddYears(-1);
DestroyAllChildren();
UpdateYear();
UpdateMonth();
UpdateDays();
UpdateData();
}
void NextYear()
{
now = now.AddYears(1);
DestroyAllChildren();
UpdateYear();
UpdateMonth();
UpdateDays();
UpdateData();
}
void LastMonth()
{
now = now.AddMonths(-1);
DestroyAllChildren();
UpdateYear();
UpdateMonth();
UpdateDays();
UpdateData();
}
void NextMonth()
{
now = now.AddMonths(1);
DestroyAllChildren();
UpdateYear();
UpdateMonth();
UpdateDays();
UpdateData();
}
List<ZCalendarDayItem> dayItemList = new List<ZCalendarDayItem>();
/// <summary>
/// 如果是区间日历,选择时间时,需要判断当前日期选择状态
/// </summary>
/// <returns></returns>
public void ChangeRangeType(ZCalendarDayItem dayItem)
{
isInRange = !isInRange;
if (dayItemList.Count >= 2)
{
dayItemList.Clear();
}
if (dayItemList.Count == 0)
{
dayItemList.Add(dayItem);
}
else
{
int compare = DateTime.Compare(dayItemList[0].dateTime, dayItem.dateTime);
if (compare <= 0)
{
dayItemList.Add(dayItem);
}
else
{
dayItemList.Insert(0, dayItem);
}
}
if (!isInRange)
{
zCalendar.RangeCalendar(dayItemList[0], dayItemList[1]);
}
}
/// <summary>
/// 显示日历
/// </summary>
public void Show()
{
if (pos != null && !isShow)
{
Debug.Log("劲来了");
isShow = true;
zCalendar.transform.localPosition = pos;
}
}
/// <summary>
/// 隐藏日历
/// </summary>
public void Hide()
{
if (isShow && !isInRange)
{
//isShow = false;
Debug.Log("hide");
zCalendar.transform.gameObject.SetActive(false);
//zCalendar.transform.localPosition = new Vector3(pos.x, 5000, pos.z);
}
}
/// <summary>
/// 查询年数据
/// </summary>
void UpdateYear()
{
Year = now.Year;
}
/// <summary>
/// 查询月数据
/// </summary>
void UpdateMonth()
{
Month = int.Parse(now.Month.ToString("00"));
}
/// <summary>
/// 返回要查询那天
/// </summary>
/// <returns></returns>
void UpdateDays()
{
days = DateTime.DaysInMonth(Year, Month);
if (Day == 0)
{
Day = now.Day;
}
else if (Day > days)
{
Day = days;
}
}
/// <summary>
/// 更新显示月份
/// </summary>
void UpdateData()
{
zCalendarModel.SetTimeTxt(Year, Month);
FillLastMonth();
for (int i = 0; i < days; i++)
{
AddDayItem(monthFirstDay.AddDays(i));
}
FillNextMonth();
}
/// <summary>
/// 自动填充上个月内容
/// </summary>
void FillLastMonth()
{
monthFirstDay = new DateTime(Year, Month, 1);
lastMonthEmptyDays = GetLastMonthDays();
if (zCalendarModel.autoFillDate)
{
for (int i = lastMonthEmptyDays; i > 0; i--)
{
AddDayItem(monthFirstDay.AddDays(-i));
}
}
else
{
for (int i = 0; i < lastMonthEmptyDays; i++)
{
ZCalendarDayItem dayItem = zCalendarModel.Instantiate();
dayItem.zCalendarController = this;
dayItem.CloseClickAble();
}
}
}
/// <summary>
/// 添加下个月的时间
/// </summary>
void FillNextMonth()
{
int nextMonthDays = 42 - (lastMonthEmptyDays + days);
if (nextMonthDays != 0)
{
if (zCalendarModel.autoFillDate)
{
DateTime lastDay = monthFirstDay.AddDays(days);
for (int i = 0; i < nextMonthDays; i++)
{
AddDayItem(lastDay.AddDays(i));
}
}
}
}
/// <summary>
/// 添加日期对象
/// </summary>
void AddDayItem(DateTime dateTime)
{
ZCalendarDayItem dayItem = zCalendarModel.Instantiate();
dayItem.zCalendarController = this;
dayItem.Init(dateTime, nowTime);
zCalendar.UpdateDate(dayItem);
if (!isInRange && dayItemList.Count > 0)
{
dayItem.IsRangeDayItem(dayItemList[0], dayItemList[1]);
}
}
/// <summary>
/// 判断上一个月有几天
/// </summary>
/// <returns></returns>
int GetLastMonthDays()
{
string firstWeek = new DateTime(Year, Month, 1).DayOfWeek.ToString();
return (int)Enum.Parse(typeof(DayOfWeek), firstWeek);
}
/// <summary>
/// 删除所有内容
/// </summary>
void DestroyAllChildren()
{
List<Transform> lst = new List<Transform>();
int count = zCalendarModel.dayContent.childCount;
for (int i = 0; i < count; i++)
{
Transform child = zCalendarModel.dayContent.GetChild(i);
lst.Add(child);
}
for (int i = 0; i < lst.Count; i++)
{
MonoBehaviour.Destroy(lst[i].gameObject);
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ce278e6a9942cdd4592d32e5dca3ef96
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,285 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
using System.Text;
namespace ZTools
{
public class ZCalendarDayItem : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public GameObject imgBk;
public GameObject rangeBk;
public Text txt;
public Button btn;
public Text lunarTxt;
[HideInInspector]
public ZCalendarController zCalendarController;
private bool isCanClick = true;
public int Year { get; set; }
public int Month { get; set; }
public int Day { get; set; }
public DateTime dateTime;
private bool isOn = false;
public bool IsOn
{
set
{
if (isOn != value || isOn)
{
isOn = value;
imgBk?.SetActive(value);
if (value)
{
if (!zCalendarController.IsInRange)
{
zCalendarController.zCalendar.DayClick(this);
}
if (zCalendarController.zCalendarModel.rangeCalendar)
{
zCalendarController.ChangeRangeType(this);
}
if (zCalendarController.zCalendarModel.isPopupCalendar && zCalendarController.isInit)
{
zCalendarController.Hide();
}
}
}
}
get { return isOn; }
}
public bool IsOnWithOutEvent
{
set
{
if (isOn != value)
{
isOn = value;
imgBk?.SetActive(value);
}
}
}
private bool isRange;
public bool IsRange
{
set
{
if (isRange != value)
{
isRange = value;
rangeBk?.SetActive(value);
}
}
get { return isRange; }
}
Color greyColor;
/// <summary>
/// 初始化日期
/// </summary>
/// <param name="year">年</param>
/// <param name="month">月</param>
/// <param name="day">日</param>
/// <param name="nowTime"></param>
/// <param name="crtDay">当前天</param>
public void Init(DateTime dateTime, DateTime crtDay)
{
isRange = rangeBk.activeInHierarchy;
isOn = imgBk.activeInHierarchy;
IsOnWithOutEvent = false;
IsRange = false;
this.dateTime = dateTime;
this.Year = dateTime.Year;
this.Month = dateTime.Month;
this.Day = dateTime.Day;
txt.text = Day.ToString("00");
if (!zCalendarController.zCalendarModel.rangeCalendar)
{
IsOn = (DateTime.Compare(dateTime, crtDay) == 0);
}
else
{
zCalendarController.zCalendar.RangeTimeEvent += RangeTimeEvent;
}
isCanClick = !zCalendarController.zCalendarModel.isStaticCalendar;
greyColor = zCalendarController.greyColor.a == 0 ? new Color(txt.color.r, txt.color.g, txt.color.b, 0.1f) : zCalendarController.greyColor;
if (!zCalendarController.zCalendarModel.isStaticCalendar)
{
btn.onClick.AddListener(() =>
{
IsOn = true;
});
zCalendarController.zCalendar.ChoiceDayEvent += ChangeState;
}
if (!zCalendarController.zCalendarModel.isUnexpiredTimeCanClick)
IsUnexpiredTime(zCalendarController.nowTime, dateTime);
if (zCalendarController.zCalendarModel.autoFillDate)
{
IsCrtMonth(zCalendarController.Month);
}
if (zCalendarController.zCalendarModel.lunar)
{
lunarTxt.gameObject.SetActive(true);
SolarToLunar(dateTime);
}
}
/// <summary>
/// 关闭可点击权限
/// </summary>
public void CloseClickAble()
{
isRange = rangeBk.activeInHierarchy;
isOn = imgBk.activeInHierarchy;
IsOn = false;
txt.text = "";
enabled = false;
IsOnWithOutEvent = false;
IsRange = false;
}
/// <summary>
/// 判断是否在选择区间内的时间
/// </summary>
public void IsRangeDayItem(ZCalendarDayItem d1, ZCalendarDayItem d2)
{
RangeTimeEvent(d1, d2);
if (DateTime.Compare(d1.dateTime, dateTime) == 0 || DateTime.Compare(d2.dateTime, dateTime) == 0)
{
IsOnWithOutEvent = true;
}
}
/// <summary>
/// 判断当前是否在区域选择时间内
/// </summary>
/// <param name="d1"></param>
/// <param name="d2"></param>
void RangeTimeEvent(ZCalendarDayItem d1, ZCalendarDayItem d2)
{
if (DateTime.Compare(d1.dateTime, dateTime) < 0 && DateTime.Compare(d2.dateTime, dateTime) > 0)
{
IsRange = true;
}
}
/// <summary>
/// 改变当前状态
/// </summary>
void ChangeState(ZCalendarDayItem dayItem)
{
if (dayItem != this)
{
IsOn = false;
IsRange = false;
}
}
public void OnPointerEnter(PointerEventData eventData)
{
if (!isOn && isCanClick)
{
imgBk.SetActive(true);
}
}
public void OnPointerExit(PointerEventData eventData)
{
if (!isOn && isCanClick)
{
imgBk.SetActive(false);
}
}
/// <summary>
/// 判断是否超过了今天的时间
/// </summary>
void IsUnexpiredTime(DateTime time, DateTime crtTime)
{
int compNum = DateTime.Compare(time, crtTime);
if (compNum < 0)
{
btn.interactable = false;
isCanClick = false;
txt.color = greyColor;
lunarTxt.color = greyColor;
}
}
/// <summary>
/// 判断是否为本月日期
/// </summary>
void IsCrtMonth(int time)
{
if (time != Month)
{
btn.interactable = false;
isCanClick = false;
txt.color = greyColor;
lunarTxt.color = greyColor;
}
}
/// <summary>
/// 显示农历日期
/// </summary>
/// <param name="time"></param>
void SolarToLunar(DateTime dt)
{
int year = zCalendarController.cncld.GetYear(dt);
int flag = zCalendarController.cncld.GetLeapMonth(year);
int month = zCalendarController.cncld.GetMonth(dt);
if (flag > 0)
{
if (flag == month)
{
//闰月
month--;
}
else if (month > flag)
{
month--;
}
}
int day = zCalendarController.cncld.GetDayOfMonth(dt);
lunarTxt.text = (day == 1) ? GetLunarMonth(month) : GetLunarDay(day);
//Debug.Log($"{year}-{(month.ToString().Length == 1 ? "0" + month : month + "")}-{(day.ToString().Length == 1 ? "0" + day : day + "")}");
}
/// <summary>
/// 获取农历月
/// </summary>
/// <param name="month"></param>
/// <returns></returns>
string GetLunarMonth(int month)
{
if (month < 13 && month > 0)
{
return $"{zCalendarController.lunarMonths[month - 1]}月";
}
throw new ArgumentOutOfRangeException("无效的月份!");
}
/// <summary>
/// 获取农历年
/// </summary>
/// <param name="day"></param>
/// <returns></returns>
string GetLunarDay(int day)
{
if (day > 0 && day < 32)
{
if (day != 20 && day != 30)
{
return string.Concat(zCalendarController.lunarDaysT[(day - 1) / 10], zCalendarController.lunarDays[(day - 1) % 10]);
}
else
{
return string.Concat(zCalendarController.lunarDays[(day - 1) / 10], zCalendarController.lunarDaysT[1]);
}
}
throw new ArgumentOutOfRangeException("无效的日!");
}
private void OnDestroy()
{
if (!zCalendarController.zCalendarModel.isStaticCalendar)
{
zCalendarController.zCalendar.ChoiceDayEvent -= ChangeState;
}
zCalendarController.zCalendar.RangeTimeEvent -= RangeTimeEvent;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 792356d2f5ab2e6448c2c8722ffec197
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,76 @@
/*
* JacobKay --20220903
*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using ZTools;
/// <summary>
/// 使用示例
/// </summary>
public class ZCalendarDemo : MonoBehaviour
{
public ZCalendar zCalendar;
public Text day_txt;
// Start is called before the first frame update
void Start()
{
zCalendar.UpdateDateEvent += ZCalendar_UpdateDateEvent;
zCalendar.ChoiceDayEvent += ZCalendar_ChoiceDayEvent;
zCalendar.RangeTimeEvent += ZCalendar_RangeTimeEvent;
zCalendar.CompleteEvent += ZCalendar_CompleteEvent;
//zCalendar.Init();
//zCalendar.Init(System.DateTime.Now);
//zCalendar.Init("2022-02-02");
//zCalendar.Show();
//zCalendar.Hide();
}
/// <summary>
/// 加载结束
/// </summary>
private void ZCalendar_CompleteEvent()
{
Debug.Log("ZCalendar加载结束");
if (null != zCalendar.CrtTime)
{
Debug.Log($"当前时间{zCalendar.CrtTime.Day}");
}
}
/// <summary>
/// 区间时间
/// </summary>
/// <param name="arg1"></param>
/// <param name="arg2"></param>
private void ZCalendar_RangeTimeEvent(ZCalendarDayItem arg1, ZCalendarDayItem arg2)
{
Debug.Log($"选择的时间区间:{arg1.Day}到{arg2.Day}");
}
/// <summary>
/// 获取选择的日期
/// </summary>
/// <param name="obj"></param>
private void ZCalendar_ChoiceDayEvent(ZCalendarDayItem obj)
{
Debug.Log($"选择的日期:{obj.Day}");
day_txt.text = obj.Day.ToString();
}
/// <summary>
/// 切换月份时可拿到每一天的item对象
/// </summary>
/// <param name="obj"></param>
private void ZCalendar_UpdateDateEvent(ZCalendarDayItem obj)
{
Debug.Log($"加载日期:{obj.Day}");
}
private void OnDestroy()
{
zCalendar.UpdateDateEvent -= ZCalendar_UpdateDateEvent;
zCalendar.ChoiceDayEvent -= ZCalendar_ChoiceDayEvent;
zCalendar.RangeTimeEvent -= ZCalendar_RangeTimeEvent;
zCalendar.CompleteEvent -= ZCalendar_CompleteEvent;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 876c074316efe994daafc72f07231852
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,118 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace ZTools
{
public class ZCalendarModel : MonoBehaviour
{
[Header("根据当前时间自动初始化")]
public bool awake2Init = true;
[Header("自动补充前后月份的日期")]
public bool autoFillDate = true;
[Header("超过当前时间是否可以点击")]
public bool isUnexpiredTimeCanClick = true;
[Header("显示农历日期")]
public bool lunar = true;
[Header("如果为true本对象显示状态不能关闭可通过子集bak的显示状态控制默认状态")]
[Header("当前是否为弹窗日历")]
public bool isPopupCalendar = false;
[Header("当前是否为静态日历")]
public bool isStaticCalendar = false;
[Header("自动修改日期尺寸")]
public bool autoSetItemSize = true;
[Header("是否可以选择时间范围")]
public bool rangeCalendar = false;
[Header("--------------------------------------------------------------------")]
public GameObject bak;
public Button btnLastYear;
public Button btnNextYear;
public Button btnLastMonth;
public Button btnNextMonth;
public Text txtYear;
public Text txtMonth;
public Text year_txt;
public Text month_txt;
public Transform dayContent;
public ZCalendarDayItem dayItem;
[HideInInspector]
public Button btnClose;
[HideInInspector]
public ZCalendarController zCalendarController;
/// <summary>
/// 初始化
/// </summary>
public void Init()
{
if (!bak.activeInHierarchy)
{
bak.SetActive(true);
this.GetComponent<ZCalendar>().Hide();
}
if (autoSetItemSize)
{
SetItemSize();
}
if (isPopupCalendar)
{
AddCloseBtn();
}
if (isStaticCalendar)
{
btnLastYear.gameObject.SetActive(false);
btnNextYear.gameObject.SetActive(false);
btnLastMonth.gameObject.SetActive(false);
btnNextMonth.gameObject.SetActive(false);
}
}
/// <summary>
/// 生成一个日期对象
/// </summary>
/// <returns></returns>
public ZCalendarDayItem Instantiate()
{
return Instantiate(dayItem, dayContent);
}
/// <summary>
/// 根据日历尺寸,设置宽高
/// </summary>
public void SetItemSize()
{
Vector2 bakSize = this.GetComponent<RectTransform>().sizeDelta;
Vector2 dayContentSize = dayContent.GetComponent<RectTransform>().sizeDelta;
//Debug.Log(bakSize.x +":::"+ dayContentSize.y);
GridLayoutGroup layoutGroup = dayContent.GetComponent<GridLayoutGroup>();
float itemSizeWidth = (bakSize.x - layoutGroup.spacing.x * layoutGroup.constraintCount - layoutGroup.padding.left - layoutGroup.padding.right) / layoutGroup.constraintCount;
float itemSizeHeight = (bakSize.y - Mathf.Abs(dayContentSize.y) - layoutGroup.padding.top - layoutGroup.padding.bottom - layoutGroup.spacing.y * 6) / 6;
dayContent.GetComponent<GridLayoutGroup>().cellSize = new Vector2(itemSizeWidth, itemSizeHeight);
}
/// <summary>
/// 添加空白处可关闭功能
/// </summary>
public void AddCloseBtn()
{
GameObject btnCloseObj = new GameObject();
RectTransform btnCloseRect = btnCloseObj.AddComponent<RectTransform>();
btnCloseObj.transform.SetParent(transform);
btnCloseObj.transform.SetAsFirstSibling();
btnCloseRect.sizeDelta = new Vector2(Screen.width, Screen.height);
btnCloseObj.transform.position = Vector3.zero + new Vector3(Screen.width / 2, Screen.height / 2, 0);
btnCloseObj.AddComponent<Image>().color = new Color(0,0,0,0);
this.btnClose = btnCloseObj.AddComponent<Button>();
}
/// <summary>
/// 设置年月文字
/// </summary>
/// <param name="year"></param>
/// <param name="month"></param>
public void SetTimeTxt(int year, int month)
{
txtYear.text = year + "年";
txtMonth.text = month + "月";
year_txt.text=year.ToString();
month_txt.text=month.ToString();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1fb16e977f37821498035ac483038f7c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: f7b5715277e3f9748931a709f5004d9e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,155 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &980121012491608750
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 980121012491608751}
- component: {fileID: 980121012491608745}
- component: {fileID: 980121012491608744}
m_Layer: 5
m_Name: subject1_iamg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &980121012491608751
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980121012491608750}
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: 980121012532208149}
m_Father: {fileID: 0}
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: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &980121012491608745
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980121012491608750}
m_CullTransparentMesh: 0
--- !u!114 &980121012491608744
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980121012491608750}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 482f04ba412ba07498c6b0a6ae63288a, 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!1 &980121012532208148
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 980121012532208149}
- component: {fileID: 980121012532208151}
- component: {fileID: 980121012532208150}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &980121012532208149
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980121012532208148}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 980121012491608751}
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: -4.5, y: 0}
m_SizeDelta: {x: 641.532, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &980121012532208151
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980121012532208148}
m_CullTransparentMesh: 0
--- !u!114 &980121012532208150
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980121012532208148}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9811321, g: 0.9579922, b: 0.9579922, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 70
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 7
m_MaxSize: 70
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u79D1\u76EE\u8BAD\u7EC3\u4E00"

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 058efd28829d09a4bb37aeef15a98545
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,155 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3836114742686134950
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3836114742686134951}
- component: {fileID: 3836114742686134949}
- component: {fileID: 3836114742686134948}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3836114742686134951
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3836114742686134950}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 3836114743442984025}
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: -4.5, y: 0}
m_SizeDelta: {x: 641.532, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3836114742686134949
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3836114742686134950}
m_CullTransparentMesh: 0
--- !u!114 &3836114742686134948
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3836114742686134950}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9811321, g: 0.9579922, b: 0.9579922, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 70
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 7
m_MaxSize: 70
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u79D1\u76EE\u8BAD\u7EC3\u4E8C"
--- !u!1 &3836114743442984024
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3836114743442984025}
- component: {fileID: 3836114743442984023}
- component: {fileID: 3836114743442984022}
m_Layer: 5
m_Name: subject2_iamg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3836114743442984025
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3836114743442984024}
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: 3836114742686134951}
m_Father: {fileID: 0}
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: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3836114743442984023
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3836114743442984024}
m_CullTransparentMesh: 0
--- !u!114 &3836114743442984022
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3836114743442984024}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 482f04ba412ba07498c6b0a6ae63288a, 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

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c3208fa5f88094048a9fa319aced1c60
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,155 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6420339708239256422
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6420339708239256425}
- component: {fileID: 6420339708239256427}
- component: {fileID: 6420339708239256424}
m_Layer: 5
m_Name: subject3_iamg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6420339708239256425
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6420339708239256422}
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: 6420339709152609844}
m_Father: {fileID: 0}
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: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6420339708239256427
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6420339708239256422}
m_CullTransparentMesh: 0
--- !u!114 &6420339708239256424
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6420339708239256422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 482f04ba412ba07498c6b0a6ae63288a, 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!1 &6420339709152609845
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6420339709152609844}
- component: {fileID: 6420339709152609846}
- component: {fileID: 6420339709152609847}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6420339709152609844
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6420339709152609845}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 6420339708239256425}
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: -4.5, y: 0}
m_SizeDelta: {x: 641.532, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6420339709152609846
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6420339709152609845}
m_CullTransparentMesh: 0
--- !u!114 &6420339709152609847
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6420339709152609845}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9811321, g: 0.9579922, b: 0.9579922, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 70
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 7
m_MaxSize: 70
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u79D1\u76EE\u8BAD\u7EC3\u4E09"

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1b2dd495db93966488301f315dbb96c2
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e9fd16d800156b3438ab6250c6cb53d7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 189 B

View File

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 163 B

View File

@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Calendarbtn : MonoBehaviour
{
public Button calendar_btn;
public RectTransform calendar_panl;
public bool isp=true;
void Start()
{
calendar_btn.onClick.AddListener(() =>
{
if (isp==true)
{
calendar_panl.gameObject.SetActive(true);
}
});
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c1bfc2e54a1a6114d9ffaae024b197bb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,72 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Optionsbox : MonoBehaviour
{
public Button anniu;
public Image Image;
private GameObject game1;
private GameObject game2;
private GameObject game3;
public List<GameObject> games = new List<GameObject>();
public List<Image> buttons = new List<Image>();
public bool isp = true;
public bool isp2 = true;
public Transform weizhi;
private Sprite sprite1;
private Sprite sprite2;
void Start()
{
game1 = Resources.Load<GameObject>("UIPanel/subject1_iamg");
game2 = Resources.Load<GameObject>("UIPanel/subject2_iamg");
game3 = Resources.Load<GameObject>("UIPanel/subject3_iamg");
sprite1 = Resources.Load<Sprite>("sprite/三角形 绿");
sprite2 = Resources.Load<Sprite>("sprite/三角形白");
Debug.Log(sprite1);
games.Add(game1);
games.Add(game2);
games.Add(game3);
anniu.onClick.AddListener(() =>
{
if (isp == true)
{
Image.sprite = sprite1;
for (int i = 0; i < games.Count; i++)
{
Instantiate(games[i], weizhi);
}
for (int i = 0; i < 3; i++)
{
buttons.Add(GameObject.Find("Scroll_view_Drop").transform.GetChild(0).transform.GetChild(0).transform.GetChild(i).GetComponent<Image>());
// buttons.Add(transform.GetChild(3).transform.GetChild(0).transform.GetChild(0).transform.GetChild(i).GetComponent<Image>());
}
isp = false;
}
else
{
if (isp2 == true)
{
Debug.Log(21);
Image.sprite = sprite2;
for (int i = 0; i < buttons.Count; i++)
{
buttons[i].gameObject.SetActive(false);
}
isp2 = false;
}
else
{
Image.sprite=sprite1;
for (int i = 0; i < buttons.Count; i++)
{
buttons[i].gameObject.SetActive(true);
}
isp2 = true;
}
}
});
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 20cb9c61c55d3894fbd17f7d5239cc70
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.PlayerLoop;
using UnityEngine.UI;
public class Prompttext : MonoBehaviour
{
[SerializeField] Text tips_txt;
void Start()
{
}
void Update()
{
if (tips_txt.text.Length >= 1)
{
Invoke("Tipstxt", 1.5f);
}
}
void Tipstxt()
{
tips_txt.text = null;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f8b6aea47790d274ab095abecc25fa56
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TimeHM : MonoBehaviour
{
public Text H_txt;
public Text M_txt2;
void Start()
{
}
// Update is called once per frame
void Update()
{
H_txt.text = DateTime.Now.Hour.ToString();
M_txt2.text = DateTime.Now.Minute.ToString();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 02b6eda7913a5d048b1f08b3b5261ca7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -16,6 +16,7 @@ public class View_Panel2 : XUIPanel
public Button Fork_off_btn;//叉掉添加房间页面
public Button verify_btn;//添加房间确认按钮
public Button cancel_btno;//取消添加房间按钮
public Text tips_txt;//提示文本
public Image distribution_panl;//席位分配面板
public Button off_btn;//席位分配叉掉页面
public Button submit_btn;//席位分配提交按钮
@ -51,6 +52,8 @@ public class View_Panel2 : XUIPanel
room_input = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(3).GetComponent<InputField>();
scenario_btn =GameObject.Find("View_Panel2(Clone)").transform.GetChild(0).transform.GetChild(2).GetComponent<Button>();
verify_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(8).GetComponent<Button>();
cancel_btno = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(9).GetComponent<Button>();
tips_txt = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(10).GetComponent<Text>();
distribution_panl = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).GetComponent<Image>();
off_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(1).GetComponent<Button>();
submit_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(5).GetComponent<Button>();
@ -218,6 +221,10 @@ public class View_Panel2 : XUIPanel
rootlist.Add(room_input.text);
distribution_panl.gameObject.SetActive(true);
}
else
{
tips_txt.text = "请输入房间名称";
}
});
off_btn.onClick.AddListener(() =>
{
@ -234,6 +241,10 @@ public class View_Panel2 : XUIPanel
{
append_room_panl.gameObject.SetActive(false);
});
cancel_btno.onClick.AddListener(() =>
{
append_room_panl.gameObject.SetActive(false);
});
}
public void JiHUO()
{

View File

@ -18194,12 +18194,12 @@ Light:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 250950117}
m_Enabled: 0
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_Intensity: 0.001
m_Color: {r: 1, g: 0.99607843, b: 0.9843137, a: 1}
m_Intensity: 1.088
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
@ -27132,7 +27132,7 @@ Camera:
m_Enabled: 0
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.0041176477, g: 0.0041176477, b: 0.0041176477, a: 0.6}
m_BackGroundColor: {r: 0.39735296, g: 0.46529412, b: 0.52294123, a: 0.6}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
@ -53977,7 +53977,7 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.0041176477, g: 0.0041176477, b: 0.0041176477, a: 0.6}
m_BackGroundColor: {r: 0.39735296, g: 0.46529412, b: 0.52294123, a: 0.6}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
@ -55891,10 +55891,15 @@ PrefabInstance:
propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1864715518}
- target: {fileID: 2088255481430625457, guid: a573eabe79e49f740807bf8ae0ff45cc,
type: 3}
propertyPath: shihuo
value:
objectReference: {fileID: 2122668663}
- target: {fileID: 6623670425880737213, guid: a573eabe79e49f740807bf8ae0ff45cc,
type: 3}
propertyPath: m_Name
value: environment_configuration1
value: environment_configuration
objectReference: {fileID: 0}
- target: {fileID: 6623670425880737213, guid: a573eabe79e49f740807bf8ae0ff45cc,
type: 3}
@ -77980,7 +77985,7 @@ Light:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1452191771}
m_Enabled: 1
m_Enabled: 0
serializedVersion: 10
m_Type: 1
m_Shape: 0
@ -98788,16 +98793,16 @@ MonoBehaviour:
moonlightObject: {fileID: 639984703}
moonLightAmt: 0.919686
moonPhase: 0.54015696
ambientCol: {r: 0, g: 0, b: 0, a: 1}
colorSun: {r: 0, g: 0, b: 0, a: 1}
ambientCol: {r: 1, g: 1, b: 1, a: 1}
colorSun: {r: 1, g: 0.99607843, b: 0.9843137, a: 1}
colorMoon: {r: 0.4392157, g: 0.5921569, b: 0.69803923, a: 1}
colorSkyBase: {r: 0.00627451, g: 0.00627451, b: 0.00627451, a: 0.8}
colorSkyBaseLow: {r: 0.007843138, g: 0.007843138, b: 0.007843138, a: 1}
colorHorizon: {r: 0.12235295, g: 0.2964706, b: 0.36705884, a: 1.2}
colorSkyBase: {r: 0.6054902, g: 0.7090196, b: 0.7968628, a: 0.8}
colorSkyBaseLow: {r: 0.75686276, g: 0.88627446, b: 0.9960785, a: 1}
colorHorizon: {r: 0.68610847, g: 0.9356758, b: 1.1343884, a: 1.2}
colorHorizonLow: {r: 0.68610847, g: 0.9356758, b: 1.1343884, a: 1.2}
colorSkyAmbient: {r: 0, g: 0, b: 0, a: 1}
colorClouds: {r: 0, g: 0, b: 0, a: 1}
colorHighlightClouds: {r: 0, g: 0, b: 0, a: 1}
colorSkyAmbient: {r: 1, g: 1, b: 1, a: 1}
colorClouds: {r: 1, g: 1, b: 1, a: 1}
colorHighlightClouds: {r: 1, g: 0.94209427, b: 0.6867151, a: 1}
colorSkyboxGround: {r: 0.1102941, g: 0.08836951, b: 0.06487888, a: 1}
colorSkyboxMie: {r: 1, g: 1, b: 1, a: 1}
displayTime: '[ 10:30:00 AM] [ 3/6/1027 ad]'
@ -99135,7 +99140,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
randSeed: 14736953
randSeed: 451779875
isDoingTransition: 0
minimumHeight: 0
--- !u!114 &1820978574
@ -122689,6 +122694,12 @@ MonoBehaviour:
model: {fileID: 0}
huoPaoCtrls: []
isDragWRJ: 0
--- !u!224 &2122668663 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8632464829370408819, guid: a573eabe79e49f740807bf8ae0ff45cc,
type: 3}
m_PrefabInstance: {fileID: 852395022}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2126298660
GameObject:
m_ObjectHideFlags: 0