Basics of bonus collection and using.

This commit is contained in:
AlexMamontow 2021-08-19 23:07:26 +03:00
parent 3bacc3c516
commit 177f01fd38
39 changed files with 3021 additions and 385 deletions

View File

@ -47,7 +47,7 @@ TextureImporter:
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteBorder: {x: 128, y: 128, z: 128, w: 128}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1

View File

@ -47,7 +47,7 @@ TextureImporter:
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteBorder: {x: 128, y: 128, z: 128, w: 128}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1

View File

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

View File

@ -0,0 +1,171 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4203281806542915686
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4203281806542915685}
- component: {fileID: 5943765404306020329}
- component: {fileID: 388713780}
- component: {fileID: 388713782}
- component: {fileID: 388713781}
m_Layer: 0
m_Name: BonusAttackContainer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4203281806542915685
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4203281806542915686}
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: 1589414037594445647}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5943765404306020329
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4203281806542915686}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b298673af6158984f907a4f27e5524cb, type: 3}
m_Name:
m_EditorClassIdentifier:
bonus: {fileID: 11400000, guid: c786d5172da5bb04594d5629474bddd8, type: 2}
--- !u!54 &388713780
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4203281806542915686}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &388713782
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4203281806542915686}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0.73, z: 0}
--- !u!114 &388713781
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4203281806542915686}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f3cf6346f0367543a91eb44cbb85b14, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &4203281804588797499
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4203281806542915685}
m_Modifications:
- target: {fileID: 2814861375992923086, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_Name
value: BonusAttack
objectReference: {fileID: 0}
- target: {fileID: 3157318353129748979, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.731
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e2feb442e3095ec4aa195eeb2b66fb08, type: 3}
--- !u!4 &1589414037594445647 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3196347567083805044, guid: e2feb442e3095ec4aa195eeb2b66fb08,
type: 3}
m_PrefabInstance: {fileID: 4203281804588797499}
m_PrefabAsset: {fileID: 0}

View File

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

View File

@ -0,0 +1,171 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8097115959948697207
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8097115959948697204}
- component: {fileID: 4518760383569281139}
- component: {fileID: 685896561}
- component: {fileID: 685896563}
- component: {fileID: 685896562}
m_Layer: 0
m_Name: BonusProtectContainer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8097115959948697204
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097115959948697207}
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: 3671408027723645473}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4518760383569281139
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097115959948697207}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b298673af6158984f907a4f27e5524cb, type: 3}
m_Name:
m_EditorClassIdentifier:
bonus: {fileID: 11400000, guid: e06948e87d5f15d4aac68d4abcffe292, type: 2}
--- !u!54 &685896561
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097115959948697207}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &685896563
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097115959948697207}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0.73, z: 0}
--- !u!114 &685896562
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097115959948697207}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f3cf6346f0367543a91eb44cbb85b14, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &3542199505056966218
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 8097115959948697204}
m_Modifications:
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.731
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 311211224759920785, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 0}
- target: {fileID: 617218703874866897, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
propertyPath: m_Name
value: BonusProtection
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2f1a385431c99b64f96b9d73008ac91a, type: 3}
--- !u!4 &3671408027723645473 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 277848274172404843, guid: 2f1a385431c99b64f96b9d73008ac91a,
type: 3}
m_PrefabInstance: {fileID: 3542199505056966218}
m_PrefabAsset: {fileID: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4a38eff5bf7424e45b29d928dfbe9f0b
PrefabImporter:
externalObjects: {}
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: cab700e817ae53f49be6c90d5fd5cdf5, type: 3}
m_Name: TestAttack
m_EditorClassIdentifier:
bonusType: 0
icon: {fileID: 21300000, guid: 3eea92b60b81945068925f98ef44b940, type: 3}
bonusLevel: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c786d5172da5bb04594d5629474bddd8
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: cab700e817ae53f49be6c90d5fd5cdf5, type: 3}
m_Name: TestDefend
m_EditorClassIdentifier:
bonusType: 1
icon: {fileID: 21300000, guid: ebc9a94c7b8dc445eb2d8081a53db2b0, type: 3}
bonusLevel: 0

