Compare commits

..

4 Commits

Author SHA1 Message Date
aquostics a0157356da Merge pull request 'Fight system work.' (#3) from jacky/fight_system_work into master
Reviewed-on: #3
2022-03-16 22:58:51 -07:00
jacky_cai 1c1df08373 Add camp. 2022-03-15 23:50:58 -07:00
jacky_cai a9d4342378 Merge. 2022-03-15 23:22:49 -07:00
jacky_cai 85b64b455f Fix bugs. 2022-03-15 23:21:32 -07:00
5 changed files with 752 additions and 4 deletions

View File

@ -123,6 +123,141 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &41095696
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 41095697}
- component: {fileID: 41095699}
- component: {fileID: 41095698}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &41095697
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 41095696}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1356389544}
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: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &41095698
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 41095696}
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: 100
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 1
m_fontSizeBase: 1
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_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!222 &41095699
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 41095696}
m_CullTransparentMesh: 1
--- !u!1001 &106877470
PrefabInstance:
m_ObjectHideFlags: 0
@ -614,6 +749,17 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &432305849 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3270170092710700281, guid: 6f411942c21bbfd4085f7482721be0b4, type: 3}
m_PrefabInstance: {fileID: 3270170093165282000}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7e1c46da2d32eb24a9a852c1d1e43de6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &438781027
PrefabInstance:
m_ObjectHideFlags: 0
@ -1614,6 +1760,7 @@ Transform:
- {fileID: 1357083436}
- {fileID: 1377839580}
- {fileID: 533000778}
- {fileID: 1547483898}
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -2105,7 +2252,7 @@ PrefabInstance:
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: cardData
value:
objectReference: {fileID: 11400000, guid: 155d6c1a6daf61943aec6158856d2336, type: 2}
objectReference: {fileID: 11400000, guid: 675490af7d7c9c142ae76d1b2e4920b1, type: 2}
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: basicAttack
value: 3
@ -2170,6 +2317,57 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1085928008
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1085928010}
- component: {fileID: 1085928009}
m_Layer: 0
m_Name: LeftSideCamp
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1085928009
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1085928008}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cacd0c45a2f4722419a5c6deec9e8456, type: 3}
m_Name:
m_EditorClassIdentifier:
currentDefense: 100
maxDefense: 100
fireRange: 3
fireAttackDamage: 0
side: 1
defenseText: {fileID: 41095697}
--- !u!4 &1085928010
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1085928008}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -5, y: -0.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1356389544}
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1088460481
GameObject:
m_ObjectHideFlags: 0
@ -2478,11 +2676,163 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7e1c46da2d32eb24a9a852c1d1e43de6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1356389543
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1356389544}
- component: {fileID: 1356389547}
- component: {fileID: 1356389546}
- component: {fileID: 1356389545}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1356389544
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1356389543}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 41095697}
m_Father: {fileID: 1085928010}
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: 10, y: 10}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1356389545
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1356389543}
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 &1356389546
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1356389543}
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: 1
--- !u!223 &1356389547
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1356389543}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 841472622}
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!4 &1357083436 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
m_PrefabInstance: {fileID: 989996726}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1359494975
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1359494977}
- component: {fileID: 1359494976}
m_Layer: 0
m_Name: RightSideCamp
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1359494976
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1359494975}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cacd0c45a2f4722419a5c6deec9e8456, type: 3}
m_Name:
m_EditorClassIdentifier:
currentDefense: 100
maxDefense: 100
fireRange: 3
fireAttackDamage: 0
side: -1
defenseText: {fileID: 2036751335}
--- !u!4 &1359494977
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1359494975}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 5, y: -0.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1540437266}
m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1377839580 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
@ -2583,6 +2933,112 @@ Transform:
m_Father: {fileID: 346553567}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1540437265
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1540437266}
- component: {fileID: 1540437269}
- component: {fileID: 1540437268}
- component: {fileID: 1540437267}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1540437266
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1540437265}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2036751335}
m_Father: {fileID: 1359494977}
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: 10, y: 10}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1540437267
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1540437265}
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 &1540437268
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1540437265}
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: 1
--- !u!223 &1540437269
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1540437265}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 841472622}
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!4 &1547483898 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
m_PrefabInstance: {fileID: 2099265125}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1581109704
PrefabInstance:
m_ObjectHideFlags: 0
@ -2867,6 +3323,226 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7e1c46da2d32eb24a9a852c1d1e43de6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2036751334
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2036751335}
- component: {fileID: 2036751337}
- component: {fileID: 2036751336}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2036751335
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2036751334}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1540437266}
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: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2036751336
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2036751334}
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: 100
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 1
m_fontSizeBase: 1
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_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!222 &2036751337
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2036751334}
m_CullTransparentMesh: 1
--- !u!1001 &2099265125
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 920405093}
m_Modifications:
- target: {fileID: 2394601693270377320, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: f8ac336e7fbacfb4c8bfff09cc239572, type: 3}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalPosition.x
value: 1.501
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalPosition.y
value: -1.49
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalPosition.z
value: -1
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102724, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102725, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: m_Name
value: "\u654C\u5175 (6)"
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: side
value: -1
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: cardData
value:
objectReference: {fileID: 11400000, guid: bc0d9030782a4164a9b9d7f1862a2a1b, type: 2}
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: basicAttack
value: 3
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: standingCell
value:
objectReference: {fileID: 432305849}
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: currentDefense
value: 18
objectReference: {fileID: 0}
- target: {fileID: 2394601694276102747, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
propertyPath: basicMaxDefense
value: 18
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 81eab03836e5b52448e4ad61de8f2406, type: 3}
--- !u!1 &2118509173
GameObject:
m_ObjectHideFlags: 0

