Compare commits

...

4 Commits

14 changed files with 2392 additions and 55 deletions

View File

@ -36,7 +36,7 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

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

View File

@ -0,0 +1,18 @@
%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: a92d696df7037b44585aaac56ec9ed98, type: 3}
m_Name: Rider
m_EditorClassIdentifier:
_wood: 0
_rock: 0
_food: 10
_cooldownInSeconds: 1

View File

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

View File

@ -0,0 +1,17 @@
%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: d1391306ffe53984bb2bc314f1d2919f, type: 3}
m_Name: Upgrade_Rider
m_EditorClassIdentifier:
_upgradeUnitCard: {fileID: 11400000, guid: 4855deb66869b934bb7a63c02d4442fe, type: 2}
_upgradePrefab: {fileID: 2230360378425099702, guid: d57d97357919087419f8097e907c7a7e, type: 3}
_upgradeCardArt: {fileID: 21300000, guid: 0f9488183cb57b242b27a65ea48f8dcb, type: 3}

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -252,6 +252,7 @@ RectTransform:
- {fileID: 5639720393060989426}
- {fileID: 907652127262489358}
- {fileID: 4911214996900807424}
- {fileID: 6666883114332643056}
m_Father: {fileID: 4817988606444742094}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -791,19 +792,6 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 907652127959947826, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
m_PrefabInstance: {fileID: 1255702544}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1825274587757073426
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 907652128862280226}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4640c30390a17784990af92ddf341312, type: 3}
m_Name:
m_EditorClassIdentifier:
_warningAnimator: {fileID: 1335203379556626542}
--- !u!95 &1335203379556626542
Animator:
serializedVersion: 5
@ -825,6 +813,19 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &1825274587757073426
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 907652128862280226}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4640c30390a17784990af92ddf341312, type: 3}
m_Name:
m_EditorClassIdentifier:
_warningAnimator: {fileID: 1335203379556626542}
--- !u!224 &907652128862280229 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
@ -859,7 +860,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.x
@ -867,7 +868,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_SizeDelta.x
@ -911,7 +912,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -201.6
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -931,11 +932,11 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 178d3231a9182834aa1a4394bd40b644, type: 3}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -943,15 +944,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -47.711605
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -959,15 +960,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -26.874405
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -975,7 +976,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -6.0372024
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8434244523906479734, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: _food
@ -1585,7 +1586,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.x
@ -1593,7 +1594,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_SizeDelta.x
@ -1637,7 +1638,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -1653,11 +1654,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -1665,15 +1666,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -47.711605
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -1681,15 +1682,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -26.874405
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -1697,7 +1698,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -6.0372024
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8434244523906479734, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: _food
@ -1920,6 +1921,208 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
m_PrefabInstance: {fileID: 5237832369539782965}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5772812162661008581
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4817988606957756069}
m_Modifications:
- target: {fileID: 907652127959947826, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_Name
value: Rider
objectReference: {fileID: 0}
- target: {fileID: 907652127959947826, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652128235033330, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_SizeDelta.x
value: 201.85
objectReference: {fileID: 0}
- target: {fileID: 907652128235033330, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_SizeDelta.y
value: 125.396
objectReference: {fileID: 0}
- target: {fileID: 907652128235033330, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalScale.x
value: 0.65528
objectReference: {fileID: 0}
- target: {fileID: 907652128235033330, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalScale.y
value: 0.65528
objectReference: {fileID: 0}
- target: {fileID: 907652128235033330, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalScale.z
value: 0.65528
objectReference: {fileID: 0}
- target: {fileID: 907652128235033330, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
value: -3.3
objectReference: {fileID: 0}
- target: {fileID: 907652128235033330, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -2.9
objectReference: {fileID: 0}
- target: {fileID: 907652128235033332, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: b98e80d2b7d70264b800b1e6aa98a092, type: 3}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -47.711605
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -26.874405
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -6.0372024
objectReference: {fileID: 0}
- target: {fileID: 8434244523906479734, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: _food
value: 60
objectReference: {fileID: 0}
- target: {fileID: 8434244523906479734, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: _wood
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8434244523906479734, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: _prefab
value:
objectReference: {fileID: 2230360378425099702, guid: d57d97357919087419f8097e907c7a7e, type: 3}
- target: {fileID: 8434244523906479734, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: _unitCardInformation
value:
objectReference: {fileID: 11400000, guid: 4855deb66869b934bb7a63c02d4442fe, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
--- !u!224 &6666883114332643056 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
m_PrefabInstance: {fileID: 5772812162661008581}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6880333787458075169
PrefabInstance:
m_ObjectHideFlags: 0
@ -2151,7 +2354,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.x
@ -2159,7 +2362,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_SizeDelta.x
@ -2203,7 +2406,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -103.3
value: 0
objectReference: {fileID: 0}
- target: {fileID: 907652127959947829, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -2251,11 +2454,11 @@ PrefabInstance:
objectReference: {fileID: 21300000, guid: 7f013ea28cc038c4794a38dc2f1b0685, type: 3}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -2263,15 +2466,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5139721979244350189, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -47.711605
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -2279,15 +2482,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7106892478383455582, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -26.874405
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.x
@ -2295,7 +2498,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7112938880036038065, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: m_AnchoredPosition.y
value: -6.0372024
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8434244523906479734, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3}
propertyPath: _food

View File

@ -0,0 +1,116 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rider : Ally
{
[SerializeField]
private int _chargeAttackDamage;
[SerializeField]
private int _chargeCooldown;
[SerializeField]
private int _maxChargeHitCount;
[SerializeField]
private int _maxChargeDistance;
[SerializeField]
private GameObject _detection;
[SerializeField]
private GameObject _chargeDetection;
[SerializeField]
private GameObject _root;
private Detection _chargeDetectionScript;
private Root _rootScript;
private Vector3 _originalPos;
private Vector2 _movementVector = Vector2.zero;
private bool _isCharging;
private float _timeSinceLastCharge;
private List<Entity> _opponentsHit = new List<Entity>();
public override void Start()
{
base.Start();
_chargeDetectionScript = _chargeDetection.GetComponent<Detection>();
_rootScript = _root.GetComponent<Root>();
_originalPos = transform.position;
_isCharging = true;
}
public override void Update()
{
// check for charge cooldown
if (_timeSinceLastCharge > _chargeCooldown)
{
_isCharging = true;
}
if (_isCharging)
{
// toggle charge detection
_detection.SetActive(false);
_chargeDetection.SetActive(true);
// movement
_movementVector.x = Time.deltaTime * Speed;
transform.position += (Vector3)_movementVector;
// attack
if (IsEnemyDetected && !_opponentsHit.Contains(Enemy))
{
AttackEnemyRiding();
}
// reset
if (transform.position.x - _originalPos.x >= _maxChargeDistance || _opponentsHit.Count >= _maxChargeHitCount)
{
// position
_movementVector = Vector2.zero;
transform.position = _originalPos;
// charge state
_isCharging = false;
_timeSinceLastCharge = 0;
_opponentsHit.Clear();
// detection state
IsEnemyDetected = false;
Enemy = null;
// toggle detection
_detection.SetActive(true);
_chargeDetection.SetActive(false);
}
}
else
{
_timeSinceLastCharge += Time.deltaTime;
if (IsEnemyDetected)
{
AttackEnemy();
}
}
}
void AttackEnemyRiding()
{
_rootScript.AttackWithCustomDamage(_chargeAttackDamage);
_opponentsHit.Add(Enemy);
}
void AttackEnemy()
{
//Attack Cooldown
if (AttackSpeedWait > AttackInterval)
{
Animation.PlayAttackAnim();
AttackSpeedWait = 0f;
}
AttackSpeedWait += Time.deltaTime;
}
}

View File

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

View File

@ -15,16 +15,31 @@ public class Detection : MonoBehaviour
// If it's a projectile damage > 0
private int _projectileDamage = 0;
private bool _hasStartBeenCalled = false;
protected virtual void Start()
{
_collider = GetComponent<BoxCollider2D>();
detectionRange = _collider.size;
StartCoroutine(C_DetectCoroutine());
_hasStartBeenCalled = true;
}
// Checks if Start ran once already.
// onEnable runs by default before Start so not everything is initialized.
// And I don't want to reinitialize the collider everytime I re-enable a unit's detection.
protected void OnEnable()
{
if (_hasStartBeenCalled)
{
StartCoroutine(C_DetectCoroutine());
}
}
// Looped detection every 'delay' amount
private IEnumerator C_DetectCoroutine()
private IEnumerator C_DetectCoroutine()
{
// Can happen if unit dies
if (_entityLinked == null) yield break;
@ -66,12 +81,12 @@ public class Detection : MonoBehaviour
}
}
private void OnTriggerStay2D(Collider2D other)
private void OnTriggerStay2D(Collider2D other)
{
if(_entityLinked != null && _projectileDamage == 0)
if (_entityLinked != null && _projectileDamage == 0)
{
GameObject detected = other.gameObject;
string tagToCheck =
string tagToCheck =
(_entityLinked.gameObject.tag == "Ally") ? "Opponent" : "Ally";
if (detected.tag == tagToCheck)
@ -82,7 +97,25 @@ public class Detection : MonoBehaviour
detectedEntities.Add(entity);
}
}
}
}
}
private void OnTriggerExit2D(Collider2D other)
{
if (_entityLinked != null)
{
GameObject detected = other.gameObject;
string tagToCheck =
(_entityLinked.gameObject.tag == "Ally") ? "Opponent" : "Ally";
if (detected.tag == tagToCheck)
{
Entity entity = other.GetComponent<Entity>();
if (detectedEntities.Contains(entity))
{
detectedEntities.Remove(entity);
}
}
}
}
public Entity GetClosest()

View File

@ -24,6 +24,18 @@ public class Root : MonoBehaviour
}
}
public void AttackWithCustomDamage(int damage)
{
if (_entity == null || _entity.Enemy == null) return;
_entity.Enemy.Hit(damage);
if (_entity.Enemy.Hp <= 0)
{
_entity.Enemy.Death();
_entity.IsEnemyDetected = false;
}
}
public void ShotProjectile()
{
Rigidbody2D _rigidbodyAlly;