fixes/ latest ai version

This commit is contained in:
dddushesss 2022-01-13 22:58:54 +03:00
parent 6eb981cf59
commit 03960d7d0b
104 changed files with 66022 additions and 687 deletions

878
Assets/Prefab/ADs.prefab Normal file
View File

@ -0,0 +1,878 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &855721721
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 855721725}
- component: {fileID: 855721724}
- component: {fileID: 855721723}
- component: {fileID: 855721722}
m_Layer: 5
m_Name: ExtralifeCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &855721725
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 855721721}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 9010224305754668558}
- {fileID: 1368758085}
m_Father: {fileID: 7017227080055577098}
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, y: 0}
--- !u!223 &855721724
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 855721721}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &855721723
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 855721721}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &855721722
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 855721721}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &1368758084
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1368758085}
- component: {fileID: 1368758088}
- component: {fileID: 1368758087}
- component: {fileID: 1368758086}
m_Layer: 5
m_Name: ExtralifeButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1368758085
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1368758084}
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: 1900174883}
- {fileID: 6546462637559422819}
m_Father: {fileID: 855721725}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -516.68}
m_SizeDelta: {x: 364.9279, y: 96.9068}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1368758088
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1368758084}
m_CullTransparentMesh: 1
--- !u!114 &1368758087
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1368758084}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1368758086
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1368758084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1368758087}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1900174882
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1900174883}
- component: {fileID: 1900174885}
- component: {fileID: 1900174884}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1900174883
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1900174882}
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: 1368758085}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1900174885
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1900174882}
m_CullTransparentMesh: 1
--- !u!114 &1900174884
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1900174882}
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.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 62
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 84
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: EXTRALIFE
--- !u!1 &840994902530579766
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6374203161451546813}
- component: {fileID: 648636861675192753}
- component: {fileID: 8439688539017693756}
- component: {fileID: 5602960826927261039}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &6374203161451546813
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 840994902530579766}
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: 1228572368403975580}
m_Father: {fileID: 7017227080055577098}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 540, y: 960}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &648636861675192753
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 840994902530579766}
m_CullTransparentMesh: 0
--- !u!114 &8439688539017693756
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 840994902530579766}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5602960826927261039
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 840994902530579766}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 8439688539017693756}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7017227080055577099}
m_TargetAssemblyTypeName: AdsMob, Assembly-CSharp
m_MethodName: ShowAd
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &959541702021905399
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 462934624606052230}
- component: {fileID: 1717549448275548369}
- component: {fileID: 8019465967749733583}
- component: {fileID: 3518427172387084100}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &462934624606052230
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 959541702021905399}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 7017227080055577098}
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, y: 0}
--- !u!223 &1717549448275548369
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 959541702021905399}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &8019465967749733583
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 959541702021905399}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &3518427172387084100
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 959541702021905399}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &1999367400106432257
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9010224305754668558}
- component: {fileID: 8157564002663662341}
- component: {fileID: 5408929494246104917}
m_Layer: 5
m_Name: Back
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9010224305754668558
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1999367400106432257}
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: 855721725}
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: -518}
m_SizeDelta: {x: -680, y: -1809.5325}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8157564002663662341
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1999367400106432257}
m_CullTransparentMesh: 1
--- !u!114 &5408929494246104917
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1999367400106432257}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: d60ccf0feab112a4baa66853572c90ad, 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 &4042280681130453449
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1228572368403975580}
- component: {fileID: 4574297410292119365}
- component: {fileID: 4226890313483791420}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1228572368403975580
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4042280681130453449}
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: 6374203161451546813}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4574297410292119365
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4042280681130453449}
m_CullTransparentMesh: 1
--- !u!114 &4226890313483791420
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4042280681130453449}
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.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Button
--- !u!1 &4988408123839147871
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6546462637559422819}
- component: {fileID: 1811238904848561244}
- component: {fileID: 1241824234629738060}
m_Layer: 5
m_Name: ExtraLifeText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6546462637559422819
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4988408123839147871}
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: 1368758085}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 3.02}
m_SizeDelta: {x: 356.4681, y: 136.8}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1811238904848561244
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4988408123839147871}
m_CullTransparentMesh: 1
--- !u!114 &1241824234629738060
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4988408123839147871}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: EXTRALIFE
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9a2157e1f9c4c4d38841fbb92558f587, type: 2}
m_sharedMaterial: {fileID: -6360588970910393389, guid: 9a2157e1f9c4c4d38841fbb92558f587,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 72
m_fontSizeBase: 62.45
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7017227080055577093
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7017227080055577098}
- component: {fileID: 7017227080055577099}
m_Layer: 5
m_Name: ADs
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7017227080055577098
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7017227080055577093}
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: 462934624606052230}
- {fileID: 6374203161451546813}
- {fileID: 855721725}
m_Father: {fileID: 0}
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: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &7017227080055577099
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7017227080055577093}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a7c276b4af35fbc4a80539b97e444f32, type: 3}
m_Name:
m_EditorClassIdentifier:
button: {fileID: 1368758086}
canvas: {fileID: 855721721}

View File

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

View File

@ -12,7 +12,6 @@ GameObject:
- component: {fileID: 4155610655756139463}
- component: {fileID: 3748583951425988394}
- component: {fileID: 6763014501615571600}
- component: {fileID: 5390111712102929048}
m_Layer: 5
m_Name: AimCanvas
m_TagString: Untagged
@ -101,23 +100,6 @@ MonoBehaviour:
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &5390111712102929048
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2273039178377770117}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6650f022a8987a34e8da86d910b6e277, type: 3}
m_Name:
m_EditorClassIdentifier:
healthBar: {fileID: 0}
manaBar: {fileID: 0}
shotPrefab: {fileID: 9204531176590517796, guid: 74ba0f2e00eb74a4882dcf82bb66bb3f,
type: 3}
grid: {fileID: 0}
--- !u!1 &4408587040574959135
GameObject:
m_ObjectHideFlags: 0

View File

@ -1,5 +1,81 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1713641455662992818
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2277933757415651690}
- component: {fileID: 2819458040482587629}
- component: {fileID: 3113562572513926796}
m_Layer: 5
m_Name: Capture
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2277933757415651690
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1713641455662992818}
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: 7490685757980339862}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2819458040482587629
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1713641455662992818}
m_CullTransparentMesh: 1
--- !u!114 &3113562572513926796
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1713641455662992818}
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: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: -4039628871920856409, guid: bcfec907e0672ed45b69575096b4a1c2,
type: 3}
m_Type: 3
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 0
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 1
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &3185331048183402439
GameObject:
m_ObjectHideFlags: 0
@ -30,7 +106,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5156761560679623958}
m_RootOrder: 1
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}
@ -62,13 +138,90 @@ MonoBehaviour:
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_ChildAlignment: 5
m_StartCorner: 0
m_StartAxis: 0
m_CellSize: {x: 0.5, y: 0.2}
m_Spacing: {x: 0, y: 0}
m_Constraint: 0
m_ConstraintCount: 1
--- !u!1 &3936950508401920806
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7490685757980339862}
- component: {fileID: 5773971934982224891}
- component: {fileID: 5339304729368615127}
m_Layer: 5
m_Name: CaptureBack
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &7490685757980339862
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3936950508401920806}
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: 2277933757415651690}
m_Father: {fileID: 5156761560679623958}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 1.77}
m_SizeDelta: {x: 3, y: 0.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5773971934982224891
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3936950508401920806}
m_CullTransparentMesh: 1
--- !u!114 &5339304729368615127
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3936950508401920806}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: -8254845973784877126, guid: bcfec907e0672ed45b69575096b4a1c2,
type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 0
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 1
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4564225513960759228
GameObject:
m_ObjectHideFlags: 0
@ -177,8 +330,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 6124438540769792862}
- {fileID: 5894909873554395549}
- {fileID: 7490685757980339862}
- {fileID: 7064199837503171822}
- {fileID: 82951532315249996}
m_Father: {fileID: 0}
@ -267,6 +420,8 @@ MonoBehaviour:
shotPrefab: {fileID: 9204531176590517796, guid: 74ba0f2e00eb74a4882dcf82bb66bb3f,
type: 3}
grid: {fileID: 3185331048183402439}
captureBar: {fileID: 3113562572513926796}
captureBack: {fileID: 3936950508401920806}
--- !u!1 &6201783996967795459
GameObject:
m_ObjectHideFlags: 0
@ -344,82 +499,6 @@ MonoBehaviour:
m_FillOrigin: 1
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6720477436881757364
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6124438540769792862}
- component: {fileID: 3872739704401499897}
- component: {fileID: 3692302203462554896}
m_Layer: 5
m_Name: CaptureBar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &6124438540769792862
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6720477436881757364}
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: 5156761560679623958}
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: 2}
m_SizeDelta: {x: 3, y: 0.3}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3872739704401499897
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6720477436881757364}
m_CullTransparentMesh: 1
--- !u!114 &3692302203462554896
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6720477436881757364}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: -2685135706508046216, guid: bcfec907e0672ed45b69575096b4a1c2,
type: 3}
m_Type: 3
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 0
m_FillAmount: 0
m_FillClockwise: 1
m_FillOrigin: 1
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7234977947494318781
GameObject:
m_ObjectHideFlags: 0

View File

@ -49,7 +49,10 @@ MonoBehaviour:
coordinates:
x: 0
z: 0
color: {r: 0, g: 0, b: 0, a: 0}
gCost: 0
hCost: 0
fCost: 0
parent: {fileID: 0}
neighbors:
- {fileID: 0}
- {fileID: 0}

View File

@ -0,0 +1,329 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &712520339275161086
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2027685022626523886}
- component: {fileID: 6949887103781095394}
- component: {fileID: 3681477863342587850}
- component: {fileID: 8345586993071746408}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2027685022626523886
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 712520339275161086}
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: 5753595653172594301}
m_Father: {fileID: 3282277863117845392}
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: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6949887103781095394
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 712520339275161086}
m_CullTransparentMesh: 1
--- !u!114 &3681477863342587850
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 712520339275161086}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8345586993071746408
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 712520339275161086}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3681477863342587850}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 4929565957207649046}
m_TargetAssemblyTypeName: add, Assembly-CSharp
m_MethodName: ShowAd
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &2000339881314694206
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3282277863117845392}
- component: {fileID: 836586704568360101}
- component: {fileID: 3434161992126342837}
- component: {fileID: 7140815531378050198}
- component: {fileID: 4929565957207649046}
m_Layer: 5
m_Name: RespawnCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3282277863117845392
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2000339881314694206}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 2027685022626523886}
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, y: 0}
--- !u!223 &836586704568360101
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2000339881314694206}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &3434161992126342837
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2000339881314694206}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 4.82
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &7140815531378050198
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2000339881314694206}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &4929565957207649046
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2000339881314694206}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a7c276b4af35fbc4a80539b97e444f32, type: 3}
m_Name:
m_EditorClassIdentifier:
button: {fileID: 8345586993071746408}
canvas: {fileID: 2000339881314694206}
--- !u!1 &5643092443057929538
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5753595653172594301}
- component: {fileID: 926802407146178452}
- component: {fileID: 8555430210322839734}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5753595653172594301
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5643092443057929538}
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: 2027685022626523886}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &926802407146178452
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5643092443057929538}
m_CullTransparentMesh: 1
--- !u!114 &8555430210322839734
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5643092443057929538}
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.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Button

View File

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

View File

@ -1689,9 +1689,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 04619977b07331e43a21b8d1bc33b6e9, type: 3}
m_Name:
m_EditorClassIdentifier:
barCanvas: {fileID: 268172662505640299}
barCanvas: {fileID: 6268534043668608886}
aimCanvas: {fileID: 1011384888140022260}
captureBar: {fileID: 0}
--- !u!136 &1900872271281143359
CapsuleCollider:
m_ObjectHideFlags: 0
@ -3993,15 +3992,21 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dec5dd0d644d5c548a53563e65837162, type: 3}
--- !u!1 &268172662505640299 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6049883652435591266, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 5786347879975309577}
m_PrefabAsset: {fileID: 0}
--- !u!224 &1719605314077195295 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5156761560679623958, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 5786347879975309577}
m_PrefabAsset: {fileID: 0}
--- !u!114 &6268534043668608886 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 482855193181693567, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 5786347879975309577}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6650f022a8987a34e8da86d910b6e277, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -3010,9 +3010,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 04619977b07331e43a21b8d1bc33b6e9, type: 3}
m_Name:
m_EditorClassIdentifier:
barCanvas: {fileID: 5591725933991455353}
barCanvas: {fileID: 1792219354502761572}
aimCanvas: {fileID: 2334695180834975480}
captureBar: {fileID: 3265669888403619595}
--- !u!136 &8911891366586862002
CapsuleCollider:
m_ObjectHideFlags: 0
@ -3938,28 +3937,22 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dec5dd0d644d5c548a53563e65837162, type: 3}
--- !u!1 &5591725933991455353 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6049883652435591266, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 2192210941540280859}
m_PrefabAsset: {fileID: 0}
--- !u!224 &6484114110451091213 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5156761560679623958, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 2192210941540280859}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3265669888403619595 stripped
--- !u!114 &1792219354502761572 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3692302203462554896, guid: dec5dd0d644d5c548a53563e65837162,
m_CorrespondingSourceObject: {fileID: 482855193181693567, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 2192210941540280859}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: 11500000, guid: 6650f022a8987a34e8da86d910b6e277, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &4606608419032177277