38
Assets/Scripts/Camp.cs Normal file
View File

@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class Camp : MonoBehaviour
{
public int currentDefense = 100;
public int maxDefense = 100;
public int fireRange = 3;
public int fireAttackDamage = 0;
public Side side;
public Transform defenseText;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
defenseText.GetComponent<TextMeshProUGUI>().text = currentDefense.ToString();
}
public void TakeDamage(int damage)
{
currentDefense -= damage;
if (currentDefense < 0)
{
currentDefense = 0;
}
}
}

View File

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

View File

@ -50,6 +50,8 @@ public class Unit : MonoBehaviour
public bool walkingToDestination = false;
Camp allyCamp;
Camp enemyCamp;
// Start is called before the first frame update
void Start()
@ -77,6 +79,19 @@ public class Unit : MonoBehaviour
}
modelArt.GetComponent<SpriteRenderer>().sprite = cardData.artwork;
var camps = FindObjectsOfType<Camp>();
foreach (var camp in camps)
{
if (camp.side == side)
{
allyCamp = camp;
}
else
{
enemyCamp = camp;
}
}
}
// Update is called once per frame
@ -196,6 +211,7 @@ public class Unit : MonoBehaviour
else
{
// Can't move to cell this is standed by enemy.
destinationCell = standingCell;
break;
}
}
@ -237,6 +253,7 @@ public class Unit : MonoBehaviour
if (attackXPos >= cellMap.column || attackXPos < 0)
{
// Attack Camp
enemyCamp.TakeDamage(finalAttack);
return;
}
@ -273,7 +290,7 @@ public class Unit : MonoBehaviour
for (int i = 0; i < unitsInRange.Count; i++)
{
Debug.Log(unitsInRange[i].unitName + ": " + unitsInRange[i].standingCell.xPos + " , " + unitsInRange[i].standingCell.yPos);
//Debug.Log(unitsInRange[i].unitName + ": " + unitsInRange[i].standingCell.xPos + " , " + unitsInRange[i].standingCell.yPos);
// Do attack
//Debug.Log("Attack!");
unitsInRange[i].currentDefense -= finalAttack;

View File

@ -55,7 +55,10 @@ public class UnitManager : MonoBehaviour
{
unit.MoveAction();
}
}
foreach (var unit in rightSideUnits)
{
if (unit.isUnitAlive())
{
unit.AttackAction();
@ -71,7 +74,10 @@ public class UnitManager : MonoBehaviour
{
unit.MoveAction();
}
}
foreach (var unit in leftSideUnits)
{
if (unit.isUnitAlive())
{
unit.AttackAction();
@ -87,10 +93,10 @@ public class UnitManager : MonoBehaviour
switch (side)
{
case Side.left:
leftSideUnits = leftSideUnits.OrderByDescending(x => x.standingCell.xPos).ThenByDescending(y => y.standingCell.yPos).ToList<Unit>();
leftSideUnits = leftSideUnits.OrderByDescending(x => x.standingCell.xPos).ThenBy(y => y.standingCell.yPos).ToList<Unit>();
break;
case Side.right:
rightSideUnits = rightSideUnits.OrderBy(x => x.standingCell.xPos).ThenBy(y => y.standingCell.yPos).ToList<Unit>();
rightSideUnits = rightSideUnits.OrderBy(x => x.standingCell.xPos).ThenByDescending(y => y.standingCell.yPos).ToList<Unit>();
break;
default:
break;