View File

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

View File

@ -0,0 +1,184 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4951693946268334740
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4951693946268334747}
- component: {fileID: 4951693946268334746}
m_Layer: 5
m_Name: BonusSlot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4951693946268334747
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4951693946268334740}
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: 4951693947175619846}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4951693946268334746
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4951693946268334740}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e28946bc7a7faa3428c7ea9f8bb4bfe9, type: 3}
m_Name:
m_EditorClassIdentifier:
icon: {fileID: 4951693947175619844}
--- !u!1 &4951693947175619847
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4951693947175619846}
- component: {fileID: 4951693947175619851}
- component: {fileID: 4951693947175619844}
- component: {fileID: 4951693947175619845}
m_Layer: 5
m_Name: BonusButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4951693947175619846
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4951693947175619847}
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: 4951693946268334747}
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!222 &4951693947175619851
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4951693947175619847}
m_CullTransparentMesh: 1
--- !u!114 &4951693947175619844
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4951693947175619847}
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 &4951693947175619845
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4951693947175619847}
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: 4951693947175619844}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 4951693946268334746}
m_TargetAssemblyTypeName: BonusSlot, Assembly-CSharp
m_MethodName: UseItem
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

View File

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

View File

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

View File

@ -0,0 +1,249 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4020685150541603057
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4020685150541603056}
- component: {fileID: 4020685150541603069}
- component: {fileID: 4020685150541603070}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4020685150541603056
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685150541603057}
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: 4020685152307600106}
m_Father: {fileID: 4020685151527544174}
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: 512, y: 256}
m_SizeDelta: {x: 256, y: 256}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4020685150541603069
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685150541603057}
m_CullTransparentMesh: 0
--- !u!114 &4020685150541603070
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685150541603057}
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: 87f8764f744cf664d882b6c9cfa9fb6b, 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 &4020685151527544175
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4020685151527544174}
- component: {fileID: 4020685151527544172}
- component: {fileID: 4020685151527544173}
- component: {fileID: 4020685151527544171}
m_Layer: 5
m_Name: MoveJoystick
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4020685151527544174
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685151527544175}
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: 4020685150541603056}
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: 1080, y: 700}
m_Pivot: {x: 0, y: 0}
--- !u!222 &4020685151527544172
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685151527544175}
m_CullTransparentMesh: 0
--- !u!114 &4020685151527544173
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685151527544175}
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: 0}
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: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4020685151527544171
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685151527544175}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a47f546fc70ec8428172694e78e4288, type: 3}
m_Name:
m_EditorClassIdentifier:
handleRange: 1
deadZone: 0.3
axisOptions: 0
snapX: 0
snapY: 0
background: {fileID: 4020685150541603056}
handle: {fileID: 4020685152307600106}
--- !u!1 &4020685152307600107
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4020685152307600106}
- component: {fileID: 4020685152307600104}
- component: {fileID: 4020685152307600105}
m_Layer: 5
m_Name: Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4020685152307600106
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685152307600107}
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: 4020685150541603056}
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: 256, y: 256}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4020685152307600104
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685152307600107}
m_CullTransparentMesh: 0
--- !u!114 &4020685152307600105
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4020685152307600107}
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: 80955831ce9ede245ae9aed439507ed6, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
[CreateAssetMenu(fileName = "New Bonus", menuName = "Bonuses/New Bonus")]
public class Bonus : ScriptableObject
{
public BonusType bonusType = BonusType.Attack;
public Sprite icon;
public int bonusLevel;
public void Use()
{
Debug.Log("Using " /*+ itemName*/);
FindObjectOfType<PlayerBonusController>().RemoveBonus(this);
}
/*public void RemoveFromInventory()
{
Inventory.instance.Remove(this);
}*/
}
public enum BonusType
{
Attack,
Defend
}
public enum BonusSpecification
{
Tower,
None
}