View File

@ -388,9 +388,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 04619977b07331e43a21b8d1bc33b6e9, type: 3}
m_Name:
m_EditorClassIdentifier:
barCanvas: {fileID: 9197595637317142914}
barCanvas: {fileID: 3090207795109785503}
aimCanvas: {fileID: 8420239414472468003}
captureBar: {fileID: 0}
--- !u!136 &1571523103774403885
CapsuleCollider:
m_ObjectHideFlags: 0
@ -3858,15 +3857,21 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dec5dd0d644d5c548a53563e65837162, type: 3}
--- !u!224 &7764648799730394358 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5156761560679623958, guid: dec5dd0d644d5c548a53563e65837162,
--- !u!114 &3090207795109785503 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 482855193181693567, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 3193594884886186464}
m_PrefabAsset: {fileID: 0}
--- !u!1 &9197595637317142914 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6049883652435591266, guid: dec5dd0d644d5c548a53563e65837162,
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6650f022a8987a34e8da86d910b6e277, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &7764648799730394358 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5156761560679623958, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 3193594884886186464}
m_PrefabAsset: {fileID: 0}

View File

@ -3515,9 +3515,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 04619977b07331e43a21b8d1bc33b6e9, type: 3}
m_Name:
m_EditorClassIdentifier:
barCanvas: {fileID: 8614863231585036848}
barCanvas: {fileID: 2506490045236694061}
aimCanvas: {fileID: 8409302512724572423}
captureBar: {fileID: 0}
--- !u!136 &2198464067484123790
CapsuleCollider:
m_ObjectHideFlags: 0
@ -3933,15 +3932,21 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dec5dd0d644d5c548a53563e65837162, type: 3}
--- !u!224 &7200088151662806852 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5156761560679623958, guid: dec5dd0d644d5c548a53563e65837162,
--- !u!114 &2506490045236694061 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 482855193181693567, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 2628876604355308114}
m_PrefabAsset: {fileID: 0}
--- !u!1 &8614863231585036848 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6049883652435591266, guid: dec5dd0d644d5c548a53563e65837162,
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6650f022a8987a34e8da86d910b6e277, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &7200088151662806852 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5156761560679623958, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 2628876604355308114}
m_PrefabAsset: {fileID: 0}

View File

