Merge branch 'Alexei' into Zakhar
# Conflicts: # Assets/ExternalDependencyManager.meta # Assets/ExternalDependencyManager/Editor.meta # Assets/ExternalDependencyManager/Editor/1.2.167.meta # Assets/GoogleMobileAds.meta # Assets/GoogleMobileAds/Editor.meta # Assets/GoogleMobileAds/Editor/Resources.meta # Assets/GoogleMobileAds/Editor/Resources/DummyAds.meta # Assets/GoogleMobileAds/Editor/Resources/DummyAds/AdImages.meta # Assets/GoogleMobileAds/Editor/Resources/DummyAds/AppOpen.meta # Assets/GoogleMobileAds/Editor/Resources/DummyAds/Banners.meta # Assets/GoogleMobileAds/Editor/Resources/DummyAds/Interstitials.meta # Assets/GoogleMobileAds/Editor/Resources/DummyAds/Rewarded.meta # Assets/Plugins/Android.meta # Assets/Plugins/Android/GoogleMobileAdsPlugin.androidlib.meta # Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar.meta # Assets/Plugins/Android/androidx.arch.core.core-common-2.0.1.jar.meta # Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.1.aar.meta # Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar.meta # Assets/Plugins/Android/androidx.browser.browser-1.0.0.aar.meta # Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar.meta # Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar.meta # Assets/Plugins/Android/androidx.core.core-1.2.0.aar.meta # Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar.meta # Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar.meta # Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar.meta # Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar.meta # Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar.meta # Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar.meta # Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar.meta # Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar.meta # Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar.meta # Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar.meta # Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar.meta # Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar.meta # Assets/Plugins/Android/androidx.lifecycle.lifecycle-service-2.0.0.aar.meta # Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar.meta # Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar.meta # Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar.meta # Assets/Plugins/Android/androidx.print.print-1.0.0.aar.meta # Assets/Plugins/Android/androidx.room.room-common-2.1.0.jar.meta # Assets/Plugins/Android/androidx.room.room-runtime-2.1.0.aar.meta # Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar.meta # Assets/Plugins/Android/androidx.sqlite.sqlite-2.0.1.aar.meta # Assets/Plugins/Android/androidx.sqlite.sqlite-framework-2.0.1.aar.meta # Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar.meta # Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar.meta # Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar.meta # Assets/Plugins/Android/androidx.work.work-runtime-2.1.0.aar # Assets/Plugins/Android/androidx.work.work-runtime-2.1.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-ads-20.2.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-20.2.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-17.0.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-20.2.0.aar # Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-20.2.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-basement-17.6.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-18.0.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-18.0.0.aar.meta # Assets/Plugins/Android/com.google.android.gms.play-services-tasks-17.0.0.aar.meta # Assets/Plugins/Android/com.google.android.ump.user-messaging-platform-1.0.0.aar.meta # Assets/Plugins/Android/com.google.guava.listenablefuture-1.0.jar.meta # ProjectSettings/GvhProjectSettings.xml
This commit is contained in:
commit
b5a80f14dd
56
.vscode/settings.json
vendored
Normal file
56
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"files.exclude":
|
||||
{
|
||||
"**/.DS_Store":true,
|
||||
"**/.git":true,
|
||||
"**/.gitignore":true,
|
||||
"**/.gitmodules":true,
|
||||
"**/*.booproj":true,
|
||||
"**/*.pidb":true,
|
||||
"**/*.suo":true,
|
||||
"**/*.user":true,
|
||||
"**/*.userprefs":true,
|
||||
"**/*.unityproj":true,
|
||||
"**/*.dll":true,
|
||||
"**/*.exe":true,
|
||||
"**/*.pdf":true,
|
||||
"**/*.mid":true,
|
||||
"**/*.midi":true,
|
||||
"**/*.wav":true,
|
||||
"**/*.gif":true,
|
||||
"**/*.ico":true,
|
||||
"**/*.jpg":true,
|
||||
"**/*.jpeg":true,
|
||||
"**/*.png":true,
|
||||
"**/*.psd":true,
|
||||
"**/*.tga":true,
|
||||
"**/*.tif":true,
|
||||
"**/*.tiff":true,
|
||||
"**/*.3ds":true,
|
||||
"**/*.3DS":true,
|
||||
"**/*.fbx":true,
|
||||
"**/*.FBX":true,
|
||||
"**/*.lxo":true,
|
||||
"**/*.LXO":true,
|
||||
"**/*.ma":true,
|
||||
"**/*.MA":true,
|
||||
"**/*.obj":true,
|
||||
"**/*.OBJ":true,
|
||||
"**/*.asset":true,
|
||||
"**/*.cubemap":true,
|
||||
"**/*.flare":true,
|
||||
"**/*.mat":true,
|
||||
"**/*.meta":true,
|
||||
"**/*.prefab":true,
|
||||
"**/*.unity":true,
|
||||
"build/":true,
|
||||
"Build/":true,
|
||||
"Library/":true,
|
||||
"library/":true,
|
||||
"obj/":true,
|
||||
"Obj/":true,
|
||||
"ProjectSettings/":true,
|
||||
"temp/":true,
|
||||
"Temp/":true
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84d861162f8d1ad49a87400ae042a3c6
|
||||
guid: 27c6a3332231cbb4cb860e99f75d26c0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02c5b57c6632922478f72d4aefe978d7
|
||||
guid: 2eda03d1e8fa2ee49b02f5be1fb44dd8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d025c6b2800003849830ede3e207eb4a
|
||||
guid: 2986ad325aa0f9445950f56d88170368
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee3ed900d9682fd48bd6b069dc4295dc
|
||||
guid: 5873076b45a4bdc428dd4a6c74a09cbb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fb32b4b1e965cf48a7a85a5ac1eee9b
|
||||
guid: fb3364c6828d3234686e3985178ab4ee
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8eafef47dac7eeb4d8be254312c5f4d8
|
||||
guid: 3ca1f8699c1fcea48b25c5f34b691d34
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cdcc3ae04c5a0c846b646041b656187d
|
||||
guid: 66366ae38b0eb7d4092ea7e4c9c0d719
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 528404ca48d0fe84ebca28ae7d57aa48
|
||||
guid: 10d3d8d8dbbc6d64dbdcc7f2e66b1911
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d65a6b74d734af4e95c361f52db8910
|
||||
guid: 7f71517e2d0637c44b753287f06efca0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06e0c07f414d22540a04aea07925c05f
|
||||
guid: d73977e10108c1e4eb9785c8ffa3cce5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a91b87545729bc46a515221f9765268
|
||||
guid: e98a3819221ca8448a0adecb207be6a6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28d544029f4f92b4f81fc960bf54dc05
|
||||
guid: 7d14d2c26f55ecf488659cab31b9abdc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ed0344c448c34840982ecc03bb6ad21
|
||||
guid: de86a764d08949c41aebc59247c8b061
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5f5c7c5047c7e44d9b08a3b312f2495
|
||||
guid: ddafd279e660dce4a918d34fcf832fbd
|
||||
folderAsset: yes
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c96ab5cc4d9bb974db3041c9501ae584
|
||||
guid: 4b766089bcb3add409ec8addc099f870
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09d724b9deed0d1489c3fa63172199e0
|
||||
guid: 82b1ce8012e9803499f564b67a73df4f
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 488c0bb0ff29ec64abfed4039263e7e2
|
||||
guid: 6a0490a1cefec2443a778c64443c4b66
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a45ea5ed20a93eb4f955acce79fbb095
|
||||
guid: ed3944bb8d19e2842a1518a89b47c708
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 438a9950a58566341964da89daa5d283
|
||||
guid: d12035546e3d01a4e8463263dba8f987
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0b039f0731d9a54db402854eba8c81f
|
||||
guid: 8cb5934fc8513944d806b6bc4d825d86
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26f351d7eab8f5c4f82301c379ad14c0
|
||||
guid: e6c3d6bc152ceea48834b0528982d6b5
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bd37fca4bb275b4fadb18755581aa89
|
||||
guid: 625135fbe3ac23246ab04acab9f5d505
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55b8ac18450b7284ebc0b0c0dc179ae0
|
||||
guid: 23209a7612974dc43b2146bb91e8027f
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a14e5a93b40e71f40bbbcb0104efcbbd
|
||||
guid: 49ec9dd1b25acf446ac19bfcbd9d6460
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 122f89876113a56419592cce27b7a7d1
|
||||
guid: 7ffdda4aad2b0d7468c73b7813ff3cfe
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5dce919fe2a2b3c4994d3cd7f97f3501
|
||||
guid: b2373629baa667e44a6b5d981a2d4e1d
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e6e0bcd87f34fc47bb8b1ac053e4384
|
||||
guid: 83e275c0cb6559d4695e306e4c3b4c39
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f6faf14d7929d342b89708e4918cffb
|
||||
guid: b4bf380f55e1bf848be010dd7c7a6795
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 964e0a838744c4343af701da9a718837
|
||||
guid: d9bced398bad1a749bfff2c00d05da2f
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf24d80613e60df42b1f7a8a2708d1bd
|
||||
guid: 73bdd63d7c4b7c64fbbbfe0f77b45e52
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c5f0944f48934541bd7a3c03603e629
|
||||
guid: c9b0beb2d3f50344a9a21a91503f5617
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee58a9ae85628fe4380c378c8c326cdc
|
||||
guid: c982d00faceeee943805abdf6cfc0c96
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95db855d068cae44f8db25ae53648c62
|
||||
guid: 53653b1cadbd021409679c5cb235a2f3
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab9f9eb2753627240a2b7f21e9ab2744
|
||||
guid: 7f69066eea117914d9ac826a2217522e
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ec2272dfc133734bb7ba44ee4957e73
|
||||
guid: 76c5914d7a1da424a88a35f20e5692d2
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e618fdda3bc5b246924abc3f1fd28a5
|
||||
guid: 00cd73ff7c489cc4a8c37a9fbb7ee8e8
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f9ce6ecf537fc647babc201fcff21fb
|
||||
guid: f2a0c63002b81d44698c4ce2f1acce64
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4320fd02357f1e34f89b5c32add41865
|
||||
guid: 37e75aeb59804f44695bba6b9872c423
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af2a2f19a84db0c4fb9df13e8a3e189f
|
||||
guid: c97e1fefd7f47e74692e92021f86db3b
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0aea51280204fcd41ad35463f163ed1c
|
||||
guid: ea521a3f1cb32304f920270cfde7989c
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b7dd20ef2fa0f44697c10166b7113ed
|
||||
guid: 57f14a6c5f9b8da438f31702628844f4
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05c2c051b453c274c9fc5609871f23d6
|
||||
guid: 748c878d3bdca734f961d8fb6e0cb749
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8265968c12e7acb49bf6453a658b0d83
|
||||
guid: 1724571b25503f04496ff9491e82b7ad
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd63fb5474740644d809de363a7db970
|
||||
guid: 0ab71eb35c0c2c64baa2f187b0869129
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 756c3ddb01e9e2846af6318cf3694c18
|
||||
guid: 35608073a9a7be34bba87b4e4f82d0e1
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08007386ada302c43b120a2cf0ac1b5a
|
||||
guid: f9035822a8ee2bc46bd312eed601ffa7
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e40745a02a3f8b5478bc9acc75993097
|
||||
guid: a17e31471274fc64ea9d6d358f1309a5
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5360f6a0fa3cf1e4aabd049dc0f221bd
|
||||
guid: 6a20e9b0a865c774ea35df659fdf58d0
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fcabf58dfbb6eee40a5f143aad3e3d54
|
||||
guid: e3eb5d467aa76344fa5938d41ff2e314
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be203a8a6fec56a4999b2d376be56685
|
||||
guid: b4d7c71ce48a1aa41bbd8dfac2918c6b
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8a13e5c10985704d841af337c4e3563
|
||||
guid: eaacb6c560effa545bf8c11311ca9e4a
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f218bdbc18ca57246b56395b92aba7bd
|
||||
guid: 2ed022bf9e27a734e927e9a99876e291
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35c97dea558d65248a3b035e07da1ff3
|
||||
guid: 5cc61a3c5cb43e44d818bb0a4fe9693a
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d2d3dbb60ac2b8489edd715bf064632
|
||||
guid: 3ca9ca6ed7252c744a25a9aea5a8fa03
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa8af91e7afe8584da56539c4814b201
|
||||
guid: 7ff516e0553692c4b9608325d0ddeeae
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d818c2890b65d74f9f6784cc35bf94f
|
||||
guid: f15e538886049384eae8045b3fcd696b
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71a187636a2cb1241991b81c7c30a289
|
||||
guid: 69f4b70b4a800a444987e11b1df83992
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53a49df57b30b724fb14c94ace156254
|
||||
guid: 5d6721d7387917c4084970f5fe647107
|
||||
labels:
|
||||
- gpsr
|
||||
PluginImporter:
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
50
Assets/Resources/Data/add.prefab
Normal file
50
Assets/Resources/Data/add.prefab
Normal file
@ -0,0 +1,50 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !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: add
|
||||
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: []
|
||||
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:
|
7
Assets/Resources/Data/add.prefab.meta
Normal file
7
Assets/Resources/Data/add.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1328a0e1e252d60408278772275bf560
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -215,8 +215,9 @@ RectTransform:
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 1475618469}
|
||||
- {fileID: 1787891160}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@ -233,7 +234,6 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 963194228}
|
||||
- component: {fileID: 963194227}
|
||||
- component: {fileID: 963194229}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
@ -298,23 +298,6 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0}
|
||||
--- !u!114 &963194229
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sharedProfile: {fileID: 11400000, guid: 2de9544b84ed15540888b484d269757d, type: 2}
|
||||
isGlobal: 1
|
||||
blendDistance: 0
|
||||
weight: 1
|
||||
priority: 0
|
||||
--- !u!1 &1475618468
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -468,8 +451,56 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1787891159
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1787891160}
|
||||
- component: {fileID: 1787891161}
|
||||
m_Layer: 5
|
||||
m_Name: add
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1787891160
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1787891159}
|
||||
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: 763084232}
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1787891161
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1787891159}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a7c276b4af35fbc4a80539b97e444f32, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1854206697
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
8
Assets/Scripts/AI.meta
Normal file
8
Assets/Scripts/AI.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e386aacf8bee41bb9a58627d03d3d0fb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
36
Assets/Scripts/AI/AIAgent.cs
Normal file
36
Assets/Scripts/AI/AIAgent.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Controller;
|
||||
using Data;
|
||||
using DG.Tweening;
|
||||
using Runtime.Controller;
|
||||
using Units;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace.AI
|
||||
{
|
||||
public class AIAgent : IFixedExecute, IExecute
|
||||
{
|
||||
private Unit _enemy;
|
||||
private Camera _camera;
|
||||
|
||||
public AIAgent(UnitInfo enemyInfo, Unit enemy)
|
||||
{
|
||||
_enemy = enemy;
|
||||
_camera = Camera.main;
|
||||
}
|
||||
|
||||
public void FixedExecute()
|
||||
{
|
||||
//throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/Scripts/AI/AIAgent.cs.meta
Normal file
3
Assets/Scripts/AI/AIAgent.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f194fcc1a57f4ef1a141dd0cf1911cee
|
||||
timeCreated: 1641464160
|
47
Assets/Scripts/AI/AIManager.cs
Normal file
47
Assets/Scripts/AI/AIManager.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
using DefaultNamespace.AI;
|
||||
|
||||
namespace AI
|
||||
{
|
||||
public class AIManager
|
||||
{
|
||||
private List<AIAgent> _agents;
|
||||
|
||||
// private void SetBehaviour(BotState state)
|
||||
// {
|
||||
// //leftInput = Vector2.zero;
|
||||
// switch (state)
|
||||
// {
|
||||
// case BotState.Patrol:
|
||||
// MoveAlongPath();
|
||||
// break;
|
||||
// case BotState.Agressive:
|
||||
// MoveToEnemy(_currentEnemy);
|
||||
// break;
|
||||
// case BotState.Attack:
|
||||
// AttackEnemy(_currentEnemy);
|
||||
// break;
|
||||
// case BotState.CollectingBonus:
|
||||
// MoveToBonus(_currentTargetTile);
|
||||
// break;
|
||||
// case BotState.ProtectBonusUsage:
|
||||
// PlaceProtectBonus(_playerState.currentTile);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public enum BotState
|
||||
{
|
||||
Patrol,
|
||||
Agressive,
|
||||
Attack,
|
||||
CollectingBonus,
|
||||
AttackBonusUsage,
|
||||
ProtectBonusUsage,
|
||||
Dead
|
||||
}
|
||||
}
|
3
Assets/Scripts/AI/AIManager.cs.meta
Normal file
3
Assets/Scripts/AI/AIManager.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c025c58c1c7454ca7a92f229181148e
|
||||
timeCreated: 1641464147
|
543
Assets/Scripts/AI/AI_BotController.cs
Normal file
543
Assets/Scripts/AI/AI_BotController.cs
Normal file
@ -0,0 +1,543 @@
|
||||
// using System.Collections;
|
||||
// using System.Collections.Generic;
|
||||
// using UnityEngine;
|
||||
// using System;
|
||||
// using AI;
|
||||
// using HexFiled;
|
||||
// using Items;
|
||||
//
|
||||
// public class AI_BotController : MonoBehaviour
|
||||
// {
|
||||
// public bool isAIActive = true;
|
||||
//
|
||||
// public BotState botState = BotState.Patrol;
|
||||
// public Vector2 leftInput, rightInput;
|
||||
//
|
||||
// public float agressiveTime = 5f;
|
||||
// public float attackTime = 2f;
|
||||
// public float updateBehaviourIn = 1f;
|
||||
// public float neutralCapDistance = 6f;
|
||||
// public float detectDistance = 4f;
|
||||
// public float bonusDetectDistance = 4f;
|
||||
// public float attackPlayerDistance = 4f;
|
||||
// public float bonusPlaceColdown = 4f;
|
||||
// public float protectionDistance = 4f;
|
||||
// public Action OnTouchDown, OnTouchUp;
|
||||
// public Action OnCurrentPathFinished, OnAttack;
|
||||
// public PlayerState _currentEnemy;
|
||||
// public HexCell _currentTargetTile;
|
||||
//
|
||||
// private Item _currentBonus;
|
||||
//
|
||||
// public List<HexCell> _currentFollowingPath = new List<HexCell>();
|
||||
//
|
||||
// private PlayerState _playerState;
|
||||
// private AttackEnergyController _attackEnergyController;
|
||||
// private ActionTriggerSystem _actionTriggerSystem;
|
||||
// private PlayerBonusController _playerBonuses;
|
||||
// private BonusSpawner _bonusController;
|
||||
// private CaptureController _captureController;
|
||||
// //private PlayerActionManager _actionManager;
|
||||
// //private Attack _attack;
|
||||
//
|
||||
// private Vector3 _startBotPoint;
|
||||
//
|
||||
// private bool isAttackedOnce = false;
|
||||
// private bool isUseBonusEnabled = true;
|
||||
//
|
||||
// private int _maxTriesToCalculatePath = 15;
|
||||
// private int _triesToCalculatePath = 0;
|
||||
//
|
||||
// private void Awake()
|
||||
// {
|
||||
// _playerState = GetComponent<PlayerState>();
|
||||
// _attackEnergyController = GetComponent<AttackEnergyController>();
|
||||
// _actionTriggerSystem = GetComponent<ActionTriggerSystem>();
|
||||
// _playerBonuses = GetComponent<PlayerBonusController>();
|
||||
// _bonusController = FindObjectOfType<BonusSpawner>();
|
||||
// _captureController = GetComponent<CaptureController>();
|
||||
//
|
||||
// _captureController.OnCaptureEnemyTile += TryToSuperJump;
|
||||
// _playerState.OnDefaultAction += RemoveCurrentBonus;
|
||||
//
|
||||
// if (isAIActive)
|
||||
// {
|
||||
// _playerState.OnInitializied += ActivateAI;
|
||||
// _playerState.OnCharStateChanged += ChangeBotBehaviour;
|
||||
// }
|
||||
//
|
||||
// OnCurrentPathFinished += StartPatrolBehaviour;
|
||||
// }
|
||||
//
|
||||
// private void RemoveCurrentBonus()
|
||||
// {
|
||||
// if (_currentBonus != null && _playerState.prevState == CharacterState.Action)
|
||||
// {
|
||||
// _playerBonuses.RemoveBonus(_currentBonus);
|
||||
// _currentBonus = null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void TryToSuperJump(HexCell current)
|
||||
// {
|
||||
// //Debug.Log("try SJ");
|
||||
// if (!isUseBonusEnabled)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// List<HexCell> adjTiles = TileManagment.GetOtherTiles(current, _playerState.ownerIndex);
|
||||
// if (adjTiles.Count == 0 || _playerBonuses.attackBonuses.Count == 0)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// //Debug.Log("try SJ");
|
||||
// HexCell targetTile = adjTiles[UnityEngine.Random.Range(0, adjTiles.Count)];
|
||||
// Bonus chosenBonus;
|
||||
// chosenBonus = _playerBonuses.attackBonuses[UnityEngine.Random.Range(0, _playerBonuses.attackBonuses.Count)];
|
||||
//
|
||||
// botState = BotState.AttackBonusUsage;
|
||||
// isUseBonusEnabled = false;
|
||||
// _actionTriggerSystem.TriggerAction(targetTile, chosenBonus.bonusAction);
|
||||
// _currentBonus = chosenBonus;
|
||||
// StartCoroutine(WaitTillBonusReset(chosenBonus.bonusAction.duration + bonusPlaceColdown));
|
||||
// }
|
||||
//
|
||||
// private IEnumerator WaitTillBonusReset(float time)
|
||||
// {
|
||||
// yield return new WaitForSeconds(time);
|
||||
// isUseBonusEnabled = true;
|
||||
// StartPatrolBehaviour();
|
||||
// }
|
||||
//
|
||||
// private void Start()
|
||||
// {
|
||||
// //ActivateAI();
|
||||
//
|
||||
// /* TileInfo currentTile = _playerState.currentTile;
|
||||
// _startBotPoint = currentTile.tilePosition;
|
||||
// TileInfo targetPathTile = TileManagment.GetClosestOtherTile(currentTile, _playerState.ownerIndex, _startBotPoint);
|
||||
// Debug.Log("current tile "+ currentTile);
|
||||
// Debug.Log("target tile "+ targetPathTile);
|
||||
// Debug.Log("Calculate path");
|
||||
// _currentFollowingPath = Pathfinding.FindPath(currentTile, targetPathTile, TileManagment.levelTiles, TileManagment.tileOffset);*/
|
||||
// }
|
||||
//
|
||||
// private void ChangeBotBehaviour(CharacterState newState)
|
||||
// {
|
||||
// switch (newState)
|
||||
// {
|
||||
// /*case CharacterState.Attack:
|
||||
//
|
||||
// break;
|
||||
// case CharacterState.Capture:
|
||||
//
|
||||
// break;*/
|
||||
// case CharacterState.Move:
|
||||
// leftInput = Vector2.zero;
|
||||
// return;
|
||||
// /*case CharacterState.Idle:
|
||||
//
|
||||
// return;
|
||||
// case CharacterState.Build:
|
||||
//
|
||||
// break;
|
||||
// default:
|
||||
// return;*/
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void ActivateAI()
|
||||
// {
|
||||
// //Debug.Log("Activate AI bot");
|
||||
// SetInitialBotParams();
|
||||
// StartPatrolBehaviour();
|
||||
// StartCoroutine(CheckBotState(updateBehaviourIn));
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// private void StartPatrolBehaviour() //looking for available tiles, calculating path and set patrol state
|
||||
// {
|
||||
// //calculate path
|
||||
// HexCell currentTile = _playerState.currentTile;
|
||||
// HexCell targetPathTile = TileManagment.GetClosestOtherTile(currentTile, _playerState.ownerIndex, _startBotPoint);
|
||||
// //Debug.Log(targetPathTile + " in pos "+ targetPathTile.tilePosition);
|
||||
// _triesToCalculatePath++;
|
||||
// if (_triesToCalculatePath < _maxTriesToCalculatePath)
|
||||
// {
|
||||
// if (!RecalculatePath(currentTile, targetPathTile))
|
||||
// {
|
||||
// Debug.Log("recursion");
|
||||
// StartPatrolBehaviour();
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.Log("not found path by max tries");
|
||||
//
|
||||
// targetPathTile = TileManagment.GetRandomOtherTile(_playerState.ownerIndex);
|
||||
// RecalculatePath(currentTile, targetPathTile);
|
||||
// }
|
||||
// if (_currentFollowingPath!=null)
|
||||
// {
|
||||
// botState = BotState.Patrol;
|
||||
// _triesToCalculatePath = 0;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// private void SetInitialBotParams()
|
||||
// {
|
||||
// _currentEnemy = null;
|
||||
// _startBotPoint = _playerState.currentTile.tilePosition;
|
||||
// //Debug.Log(_startBotPoint);
|
||||
// //botState = BotState.Patrol;
|
||||
// }
|
||||
//
|
||||
// private IEnumerator CheckBotState(float updateTime)
|
||||
// {
|
||||
// yield return new WaitForSeconds(UnityEngine.Random.Range(0.5f, 1f));
|
||||
//
|
||||
// while (true)
|
||||
// {
|
||||
// CheckBotState();
|
||||
// yield return new WaitForSeconds(updateTime);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void CheckBotState()
|
||||
// {
|
||||
// //Debug.Log("CheckState");
|
||||
// BotState newBotState;
|
||||
// if (CanPlaceProtectBonus())
|
||||
// {
|
||||
// newBotState = BotState.ProtectBonusUsage;
|
||||
// }
|
||||
// else if (IsBonusDetected())
|
||||
// {
|
||||
// newBotState = BotState.CollectingBonus;
|
||||
// //Debug.Log("CollectBonus");
|
||||
// }
|
||||
// else if (IsEnemyEnabledForAttack())
|
||||
// {
|
||||
// newBotState = BotState.Attack;
|
||||
// }
|
||||
// else if (IsEnemyCloseOrRude())
|
||||
// {
|
||||
// newBotState = BotState.Agressive;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// newBotState = BotState.Patrol;
|
||||
// }
|
||||
//
|
||||
// SetNewBotState(newBotState);
|
||||
// SetBehaviour(newBotState);
|
||||
// }
|
||||
//
|
||||
// private bool CanPlaceProtectBonus()
|
||||
// {
|
||||
//
|
||||
// if (botState == BotState.ProtectBonusUsage || botState == BotState.AttackBonusUsage)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// if (_playerBonuses.protectBonuses.Count == 0 || !isUseBonusEnabled)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// foreach (var enemy in _playerState.enemies)
|
||||
// {
|
||||
// if (enemy == null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// if (!enemy.gameObject.activeSelf)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// if (Vector3.Distance(_playerState.transform.position, enemy.transform.position) < protectionDistance)
|
||||
// {
|
||||
// //Debug.Log("can place");
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// private bool IsBonusDetected()
|
||||
// {
|
||||
// //Debug.Log("Detect bonus");
|
||||
// if (botState == BotState.CollectingBonus)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// foreach (var bonusObj in _bonusController.activeBonuses)
|
||||
// {
|
||||
// if (!_playerBonuses.CanTakeBonus(bonusObj.bonus.bonusType) || bonusObj ==null)
|
||||
// {
|
||||
// //Debug.Log("Can`t take or bonus doesn`t exists");
|
||||
//
|
||||
// continue;
|
||||
// }
|
||||
// if (Vector3.Distance(bonusObj.transform.position, _playerState.currentTile.tilePosition) < bonusDetectDistance)
|
||||
// {
|
||||
// //Debug.Log("All good");
|
||||
// _currentTargetTile = TileManagment.GetTile(bonusObj.transform.position);
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// private bool SetNewBotState(BotState newState)
|
||||
// {
|
||||
// if (botState != newState)
|
||||
// {
|
||||
// botState = newState;
|
||||
// return true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private bool IsEnemyEnabledForAttack()
|
||||
// {
|
||||
// if (isAttackedOnce)
|
||||
// return false;
|
||||
// if (botState != BotState.Attack && _attackEnergyController.IsReady())
|
||||
// {
|
||||
// foreach (PlayerState enemy in _playerState.enemies)
|
||||
// {
|
||||
// if (enemy == null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// if (!enemy.gameObject.activeSelf)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// foreach (var dir in TileManagment.basicDirections)
|
||||
// {
|
||||
// for (int i = 1; i <= attackPlayerDistance; i++)
|
||||
// {
|
||||
// HexCell checkTile = TileManagment.GetTile(_playerState.currentTile.tilePosition, dir, i);
|
||||
// if (checkTile == null || checkTile.tileOwnerIndex == TileOwner.Neutral)
|
||||
// {
|
||||
// break;
|
||||
// }
|
||||
// if (enemy.currentTile == checkTile)
|
||||
// {
|
||||
// _currentEnemy = enemy;
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// /*private bool IsEnemyEnabledForAttack()
|
||||
// {
|
||||
// if (isAttackedOnce)
|
||||
// return false;
|
||||
// if (botState != BotState.Attack && _attackEnergyController.IsReady())
|
||||
// {
|
||||
// foreach (PlayerState enemy in _playerState.enemies)
|
||||
// {
|
||||
// if (!enemy.gameObject.activeSelf)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// if (Vector3.Distance(enemy.currentTile.tilePosition, _playerState.currentTile.tilePosition) <= TileManagment.tileOffset * 1.1f)
|
||||
// {
|
||||
//
|
||||
// _currentEnemy = enemy;
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }*/
|
||||
//
|
||||
// private bool IsEnemyCloseOrRude()
|
||||
// {
|
||||
// if (isAttackedOnce)
|
||||
// return false;
|
||||
// if (botState == BotState.Patrol && _attackEnergyController.IsReady())
|
||||
// {
|
||||
// foreach (PlayerState enemy in _playerState.enemies)
|
||||
// {
|
||||
// if (enemy == null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// if (!enemy.gameObject.activeSelf)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// if (TileManagment.charTiles[(int)_playerState.ownerIndex].Contains(enemy.currentTile)) //if enemy standing on our tiles
|
||||
// {
|
||||
//
|
||||
// _currentEnemy = enemy;
|
||||
// return true;
|
||||
// }
|
||||
// float distanceToEnemy = Vector3.Distance(enemy.currentTile.tilePosition, _playerState.currentTile.tilePosition);
|
||||
// if (distanceToEnemy < detectDistance) //if enemy is close enough to us we starting to chase him fo some time
|
||||
// {
|
||||
// _currentEnemy = enemy;
|
||||
// StartCoroutine(CalmDown(agressiveTime));
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// private void SetBehaviour(BotState state)
|
||||
// {
|
||||
// //leftInput = Vector2.zero;
|
||||
// switch (state)
|
||||
// {
|
||||
// case BotState.Patrol:
|
||||
// MoveAlongPath();
|
||||
// break;
|
||||
// case BotState.Agressive:
|
||||
// MoveToEnemy(_currentEnemy);
|
||||
// break;
|
||||
// case BotState.Attack:
|
||||
// AttackEnemy(_currentEnemy);
|
||||
// break;
|
||||
// case BotState.CollectingBonus:
|
||||
// MoveToBonus(_currentTargetTile);
|
||||
// break;
|
||||
// case BotState.ProtectBonusUsage:
|
||||
// PlaceProtectBonus(_playerState.currentTile);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void PlaceProtectBonus(HexCell currentTile)
|
||||
// {
|
||||
// //Debug.Log("try protect");
|
||||
// Bonus chosenBonus = _playerBonuses.protectBonuses[UnityEngine.Random.Range(0, _playerBonuses.protectBonuses.Count)];
|
||||
// List<HexCell> targets = TileManagment.GetOwnerAdjacentTiles(currentTile, _playerState.ownerIndex);
|
||||
// HexCell target = targets[UnityEngine.Random.Range(0, targets.Count)];
|
||||
// _actionTriggerSystem.TriggerAction(target, chosenBonus.bonusAction);
|
||||
// isUseBonusEnabled = false;
|
||||
// _currentBonus = chosenBonus;
|
||||
// StartCoroutine(WaitTillBonusReset(chosenBonus.bonusAction.duration + bonusPlaceColdown));
|
||||
//
|
||||
// }
|
||||
//
|
||||
// private void Move(HexCell tile)
|
||||
// {
|
||||
// if (_currentFollowingPath.Count > 0 && tile!=null)
|
||||
// {
|
||||
// Vector3 dir3 = tile.tilePosition - _playerState.currentTile.tilePosition;
|
||||
// Vector2 dir2 = new Vector2(dir3.x, dir3.z);
|
||||
// leftInput = dir2.normalized;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void MoveToBonus(HexCell currentTarget)
|
||||
// {
|
||||
// bool isPathExists = RecalculatePath(_playerState.currentTile, currentTarget);
|
||||
// if (!isPathExists)
|
||||
// {
|
||||
// StartPatrolBehaviour();
|
||||
// }
|
||||
// MoveAlongPath();
|
||||
// }
|
||||
//
|
||||
// private void AttackEnemy(PlayerState currentEnemy)
|
||||
// {
|
||||
// leftInput = Vector2.zero;
|
||||
// _currentFollowingPath.Clear();
|
||||
// _actionTriggerSystem.TriggerAction(currentEnemy.currentTile, _playerState.defaultAction);
|
||||
// StartPatrolBehaviour();
|
||||
// }
|
||||
//
|
||||
// private void MoveToEnemy(PlayerState currentEnemy)
|
||||
// {
|
||||
// List<HexCell> allAdjacentTilesToTarget = TileManagment.GetAllAdjacentTiles(currentEnemy.currentTile);
|
||||
// HexCell adjacentTarget = allAdjacentTilesToTarget[0];
|
||||
// foreach (var tile in allAdjacentTilesToTarget)
|
||||
// {
|
||||
// if (tile.canMove)
|
||||
// {
|
||||
// adjacentTarget = tile;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// HexCell currentPos = _playerState.currentTile;
|
||||
// RecalculatePath(currentPos, adjacentTarget);
|
||||
// if (!RecalculatePath(currentPos, adjacentTarget))
|
||||
// {
|
||||
// //StartPatrolBehaviour();
|
||||
// return;
|
||||
// }
|
||||
// MoveAlongPath();
|
||||
// }
|
||||
//
|
||||
// private bool RecalculatePath(HexCell curentPos, HexCell target)
|
||||
// {
|
||||
// if (_currentFollowingPath != null)
|
||||
// {
|
||||
// _currentFollowingPath.Clear();
|
||||
// }
|
||||
// _currentFollowingPath = Pathfinding.FindPath(curentPos, target, TileManagment.levelTiles, TileManagment.tileOffset);
|
||||
// //Debug.Log("created path to " + target);
|
||||
// return _currentFollowingPath != null;
|
||||
//
|
||||
// }
|
||||
//
|
||||
// private void MoveAlongPath()
|
||||
// {
|
||||
// //Debug.Log("try to move next point");
|
||||
// if (_currentFollowingPath != null) //recalculate existing path or start anew one
|
||||
// {
|
||||
// if (_playerState.currentTile.tileOwnerIndex == _playerState.ownerIndex)
|
||||
// {
|
||||
// if (_playerState.currentTile == _currentFollowingPath[_currentFollowingPath.Count - 1])
|
||||
// {
|
||||
// //Debug.Log("finished path");
|
||||
// OnCurrentPathFinished?.Invoke();
|
||||
// return;
|
||||
// }
|
||||
// var currentTile = _playerState.currentTile;
|
||||
// var endTile = _currentFollowingPath[_currentFollowingPath.Count - 1];
|
||||
// if (!endTile.canMove)
|
||||
// {
|
||||
// endTile = TileManagment.GetClosestOtherTile(currentTile, _playerState.ownerIndex, _startBotPoint);
|
||||
// }
|
||||
// if (RecalculatePath(currentTile, endTile))
|
||||
// {
|
||||
// HexCell nextPathTile = _currentFollowingPath[1];
|
||||
// Move(nextPathTile);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (_playerState.currentTile.tileOwnerIndex == _playerState.ownerIndex)
|
||||
// {
|
||||
// //Debug.Log("finished path");
|
||||
// OnCurrentPathFinished?.Invoke();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// private IEnumerator CalmDown(float time)
|
||||
// {
|
||||
// yield return new WaitForSeconds(time);
|
||||
// _currentEnemy = null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
11
Assets/Scripts/AI/AI_BotController.cs.meta
Normal file
11
Assets/Scripts/AI/AI_BotController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 754e9bf36b6ab0b40a8b71c58aa34b04
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
114
Assets/Scripts/AI/Pathfinding.cs
Normal file
114
Assets/Scripts/AI/Pathfinding.cs
Normal file
@ -0,0 +1,114 @@
|
||||
using System.Collections.Generic;
|
||||
using HexFiled;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AI
|
||||
{
|
||||
public static class Pathfinding
|
||||
{
|
||||
public static List<HexCell> FindPath(HexCell startTile, HexCell endTile, List<HexCell> allTiles)
|
||||
{
|
||||
foreach (var tile in allTiles)
|
||||
{
|
||||
tile.gCost = 0f;
|
||||
tile.hCost = 0f;
|
||||
tile.fCost = 0f;
|
||||
|
||||
}
|
||||
|
||||
var tileOffset = HexGrid.HexDistance;
|
||||
var openNodes = new List<HexCell>();
|
||||
var closedNodes = new List<HexCell>();
|
||||
|
||||
startTile.gCost = 0f;
|
||||
startTile.hCost = Vector3.Distance(startTile.transform.position, endTile.transform.position);
|
||||
startTile.fCost = startTile.gCost + startTile.hCost;
|
||||
startTile.parent = null;
|
||||
openNodes.Add(startTile);
|
||||
|
||||
while (openNodes.Count > 0)
|
||||
{
|
||||
var currentNode = openNodes[0]; //looking for lowest value node
|
||||
foreach (var node in openNodes)
|
||||
{
|
||||
if (node.fCost < currentNode.fCost)
|
||||
{
|
||||
currentNode = node;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentNode == endTile)
|
||||
{
|
||||
return GetPathForNode(currentNode);
|
||||
}
|
||||
|
||||
openNodes.Remove(currentNode);
|
||||
closedNodes.Add(currentNode);
|
||||
//Debug.Log(currentNode.name);
|
||||
foreach (HexCell newNode in currentNode.GetListNeighbours())
|
||||
{
|
||||
if (newNode)
|
||||
{
|
||||
if (closedNodes.Contains(newNode))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!openNodes.Contains(newNode))
|
||||
{
|
||||
SetNodeParams(newNode, currentNode, endTile, tileOffset);
|
||||
openNodes.Add(newNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentNode.gCost + tileOffset < newNode.gCost)
|
||||
{
|
||||
newNode.gCost = currentNode.gCost + tileOffset;
|
||||
newNode.parent = currentNode;
|
||||
newNode.fCost = newNode.gCost + newNode.hCost;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Debug.Log("path not found");
|
||||
return null;
|
||||
}
|
||||
|
||||
// private static List<TileInfo> GetAdjacentNodes(TileInfo currentNode)
|
||||
// {
|
||||
// var allAjacentTiles = currentNode.Cell.GetListNeighbours();
|
||||
// List<TileInfo> adjacentNodes = new List<TileInfo>();
|
||||
//
|
||||
// foreach (TileInfo tile in allAjacentTiles)
|
||||
// {
|
||||
// if (tile.canMove)
|
||||
// {
|
||||
// adjacentNodes.Add(tile);
|
||||
// }
|
||||
// }
|
||||
// return adjacentNodes;
|
||||
// }
|
||||
|
||||
private static List<HexCell> GetPathForNode(HexCell pathNode)
|
||||
{
|
||||
var result = new List<HexCell>();
|
||||
var currentNode = pathNode;
|
||||
while (currentNode != null)
|
||||
{
|
||||
result.Add(currentNode);
|
||||
currentNode = currentNode.parent;
|
||||
}
|
||||
result.Reverse();
|
||||
//Debug.Log("path found");
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void SetNodeParams(HexCell currentNode, HexCell parrentNode, HexCell endNode, float nodeOffset)
|
||||
{
|
||||
currentNode.parent = parrentNode;
|
||||
currentNode.gCost = currentNode.parent.gCost + nodeOffset;
|
||||
currentNode.hCost = Vector3.Distance(currentNode.transform.position, endNode.transform.position);
|
||||
currentNode.fCost = currentNode.gCost + currentNode.hCost;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/AI/Pathfinding.cs.meta
Normal file
11
Assets/Scripts/AI/Pathfinding.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db5503f3b12f2084c8f3d31d6a06e1ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -11,9 +11,12 @@ namespace Data
|
||||
[SerializeField] private List<GameObject> _objectsToSpawn;
|
||||
[SerializeField] private PlayerControlView joystickView;
|
||||
[SerializeField] private PlayerInventoryView inventoryView;
|
||||
[SerializeField] private add _add;
|
||||
public List<GameObject> ObjectsToSpawn => _objectsToSpawn;
|
||||
public PlayerControlView PlayerControlView => joystickView;
|
||||
|
||||
public PlayerInventoryView InventoryView => inventoryView;
|
||||
|
||||
public add Add => _add;
|
||||
}
|
||||
}
|
@ -10,9 +10,11 @@ namespace GameUI
|
||||
private readonly UIData _uiData;
|
||||
private PlayerControlView _playerControlView;
|
||||
private PlayerInventoryView _inventoryView;
|
||||
private add _add;
|
||||
|
||||
public PlayerControlView PlayerControlView => _playerControlView;
|
||||
public PlayerInventoryView PlayerInventoryView => _inventoryView;
|
||||
public add Add => _add;
|
||||
|
||||
public UIController(UIData uiData)
|
||||
{
|
||||
@ -25,7 +27,8 @@ namespace GameUI
|
||||
canvasGroup.AddComponent<CanvasGroup>();
|
||||
_playerControlView = Object.Instantiate(_uiData.PlayerControlView, canvasGroup.transform);
|
||||
_inventoryView = Object.Instantiate(_uiData.InventoryView, canvasGroup.transform);
|
||||
|
||||
_add = Object.Instantiate(_uiData.Add, canvasGroup.transform);
|
||||
|
||||
_uiData.ObjectsToSpawn.ForEach(x => Object.Instantiate(x, canvasGroup.transform));
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,11 @@ 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;
|
||||
@ -64,6 +69,8 @@ namespace HexFiled
|
||||
_renderer.material.mainTexture = HexGrid.Colors[color].Texture;
|
||||
|
||||
_color = color;
|
||||
MusicController.Instance.PlayRandomClip(MusicController.Instance.MusicData.SfxMusic.Captures,
|
||||
gameObject);
|
||||
Instantiate(HexGrid.Colors[color].VFXPrefab, transform);
|
||||
onHexPainted?.Invoke(this);
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Data;
|
||||
using UnityEngine;
|
||||
using DefaultNamespace;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace HexFiled
|
||||
{
|
||||
@ -46,26 +47,24 @@ namespace HexFiled
|
||||
var closeDirection = direction.MinusSixtyDeg();
|
||||
|
||||
|
||||
var path = Round(
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(closeDirection),
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(openDirection)
|
||||
);
|
||||
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);
|
||||
}
|
||||
|
||||
if (!path.hasPath)
|
||||
cell.GetListNeighbours().ForEach(x =>
|
||||
{
|
||||
path.field.ForEach(x => x.PaintHex(cell.Color));
|
||||
}
|
||||
else
|
||||
{
|
||||
path = Round(
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(openDirection),
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(closeDirection)
|
||||
);
|
||||
if (!path.hasPath)
|
||||
if (x != null && x.Color == UnitColor.GREY)
|
||||
{
|
||||
path.field.ForEach(x => x.PaintHex(cell.Color));
|
||||
TryPaintHexList(Round(x, null), cell.Color);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (item.Value.Count > 0 && item.Key != UnitColor.GREY && item.Key != cell.Color)
|
||||
@ -77,13 +76,27 @@ namespace HexFiled
|
||||
where !path.hasPath
|
||||
select path)
|
||||
{
|
||||
path.field.ForEach(x => x.PaintHex(UnitColor.GREY));
|
||||
TryPaintHexList(path, 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)
|
||||
{
|
||||
Dictionary<UnitColor, List<HexCell>> resultDict = new Dictionary<UnitColor, List<HexCell>>();
|
||||
@ -103,7 +116,7 @@ namespace HexFiled
|
||||
|
||||
private (bool hasPath, List<HexCell> field) Round(HexCell start, HexCell end)
|
||||
{
|
||||
if (start.Color == _cell.Color || end.Color == _cell.Color)
|
||||
if (start == null || start.Color == _cell.Color)
|
||||
{
|
||||
return (true, null);
|
||||
}
|
||||
@ -118,7 +131,7 @@ namespace HexFiled
|
||||
|
||||
while (stackIterators.Count >= 0)
|
||||
{
|
||||
if (currentCell == end)
|
||||
if (end != null && currentCell == end)
|
||||
return (true, closedList);
|
||||
|
||||
List<HexCell> openList = new List<HexCell>();
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace
|
||||
@ -13,22 +14,48 @@ namespace DefaultNamespace
|
||||
private void Start()
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void StartTimer(Action action, int time)
|
||||
public void StartTimer(Action action, float time)
|
||||
{
|
||||
StartCoroutine(Timer(action, time));
|
||||
}
|
||||
|
||||
IEnumerator Timer(Action action, int time)
|
||||
public void StartTimer<T>(Action<T> action, float time, T param)
|
||||
{
|
||||
StartCoroutine(Timer(action, time, param));
|
||||
}
|
||||
|
||||
public void StartTimer<T>(List<Action<T>> actions, float time, T param)
|
||||
{
|
||||
StartCoroutine(Timer(actions, time, param));
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
IEnumerator Timer<T>(List<Action<T>> actions, float time, T param)
|
||||
{
|
||||
foreach (var action in actions)
|
||||
{
|
||||
yield return new WaitForSeconds(time);
|
||||
action?.Invoke(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -220,8 +220,7 @@ namespace Units
|
||||
else
|
||||
{
|
||||
CaptureHex();
|
||||
MusicController.Instance.PlayRandomClip(MusicController.Instance.MusicData.SfxMusic.Captures,
|
||||
_cell.gameObject);
|
||||
|
||||
}
|
||||
|
||||
_isHardToCapture = false;
|
||||
|
@ -1,16 +1,13 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Data;
|
||||
using DG.Tweening;
|
||||
using HexFiled;
|
||||
using Items;
|
||||
using Units;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
using Weapons;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
|
||||
public class UnitView : MonoBehaviour
|
||||
|
35
Assets/add.cs
Normal file
35
Assets/add.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using GoogleMobileAds.Api;
|
||||
using UnityEditor.PackageManager.Requests;
|
||||
|
||||
public class add : MonoBehaviour
|
||||
{
|
||||
private string _revardUnitId = "ca-app-pub-3940256099942544/5224354917";
|
||||
private RewardedAd _ad;
|
||||
private AdRequest _request;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_ad = new RewardedAd(_revardUnitId);
|
||||
_request = new AdRequest.Builder().Build();
|
||||
_ad.LoadAd(_request);
|
||||
_ad.OnUserEarnedReward += HandleUser;
|
||||
ShowAd();
|
||||
}
|
||||
|
||||
private void HandleUser(object sender, Reward reward)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ShowAd()
|
||||
{
|
||||
if (_ad.IsLoaded())
|
||||
{
|
||||
_ad.Show();
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/add.cs.meta
Normal file
11
Assets/add.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7c276b4af35fbc4a80539b97e444f32
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<projectSettings>
|
||||
<projectSetting name="Google.IOSResolver.VerboseLoggingEnabled" value="False" />
|
||||
<projectSetting name="Google.PackageManagerResolver.VerboseLoggingEnabled" value="False" />
|
||||
<projectSetting name="Google.VersionHandler.VerboseLoggingEnabled" value="False" />
|
||||
<projectSetting name="GooglePlayServices.AutoResolverEnabled" value="False" />
|
||||
<projectSetting name="GooglePlayServices.PromptBeforeAutoResolution" value="False" />
|
||||
<projectSetting name="GooglePlayServices.UseJetifier" value="True" />
|
||||
</projectSettings>
|
Loading…
x
Reference in New Issue
Block a user