View File

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

View File

@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BonusCollisionController : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
var playerBonusController = other.gameObject.GetComponent<PlayerBonusController>();
if (playerBonusController)
{
var currentBonus = GetComponent<BonusVisuals>().bonus;
bool bonusPickedUp = playerBonusController.AddBonusToPlayer(currentBonus);
if (bonusPickedUp)
{
Debug.Log("picked up " + gameObject.name);
Destroy(gameObject);
}
}
}
}

View File

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

View File

@ -0,0 +1,43 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class BonusSlot : MonoBehaviour
{
public Image icon;
//public Button removeBtn;
private Bonus _item;
public void Additem(Bonus newItem)
{
_item = newItem;
icon.sprite = _item.icon;
icon.enabled = true;
//removeBtn.interactable = true;
}
public void ClearSlot()
{
_item = null;
icon.sprite = null;
icon.enabled = false;
// removeBtn.interactable = false;
}
/*public void OnRemoveBtn()
{
Inventory.instance.Remove(item);
}*/
public void UseItem()
{
if (_item != null)
{
_item.Use();
}
}
}

View File

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

View File

@ -0,0 +1,66 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BonusUI : MonoBehaviour
{
public Transform attackBonusParent;
public Transform protectBonusParent;
//public GameObject inventoryUI;
public PlayerBonusController bonusController;
BonusSlot[] attackSlots;
BonusSlot[] protectSlots;
private void Start()
{
attackSlots = attackBonusParent.GetComponentsInChildren<BonusSlot>();
protectSlots = protectBonusParent.GetComponentsInChildren<BonusSlot>();
bonusController.OnBonusesChanged += UpdateUI;
}
/*private void Update()
{
if (Input.GetButtonDown("Inventory"))
{
inventoryUI.SetActive(!inventoryUI.activeSelf);
if (inventoryUI.activeSelf)
{
Cursor.lockState = CursorLockMode.None;
}
else
{
Cursor.lockState = CursorLockMode.Locked;
}
}
}*/
private void UpdateUI()
{
for (int i = 0; i < attackSlots.Length; i++)
{
if (i < bonusController.attackBonuses.Count)
{
attackSlots[i].Additem(bonusController.attackBonuses[i]);
}
else
{
attackSlots[i].ClearSlot();
}
}
for (int i = 0; i < protectSlots.Length; i++)
{
if (i < bonusController.protectBonuses.Count)
{
protectSlots[i].Additem(bonusController.protectBonuses[i]);
}
else
{
protectSlots[i].ClearSlot();
}
}
}
}

View File

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

View File

@ -0,0 +1,59 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class PlayerBonusController : MonoBehaviour
{
public int maxBonusCount = 3;
public List<Bonus> attackBonuses;
public List<Bonus> protectBonuses;
public Action OnBonusesChanged;
public bool AddBonusToPlayer(Bonus bonus)
{
if (bonus.bonusType == BonusType.Attack)
{
if (attackBonuses.Count < maxBonusCount)
{
attackBonuses.Add(bonus);
OnBonusesChanged?.Invoke();
return true;
}
else
{
return false;
}
}
else
{
if (protectBonuses.Count < maxBonusCount)
{
protectBonuses.Add(bonus);
OnBonusesChanged?.Invoke();
return true;
}
else
{
return false;
}
}
}
public void RemoveBonus(Bonus bonus)
{
if (protectBonuses.Contains(bonus))
{
protectBonuses.Remove(bonus);
}
else
{
attackBonuses.Remove(bonus);
}
OnBonusesChanged?.Invoke();
}
}

View File

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

View File