@ -173,9 +173,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 04619977b07331e43a21b8d1bc33b6e9, type: 3}
m_Name:
m_EditorClassIdentifier:
barCanvas: {fileID: 7624052504724712865}
barCanvas: {fileID: 4361982831792671676}
aimCanvas: {fileID: 3979930549707458788}
captureBar: {fileID: 650245892348180691}
--- !u!136 &6373024555497604353
CapsuleCollider:
m_ObjectHideFlags: 0
@ -3933,18 +3932,18 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 09a0317cbdff9fa479a18c9e20743a8e, type: 3}
--- !u!1 &3979930549707458788 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2273039178377770117, guid: 09a0317cbdff9fa479a18c9e20743a8e,
type: 3}
m_PrefabInstance: {fileID: 2932116763859057761}
m_PrefabAsset: {fileID: 0}
--- !u!224 &2548601768047453584 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 859777855380249073, guid: 09a0317cbdff9fa479a18c9e20743a8e,
type: 3}
m_PrefabInstance: {fileID: 2932116763859057761}
m_PrefabAsset: {fileID: 0}
--- !u!1 &3979930549707458788 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2273039178377770117, guid: 09a0317cbdff9fa479a18c9e20743a8e,
type: 3}
m_PrefabInstance: {fileID: 2932116763859057761}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4196108535858654659
PrefabInstance:
m_ObjectHideFlags: 0
@ -4069,27 +4068,21 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dec5dd0d644d5c548a53563e65837162, type: 3}
--- !u!1 &7624052504724712865 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6049883652435591266, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 4196108535858654659}
m_PrefabAsset: {fileID: 0}
--- !u!224 &9055592242171101397 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5156761560679623958, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 4196108535858654659}
m_PrefabAsset: {fileID: 0}
--- !u!114 &650245892348180691 stripped
--- !u!114 &4361982831792671676 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3692302203462554896, guid: dec5dd0d644d5c548a53563e65837162,
m_CorrespondingSourceObject: {fileID: 482855193181693567, guid: dec5dd0d644d5c548a53563e65837162,
type: 3}
m_PrefabInstance: {fileID: 4196108535858654659}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: 11500000, guid: 6650f022a8987a34e8da86d910b6e277, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -0,0 +1,437 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1128494808968600640
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 352099495347111674}
- component: {fileID: 245536191104746341}
- component: {fileID: 3903463562127952171}
m_Layer: 0
m_Name: Crystal
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &352099495347111674
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128494808968600640}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.5, z: 0}
m_LocalScale: {x: 0.7, y: 0.80511, z: 0.7}
m_Children:
- {fileID: 8825936066133981456}
- {fileID: 6421473808028771063}
- {fileID: 4037073582310855669}
- {fileID: 4462963591290508227}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &245536191104746341
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128494808968600640}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 30570e2c7de3ce8408cd76b6d1665789, 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 &3903463562127952171
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128494808968600640}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5db196e1099b97246bde07a348189567, type: 3}
m_Name:
m_EditorClassIdentifier:
weapon:
name: Crystal
icon: {fileID: 0}
objectToThrow: {fileID: 4746165193704193263, guid: 4e7523811a052fd46acf941fc69c8c98,
type: 3}
VFXGameObject: {fileID: 4746165193704193263, guid: 4e7523811a052fd46acf941fc69c8c98,
type: 3}
modifiedDamage: 0
damage: 40
speed: 1
disnatce: 5
reloadTime: 5
shots: 4
shotSound: {fileID: 8300000, guid: 9ea918c6c23577f4e885a8490d2f2046, type: 3}
hitSound: {fileID: 8300000, guid: 6c42231c18643dc4d9d8f8d15bc4735b, type: 3}
crystals:
- _gameObject: {fileID: 3696683042835843407}
_unitColor: 0
- _gameObject: {fileID: 8158225351781721002}
_unitColor: 1
- _gameObject: {fileID: 3937396292240476537}
_unitColor: 3
- _gameObject: {fileID: 5933062374339115085}
_unitColor: 4
--- !u!1001 &4111022426741871929
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 352099495347111674}
m_Modifications:
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1128494808968600640, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_Name
value: CrystaYellow
objectReference: {fileID: 0}
- target: {fileID: 1128494808968600640, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 502fb68ff9e389e479f59c576782150a, type: 3}
--- !u!1 &3937396292240476537 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1128494808968600640, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
m_PrefabInstance: {fileID: 4111022426741871929}
m_PrefabAsset: {fileID: 0}
--- !u!4 &4462963591290508227 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 352099495347111674, guid: 502fb68ff9e389e479f59c576782150a,
type: 3}
m_PrefabInstance: {fileID: 4111022426741871929}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4419583896097047243
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 352099495347111674}
m_Modifications:
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7999515437598587526, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_Name
value: CrystaBlue
objectReference: {fileID: 0}
- target: {fileID: 7999515437598587526, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 48b919cb81c94d846ab3491c856224ab, type: 3}
--- !u!1 &5933062374339115085 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7999515437598587526, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
m_PrefabInstance: {fileID: 4419583896097047243}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6421473808028771063 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7226074276374339644, guid: 48b919cb81c94d846ab3491c856224ab,
type: 3}
m_PrefabInstance: {fileID: 4419583896097047243}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5604025926826166373
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 352099495347111674}
m_Modifications:
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4391758782632602575, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_Name
value: CrystaRed
objectReference: {fileID: 0}
- target: {fileID: 4391758782632602575, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2d04fd15863f13c4487d158f78e2a362, type: 3}
--- !u!1 &8158225351781721002 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4391758782632602575, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
m_PrefabInstance: {fileID: 5604025926826166373}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8825936066133981456 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4015374634755354997, guid: 2d04fd15863f13c4487d158f78e2a362,
type: 3}
m_PrefabInstance: {fileID: 5604025926826166373}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6758303849426175959
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 352099495347111674}
m_Modifications:
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7964352262128733848, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_Name
value: CrystaGreen
objectReference: {fileID: 0}
- target: {fileID: 7964352262128733848, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 54e3bec084dedc847a62e362e0d63332, type: 3}
--- !u!1 &3696683042835843407 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7964352262128733848, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
m_PrefabInstance: {fileID: 6758303849426175959}
m_PrefabAsset: {fileID: 0}
--- !u!4 &4037073582310855669 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7335449565726987298, guid: 54e3bec084dedc847a62e362e0d63332,
type: 3}
m_PrefabInstance: {fileID: 6758303849426175959}
m_PrefabAsset: {fileID: 0}

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -15,6 +15,8 @@ MonoBehaviour:
width: 25
height: 50
hexCaptureManaCost: 10
hexHardCaptureManaCost: 20
hexHardCaptureTime: 1
cellPrefab: {fileID: 1661242500252451528, guid: bcea5b4a96735bd4b936f8f3fefcc688,
type: 3}
cellLabelPrefab: {fileID: 3836123284387241147, guid: efd47cbd22ddfee4aa2b1391914116fc,
@ -24,25 +26,29 @@ MonoBehaviour:
colors:
- _unitColor: 2
_texture: {fileID: 2800000, guid: 983242f4b4db7a841af48234cf0021b8, type: 3}
_vfxPrefab: {fileID: 0}
_buildinTexture: {fileID: 0}
_vfxCellCapturePrefab: {fileID: 0}
_vfxDeathPrefab: {fileID: 0}
- _unitColor: 0
_texture: {fileID: 2800000, guid: 0298dfcb0756f534a9a125d510461c7a, type: 3}
_vfxPrefab: {fileID: 8021195855904498788, guid: 2f6d0540c8fd7bb46b356ff86962379c,
_vfxCellCapturePrefab: {fileID: 8021195855904498788, guid: 2f6d0540c8fd7bb46b356ff86962379c,
type: 3}
_vfxDeathPrefab: {fileID: 8483527721606052447, guid: fd7fc481b936cf84a90d2d01d83e9b06,
type: 3}
_buildinTexture: {fileID: 2800000, guid: 0298dfcb0756f534a9a125d510461c7a, type: 3}
- _unitColor: 1
_texture: {fileID: 2800000, guid: 3b75368df991b164583e8cede390e24e, type: 3}
_vfxPrefab: {fileID: 442387583353148024, guid: 53959bc898e9a644daad0282881d596a,
_vfxCellCapturePrefab: {fileID: 442387583353148024, guid: 53959bc898e9a644daad0282881d596a,
type: 3}
_vfxDeathPrefab: {fileID: 730781534364879866, guid: 15620662117187f419d41032a4267445,
type: 3}
_buildinTexture: {fileID: 2800000, guid: 3b75368df991b164583e8cede390e24e, type: 3}
- _unitColor: 3
_texture: {fileID: 2800000, guid: 1a76a79d5a83143479c76f4f37c4b896, type: 3}
_vfxPrefab: {fileID: 5732852186060375560, guid: 54d847a18c62f57479c53469d4398ceb,
_vfxCellCapturePrefab: {fileID: 5732852186060375560, guid: 54d847a18c62f57479c53469d4398ceb,
type: 3}
_vfxDeathPrefab: {fileID: 7140011676602114744, guid: 6d9f179a27798c248b3c35df9139eb85,
type: 3}
_buildinTexture: {fileID: 2800000, guid: 1a76a79d5a83143479c76f4f37c4b896, type: 3}
- _unitColor: 4
_texture: {fileID: 2800000, guid: 779719648deedb4478ddebb3b81751ef, type: 3}
_vfxPrefab: {fileID: 1651852338557341938, guid: fa6c1fc3da7c8d24c85a88b00cf598d4,
_vfxCellCapturePrefab: {fileID: 1651852338557341938, guid: fa6c1fc3da7c8d24c85a88b00cf598d4,
type: 3}
_vfxDeathPrefab: {fileID: 4578021055421768374, guid: b2b879dd7ca552a408d4349691d2c8df,
type: 3}
_buildinTexture: {fileID: 2800000, guid: 779719648deedb4478ddebb3b81751ef, type: 3}

View File

@ -12,30 +12,14 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: effbc11b6ae8444c8d20e929ce28183e, type: 3}
m_Name: ItemData
m_EditorClassIdentifier:
itemInfos:
- prefab: {fileID: 919132149155446097, guid: 4166c606d638610418dc9ead794d697b, type: 3}
isInstantUse: 0
type: Tower
icon: {fileID: 21300000, guid: 543c4732bd2d47a41bdbbf2156eb358c, type: 3}
spawnablePrefab: {fileID: 4774919592469818776, guid: 0dbed8f974ba44a42af9d8fcae504ce0,
type: 3}
values:
spawnChance: 0.2
- prefab: {fileID: 3197816592181874056, guid: 2704c4f795b0d7748a3e3fa53be4d893,
type: 3}
isInstantUse: 1
type: AttackBonus
icon: {fileID: 21300000, guid: caf8bc0311dd2fc4ca1528a82a063754, type: 3}
spawnablePrefab: {fileID: 0}
values: 0300000064000000
spawnChance: 0.516
- prefab: {fileID: 8639522512577941448, guid: 7b6a7f64e52da514d88aa97ad8f863df,
type: 3}
isInstantUse: 1
type: DefenceBonus
icon: {fileID: 21300000, guid: 35be128594dcdce48b5d8e5317b38ed9, type: 3}
spawnablePrefab: {fileID: 0}
values: 0a0000001e000000
spawnChance: 0.797
fromTimeSpawn: 3
items:
- item: {fileID: 11400000, guid: c72a339ad88d1794ab453222b5eb6e6c, type: 2}
_spawnChance: 0.681
- item: {fileID: 11400000, guid: 8cab9569bb4f24849a60d15577229a50, type: 2}
_spawnChance: 0.873
- item: {fileID: 11400000, guid: c3ee153d6d89c214bb4d5a2e5ed86aba, type: 2}
_spawnChance: 0.767
- item: {fileID: 0}
_spawnChance: 0
fromTimeSpawn: 2.93
toTimeSpawn: 10

View File

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

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 299045fa19935a34d9edca91d5d77b22, type: 3}
m_Name: AttackBonusItem
m_EditorClassIdentifier:
iconPrefab: {fileID: 3197816592181874056, guid: 2704c4f795b0d7748a3e3fa53be4d893,
type: 3}
icon: {fileID: 21300000, guid: caf8bc0311dd2fc4ca1528a82a063754, type: 3}
duration: 3
value: 50
type: 0
usisngVFX: {fileID: 1392949555731818751, guid: 28a618fbe29f3724e97b44022bc55820,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c72a339ad88d1794ab453222b5eb6e6c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 299045fa19935a34d9edca91d5d77b22, type: 3}
m_Name: DefenceBonusItem
m_EditorClassIdentifier:
iconPrefab: {fileID: 8639522512577941448, guid: 7b6a7f64e52da514d88aa97ad8f863df,
type: 3}
icon: {fileID: 21300000, guid: ef4f09043626c634a86d095be3a55257, type: 3}
duration: 15
value: 50
type: 0
usisngVFX: {fileID: 413716222248834417, guid: 5290ce7f3e2c9c641b90f0d62ae2cb36,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c3ee153d6d89c214bb4d5a2e5ed86aba
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ffa041f25f4df8a40884ff0aee13068b, type: 3}
m_Name: TowerBuildingItem
m_EditorClassIdentifier:
iconPrefab: {fileID: 3197816592181874056, guid: 2704c4f795b0d7748a3e3fa53be4d893,
type: 3}
icon: {fileID: 21300000, guid: b7771b47a72ca7947bf18f664e53a983, type: 3}
buildingPrefab: {fileID: 1128494808968600640, guid: 14d7168dde21a3e498d36b095e4f08da,
type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8cab9569bb4f24849a60d15577229a50
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -14,4 +14,4 @@ MonoBehaviour:
m_EditorClassIdentifier:
levels:
- sceneName: Level 1
levelSprite: {fileID: 21300000, guid: 8bc240b354e7722408178bdcb1bf7b56, type: 3}
levelSprite: {fileID: 21300000, guid: ef4f09043626c634a86d095be3a55257, type: 3}

View File

@ -24,5 +24,5 @@ MonoBehaviour:
- {fileID: 8300000, guid: d657487da1404a34f835a7631432b835, type: 3}
- {fileID: 8300000, guid: 5481b8f08252dd7499af6b48ad6c5354, type: 3}
- {fileID: 8300000, guid: 2b1056532f20f3248910d138da8358b9, type: 3}
hardCapture: {fileID: 8300000, guid: 72cf5153f4959df4eb30db3dc01d4e24, type: 3}
hardCapture: {fileID: 8300000, guid: d657487da1404a34f835a7631432b835, type: 3}
death: {fileID: 8300000, guid: 158e2b6cd6cdcba49bc9f9c1cb29d84b, type: 3}

View File

@ -19,3 +19,4 @@ MonoBehaviour:
type: 3}
inventoryView: {fileID: 1527356263590969195, guid: ff3bc3b17ddefd14eb798b22cf0a854f,
type: 3}
adsMob: {fileID: 7017227080055577099, guid: 1328a0e1e252d60408278772275bf560, type: 3}

View File

@ -15,13 +15,13 @@ MonoBehaviour:
_units:
- isPlayer: 1
spawnPos:
x: 9
z: 10
x: 19
z: 4
unitPrefa: {fileID: 7527582019267571087, guid: f102085e8bc4cad4992d43b84dee1055,
type: 3}
color: 3
manaRegen: 1
maxMana: 100
manaRegen: 10
maxMana: 1000
maxHP: 100
inventoryCapacity: 4
- isPlayer: 0
@ -32,17 +32,28 @@ MonoBehaviour:
type: 3}
color: 4
manaRegen: 10
maxMana: 100
maxMana: 1000
maxHP: 100
inventoryCapacity: 4
- isPlayer: 0
spawnPos:
x: 3
z: 10
x: -1
z: 42
unitPrefa: {fileID: 742650227762578155, guid: 97b4a76c55741764e880b63d6e1514a9,
type: 3}
color: 0
manaRegen: 10
maxMana: 100
maxMana: 1000
maxHP: 100
inventoryCapacity: 4
- isPlayer: 0
spawnPos:
x: -17
z: 40
unitPrefa: {fileID: 8887939040951305984, guid: 1a81dbbd6ef62324491d9f58654ebe4b,
type: 3}
color: 1
manaRegen: 10
maxMana: 1000
maxHP: 100
inventoryCapacity: 4

View File

@ -14,12 +14,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
_weapons:
- name: StandartAttac
icon: {fileID: 3777131139682951229, guid: dcb79c5472cbd5f4eb050a4acc4b197e, type: 3}
icon: {fileID: 3777131139682951229, guid: e85f2abe991b09140ac9b67cf8cb24a1, type: 3}
objectToThrow: {fileID: 4746165193704193263, guid: 4e7523811a052fd46acf941fc69c8c98,
type: 3}
VFXGameObject: {fileID: 2957420090356197408, guid: 5d1244f7b80cadd428a70173a01ce889,
type: 3}
manaCost: 10
modifiedDamage: 0
damage: 10
speed: 1
disnatce: 5
@ -28,12 +28,12 @@ MonoBehaviour:
shotSound: {fileID: 8300000, guid: 9ea918c6c23577f4e885a8490d2f2046, type: 3}
hitSound: {fileID: 8300000, guid: 6c42231c18643dc4d9d8f8d15bc4735b, type: 3}
- name: Laser
icon: {fileID: 3777131139682951229, guid: e85f2abe991b09140ac9b67cf8cb24a1, type: 3}
icon: {fileID: 3777131139682951229, guid: dcb79c5472cbd5f4eb050a4acc4b197e, type: 3}
objectToThrow: {fileID: 7219588875883387333, guid: ab214974cd498df42867306700ba5fd2,
type: 3}
VFXGameObject: {fileID: 8715260329460421181, guid: e0388f43a34de79458c79763de903ffb,
type: 3}
manaCost: 15
modifiedDamage: 0
damage: 30
speed: 0.5
disnatce: 3

8
Assets/Scripts/ADs.meta Normal file
View File

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

View File

@ -0,0 +1,91 @@
using System.Collections.Generic;
using UnityEngine;
// using GoogleMobileAds.Api;
using HexFiled;
using Random = UnityEngine.Random;
using Units;
using UnityEngine.UI;
public class AdsMob : MonoBehaviour
{
// private string _revardUnitId = "ca-app-pub-3940256099942544/5224354917";
// private RewardedAd _ad;
// private AdRequest _request;
private Unit _player;
[SerializeField] private Button button;
[SerializeField] private GameObject canvas;
private void OnEnable()
{
// _ad = new RewardedAd(_revardUnitId);
// _request = new AdRequest.Builder().Build();
// _ad.LoadAd(_request);
// _ad.OnUserEarnedReward += HandleUser;
button.onClick.AddListener(Spawn) ;
canvas.SetActive(false);
//
}
// private void Start() {
// ShowAd();
// }
// private void HandleUser(object sender, Reward reward)
// {
//
// _player.Spawn(HexManager.CellByColor[UnitColor.GREY][Random.Range(0, HexManager.CellByColor[UnitColor.GREY].Count - 1)].coordinates);
// canvas.SetActive(false);
//
// }
private void Spawn()
{
_player.Spawn(HexManager.CellByColor[UnitColor.GREY][Random.Range(0, HexManager.CellByColor[UnitColor.GREY].Count - 1)].coordinates);
canvas.SetActive(false);
}
// public void ShowAd()
// {
// //_player = player;
// if (_ad.IsLoaded())
// {
// _ad.Show();
// }
// }
public void ShowCanvas(Unit player)
{
_player = player;
canvas.SetActive(true);
}
public void Respawn(GameObject player)
{
List<HexCell> cells = new List<HexCell>();
cells.AddRange(HexManager.CellByColor[UnitColor.GREY]);
// for (int i = 0; i < cells.Count; i++)
// {
// }
foreach (var cell in cells)
{
if(cell.Color == UnitColor.GREY)
{
var randomCell = Random.Range(0, cells.Count);
Vector3 respawnPosition = cells[randomCell].transform.position;
//cells[randomCell].Color = UnitColor.YELLOW;
player = FindObjectOfType<ExtraLife>().gameObject;
player.transform.position = respawnPosition;
if(player.transform.position == respawnPosition)
{
//cell.Color = UnitColor.YELLOW;
}
}
}
}
// private void OnDisable() {
// _ad.OnUserEarnedReward -= HandleUser;
// }
}

View File

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

View File

@ -0,0 +1,63 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!850595691 &4890085278179872738
LightingSettings:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Lighting Settings
serializedVersion: 3
m_GIWorkflowMode: 1
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_RealtimeEnvironmentLighting: 1
m_BounceScale: 1
m_AlbedoBoost: 1
m_IndirectOutputScale: 1
m_UsingShadowmask: 1
m_BakeBackend: 1
m_LightmapMaxSize: 1024
m_BakeResolution: 40
m_Padding: 2
m_TextureCompression: 1
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAO: 0
m_MixedBakeMode: 2
m_LightmapsBakeMode: 1
m_FilterMode: 1
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_RealtimeResolution: 2
m_ForceWhiteAlbedo: 0
m_ForceUpdates: 0
m_FinalGather: 0
m_FinalGatherRayCount: 256
m_FinalGatherFiltering: 1
m_PVRCulling: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2
m_PVRMinBounces: 1
m_PVREnvironmentMIS: 1
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 82adcc5c04b15af44afe569caa21fa7e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4890085278179872738
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scripts/AI.meta Normal file
View File

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

View File

@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using AI;
using Controller;
using Data;
using DG.Tweening;
using HexFiled;
using Runtime.Controller;
using Units;
using UnityEngine;
namespace DefaultNamespace.AI
{
public class AIAgent : IFixedExecute, IExecute
{
private Unit _enemy;
private Camera _camera;
private AIManager _manager;
private BotState curentState;
public Queue<HexDirection> currentPath;
public Action<AIAgent> OnAgentInited;
private Vector2 _attackDirection;
public Unit Enemy => _enemy;
public BotState CurentState => curentState;
public AIAgent(UnitInfo enemyInfo, Unit enemy, AIManager manager)
{
currentPath = new Queue<HexDirection>();
_enemy = enemy;
_camera = Camera.main;
_enemy.OnDeath += AgentDeath;
enemy.onPlayerSpawned += InitAgent;
_manager = manager;
}
private void AgentDeath(Unit unit)
{
AIManager.Instance.RemoveAgent(this);
currentPath.Clear();
}
private void InitAgent(GameObject unit)
{
_manager.AddAgent(this);
HexManager.agents.Add(unit, this);
OnAgentInited?.Invoke(this);
}
public void AttackTarget(Vector2 direction)
{
_attackDirection = direction;
}
public void FixedExecute()
{
if (curentState == BotState.Attack && !_enemy.IsBusy)
{
_enemy.Aim(_attackDirection);
_enemy.StartAttack();
curentState = _manager.GetNewBehaviour(this);
}
if (currentPath.Count > 0 && !_enemy.IsBusy)
{
var dir = currentPath.Dequeue();
while (HexManager.UnitCurrentCell[_enemy.Color].cell.GetNeighbor(dir) == null)
{
dir = dir.PlusSixtyDeg();
}
_enemy.Move(dir);
}
if(currentPath.Count == 0 && !_enemy.IsBusy)
{
curentState = _manager.GetNewBehaviour(this);
}
}
public void Execute()
{
if (_enemy.UnitView != null)
{
_enemy.UnitView.BarCanvas.transform.DOLookAt(
_enemy.UnitView.BarCanvas.transform.position + _camera.transform.rotation * Vector3.back, 0f,
up: _camera.transform.rotation * Vector3.up);
}
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f194fcc1a57f4ef1a141dd0cf1911cee
timeCreated: 1641464160

View File

@ -0,0 +1,246 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using Controller;
using DefaultNamespace;
using DefaultNamespace.AI;
using HexFiled;
using Items;
using Runtime.Controller;
using Units;
using UnityEngine;
using Object = UnityEngine.Object;
using Random = UnityEngine.Random;
namespace AI
{
public class AIManager
{
private List<AIAgent> _agents;
private int _triesToCalculatePath = 0;
private int _maxTriesToCalculatePath = 5;
private static AIManager _instance;
public static AIManager Instance
{
get => _instance;
private set => _instance ??= value;
}
public AIManager(List<AIAgent> agents)
{
_agents = agents;
agents.ForEach(agent => { SetBehaviour(BotState.Patrol, agent); });
}
public AIManager()
{
_agents = new List<AIAgent>();
Instance = this;
HexManager.agents = new Dictionary<GameObject, AIAgent>();
}
public void AddAgent(AIAgent agent)
{
_agents.Add(agent);
agent.OnAgentInited += InitAI;
}
public void RemoveAgent(AIAgent agent)
{
_agents.Remove(agent);
agent.OnAgentInited -= InitAI;
}
private void InitAI(AIAgent agent)
{
SetBehaviour(BotState.Patrol, agent);
}
private void StartPatrolBehaviour(AIAgent agent)
{
HexManager.GetNearestDifferCell(agent.Enemy.Color, agent.currentPath);
while (agent.currentPath.Count == 0 && _triesToCalculatePath < _maxTriesToCalculatePath)
{
HexManager.GetNearestDifferCell(agent.Enemy.Color, agent.currentPath);
_triesToCalculatePath++;
}
_triesToCalculatePath = 0;
}
private Unit GetNearestUnit(int cellDist, AIAgent agent)
{
return (from unit in HexManager.UnitCurrentCell
where unit.Key != agent.Enemy.Color &&
Vector3.Distance(unit.Value.unit.Instance.transform.position,
agent.Enemy.Instance.transform.position) <= cellDist * HexGrid.HexDistance
select unit.Value.unit).FirstOrDefault();
}
public BotState GetNewBehaviour(AIAgent agent)
{
var attack = agent.Enemy.Inventory.Where(x => x is Bonus { Type: BonusType.Attack }).ToList();
if (agent.CurentState is BotState.Attack && agent.Enemy.AttackBonus == 0 && attack.Count > 0)
{
SetBehaviour(BotState.AttackBonusUsage, agent);
return BotState.AttackBonusUsage;
}
var enemy = GetNearestUnit(6, agent);
if (enemy != null && agent.Enemy.Hp > agent.Enemy.Data.maxHP / 4 && enemy.IsAlive)
{
if (Vector3.Distance(agent.Enemy.Instance.transform.position, enemy.Instance.transform.position) < 4)
{
SetBehaviour(BotState.Attack, agent);
return BotState.Attack;
}
SetBehaviour(BotState.Agressive, agent);
return BotState.Agressive;
}
if (agent.Enemy.Mana <= agent.Enemy.Data.maxMana / 3 &&
agent.Enemy.Inventory.Count < agent.Enemy.InventoryCapacity)
{
SetBehaviour(BotState.CollectingBonus, agent);
return BotState.CollectingBonus;
}
var protect = agent.Enemy.Inventory.Where(x => x is Bonus { Type: BonusType.Defence }).ToList();
if (protect.Count > 0 && agent.Enemy.Hp <= agent.Enemy.Data.maxHP / 4 && agent.Enemy.DefenceBonus == 0)
{
SetBehaviour(BotState.ProtectBonusUsage, agent);
return BotState.ProtectBonusUsage;
}
if (agent.Enemy.Hp <= agent.Enemy.Data.maxHP / 4 && GetNearestUnit(5, agent) != null)
{
SetBehaviour(BotState.Retreet, agent);
return BotState.Retreet;
}
SetBehaviour(BotState.Patrol, agent);
return BotState.Patrol;
}
private void SetBehaviour(BotState state, AIAgent agent)
{
switch (state)
{
case BotState.Patrol:
StartPatrolBehaviour(agent);
break;
case BotState.Agressive:
MoveToEnemy(agent);
break;
case BotState.Attack:
AttackEnemy(agent);
break;
case BotState.CollectingBonus:
MoveToBonus(agent);
break;
case BotState.ProtectBonusUsage:
UseBonus(agent, BonusType.Defence);
break;
case BotState.AttackBonusUsage:
UseBonus(agent, BonusType.Attack);
break;
case BotState.Dead:
break;
case BotState.Retreet:
Retreet(agent);
break;
default:
throw new ArgumentOutOfRangeException(nameof(state), state, null);
}
}
private void UseBonus(AIAgent agent, BonusType type)
{
var attack = agent.Enemy.Inventory.Where(x => x is Bonus bonus && bonus.Type == type).ToList();
if (attack.Count == 0)
{
GetNewBehaviour(agent);
return;
}
((Bonus)attack.First()).Invoke();
}
private void Retreet(AIAgent agent)
{
var enemy = GetNearestUnit(6, agent)?.Instance.transform;
if (enemy == null)
{
return;
}
var dir = -DirectionHelper.DirectionTo(agent.Enemy.Instance.transform.position,
enemy.position);
agent.currentPath.Clear();
agent.currentPath.Enqueue(DirectionHelper.VectorToDirection(new Vector2(dir.x, dir.z)));
}
private void MoveToBonus(AIAgent agent)
{
HexCell itemToMove = null;
var min = 10 * HexGrid.HexDistance;
foreach (var itemCell in ItemFabric.Items)
{
if (Vector3.Distance(agent.Enemy.Instance.transform.position, itemCell.Key.transform.position) < min)
{
min = Vector3.Distance(agent.Enemy.Instance.transform.position, itemCell.Key.transform.position);
itemToMove = itemCell.Value;
}
}
if (itemToMove == null)
{
return;
}
Pathfinding.FindPath(HexManager.UnitCurrentCell[agent.Enemy.Color].cell, itemToMove, agent.currentPath);
}
private void AttackEnemy(AIAgent agent)
{
var enemy = GetNearestUnit(3, agent);
var dir = DirectionHelper.DirectionTo(agent.Enemy.Instance.transform.position,
enemy.Instance.transform.position);
agent.AttackTarget(new Vector2(dir.x, dir.z));
}
private void MoveToEnemy(AIAgent agent)
{
var enemies = HexManager.UnitCurrentCell
.Where(unit =>
unit.Value.unit.Color != agent.Enemy.Color &&
Vector3.Distance(unit.Value.unit.Instance.transform.position,
agent.Enemy.Instance.transform.position) <= 6 * HexGrid.HexDistance).ToList();
Pathfinding.FindPath(HexManager.UnitCurrentCell[agent.Enemy.Color].cell,
enemies[Random.Range(0, enemies.Count)].Value.cell, agent.currentPath);
}
}
public enum BotState
{
Patrol,
Agressive,
Attack,
CollectingBonus,
AttackBonusUsage,
ProtectBonusUsage,
Dead,
Retreet
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5c025c58c1c7454ca7a92f229181148e
timeCreated: 1641464147

View File

@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using HexFiled;
namespace AI
{
public static class Pathfinding
{
public static void FindPath(HexCell startTile, HexCell endTile, Queue<HexDirection> path)
{
var foundPathIter = 0;
var currentTile = startTile;
if (startTile == null || endTile == null)
{
return;
}
while (foundPathIter < 3 && currentTile == null)
{
if (currentTile.coordinates.Z == endTile.coordinates.Z)
{
if (currentTile.coordinates.X < endTile.coordinates.X)
{
path.Enqueue(HexDirection.E);
currentTile = currentTile.GetNeighbor(HexDirection.E);
}
else if (currentTile.coordinates.X > endTile.coordinates.X)
{
path.Enqueue(HexDirection.W);
currentTile = currentTile.GetNeighbor(HexDirection.W);
}
}
else if (currentTile.coordinates.Y == endTile.coordinates.Y)
{
if (currentTile.coordinates.X > endTile.coordinates.X)
{
path.Enqueue(HexDirection.NW);
currentTile = currentTile.GetNeighbor(HexDirection.NW);
}
else if (currentTile.coordinates.X < endTile.coordinates.X)
{
path.Enqueue(HexDirection.SE);
currentTile = currentTile.GetNeighbor(HexDirection.SE);
}
}
else if (currentTile.coordinates.X == endTile.coordinates.X)
{
if (currentTile.coordinates.Y > endTile.coordinates.Y)
{
path.Enqueue(HexDirection.NE);
currentTile = currentTile.GetNeighbor(HexDirection.NE);
}
else if (currentTile.coordinates.Y < endTile.coordinates.Y)
{
path.Enqueue(HexDirection.SW);
currentTile = currentTile.GetNeighbor(HexDirection.SW);
}
}
else
{
if (Math.Abs(currentTile.coordinates.X - endTile.coordinates.X) < Math.Abs(currentTile.coordinates.Y - endTile.coordinates.Y))
{
if (Math.Abs(currentTile.coordinates.X - endTile.coordinates.X) <
Math.Abs(currentTile.coordinates.Z - endTile.coordinates.Z))
{
var dir = currentTile.coordinates.X > endTile.coordinates.X
? HexDirection.E
: HexDirection.W;
path.Enqueue(dir);
currentTile = currentTile.GetNeighbor(dir);
}
else
{
var dir = currentTile.coordinates.Z > endTile.coordinates.Z
? HexDirection.SW
: HexDirection.NE;
path.Enqueue(dir);
currentTile = currentTile.GetNeighbor(dir);
}
}
else
{
if (Math.Abs(currentTile.coordinates.Y - endTile.coordinates.Y) <
Math.Abs(currentTile.coordinates.Z - endTile.coordinates.Z))
{
var dir = currentTile.coordinates.Y > endTile.coordinates.Y
? HexDirection.SE
: HexDirection.NW;
path.Enqueue(dir);
currentTile = currentTile.GetNeighbor(dir);
}
else
{
var dir = currentTile.coordinates.Z > endTile.coordinates.Z
? HexDirection.SW
: HexDirection.NE;
path.Enqueue(dir);
currentTile = currentTile.GetNeighbor(dir);
}
}
}
if (currentTile == endTile)
{
return;
}
foundPathIter++;
}
}
}
}

View File

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

View File

@ -50,6 +50,34 @@ namespace Controller
return this;
}
public void Remove(IController controller)
{
if (controller is IInitialization initializeController)
{
_initializeControllers.Remove(initializeController);
}
if (controller is IExecute executeController)
{
_executeControllers.Remove(executeController);
}
if (controller is ILateExecute lateExecuteController)
{
_lateControllers.Remove(lateExecuteController);
}
if (controller is ICleanup cleanupController)
{
_cleanupControllers.Remove(cleanupController);
}
if (controller is IFixedExecute fixedExecute)
{
_fixedExecuteControllers.Remove(fixedExecute);
}
}
public void Execute()
{
_executeControllers?.ForEach(x => x.Execute());

View File

@ -1,9 +1,12 @@
using System;
using System.Collections.Generic;
using System.Timers;
using AI;
using CamControl;
using Chars;
using DefaultNamespace;
using DefaultNamespace.AI;
using DG.Tweening;
using GameUI;
using HexFiled;
using Items;
@ -20,16 +23,16 @@ namespace Controller
public GameInit(Controllers controllers, Data.Data data)
{
new GameObject("Timer").AddComponent<TimerHelper>();
AIManager aiManager = new AIManager();
var hexGrid = new HexGrid(data.FieldData);
new MusicController();
new VFXController(data.VFXData);
MusicController.Instance.SetMusicData(data.MusicData);
controllers.Add(hexGrid);
data.WeaponsData.WeaponsList.ForEach(x => x.SetModifiedDamage(0));
ItemFabric itemFabric = new ItemFabric(data.ItemsData, SetUpItems());
ItemFabric itemFabric = new ItemFabric(data.ItemsData);
controllers.Add(itemFabric);
UIController uiController = new UIController(data.UIData);
@ -52,6 +55,8 @@ namespace Controller
player.onPlayerSpawned += cameraControl.InitCameraControl;
player.onPlayerSpawned += MusicController.Instance.AddAudioListener;
units.Add(player);
player.OnDeath += uiController.AdsMob.ShowCanvas;
}
else
{
@ -60,10 +65,13 @@ namespace Controller
var enemyController = new EnemyController(unit, enemy);
controllers.Add(enemyController);
units.Add(enemy);
AIAgent agent = new AIAgent(unit, enemy, aiManager);
controllers.Add(agent);
enemy.OnDeath += x => {controllers.Remove(agent);};
}
});
var unitFactory = new UnitFactory(units);
var unitFactory = new UnitFactory(units, hexGrid);
hexGrid.OnGridLoaded += unitFactory.Spawn;
@ -72,11 +80,12 @@ namespace Controller
hexGrid.OnHexPainted += paintedController.SetHexColors;
hexGrid.OnHexPainted += itemFabric.UpdateCellToOpenList;
hexGrid.OnHexPainted += paintedController.CheckDeathOrDestroy;
}
private List<Type> SetUpItems()
{
return new List<Type>() { typeof(Tower), typeof(AttackBonus), typeof(DefenceBonus) };
return new List<Type>() { typeof(Building), typeof(Bonus)};
}
}
}

View File

@ -22,10 +22,23 @@ namespace Data
private MusicData _musicData;
[SerializeField] private string itemDataPath;
private ItemsData _itemsData;
[SerializeField] private string vfxDataPath;
private VFXData _vfxData;
[SerializeField] private string chosenWeaponDataPath;
public string ChosenWeapon => File.ReadAllText(Application.persistentDataPath + "/" + chosenWeaponDataPath);
public VFXData VFXData {
get
{
if (_vfxData == null)
{
_vfxData = Load<VFXData>("Data/" + vfxDataPath);
}
return _vfxData;
}
}
public ItemsData ItemsData
{
get

View File

@ -11,7 +11,8 @@ namespace Data
public int width = 6;
public int height = 6;
public int hexCaptureManaCost;
public int hexHardCaptureManaCost;
public float hexHardCaptureTime;
public GameObject cellPrefab;
public TMP_Text cellLabelPrefab;
public GameObject CoordinatesCanvas;

View File

@ -10,34 +10,27 @@ namespace Data
public class ItemsData : ScriptableObject
{
[SerializeField]
private List<ItemInfo> itemInfos;
private List<ItemInfos> items;
[SerializeField] private float fromTimeSpawn;
[SerializeField] private float toTimeSpawn;
public List<ItemInfo> ItemInfos => itemInfos;
public List<ItemInfos> ItemInfos => items;
public (float from, float to) SpawnTime => (fromTimeSpawn, toTimeSpawn);
}
[Serializable]
public struct ItemInfo
public struct ItemInfos
{
[SerializeField] private GameObject prefab;
[SerializeField] private bool isInstantUse;
[SerializeField] private string type;
[SerializeField] private Sprite icon;
[SerializeField] private GameObject spawnablePrefab;
[SerializeField] private int[] values;
[SerializeField][Range(0,1)] private float spawnChance;
public GameObject Prefab => prefab;
public string Type => type;
[SerializeField] private Item item;
[SerializeField][Range(0,1)] private float _spawnChance;
public Sprite Icon => icon;
public GameObject SpawnablePrefab => spawnablePrefab;
public bool IsInstanceUse => isInstantUse;
public int[] Values => values;
public float SpawnChance => spawnChance;
public Item Item => item;
public float SpawnChance => _spawnChance;
}
}

View File

@ -11,9 +11,12 @@ namespace Data
[SerializeField] private List<GameObject> _objectsToSpawn;
[SerializeField] private PlayerControlView joystickView;
[SerializeField] private PlayerInventoryView inventoryView;
[SerializeField] private AdsMob adsMob;
public List<GameObject> ObjectsToSpawn => _objectsToSpawn;
public PlayerControlView PlayerControlView => joystickView;
public PlayerInventoryView InventoryView => inventoryView;
public AdsMob AdsMob => adsMob;
}
}

View File

@ -0,0 +1,10 @@
using UnityEngine;
namespace Data
{
[CreateAssetMenu(fileName = "VFXData", menuName = "Data/VFXData", order = 0)]
public class VFXData : ScriptableObject
{
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 20727ea91acd422788176450128f9251
timeCreated: 1641837401

View File

@ -11,23 +11,24 @@ namespace GameUI
[SerializeField] private GameObject item;
[SerializeField] private GameObject grid;
public Action<Item> OnItemInvoked;
public Action<Building> OnBuildingInvoked;
private List<Button> _buttons;
private Button[] _freeButtons;
private Dictionary<Item, Button> _dictionary;
private Dictionary<Button, Item> _dictionary;
public void SetUpUI(int inventoryCapacity)
{
_buttons = new List<Button>();
_dictionary = new Dictionary<Item, Button>();
_dictionary = new Dictionary<Button, Item>();
_freeButtons = new Button[inventoryCapacity];
for (int i = 0; i < inventoryCapacity; i++)
{
var itemGo = Instantiate(item, grid.transform);
var button = itemGo.GetComponentInChildren<Button>();
_buttons.Add(button);
_dictionary.Add(button, null);
button.gameObject.SetActive(false);
}
@ -35,10 +36,10 @@ namespace GameUI
_buttons.ForEach(button => _freeButtons[j++] = button);
}
private void SwitchButton(Item item)
private void SwitchButton(Button button)
{
var button = _dictionary[item];
_dictionary.Remove(item);
var item = _dictionary[button];
button.gameObject.SetActive(false);
for (int i = 0; i < _freeButtons.Length; i++)
{
@ -61,28 +62,32 @@ namespace GameUI
if (button == null)
return;
_dictionary.Add(item, button);
_dictionary[button] = item;
button.gameObject.SetActive(true);
button.image.sprite = item.Icon;
button.onClick.AddListener(() =>
{
if (item.IsInstantUse)
switch (item)
{
button.onClick.RemoveAllListeners();
item.InstanceInvoke();
for (int i = 0; i < _freeButtons.Length; i++)
case Bonus _bonus:
{
if (_freeButtons[i] != null) continue;
_freeButtons[i] = button;
button.onClick.RemoveAllListeners();
_bonus.Invoke();
for (int i = 0; i < _freeButtons.Length; i++)
{
if (_freeButtons[i] != null) continue;
_freeButtons[i] = button;
break;
}
button.onClick.RemoveAllListeners();
button.gameObject.SetActive(false);
break;
}
button.onClick.RemoveAllListeners();
button.gameObject.SetActive(false);
}
else
{
item.Invoke(SwitchButton);
OnItemInvoked?.Invoke(item);
case Building _building:
_building.Invoke(() => SwitchButton(button));
OnBuildingInvoked?.Invoke(_building);
break;
}
});
}

View File

@ -10,9 +10,11 @@ namespace GameUI
private readonly UIData _uiData;
private PlayerControlView _playerControlView;
private PlayerInventoryView _inventoryView;
private AdsMob _adsMob;
public PlayerControlView PlayerControlView => _playerControlView;
public PlayerInventoryView PlayerInventoryView => _inventoryView;
public AdsMob AdsMob => _adsMob;
public UIController(UIData uiData)
{
@ -26,6 +28,9 @@ namespace GameUI
_playerControlView = Object.Instantiate(_uiData.PlayerControlView, canvasGroup.transform);
_inventoryView = Object.Instantiate(_uiData.InventoryView, canvasGroup.transform);
_adsMob = Object.Instantiate(_uiData.AdsMob, canvasGroup.transform);
//_add.enabled = false;
_uiData.ObjectsToSpawn.ForEach(x => Object.Instantiate(x, canvasGroup.transform));
}
}

View File

@ -8,13 +8,14 @@ namespace HexFiled
{
[SerializeField] private UnitColor _unitColor;
[SerializeField] private Texture _texture;
[SerializeField] private GameObject _vfxPrefab;
[SerializeField] private Texture _buildinTexture;
[SerializeField] private GameObject _vfxCellCapturePrefab;
[SerializeField] private GameObject _vfxDeathPrefab;
public UnitColor UnitColor => _unitColor;
public Texture Texture => _texture;
public Texture BuildingTexture => _buildinTexture;
public GameObject VFXPrefab => _vfxPrefab;
public GameObject VFXDeathPrefab => _vfxDeathPrefab;
public GameObject VFXCellCapturePrefab => _vfxCellCapturePrefab;

View File

@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using DefaultNamespace;
using Items;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;
namespace HexFiled
@ -11,21 +13,47 @@ namespace HexFiled
{
public HexCoordinates coordinates;
public Action<HexCell> onHexPainted;
public float gCost;
public float hCost;
public float fCost;
public HexCell parent;
[SerializeField] private HexCell[] neighbors;
private Item _item;
private UnitColor _color;
private MeshRenderer _renderer;
public HexCell[] Neighbors => neighbors;
public UnitColor Color => _color;
public Item Item => _item;
private TowerView _towerView;
public TowerView Building
{
get => _towerView;
set
{
if (_towerView != null)
{
_towerView = value;
}
}
}
private void Awake()
{
_renderer = GetComponent<MeshRenderer>();
MusicController.Instance.AddAudioSource(gameObject);
_color = UnitColor.GREY;
if (!HexManager.CellByColor.ContainsKey(_color))
{
HexManager.CellByColor.Add(_color, new List<HexCell>(){this});
}
else
{
HexManager.CellByColor[_color].Add(this);
}
}
public void SetItem(Item item)
@ -54,19 +82,24 @@ namespace HexFiled
public void PaintHex(UnitColor color)
{
if (color == _color) return;
if (color == UnitColor.GREY)
if (!HexManager.CellByColor.ContainsKey(color))
{
_renderer.material.mainTexture = HexGrid.Colors[color].Texture;
_color = color;
return;
HexManager.CellByColor.Add(color, new List<HexCell>(){this});
}
_renderer.material.mainTexture = HexGrid.Colors[color].Texture;
var previousColor = _color;
HexManager.CellByColor[previousColor].Remove(this);
_color = color;
MusicController.Instance.PlayRandomClip(MusicController.Instance.MusicData.SfxMusic.Captures,
gameObject);
Instantiate(HexGrid.Colors[color].VFXPrefab, transform);
HexManager.CellByColor[_color].Add(this);
if(color == UnitColor.GREY) return;
var vfx = VFXController.Instance.PlayEffect(HexGrid.Colors[color].VFXCellCapturePrefab, transform.position + new Vector3(0,0.1f,0));
MusicController.Instance.AddAudioSource(vfx);
MusicController.Instance.PlayRandomClip(MusicController.Instance.MusicData.SfxMusic.Captures, vfx);
onHexPainted?.Invoke(this);
}
}

View File

@ -10,31 +10,31 @@ namespace HexFiled
{
public class HexGrid : IInitialization
{
private int _width;
private int _height;
private GameObject _cellPrefab;
private TMP_Text _cellLabelPrefab;
private HexCell[] _cells;
private Canvas _gridCanvas;
private GameObject _baseGameObject;
private static Dictionary<UnitColor, CellColor> _colors;
private static float _hexDistance;
private int _hexCaptureCost;
private FieldData _fieldData;
public static float HexDistance => _hexDistance;
public Action<HexCell> OnHexPainted;
public Action OnGridLoaded;
public int HexCaptureCost => _hexCaptureCost;
private static Dictionary<UnitColor, CellColor> _colors;
private static float _hexDistance;
public int HexCaptureCost => _fieldData.hexCaptureManaCost;
public int HexHardCaptureCost => _fieldData.hexHardCaptureManaCost;
public float HardCaptureTime => _fieldData.hexHardCaptureTime;
public static Dictionary<UnitColor, CellColor> Colors => _colors;
public HexGrid(FieldData fieldData)
{
_hexCaptureCost = fieldData.hexCaptureManaCost;
_width = fieldData.width;
_height = fieldData.height;
_cellPrefab = fieldData.cellPrefab;
_cellLabelPrefab = fieldData.cellLabelPrefab;
_fieldData = fieldData;
_baseGameObject = new GameObject("HexGrid");
_colors = new Dictionary<UnitColor, CellColor>(fieldData.colors.Count);
foreach (var color in fieldData.colors)
@ -57,13 +57,13 @@ namespace HexFiled
}
void CreateCell(int x, int z, int i)
private void CreateCell(int x, int z, int i)
{
Vector3 position;
position.x = (x + z * 0.5f - z / 2) * (HexMetrics.innerRadius * 2f);
position.y = 0f;
position.z = z * (HexMetrics.outerRadius * 1.5f);
var cellGO = Object.Instantiate(_cellPrefab);
var cellGO = Object.Instantiate(_fieldData.cellPrefab);
HexCell cell = _cells[i] = cellGO.GetComponent<HexCell>();
cell.PaintHex(UnitColor.GREY);
cell.transform.SetParent(_baseGameObject.transform, false);
@ -80,31 +80,31 @@ namespace HexFiled
{
if ((z & 1) == 0)
{
cell.SetNeighbor(HexDirection.SE, _cells[i - _width]);
cell.SetNeighbor(HexDirection.SE, _cells[i - _fieldData.width]);
if (x > 0)
{
cell.SetNeighbor(HexDirection.SW, _cells[i - _width - 1]);
cell.SetNeighbor(HexDirection.SW, _cells[i - _fieldData.width - 1]);
}
}
else
{
cell.SetNeighbor(HexDirection.SW, _cells[i - _width]);
cell.SetNeighbor(HexDirection.SW, _cells[i - _fieldData.width]);
if (_hexDistance == 0f)
{
_hexDistance = Vector3.Distance(cell.transform.position,
cell.GetNeighbor(HexDirection.SW).transform.position);
}
if (x < _width - 1)
if (x < _fieldData.width - 1)
{
cell.SetNeighbor(HexDirection.SE, _cells[i - _width + 1]);
cell.SetNeighbor(HexDirection.SE, _cells[i - _fieldData.width + 1]);
}
}
}
#if UNITY_EDITOR
TMP_Text label = Object.Instantiate(_cellLabelPrefab, _gridCanvas.transform, false);
TMP_Text label = Object.Instantiate(_fieldData.cellLabelPrefab, _gridCanvas.transform, false);
label.rectTransform.anchoredPosition =
new Vector2(position.x, position.z);
label.text = cell.coordinates.ToStringOnSeparateLines();
@ -112,13 +112,14 @@ namespace HexFiled
}
public void Init()
public void Init()
{
_cells = new HexCell[_height * _width];
HexManager.CellByColor = new Dictionary<UnitColor, List<HexCell>>();
_cells = new HexCell[_fieldData.height * _fieldData.width];
for (int z = 0, i = 0; z < _height; z++)
for (int z = 0, i = 0; z < _fieldData.height; z++)
{
for (int x = 0; x < _width; x++)
for (int x = 0; x < _fieldData.width; x++)
{
CreateCell(x, z, i++);
}

View File

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using AI;
using DefaultNamespace;
using DefaultNamespace.AI;
using Units;
using UnityEngine;
using Random = UnityEngine.Random;
namespace HexFiled
{
public static class HexManager
{
public static Dictionary<UnitColor, (HexCell cell, Unit unit)> UnitCurrentCell;
public static Dictionary<UnitColor, List<HexCell>> CellByColor;
public static Dictionary<GameObject, AIAgent> agents;
public static void GetNearestDifferCell(UnitColor color, Queue<HexDirection> path)
{
HexCell end = UnitCurrentCell[color].cell;
var itters = 0;
var neighbours = end.GetListNeighbours().Where(cell => cell != null && cell.Color != color).ToList();
if (neighbours.Any())
{
var dir = DirectionHelper.DirectionTo(end.transform.position,
neighbours[Random.Range(0, neighbours.Count)].transform.position);
path.Enqueue(DirectionHelper.VectorToDirection(new Vector2(dir.x, dir.z)));
return;
}
while (end.Color == color)
{
var tmp = end;
HexDirection dir;
do
{
dir = (HexDirection)Random.Range(0, 6);
end = tmp.GetNeighbor(dir);
itters++;
} while (end == null && itters < 5);
if (itters >= 5)
{
return;
}
path.Enqueue(dir);
}
}
public static void PaintHexList(List<HexCell> field, UnitColor color)
{
List<Action<UnitColor>> actions = new List<Action<UnitColor>>();
field.ForEach(x => actions.Add(x.PaintHex));
TimerHelper.Instance.StartTimer(actions, 0.01f, color);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4cbcb8d61a914507b1d6ca7c912db1ed
timeCreated: 1641496225

View File

@ -1,107 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Data;
using DefaultNamespace;
using Units;
using UnityEngine;
using Random = UnityEngine.Random;
namespace HexFiled
{
public class PaintedController
{
public static Dictionary<UnitColor, (HexCell previos, HexCell curent)> UnitCurrentCell;
private HexCell _cell;
public PaintedController()
{
UnitCurrentCell = new Dictionary<UnitColor, (HexCell, HexCell)>();
HexManager.UnitCurrentCell = new Dictionary<UnitColor, (HexCell cell, Unit unit)>();
}
public void CheckDeathOrDestroy(HexCell cell)
{
List<Unit> unitsToDeath = new List<Unit>();
foreach (var cells in HexManager.UnitCurrentCell
.Where(cells => HexManager.CellByColor[cells.Key].Count < 2 || (cells.Value.cell == cell && cells.Value.unit.Color != cell.Color)))
{
unitsToDeath.Add(cells.Value.unit);
}
unitsToDeath.ForEach(x => x.Death());
if (cell.Building != null && cell.Building.Color != cell.Color)
{
}
}
public void SetHexColors(HexCell cell)
{
_cell = cell;
List<HexCell> cells = new List<HexCell>();
for (int i = 0; i < 6; i++)
{
cells.Add(cell.GetNeighbor((HexDirection)i));
}
var hexByColorDict = DifferentHexByColor(cells);
var hexByColorDict = DifferentHexByColor(cell.GetListNeighbours());
foreach (var item in hexByColorDict)
{
if (item.Key == cell.Color && item.Value.Count >= 2 && item.Value.Count < 6 &&
UnitCurrentCell.ContainsKey(cell.Color))
HexManager.UnitCurrentCell.ContainsKey(cell.Color))
{
HexDirection direction = new HexDirection();
for (int i = 0; i < 6; i++)
{
var neighbour = UnitCurrentCell[cell.Color].previos.GetNeighbor((HexDirection)i);
if (neighbour == UnitCurrentCell[cell.Color].curent)
{
direction = (HexDirection)i;
}
}
var openDirection = direction.PlusSixtyDeg();
var closeDirection = direction.MinusSixtyDeg();
if (TryPaintHexList(Round(
UnitCurrentCell[cell.Color].previos.GetNeighbor(closeDirection),
UnitCurrentCell[cell.Color].previos.GetNeighbor(openDirection)),
cell.Color))
{
TryPaintHexList(Round(
UnitCurrentCell[cell.Color].previos.GetNeighbor(openDirection),
UnitCurrentCell[cell.Color].previos.GetNeighbor(closeDirection)),
cell.Color);
}
cell.GetListNeighbours().ForEach(x =>
{
if (x.Color == UnitColor.GREY)
if (x != null && x.Color != cell.Color)
{
TryPaintHexList(Round(x, null), cell.Color);
var path = Round(x, null);
if(!path.hasPath)
HexManager.PaintHexList(path.field, cell.Color);
}
});
}
if (item.Value.Count > 0 && item.Key != UnitColor.GREY && item.Key != cell.Color)
if (item.Value.Count >= 2 && item.Key != UnitColor.GREY && item.Key != cell.Color)
{
foreach (var path in from cellNeighbour in item.Value
where UnitCurrentCell.ContainsKey(item.Key)
select HasPath(cellNeighbour, UnitCurrentCell[item.Key].curent)
into path
where !path.hasPath
select path)
item.Value.ForEach(neighbour =>
{
TryPaintHexList(path, UnitColor.GREY);
}
var (hasPath, field) = HasPath(neighbour, HexManager.UnitCurrentCell[neighbour.Color].cell);
if (!hasPath)
{
field.ForEach(x => x.PaintHex(UnitColor.GREY));
}
});
}
}
}
private bool TryPaintHexList((bool hasPath, List<HexCell> field) path, UnitColor color)
{
if (!path.hasPath)
{
List<Action<UnitColor>> actions = new List<Action<UnitColor>>();
path.field.ForEach(x =>
{
actions.Add(x.PaintHex);
});
TimerHelper.Instance.StartTimer(actions, 0.05f, color);
}
return path.hasPath;
}
private Dictionary<UnitColor, List<HexCell>> DifferentHexByColor(List<HexCell> cellsList)
{
@ -203,23 +175,9 @@ namespace HexFiled
if (currentCell == end)
return (true, null);
List<HexCell> openList = new List<HexCell>();
foreach (var neighbour in currentCell.GetListNeighbours())
{
if (neighbour == null)
{
return (true, null);
}
if (closedList.Contains(neighbour) || neighbour.Color != start.Color) continue;
openList.Add(neighbour);
if (neighbour.GetListNeighbours().Contains(end))
{
return (true, null);
}
}
List<HexCell> openList = currentCell.GetListNeighbours()
.Where(neighbour => neighbour != null && !closedList.Contains(neighbour) && neighbour.Color == start.Color)
.ToList();
if (openList.Count > 0)

View File

@ -1,29 +0,0 @@
using System;
using Data;
using HexFiled;
namespace Items
{
public class AttackBonus : Item
{
public AttackBonus(ItemInfo data) : base(data)
{
}
public override void Invoke(Action<Item> item)
{
throw new NotImplementedException();
}
public override void InstanceInvoke()
{
Unit.SetAttackBonus(Data.Values[0], Data.Values[1]);
Unit.UseItem(this);
}
public override void PlaceItem(HexCell cell)
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,32 @@
using System;
using Data;
using DefaultNamespace;
using HexFiled;
using UnityEngine;
namespace Items
{
public enum BonusType
{
Attack,
Defence
}
[CreateAssetMenu(fileName = "BonusItem", menuName = "Item/Bonus")]
public class Bonus : Item
{
[SerializeField] private float duration;
[SerializeField] private int value;
[SerializeField] private BonusType type;
[SerializeField] private GameObject usisngVFX;
public BonusType Type => type;
public void Invoke()
{
Unit.SetUpBonus(duration, value, type);
var vfx = VFXController.Instance.PlayEffect(usisngVFX, Unit.Instance.transform);
TimerHelper.Instance.StartTimer(() => Destroy(vfx), duration);
Unit.UseItem(this);
}
}
}

View File

@ -1,3 +1,3 @@
fileFormatVersion: 2
guid: 2b016eba27de41629261b965b3e2be0c
guid: 299045fa19935a34d9edca91d5d77b22
timeCreated: 1641382290

View File

@ -0,0 +1,30 @@
using System;
using DefaultNamespace;
using HexFiled;
using UnityEngine;
namespace Items
{
[CreateAssetMenu(fileName = "BuildingItem", menuName = "Item/Building")]
public class Building : Item
{
[SerializeField] private GameObject buildingPrefab;
public void Invoke(Action action)
{
Unit.UseItem(this);
OnItemUsed += action;
}
public void PlaceItem(HexCell cell)
{
Unit.UseItem(this);
var obj = SpawnHelper.Spawn(buildingPrefab, cell.transform.position + buildingPrefab.transform.position);
obj.GetComponent<TowerView>().SetUp(Unit.Color);
cell.Building = obj.GetComponent<TowerView>();
OnItemUsed?.Invoke();
}
}
}

View File

@ -1,3 +1,3 @@
fileFormatVersion: 2
guid: f23a091c5733400f8f0092a4c0f33c6e
guid: ffa041f25f4df8a40884ff0aee13068b
timeCreated: 1641294934

View File

@ -1,29 +0,0 @@
using System;
using Data;
using HexFiled;
namespace Items
{
public class DefenceBonus : Item
{
public DefenceBonus(ItemInfo data) : base(data)
{
}
public override void Invoke(Action<Item> item)
{
throw new NotImplementedException();
}
public override void InstanceInvoke()
{
Unit.SetDefenceBonus(Data.Values[0], Data.Values[1]);
Unit.UseItem(this);
}
public override void PlaceItem(HexCell cell)
{
throw new NotImplementedException();
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: c518da097b3645c491c6a4cc61b3d493
timeCreated: 1641382317

View File

@ -1,5 +1,6 @@
using System;
using Data;
using DefaultNamespace;
using HexFiled;
using Units;
using UnityEngine;
@ -8,33 +9,31 @@ using Object = UnityEngine.Object;
namespace Items
{
public abstract class Item
public abstract class Item : ScriptableObject
{
protected ItemInfo Data;
protected Unit Unit;
protected Action<Item> OnItemUsed;
private GameObject _instance;
[SerializeField] private GameObject iconPrefab;
[SerializeField] private Sprite icon;
public Sprite Icon => icon;
public GameObject IconPrefab => iconPrefab;
public bool IsInstantUse => Data.IsInstanceUse;
public Sprite Icon => Data.Icon;
protected Item(ItemInfo data)
protected Unit Unit;
protected Action OnItemUsed;
public UnitColor Color => Unit.Color;
public GameObject Spawn(HexCell cell)
{
Data = data;
var obj = SpawnHelper.Spawn(iconPrefab, cell.transform.position + new Vector3(0, 1, 0));
obj.AddComponent<ItemView>().SetUp(this);
obj.AddComponent<CapsuleCollider>().isTrigger = true;
return obj;
}
public void PickUp(Unit unit)
{
Unit = unit;
}
public GameObject Spawn(HexCell cell)
{
var item = Object.Instantiate(Data.Prefab, cell.transform.position + new Vector3(0, 1, 0),
Quaternion.identity);
return item;
}
public abstract void Invoke(Action<Item> item);
public abstract void InstanceInvoke();
public abstract void PlaceItem(HexCell cell);
}
}

View File

@ -12,18 +12,17 @@ namespace Items
{
public class ItemFabric : IExecute
{
public static Dictionary<GameObject, HexCell> Items;
private ItemsData _data;
private List<HexCell> _openList;
private List<Type> _itemTypes;
private Dictionary<string, ItemInfo> _itemInfos;
private float _spawnTime;
private float time;
public ItemFabric(ItemsData data, List<Type> dictionary)
public ItemFabric(ItemsData data)
{
_itemInfos = new Dictionary<string, ItemInfo>();
data.ItemInfos.ForEach(info => { _itemInfos.Add(info.Type, info); });
_itemTypes = dictionary;
Items = new Dictionary<GameObject, HexCell>();
_data = data;
_openList = new List<HexCell>();
_spawnTime = Random.Range(data.SpawnTime.from, data.SpawnTime.to);
@ -45,46 +44,51 @@ namespace Items
{
if (Time.time - time >= _spawnTime)
{
List<HexCell> closedList = PaintedController.UnitCurrentCell.Select(unitCells => unitCells.Value.curent)
List<HexCell> closedList = HexManager.UnitCurrentCell.Select(unitCells => unitCells.Value.cell)
.ToList();
time = Time.time;
var cell = _openList[Random.Range(0, _openList.Count - 1)];
while (closedList.Contains(cell) || cell.Item != null)
if (closedList.Contains(cell) || cell.Item != null)
{
return;
}
var type = GetWeightedType();
while (type == null)
var i = GetWeightedItemIndex();
if (i < 0)
{
return;
}
var info = _itemInfos[type.ToString().Replace("Items.", "")];
var obj = (Item)Activator.CreateInstance(type, info);
var go = obj.Spawn(cell);
go.AddComponent<CapsuleCollider>().isTrigger = true;
var itemView = go.AddComponent<ItemView>();
itemView.SetUp(obj);
cell.SetItem(obj);
Items.Add(_data.ItemInfos[i].Item.Spawn(cell), cell);
cell.SetItem(_data.ItemInfos[i].Item);
_spawnTime = Random.Range(_data.SpawnTime.from, _data.SpawnTime.to);
}
}
private Type GetWeightedType()
private int GetWeightedItemIndex()
{
float randomNum = Random.Range(1, 101)/100f;
List<Type> possibleTypes = new List<Type>();
_itemTypes.ForEach(type =>
int[] possibleTypes = new int[_data.ItemInfos.Count];
var i = 0;
var j = 0;
_data.ItemInfos.ForEach(item =>
{
if (_itemInfos[type.ToString().Replace("Items.", "")].SpawnChance >= randomNum)
if (item.SpawnChance >= randomNum)
{
possibleTypes.Add(type);
possibleTypes[j++] = i;
}
++i;
});
return possibleTypes.Count > 0 ? possibleTypes[Random.Range(0, possibleTypes.Count - 1)] : null;
if (j > 0)
{
return possibleTypes[Random.Range(0, j - 1)];
}
return -1;
}
}
}

View File

@ -8,7 +8,8 @@ namespace Items
public class ItemView : MonoBehaviour
{
private Item _item;
public Item Item => _item;
public void SetUp(Item item)
{
@ -16,11 +17,11 @@ namespace Items
Rotate();
}
public Item PickUp(Unit unit)
public ItemView PickUp(Unit unit)
{
transform.DOKill();
_item.PickUp(unit);
return _item;
return this;
}
private void Rotate()

View File

@ -1,36 +0,0 @@
using System;
using Data;
using HexFiled;
using UnityEngine;
using UnityEngine.UI;
using Object = UnityEngine.Object;
namespace Items
{
public class Tower : Item
{
public Tower(ItemInfo data) : base(data)
{
}
public override void Invoke(Action<Item> action)
{
OnItemUsed += action;
}
public override void InstanceInvoke()
{
Unit.UseItem(this);
}
public override void PlaceItem(HexCell cell)
{
Unit.UseItem(this);
var obj = Object.Instantiate(Data.SpawnablePrefab, cell.transform.position, Quaternion.identity);
obj.AddComponent<TowerView>().SetUp(Unit.Color);
OnItemUsed?.Invoke(this);
}
}
}

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using DefaultNamespace;
using DG.Tweening;
using HexFiled;
@ -10,26 +11,39 @@ using Weapons;
public class TowerView : MonoBehaviour
{
[Serializable]
internal struct Crystal
{
[SerializeField] private GameObject _gameObject;
[SerializeField] private UnitColor _unitColor;
public GameObject GameObject => _gameObject;
public UnitColor UnitColor => _unitColor;
}
private UnitColor _color;
private GameObject _target;
[SerializeField] private Weapon weapon;
[SerializeField] private List<Crystal> crystals;
public UnitColor Color => _color;
public void SetUp(UnitColor unitColor)
{
_color = unitColor;
GetComponent<MeshRenderer>().material.mainTexture = HexGrid.Colors[unitColor].BuildingTexture;
crystals.First(x => x.UnitColor == unitColor).GameObject.SetActive(true);
var capsule = gameObject.AddComponent<CapsuleCollider>();
capsule.radius = weapon.disnatce * HexGrid.HexDistance;
}
private void OnCollisionEnter(Collision collision)
{
var unit = collision.gameObject.GetComponent<UnitView>();
if (unit != null && unit.Color != _color) //TODO какие-то проблемы с задием цвета
{
weapon.SetModifiedDamage(0);
_target = unit.gameObject;
StartCoroutine(Shot());
}
if (unit == null || unit.Color == _color) return;
weapon.SetModifiedDamage(0);
_target = unit.gameObject;
StartCoroutine(Shot());
}
private void OnCollisionExit(Collision other)
@ -45,23 +59,12 @@ public class TowerView : MonoBehaviour
while (_target != null)
{
yield return new WaitForSecondsRealtime(weapon.reloadTime);
if (_target == null)
{
yield return null;
}
var direction = DirectionHelper.DirectionTo(transform.position, _target.transform.position);
var ball = Instantiate(weapon.objectToThrow,
transform.forward + transform.position + new Vector3(0, 2),
Quaternion.LookRotation(direction));
MusicController.Instance.AddAudioSource(ball);
MusicController.Instance.PlayAudioClip(weapon.shotSound, ball);
ball.AddComponent<WeaponView>().SetWeapon(weapon);
ball.transform.DOMove(
new Vector3(direction.x,
0, direction.z) * weapon.disnatce * HexGrid.HexDistance +
transform.position + new Vector3(0, 2, 0),
weapon.speed)
.SetEase(Ease.Linear)
.OnComplete(() => Destroy(ball));
weapon.Fire(transform, new Vector2(direction.x, direction.z));
}
}
}

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.IO;
using DefaultNamespace.Weapons;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using Weapons;

View File

@ -49,6 +49,7 @@ public class MusicController
public void RemoveAudioSource(GameObject gameObject)
{
_sources.Remove(gameObject);
if(_sources.ContainsKey(gameObject))
_sources.Remove(gameObject);
}
}

30
Assets/Scripts/Score.cs Normal file
View File

@ -0,0 +1,30 @@
using HexFiled;
using TMPro;
using UnityEngine;
#if UNITY_EDITOR
public class Score : MonoBehaviour
{
private TMP_Text _text;
void Start()
{
_text = GetComponent<TMP_Text>();
}
void Update()
{
_text.text = "";
var sum = 0;
foreach (var color in HexManager.CellByColor)
{
_text.text = _text.text + color.Key + " " + color.Value.Count + '\n';
sum += color.Value.Count;
}
_text.text += sum;
}
}
#endif

View File

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

View File

@ -0,0 +1,12 @@
using UnityEngine;
namespace DefaultNamespace
{
public static class SpawnHelper
{
public static GameObject Spawn(GameObject gameObject, Vector3 pos)
{
return Object.Instantiate(gameObject, pos, Quaternion.identity);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 6ec94f8447ef4582be47e726718b30b5
timeCreated: 1641866607

View File

@ -0,0 +1,72 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HexFiled;
public class ExtraLife : MonoBehaviour
{
[SerializeField] private GameObject canvasgroupe;
[SerializeField] private AdsMob canvasPref;
public static int lifeCount = 1;
public int health = 1;
private void Start() {
canvasPref = FindObjectOfType<AdsMob>();
canvasPref.gameObject.SetActive(false);
}
private void Update() {
if(health <= 0)
{
lifeCount -= 1;
canvasPref.gameObject.SetActive(true);
Time.timeScale = 0f;
//canvasPref.ShowAd();
//Instantiate(canvasPref);//.GetComponent<add>().ShowAd();
if(lifeCount < 0)
{
lifeCount = 0;
}
}
if(lifeCount > 0)
{
canvasPref.gameObject.SetActive(false);
//Respawn();
Time.timeScale = 1f;
}
}
// public void Respawn()
// {
// List<HexCell> cells = new List<HexCell>(FindObjectsOfType<HexCell>());
// // for (int i = 0; i < cells.Count; i++)
// // {
// // }
// foreach (var cell in cells)
// {
// if(cell.Color == UnitColor.GREY)
// {
// var randomCell = Random.Range(0, cells.Count);
// Vector3 respawnPosition = cells[randomCell].transform.position;
// GameObject player = FindObjectOfType<ExtraLife>().gameObject;
// player.transform.position = respawnPosition;
// }
// }
// }
// public void AddLIfe(int count)
// {
// lifeCount = count;
// if(count < 1)
// {
// //add reward = new add();
// count++;
// }
// }
}

View File

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

View File

@ -7,24 +7,27 @@ namespace DefaultNamespace
{
public class TimerHelper : MonoBehaviour
{
[SerializeField] private float scale;
private static TimerHelper _instance;
public static TimerHelper Instance => _instance;
public static List<Action> OnCorutineEndedList;
private void Start()
public static TimerHelper Instance
{
if (_instance == null)
get
{
_instance = this;
OnCorutineEndedList = new List<Action>();
}
else
{
Destroy(this);
if (_instance == null)
{
_instance = new GameObject("Timer").AddComponent<TimerHelper>();
}
return _instance;
}
}
public void SetTimerScale()
{
Time.timeScale = scale;
}
public void StartTimer(Action action, float time)
{
StartCoroutine(Timer(action, time));
@ -42,13 +45,13 @@ namespace DefaultNamespace
IEnumerator Timer(Action action, float time)
{
yield return new WaitForSeconds(time);
action.Invoke();
action?.Invoke();
}
IEnumerator Timer<T>(Action<T> action, float time, T param)
{
yield return new WaitForSeconds(time);
action.Invoke(param);
action?.Invoke(param);
}
IEnumerator Timer<T>(List<Action<T>> actions, float time, T param)
@ -56,7 +59,7 @@ namespace DefaultNamespace
foreach (var action in actions)
{
yield return new WaitForSeconds(time);
action.Invoke(param);
action?.Invoke(param);
}
}
}

View File

@ -0,0 +1,21 @@
using UnityEditor;
using UnityEngine;
#if UNITY_EDITOR
namespace DefaultNamespace
{
[CustomEditor(typeof(TimerHelper))]
public class TimerHelperEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
var timerHelper = (TimerHelper)target;
if (GUILayout.Button("SetScale"))
{
timerHelper.SetTimerScale();
}
}
}
}
#endif

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 062c6a94eaf44874a83595e726aab5e4
timeCreated: 1641927836

View File

@ -4,5 +4,6 @@ namespace Chars
{
public float Move;
public float Attack;
public float Death;
}
}

View File

@ -1,5 +1,6 @@
using Controller;
using Data;
using DefaultNamespace.AI;
using DG.Tweening;
using Runtime.Controller;
using Units;
@ -17,6 +18,7 @@ namespace Chars
_enemy = enemy;
_camera = Camera.main;
}
public void FixedExecute()

View File

@ -23,7 +23,7 @@ namespace Chars
private Vector2 _attackDircetion;
private HexDirection _placeDirection;
private PlayerInventoryView _inventoryView;
private Item _itemToPlace;
private Building _itemToPlace;
private HexCell _cellToPlace;
@ -43,13 +43,13 @@ namespace Chars
inventoryView.SetUpUI(unit.InventoryCapacity);
_unit.OnItemPickUp += PickUp;
_inventoryView = inventoryView;
inventoryView.OnItemInvoked += AimPlaceItem;
inventoryView.OnBuildingInvoked += AimPlaceItem;
_placeJoystick.OnTouchDown += AimCanvas;
_placeJoystick.OnTouchUp += PlaceItem;
}
private void AimPlaceItem(Item item)
private void AimPlaceItem(Building item)
{
if (!_unit.IsBusy)
{

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Chars;
using Data;
using DefaultNamespace;
@ -9,7 +10,6 @@ using Items;
using UnityEngine;
using Weapons;
using Object = UnityEngine.Object;
using Random = UnityEngine.Random;
namespace Units
@ -37,14 +37,28 @@ namespace Units
private int _attackBonus;
private int _defenceBonus;
public int AttackBonus => _attackBonus;
public int DefenceBonus => _defenceBonus;
public bool IsBusy
{
get => _isBusy;
set => _isBusy = value;
}
public bool IsBusy => _isBusy;
public UnitView UnitView => _unitView;
public bool IsAlive => _isAlive;
public UnitColor Color => _data.color;
public int InventoryCapacity => _data.inventoryCapacity;
public Action<Item> OnItemPickUp;
public Action<Unit> OnDeath;
public BarCanvas BarCanvas => _barCanvas;
public GameObject Instance => _instance;
public UnitInfo Data => _data;
public int Mana => _mana;
public int Hp => _hp;
public List<Item> Inventory => _inventory;
public Unit(UnitInfo unitData, Weapon weapon, HexGrid hexGrid)
{
_weapon = weapon;
@ -56,31 +70,33 @@ namespace Units
_isCapturing = false;
}
public void SetAttackBonus(int duration, int value)
public void SetUpBonus(float duration, int value, BonusType type)
{
TimerHelper.Instance.StartTimer(StopAttackBonus, duration);
_weapon.SetModifiedDamage(value);
}
private void StopAttackBonus()
{
_weapon.SetModifiedDamage(0);
}
public void SetDefenceBonus(int duration, int value)
{
TimerHelper.Instance.StartTimer(StopDefenceBonus, duration);
_defenceBonus = value;
}
private void StopDefenceBonus()
{
_defenceBonus = 0;
switch (type)
{
case BonusType.Attack:
TimerHelper.Instance.StartTimer(() => _weapon.SetModifiedDamage(0), duration);
_weapon.SetModifiedDamage(value);
break;
case BonusType.Defence:
TimerHelper.Instance.StartTimer(()=> _defenceBonus = 0, duration);
_defenceBonus = value;
break;
default:
break;
}
}
public void Move(HexDirection direction)
{
if (!_cell.GetNeighbor(direction) || _isBusy) return;
if (!_cell.GetNeighbor(direction) || _isBusy || _cell.GetNeighbor(direction).Color != UnitColor.GREY &&
HexManager.UnitCurrentCell[_cell.GetNeighbor(direction).Color].cell ==
_cell.GetNeighbor(direction)) return;
if (_data.isPlayer)
Debug.Log("Player");
_unitView.StopHardCapture();
if (_cell.GetNeighbor(direction).Color == _data.color)
{
@ -88,16 +104,14 @@ namespace Units
}
else if (_cell.GetNeighbor(direction).Color != UnitColor.GREY)
{
if (_mana - _hexGrid.HexHardCaptureCost <= 0) return;
_isHardToCapture = true;
_unitView.RegenMana(_mana);
DoTransit(direction);
}
else if (_mana - _hexGrid.HexCaptureCost >= 0)
{
_mana -= _hexGrid.HexCaptureCost;
_unitView.RegenMana(_mana);
UpdateBarCanvas();
if (_mana - _hexGrid.HexHardCaptureCost <= 0) return;
DoTransit(direction);
}
}
@ -106,9 +120,8 @@ namespace Units
{
_isBusy = true;
_isCapturing = _data.color != _cell.GetNeighbor(direction).Color;
var previousCell = _cell;
_cell = _cell.GetNeighbor(direction);
PaintedController.UnitCurrentCell[_data.color] = (previousCell, _cell);
HexManager.UnitCurrentCell[_data.color] = (_cell, this);
RotateUnit(new Vector2((_cell.transform.position - _instance.transform.position).normalized.x,
(_cell.transform.position - _instance.transform.position).normalized.z));
_animator.SetTrigger("Move");
@ -118,6 +131,19 @@ namespace Units
private void CaptureHex()
{
if (_isHardToCapture)
{
_mana -= _hexGrid.HexHardCaptureCost;
}
else
{
_mana -= _hexGrid.HexCaptureCost;
}
_unitView.RegenMana(_mana);
UpdateBarCanvas();
_isBusy = false;
_isHardToCapture = false;
_cell.PaintHex(_data.color);
}
@ -134,48 +160,46 @@ namespace Units
case "Attack":
_animLength.Attack = clip.length;
break;
case "Dead":
_animLength.Death = clip.length;
break;
default:
break;
}
}
}
public void Spawn()
public void Spawn(HexCoordinates hexCoordinates)
{
if (!_isAlive)
{
_cell = _hexGrid.GetCellFromCoord(_data.spawnPos);
_cell = _hexGrid.GetCellFromCoord(hexCoordinates);
_cell.PaintHex(_data.color);
_inventory = new List<Item>();
for (int i = 0; i < 6; i++)
{
var neigh = _cell.GetNeighbor((HexDirection)i);
neigh?.PaintHex(_data.color);
for (int j = 0; j < 6; j++)
{
neigh?.GetNeighbor((HexDirection)j)?.PaintHex(_data.color);
}
}
//
PaintedController.UnitCurrentCell.Add(_data.color, (null, _cell));
//
HexManager.UnitCurrentCell.Add(_data.color, (_cell, this));
_instance = Object.Instantiate(_data.unitPrefa, _cell.transform.parent);
_instance.transform.localPosition = _cell.transform.localPosition;
onPlayerSpawned?.Invoke(_instance);
_isAlive = true;
_animator = _instance.GetComponent<Animator>();
_unitView = _instance.GetComponent<UnitView>();
_barCanvas = _unitView.BarCanvas.GetComponent<BarCanvas>();
_barCanvas = _unitView.BarCanvas;
_unitView.SetUp(_barCanvas.SpawnShotUI(_weapon.shots), _weapon, RegenMana, _data.manaRegen, CaptureHex,
this);
this, _hexGrid.HardCaptureTime);
SetAnimLength();
MusicController.Instance.AddAudioSource(_instance);
_mana = _data.maxMana;
_hp = _data.maxHP;
SetUpActions();
_weapon.SetModifiedDamage(0);
onPlayerSpawned?.Invoke(_instance);
}
}
@ -185,13 +209,13 @@ namespace Units
UpdateBarCanvas();
}
public bool PickUpItem(ItemView itemView)
public bool PickUpItem(Item item)
{
if (_inventory.Count < _data.inventoryCapacity)
{
var item = itemView.PickUp(this);
item.PickUp(this);
_inventory.Add(item);
OnItemPickUp.Invoke(item);
OnItemPickUp?.Invoke(item);
return true;
}
@ -207,9 +231,9 @@ namespace Units
{
_isBusy = false;
_animator.SetBool("isMoving", _isBusy);
if (!_isCapturing)
{
_isHardToCapture = false;
return;
}
@ -220,7 +244,6 @@ namespace Units
else
{
CaptureHex();
}
_isHardToCapture = false;
@ -236,23 +259,11 @@ namespace Units
{
if (_direction.Equals(Vector2.zero))
{
_direction = new Vector2(_unitView.transform.forward.x, _unitView.transform.forward.z);
_direction = new Vector2(_unitView.transform.forward.x, _unitView.transform.forward.z); //TODO автовыстрел
Aim(_direction);
}
var ball = Object.Instantiate(_weapon.objectToThrow,
_instance.transform.forward + _instance.transform.position + new Vector3(0, 2),
_instance.transform.rotation);
MusicController.Instance.AddAudioSource(ball);
MusicController.Instance.PlayAudioClip(_weapon.shotSound, ball);
ball.AddComponent<WeaponView>().SetWeapon(_weapon);
ball.transform.DOMove(
new Vector3(_direction.normalized.x,
0, _direction.normalized.y) * _weapon.disnatce * HexGrid.HexDistance +
_instance.transform.position + new Vector3(0, 2, 0),
_weapon.speed)
.SetEase(Ease.Linear)
.OnComplete(() => Object.Destroy(ball));
_weapon.Fire(_instance.transform, _direction);
}
private void SetUpActions()
@ -275,21 +286,26 @@ namespace Units
float maxHp = _data.maxHP;
float maxMana = _data.maxMana;
_barCanvas.ManaBar.DOFillAmount(mana / maxMana, 0.5f).SetEase(Ease.InQuad);
//_barCanvas.ManaBar.value =
//_unitView.RegenMana(10);
_barCanvas.HealthBar.DOFillAmount(hp / maxHp, 0.5f).SetEase(Ease.InQuad);
}
private void Death()
public void Death()
{
_unitView.OnStep -= MoveEnd;
_unitView.OnAttackEnd -= AttackEnd;
_unitView.OnAttack -= Attacking;
_unitView.OnHit -= Damage;
_isAlive = false;
HexManager.UnitCurrentCell.Remove(Color);
_animator.SetTrigger("Death");
MusicController.Instance.PlayAudioClip(MusicController.Instance.MusicData.SfxMusic.Death, _instance);
var vfx = VFXController.Instance.PlayEffect(HexGrid.Colors[Color].VFXDeathPrefab,
_instance.transform.position);
TimerHelper.Instance.StartTimer(() => Object.Destroy(_instance), _animLength.Death);
OnDeath?.Invoke(this);
MusicController.Instance.AddAudioSource(vfx);
MusicController.Instance.PlayAudioClip(MusicController.Instance.MusicData.SfxMusic.Death, vfx);
MusicController.Instance.RemoveAudioSource(_instance);
HexManager.PaintHexList(HexManager.CellByColor[Color].ToList(), UnitColor.GREY);
}

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using HexFiled;
using Units;
namespace Chars
@ -6,15 +7,17 @@ namespace Chars
public class UnitFactory
{
private List<Unit> _units;
public UnitFactory(List<Unit> units)
public UnitFactory(List<Unit> units, HexGrid grid)
{
_units = units;
}
public void Spawn()
{
_units.ForEach(x => x.Spawn());
_units.ForEach(x => x.Spawn(x.Data.spawnPos));
}
}
}

View File

@ -3,17 +3,24 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class BarCanvas : MonoBehaviour
{
[SerializeField] private Image healthBar;
[SerializeField] private Image manaBar;
[SerializeField] private ShotUIView shotPrefab;
[SerializeField] private GameObject grid;
[SerializeField] private Image captureBar;
[SerializeField] private GameObject captureBack;
public Image HealthBar => healthBar;
public Image ManaBar => manaBar;
public ShotUIView ShotUIView => shotPrefab;
public Image CaptureBar => captureBar;
public GameObject CaptureBack => captureBack;
public Stack<ShotUIView> SpawnShotUI(int count)
{
Stack<ShotUIView> stack = new Stack<ShotUIView>();

View File

@ -2,6 +2,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using Data;
using DefaultNamespace;
using DG.Tweening;
using HexFiled;
using Items;
@ -19,9 +20,8 @@ public class UnitView : MonoBehaviour
public Action OnAttackEnd;
public Action OnAttack;
public Action<int> OnHit;
[SerializeField] private GameObject barCanvas;
[SerializeField] private BarCanvas barCanvas;
[SerializeField] private GameObject aimCanvas;
[SerializeField] private Image captureBar;
private Stack<ShotUIView> _shootUIStack;
@ -31,19 +31,20 @@ public class UnitView : MonoBehaviour
private Action _startRegen;
private Coroutine _previosRegen;
private Coroutine _previosReload;
private int _mana;
private Action _capureHex;
private Sequence _sequence;
private AudioSource _audioSource;
private Unit _unit;
private float _hardCaptureTime;
public GameObject BarCanvas => barCanvas;
public BarCanvas BarCanvas => barCanvas;
public GameObject AimCanvas => aimCanvas;
public UnitColor Color => _unit.Color;
public void SetUp(Stack<ShotUIView> shots, Weapon weapon, Action regenMana, int manaRegen, Action captureHex,
Unit unit)
Unit unit, float hardCaptureTime)
{
_shootUIStack = shots;
_weapon = weapon;
@ -52,28 +53,32 @@ public class UnitView : MonoBehaviour
_manaRegen = manaRegen;
_capureHex = captureHex;
_unit = unit;
_hardCaptureTime = hardCaptureTime;
}
public void HardCaptureHex(HexCell cell)
{
captureBar.gameObject.SetActive(true);
_unit.IsBusy = true;
barCanvas.CaptureBack.SetActive(true);
_sequence = DOTween.Sequence();
_sequence.Append(captureBar.DOFillAmount(1f, 0f).SetEase(Ease.Linear).OnComplete(() =>
_sequence.Append(_unit.BarCanvas.CaptureBar.DOFillAmount(1f, _hardCaptureTime).SetEase(Ease.Linear).OnComplete(() =>
{
_capureHex?.Invoke();
captureBar.DOFillAmount(0f, 0f).SetEase(Ease.Linear);
captureBar.gameObject.SetActive(false);
barCanvas.CaptureBack.SetActive(false);
MusicController.Instance.PlayRandomClip(MusicController.Instance.MusicData.SfxMusic.Captures,
cell.gameObject);
}));
_sequence.Play();
}
public void StopHardCapture()
{
_sequence.Kill();
captureBar.DOFillAmount(0f, 0f).SetEase(Ease.Linear);
captureBar.gameObject.SetActive(false);
barCanvas.CaptureBar.DOFillAmount(0f, 0f).SetEase(Ease.Linear);
_unit.BarCanvas.CaptureBack.SetActive(false);
}
public bool Shoot()
@ -93,17 +98,13 @@ public class UnitView : MonoBehaviour
public void RegenMana(int mana)
{
if (_previosRegen != null)
{
StopCoroutine(_previosRegen);
}
_mana = mana;
//_startRegen.Invoke();
_previosRegen = StartCoroutine(Regen());
//return _mana;
}
private void Step()
@ -117,7 +118,7 @@ public class UnitView : MonoBehaviour
MusicController.Instance.MusicData.SfxMusic.Step, gameObject);
}
private void AttackEnd()
private void AttackEnd() // Методы выполняемые из аниматора
{
OnAttackEnd?.Invoke();
}
@ -133,62 +134,57 @@ public class UnitView : MonoBehaviour
if (weaponView != null)
{
OnHit?.Invoke(weaponView.Weapon.modifiedDamage);
var vfx = VFXController.Instance.PlayEffect(weaponView.Weapon.VFXGameObject, weaponView.transform.position, weaponView.transform.rotation);
MusicController.Instance.AddAudioSource(vfx);
MusicController.Instance.PlayAudioClip(weaponView.Weapon.hitSound, vfx);
other.transform.DOKill();
Destroy(other.gameObject);
}
ItemView itemView = other.GetComponent<ItemView>();
if (itemView != null && _unit.PickUpItem(itemView))
if (itemView != null && _unit.PickUpItem(itemView.Item))
{
ItemFabric.Items.Remove(itemView.gameObject);
Destroy(itemView.gameObject);
}
}
private IEnumerator Reload()
{
if (_toReloadStack.Count == 0) yield break; //TODO При частой стрльбе перезарядка работает некорректно
if (_toReloadStack.Count == 0) yield break;
yield return new WaitForSeconds(_weapon.reloadTime);
if (_toReloadStack.Count == 0) yield break;
var shot = _toReloadStack.Pop();
// _shootUIStack.Push(shot);
shot.Switch();
_shootUIStack.Push(shot);
shot.Switch();
_shootUIStack.Push(shot);
foreach (var item in _toReloadStack)
{
if(Time.deltaTime < _weapon.reloadTime)
if (Time.deltaTime < _weapon.reloadTime)
{
StopCoroutine(_previosReload);
_previosReload = null;
}
_previosReload = StartCoroutine(Reload());
_previosReload = StartCoroutine(Reload());
}
}
private IEnumerator Regen()
{
if (_mana >= 100)
if (_mana >= 100)
{
yield break;
}
yield return new WaitForSeconds(2f);
while(_mana < 100)
while (_mana < 100)
{
yield return new WaitForSeconds(1f);
_mana += _manaRegen;
_startRegen.Invoke();
_startRegen.Invoke();
}
//StartCoroutine(Regen());
_previosRegen = null;
}
}

View File

@ -0,0 +1,45 @@
using Data;
using UnityEngine;
namespace DefaultNamespace
{
public class VFXController
{
private static VFXController _instance;
public static VFXController Instance
{
get => _instance;
private set => _instance = value;
}
private VFXData _data;
public VFXData Data => _data;
public VFXController(VFXData data)
{
Instance ??= this;
_data = data;
}
public GameObject PlayEffect(GameObject effect, Vector3 pos)
{
var obj = Object.Instantiate(effect, pos, effect.transform.rotation);
obj.AddComponent<VFXView>();
return obj;
}
public GameObject PlayEffect(GameObject effect, Vector3 pos, Quaternion quaternion)
{
var obj = Object.Instantiate(effect, pos, quaternion);
obj.AddComponent<VFXView>();
return obj;
}
public GameObject PlayEffect(GameObject effect, Transform parent)
{
var obj = Object.Instantiate(effect, parent);
obj.AddComponent<VFXView>();
return obj;
}
}
}

Some files were not shown because too many files have changed in this diff Show More