@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BonusSpawner : MonoBehaviour
{
public float minBonusSpawnTime = 5f, maxBonusSpwnTime = 20f;
public List<GameObject> bounsPrefs;
private IEnumerator SpawnRandomBonus()
{
while (true)
{
float bonusSpawnRate = Random.Range(minBonusSpawnTime, maxBonusSpwnTime);
yield return new WaitForSeconds(bonusSpawnRate);
List<PlayerState> activePlayers = PlayerDeathController.alivePlayers;
var chosenPlayer = activePlayers[Random.Range(0, activePlayers.Count)];
TileInfo availableTile = TileManagment.GetTile(chosenPlayer.ownerIndex);
int bonusIndex = Random.Range(0, bounsPrefs.Count);
GameObject chosenBonus = bounsPrefs[bonusIndex];
Instantiate(chosenBonus, availableTile.tilePosition, chosenBonus.transform.rotation);
Debug.Log("spawned");
}
}
private void Start()
{
StartCoroutine(SpawnRandomBonus());
}
}

View File

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

View File

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BonusVisuals : MonoBehaviour
{
public Bonus bonus;
}

View File

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

View File

@ -11,8 +11,9 @@ public class PlayerDeathController : MonoBehaviour
public float resurrectTime = 7f;
private List<PlayerState> alivePlayers = new List<PlayerState>();
private List<PlayerState> deadPlayers = new List<PlayerState>();
public static List<PlayerState> alivePlayers = new List<PlayerState>();
public static List<PlayerState> deadPlayers = new List<PlayerState>();
private List<float> lastDeadTime = new List<float>();
private float updateTime = 1f;

View File

@ -118,6 +118,21 @@ public class TileManagment : MonoBehaviour
return GetTile(tilePos);
}
public static TileInfo GetTile(TileOwner owner)
{
var ownerTiles = charTiles[(int)owner];
int randomTileIndex = UnityEngine.Random.Range(0, ownerTiles.Count - 1);
TileInfo resultTile = ownerTiles[randomTileIndex];
while (!resultTile.canMove)
{
randomTileIndex = UnityEngine.Random.Range(0, ownerTiles.Count - 1);
resultTile = ownerTiles[randomTileIndex];
}
return resultTile;
}
public static List<TileInfo> GetOtherTiles(TileInfo currentTile, TileOwner ownerIndex)
{
List<TileInfo> otherTiles = new List<TileInfo>();
@ -317,51 +332,5 @@ public class TileManagment : MonoBehaviour
}
}
}
/* public static void SetSurroundedTiles(List<TileInfo> tiles, TileOwner ownerIndex, TileInfo startTile)
{
List<TileInfo> surroundedTiles = new List<TileInfo>();
var q = new Queue<TileInfo>(tiles.Count);
q.Enqueue(startTile);
int iterations = 0;
while (q.Count > 0)
{
var tile = q.Dequeue();
if (q.Count > tiles.Count)
{
throw new Exception("The algorithm is probably looping. Queue size: " + q.Count);
}
if (tile.isBorderTile) //we are in a wrong area
{
surroundedTiles.Clear();
return;
}
if (surroundedTiles.Contains(tile))
{
continue;
}
surroundedTiles.Add(tile);
var adjacentTiles = GetOtherTiles(tile, ownerIndex);
foreach (TileInfo newTile in adjacentTiles)
{
q.Enqueue(newTile);
}
iterations++;
}
//Debug.Log("Found " +surroundedTiles.Count + " tiles");
//Debug.Log("Iterations " + iterations);
foreach (TileInfo tile in surroundedTiles)
{
tile.whoCanEasyGetTile = ownerIndex;
}
Debug.Log("Surrounded " + surroundedTiles.Count);
}*/
}

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.cinemachine": "2.6.5",
"com.unity.collab-proxy": "1.5.7",
"com.unity.ide.rider": "2.0.7",

View File

@ -1,5 +1,11 @@
{
"dependencies": {
"com.unity.2d.sprite": {
"version": "1.0.0",
"depth": 0,
"source": "builtin",
"dependencies": {}
},
"com.unity.cinemachine": {
"version": "2.6.5",
"depth": 0,