diff --git a/assets/Data/GameSettings-001.json b/assets/Data/GameSettings-001.json deleted file mode 100644 index 8bcbadd..0000000 --- a/assets/Data/GameSettings-001.json +++ /dev/null @@ -1,403 +0,0 @@ -{ - "player": { - "defaultHP": 50, - "requiredXP": [ - 10, - 20, - 30, - 40, - 50, - 60, - 70, - 80, - 90, - 100 - ], - "speed": 100, - "regenerationDelay": 5, - "collisionDelay": 0.5, - "weapon": { - "strikeDelay": 2, - "damage": 2 - }, - "haloLauncher": { - "projectilesToSpawn": 24, - "cooldownDivisorPerUpgrade": 1, - "launcher": { - "projectileLifetime": 2, - "projectileSpeed": 150, - "wavesToShoot": 1, - "wavesDelayMs": 0, - "cooldown": 10 - } - }, - "horizontalLauncher": { - "wavesToShootPerUpgrade": 1, - "launcher": { - "projectileLifetime": 3, - "projectileSpeed": 300, - "wavesToShoot": 1, - "wavesDelayMs": 100, - "cooldown": 4 - } - }, - "diagonalLauncher": { - "wavesToShootPerUpgrade": 1, - "launcher": { - "projectileLifetime": 20, - "projectileSpeed": 300, - "wavesToShoot": 1, - "wavesDelayMs": 100, - "cooldown": 4 - } - } - }, - "upgrades": { - "maxWeaponLengthUpgrades": 5, - "maxWeaponDamageUpgrades": 10, - "maxHorizontalProjectileUpgrades": 0, - "maxDiagonalProjectileUpgrades": 0, - "maxHaloProjectileUpgrades": 5, - "maxRegenerationUpgrades": 5 - }, - "metaUpgrades": { - "healthPointsPerLevel": 0, - "bonusDamagePerLevel": 0, - "projectilePiercingPerLevel": 0, - "movementSpeedPerLevel": 0, - "xpBonusPerLevel": 0, - "goldBonusPerLevel": 0 - }, - "enemyManager": { - "enemies": [ - { - "id": "BasicEnemy", - "moveType": "Follow", - "health": 2, - "damage": 1, - "speed": 60, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0 - }, - { - "id": "StandardEnemy", - "moveType": "Follow", - "health": 3, - "damage": 2, - "speed": 65, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0.1 - }, - { - "id": "FastEnemy", - "moveType": "Follow", - "health": 3, - "damage": 2, - "speed": 75, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0.1 - }, - { - "id": "CircleEnemy", - "moveType": "Follow", - "health": 4, - "damage": 1, - "speed": 25, - "lifetime": 29, - "xpReward": 0, - "goldReward": 1 - }, - { - "id": "CircleEnemyStandard", - "moveType": "Follow", - "health": 7, - "damage": 2, - "speed": 35, - "lifetime": 27, - "xpReward": 0, - "goldReward": 2 - }, - { - "id": "WaveEnemy", - "moveType": "Launch", - "health": 1, - "damage": 2, - "speed": 390, - "lifetime": 20, - "xpReward": 0, - "goldReward": 0.2 - }, - { - "id": "WaveEnemyArmor", - "moveType": "Launch", - "health": 5, - "damage": 3, - "speed": 70, - "lifetime": 30, - "xpReward": 0, - "goldReward": 1 - }, - { - "id": "WaveEnemyArmorFast", - "moveType": "Launch", - "health": 5, - "damage": 3, - "speed": 320, - "lifetime": 30, - "xpReward": 0, - "goldReward": 1 - }, - { - "id": "BasicBoss", - "moveType": "Follow", - "health": 8, - "damage": 2, - "speed": 65, - "lifetime": -1, - "xpReward": 0, - "goldReward": 3 - }, - { - "id": "StandardBoss", - "moveType": "Follow", - "health": 12, - "damage": 3, - "speed": 75, - "lifetime": -1, - "xpReward": 2, - "goldReward": 5 - }, - { - "id": "BasicCheetah", - "moveType": "PeriodicFollow", - "health": 4, - "damage": 1, - "speed": 120, - "lifetime": -1, - "xpReward": 0, - "goldReward": 1 - } - ], - "individualEnemySpawners": [ - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 0, - "stopDelay": 59, - "cooldown": 1 - } - }, - { - "common": { - "enemyId": "BasicBoss", - "startDelay": 89, - "stopDelay": 90, - "cooldown": 0.9 - } - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 61, - "stopDelay": 120, - "cooldown": 0.9 - } - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 121, - "stopDelay": 190, - "cooldown": 0.8 - } - }, - { - "common": { - "enemyId": "StandardBoss", - "startDelay": 199, - "stopDelay": 200, - "cooldown": 0.9 - } - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 191, - "stopDelay": 220, - "cooldown": 1.5 - } - }, - { - "common": { - "enemyId": "StandardEnemy", - "startDelay": 210, - "stopDelay": 250, - "cooldown": 0.9 - } - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 290, - "stopDelay": 320, - "cooldown": 1 - } - }, - { - "common": { - "enemyId": "StandardEnemy", - "startDelay": 335, - "stopDelay": 420, - "cooldown": 0.7 - } - }, - { - "common": { - "enemyId": "StandardEnemy", - "startDelay": 421, - "stopDelay": 520, - "cooldown": 0.5 - } - }, - { - "common": { - "enemyId": "StandardEnemy", - "startDelay": 520, - "stopDelay": 600, - "cooldown": 0.3 - } - }, - { - "common": { - "enemyId": "FastEnemy", - "startDelay": 310, - "stopDelay": 340, - "cooldown": 0.5 - } - }, - { - "common": { - "enemyId": "FastEnemy", - "startDelay": 260, - "stopDelay": 300, - "cooldown": 0.8 - } - } - ], - "circularEnemySpawners": [ - { - "common": { - "enemyId": "CircleEnemy", - "startDelay": 1, - "stopDelay": 130, - "cooldown": 45 - }, - "enemiesToSpawn": 38 - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 0, - "stopDelay": 122, - "cooldown": 60 - }, - "enemiesToSpawn": 10 - }, - { - "common": { - "enemyId": "CircleEnemyStandard", - "startDelay": 280, - "stopDelay": 520, - "cooldown": 50 - }, - "enemiesToSpawn": 44 - }, - { - "common": { - "enemyId": "CircleEnemyStandard", - "startDelay": 383, - "stopDelay": 390, - "cooldown": 3 - }, - "enemiesToSpawn": 44 - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 245, - "stopDelay": 280, - "cooldown": 5 - }, - "enemiesToSpawn": 12 - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 278, - "stopDelay": 291, - "cooldown": 3 - }, - "enemiesToSpawn": 30 - }, - { - "common": { - "enemyId": "BasicBoss", - "startDelay": 300, - "stopDelay": 303, - "cooldown": 2 - }, - "enemiesToSpawn": 8 - }, - { - "common": { - "enemyId": "BasicCheetah", - "startDelay": 139, - "stopDelay": 140, - "cooldown": 0.9 - }, - "enemiesToSpawn": 6 - } - ], - "waveEnemySpawners": [ - { - "common": { - "enemyId": "WaveEnemy", - "startDelay": 1, - "stopDelay": 201, - "cooldown": 25 - }, - "enemiesToSpawn": 12 - }, - { - "common": { - "enemyId": "WaveEnemy", - "startDelay": 420, - "stopDelay": 600, - "cooldown": 35 - }, - "enemiesToSpawn": 30 - }, - { - "common": { - "enemyId": "WaveEnemyArmor", - "startDelay": 1, - "stopDelay": 199, - "cooldown": 50 - }, - "enemiesToSpawn": 10 - }, - { - "common": { - "enemyId": "WaveEnemyArmorFast", - "startDelay": 200, - "stopDelay": 600, - "cooldown": 27 - }, - "enemiesToSpawn": 14 - } - ] - } -} \ No newline at end of file diff --git a/assets/Data/GameSettings-001.json.meta b/assets/Data/GameSettings-001.json.meta deleted file mode 100644 index 6a86f6a..0000000 --- a/assets/Data/GameSettings-001.json.meta +++ /dev/null @@ -1 +0,0 @@ -{"ver":"1.0.0","importer":"json","imported":true,"uuid":"4a156ee8-535e-4443-8bf5-8b979a08d232","files":[".json"],"subMetas":{},"userData":{}} diff --git a/assets/Data/GameSettings.json b/assets/Data/GameSettings.json index d672ee0..8bcbadd 100644 --- a/assets/Data/GameSettings.json +++ b/assets/Data/GameSettings.json @@ -17,8 +17,8 @@ "regenerationDelay": 5, "collisionDelay": 0.5, "weapon": { - "strikeDelay": 2.5, - "damage": 5 + "strikeDelay": 2, + "damage": 2 }, "haloLauncher": { "projectilesToSpawn": 24, @@ -69,160 +69,335 @@ "goldBonusPerLevel": 0 }, "enemyManager": { - "enemies": [ - { - "id": "BasicEnemy", - "moveType": "Follow", - "health": 3, - "damage": 1, - "speed": 60, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0 - }, - { - "id": "CircleEnemy", - "moveType": "Follow", - "health": 10, - "damage": 1, - "speed": 25, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0 - }, - { - "id": "WaveEnemy", - "moveType": "Launch", - "health": 1, - "damage": 2, - "speed": 390, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0 - }, - { - "id": "WaveEnemyArmor", - "moveType": "Launch", - "health": 7, - "damage": 3, - "speed": 70, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0 - }, - { - "id": "BasicBoss", - "moveType": "Follow", - "health": 12, - "damage": 2, - "speed": 65, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0 - }, - { - "id": "BasicCheetah", - "moveType": "PeriodicFollow", - "health": 5, - "damage": 2, - "speed": 140, - "lifetime": -1, - "xpReward": 0, - "goldReward": 0 - } - ], - "individualEnemySpawners": [ - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 0, - "stopDelay": 29, - "cooldown": 1 - } - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 30, - "stopDelay": 59, - "cooldown": 0.9 - } - }, - { - "common": { - "enemyId": "BasicBoss", - "startDelay": 60, - "stopDelay": 61, - "cooldown": 0.9 - } - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 62, - "stopDelay": 120, - "cooldown": 0.7 - } - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 121, - "stopDelay": 240, - "cooldown": 0.5 - } - } - ], - "circularEnemySpawners": [ - { - "common": { - "enemyId": "CircleEnemy", - "startDelay": 1, - "stopDelay": 240, - "cooldown": 35 - }, - "enemiesToSpawn": 40 - }, - { - "common": { - "enemyId": "BasicEnemy", - "startDelay": 59, - "stopDelay": 63, - "cooldown": 3 - }, - "enemiesToSpawn": 10 - }, - { - "common": { - "enemyId": "BasicCheetah", - "startDelay": 119, - "stopDelay": 123, - "cooldown": 2 - }, - "enemiesToSpawn": 10 - } - ], - "waveEnemySpawners": [ - { - "common": { - "enemyId": "WaveEnemy", - "startDelay": 1, - "stopDelay": -1, - "cooldown": 20 - }, - "enemiesToSpawn": 15, - "waveLifetime": 50 - }, - { - "common": { - "enemyId": "WaveEnemyArmor", - "startDelay": 1, - "stopDelay": -1, - "cooldown": 50 - }, - "enemiesToSpawn": 12, - "waveLifetime": 20 - } - ] + "enemies": [ + { + "id": "BasicEnemy", + "moveType": "Follow", + "health": 2, + "damage": 1, + "speed": 60, + "lifetime": -1, + "xpReward": 0, + "goldReward": 0 + }, + { + "id": "StandardEnemy", + "moveType": "Follow", + "health": 3, + "damage": 2, + "speed": 65, + "lifetime": -1, + "xpReward": 0, + "goldReward": 0.1 + }, + { + "id": "FastEnemy", + "moveType": "Follow", + "health": 3, + "damage": 2, + "speed": 75, + "lifetime": -1, + "xpReward": 0, + "goldReward": 0.1 + }, + { + "id": "CircleEnemy", + "moveType": "Follow", + "health": 4, + "damage": 1, + "speed": 25, + "lifetime": 29, + "xpReward": 0, + "goldReward": 1 + }, + { + "id": "CircleEnemyStandard", + "moveType": "Follow", + "health": 7, + "damage": 2, + "speed": 35, + "lifetime": 27, + "xpReward": 0, + "goldReward": 2 + }, + { + "id": "WaveEnemy", + "moveType": "Launch", + "health": 1, + "damage": 2, + "speed": 390, + "lifetime": 20, + "xpReward": 0, + "goldReward": 0.2 + }, + { + "id": "WaveEnemyArmor", + "moveType": "Launch", + "health": 5, + "damage": 3, + "speed": 70, + "lifetime": 30, + "xpReward": 0, + "goldReward": 1 + }, + { + "id": "WaveEnemyArmorFast", + "moveType": "Launch", + "health": 5, + "damage": 3, + "speed": 320, + "lifetime": 30, + "xpReward": 0, + "goldReward": 1 + }, + { + "id": "BasicBoss", + "moveType": "Follow", + "health": 8, + "damage": 2, + "speed": 65, + "lifetime": -1, + "xpReward": 0, + "goldReward": 3 + }, + { + "id": "StandardBoss", + "moveType": "Follow", + "health": 12, + "damage": 3, + "speed": 75, + "lifetime": -1, + "xpReward": 2, + "goldReward": 5 + }, + { + "id": "BasicCheetah", + "moveType": "PeriodicFollow", + "health": 4, + "damage": 1, + "speed": 120, + "lifetime": -1, + "xpReward": 0, + "goldReward": 1 + } + ], + "individualEnemySpawners": [ + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 0, + "stopDelay": 59, + "cooldown": 1 + } + }, + { + "common": { + "enemyId": "BasicBoss", + "startDelay": 89, + "stopDelay": 90, + "cooldown": 0.9 + } + }, + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 61, + "stopDelay": 120, + "cooldown": 0.9 + } + }, + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 121, + "stopDelay": 190, + "cooldown": 0.8 + } + }, + { + "common": { + "enemyId": "StandardBoss", + "startDelay": 199, + "stopDelay": 200, + "cooldown": 0.9 + } + }, + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 191, + "stopDelay": 220, + "cooldown": 1.5 + } + }, + { + "common": { + "enemyId": "StandardEnemy", + "startDelay": 210, + "stopDelay": 250, + "cooldown": 0.9 + } + }, + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 290, + "stopDelay": 320, + "cooldown": 1 + } + }, + { + "common": { + "enemyId": "StandardEnemy", + "startDelay": 335, + "stopDelay": 420, + "cooldown": 0.7 + } + }, + { + "common": { + "enemyId": "StandardEnemy", + "startDelay": 421, + "stopDelay": 520, + "cooldown": 0.5 + } + }, + { + "common": { + "enemyId": "StandardEnemy", + "startDelay": 520, + "stopDelay": 600, + "cooldown": 0.3 + } + }, + { + "common": { + "enemyId": "FastEnemy", + "startDelay": 310, + "stopDelay": 340, + "cooldown": 0.5 + } + }, + { + "common": { + "enemyId": "FastEnemy", + "startDelay": 260, + "stopDelay": 300, + "cooldown": 0.8 + } + } + ], + "circularEnemySpawners": [ + { + "common": { + "enemyId": "CircleEnemy", + "startDelay": 1, + "stopDelay": 130, + "cooldown": 45 + }, + "enemiesToSpawn": 38 + }, + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 0, + "stopDelay": 122, + "cooldown": 60 + }, + "enemiesToSpawn": 10 + }, + { + "common": { + "enemyId": "CircleEnemyStandard", + "startDelay": 280, + "stopDelay": 520, + "cooldown": 50 + }, + "enemiesToSpawn": 44 + }, + { + "common": { + "enemyId": "CircleEnemyStandard", + "startDelay": 383, + "stopDelay": 390, + "cooldown": 3 + }, + "enemiesToSpawn": 44 + }, + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 245, + "stopDelay": 280, + "cooldown": 5 + }, + "enemiesToSpawn": 12 + }, + { + "common": { + "enemyId": "BasicEnemy", + "startDelay": 278, + "stopDelay": 291, + "cooldown": 3 + }, + "enemiesToSpawn": 30 + }, + { + "common": { + "enemyId": "BasicBoss", + "startDelay": 300, + "stopDelay": 303, + "cooldown": 2 + }, + "enemiesToSpawn": 8 + }, + { + "common": { + "enemyId": "BasicCheetah", + "startDelay": 139, + "stopDelay": 140, + "cooldown": 0.9 + }, + "enemiesToSpawn": 6 + } + ], + "waveEnemySpawners": [ + { + "common": { + "enemyId": "WaveEnemy", + "startDelay": 1, + "stopDelay": 201, + "cooldown": 25 + }, + "enemiesToSpawn": 12 + }, + { + "common": { + "enemyId": "WaveEnemy", + "startDelay": 420, + "stopDelay": 600, + "cooldown": 35 + }, + "enemiesToSpawn": 30 + }, + { + "common": { + "enemyId": "WaveEnemyArmor", + "startDelay": 1, + "stopDelay": 199, + "cooldown": 50 + }, + "enemiesToSpawn": 10 + }, + { + "common": { + "enemyId": "WaveEnemyArmorFast", + "startDelay": 200, + "stopDelay": 600, + "cooldown": 27 + }, + "enemiesToSpawn": 14 + } + ] } } \ No newline at end of file diff --git a/assets/Data/GameSettings.json.meta b/assets/Data/GameSettings.json.meta index 1816c7e..6a86f6a 100644 --- a/assets/Data/GameSettings.json.meta +++ b/assets/Data/GameSettings.json.meta @@ -1,11 +1 @@ -{ - "ver": "1.0.0", - "importer": "json", - "imported": true, - "uuid": "737b7646-f050-47db-8f02-a204ad5f768b", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": {} -} +{"ver":"1.0.0","importer":"json","imported":true,"uuid":"4a156ee8-535e-4443-8bf5-8b979a08d232","files":[".json"],"subMetas":{},"userData":{}} diff --git a/assets/Media/Materials.meta b/assets/Media/Materials.meta new file mode 100644 index 0000000..cf10e5e --- /dev/null +++ b/assets/Media/Materials.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "76b20dbf-cc02-46ff-9770-7ff180008804", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/Media/Materials/material.mtl b/assets/Media/Materials/material.mtl new file mode 100644 index 0000000..38ec0ec --- /dev/null +++ b/assets/Media/Materials/material.mtl @@ -0,0 +1,30 @@ +{ + "__type__": "cc.Material", + "_name": "", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "7397d178-7d57-417a-9c48-4b90855a0014", + "__expectedType__": "cc.EffectAsset" + }, + "_techIdx": 0, + "_defines": [ + { + "USE_TEXTURE": true + } + ], + "_states": [ + { + "rasterizerState": {}, + "depthStencilState": {}, + "blendState": { + "targets": [ + {} + ] + } + } + ], + "_props": [ + {} + ] +} \ No newline at end of file diff --git a/assets/Media/Materials/material.mtl.meta b/assets/Media/Materials/material.mtl.meta new file mode 100644 index 0000000..8f9764b --- /dev/null +++ b/assets/Media/Materials/material.mtl.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.0.16", + "importer": "material", + "imported": true, + "uuid": "9cb17675-370b-48ed-bfa2-bb613a88af44", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Media/Materials/white-sprite.effect b/assets/Media/Materials/white-sprite.effect new file mode 100644 index 0000000..6523e3e --- /dev/null +++ b/assets/Media/Materials/white-sprite.effect @@ -0,0 +1,87 @@ +// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. +CCEffect %{ + techniques: + - passes: + - vert: sprite-vs:vert + frag: sprite-fs:frag + depthStencilState: + depthTest: false + depthWrite: false + blendState: + targets: + - blend: true + blendSrc: src_alpha + blendDst: one_minus_src_alpha + blendDstAlpha: one_minus_src_alpha + rasterizerState: + cullMode: none + properties: + alphaThreshold: { value: 0.5 } +}% + +CCProgram sprite-vs %{ + precision highp float; + #include + #if USE_LOCAL + #include + #endif + #if SAMPLE_FROM_RT + #include + #endif + in vec3 a_position; + in vec2 a_texCoord; + in vec4 a_color; + + out vec4 color; + out vec2 uv0; + + vec4 vert () { + vec4 pos = vec4(a_position, 1); + + #if USE_LOCAL + pos = cc_matWorld * pos; + #endif + + #if USE_PIXEL_ALIGNMENT + pos = cc_matView * pos; + pos.xyz = floor(pos.xyz); + pos = cc_matProj * pos; + #else + pos = cc_matViewProj * pos; + #endif + + uv0 = a_texCoord; + #if SAMPLE_FROM_RT + CC_HANDLE_RT_SAMPLE_FLIP(uv0); + #endif + color = vec4(1, 1, 1, 1); + + return pos; + } +}% + +CCProgram sprite-fs %{ + precision highp float; + #include + #include + + in vec4 color; + + #if USE_TEXTURE + in vec2 uv0; + #pragma builtin(local) + layout(set = 2, binding = 11) uniform sampler2D cc_spriteTexture; + #endif + + vec4 frag () { + vec4 o = vec4(1, 1, 1, 1); + + #if USE_TEXTURE + o *= CCSampleWithAlphaSeparated(cc_spriteTexture, uv0); + #endif + + + ALPHA_TEST(o); + return o; + } +}% diff --git a/assets/Media/Materials/white-sprite.effect.meta b/assets/Media/Materials/white-sprite.effect.meta new file mode 100644 index 0000000..befb2f7 --- /dev/null +++ b/assets/Media/Materials/white-sprite.effect.meta @@ -0,0 +1,15 @@ +{ + "ver": "1.6.0", + "importer": "effect", + "imported": true, + "uuid": "7397d178-7d57-417a-9c48-4b90855a0014", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "combinations": [ + {} + ] + } +} diff --git a/assets/Media/Prefabs/Menu.meta b/assets/Media/Prefabs/Menu.meta new file mode 100644 index 0000000..449127e --- /dev/null +++ b/assets/Media/Prefabs/Menu.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "63c984ff-f414-4b17-947c-cf8c6e809a4e", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/Media/Prefabs/Menu/UpgradeButton.prefab b/assets/Media/Prefabs/Menu/UpgradeButton.prefab new file mode 100644 index 0000000..041b524 --- /dev/null +++ b/assets/Media/Prefabs/Menu/UpgradeButton.prefab @@ -0,0 +1,632 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "UpgradeButton", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "UpgradeButton", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 14 + } + ], + "_active": true, + "_components": [ + { + "__id__": 20 + }, + { + "__id__": 22 + }, + { + "__id__": 24 + }, + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 28 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -157.5, + "y": 222.5, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Title", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 54, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 84.64, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7d1F/X8lZKWZQPKDYTPpbk" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "label", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 30, + "_fontSize": 30, + "_fontFamily": "Arial", + "_lineHeight": 30, + "_overflow": 0, + "_enableWrapText": true, + "_font": { + "__uuid__": "c96b42a9-d20d-4c59-8e99-8ed749a715c8", + "__expectedType__": "cc.BitmapFont" + }, + "_isSystemFontUsed": false, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b8GBndGn1E1Zkb2w0Isj0P" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a65PjT6BBE1ISje+COgOhi" + }, + { + "__type__": "cc.Node", + "_name": "Description", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 13 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 10 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 56.43, + "height": 20 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5eE/hiSIlCSqBMeMkICAR7" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "label", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 20, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 20, + "_overflow": 0, + "_enableWrapText": true, + "_font": { + "__uuid__": "c96b42a9-d20d-4c59-8e99-8ed749a715c8", + "__expectedType__": "cc.BitmapFont" + }, + "_isSystemFontUsed": false, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "47padmXvBCbJ5DD+YuRnO6" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9629OIo0NNBaQPQUVzA1ve" + }, + { + "__type__": "cc.Node", + "_name": "LevelPoints", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 15 + }, + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 19 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -63.985, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 14 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 20 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "82HcINQ1lN+btmu1aQSHgx" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 14 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_resizeMode": 1, + "_layoutType": 1, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 5, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dctdSeZZpNCbN0yY9+AunT" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "69ItV8RjNK0LBrhjv1o0Iu" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 140, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e6iaKNySFPeqIAI7XzQiLk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 209, + "g": 209, + "b": 209, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "0a917d5c-2810-46e1-8332-63f00395d63a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3aMW06471HwpgHeF0r4+4M" + }, + { + "__type__": "76eda6MFrpILZH9KDOZFHWs", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "levelPointPrefab": { + "__uuid__": "41ca6952-fa32-4e38-8d43-eec2e982533c", + "__expectedType__": "cc.Prefab" + }, + "levelPointsParent": { + "__id__": 14 + }, + "title": { + "__id__": 5 + }, + "description": { + "__id__": 11 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c52I+5RPFJDoP/OUf2yPtC" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 27 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "0a917d5c-2810-46e1-8332-63f00395d63a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "045X3wfvNBkJwlsc5ftHOY" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "dchT3ooxlOOL9eH/XiAT2K" + } +] \ No newline at end of file diff --git a/assets/Media/Prefabs/Menu/UpgradeButton.prefab.meta b/assets/Media/Prefabs/Menu/UpgradeButton.prefab.meta new file mode 100644 index 0000000..db3bd2a --- /dev/null +++ b/assets/Media/Prefabs/Menu/UpgradeButton.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.40", + "importer": "prefab", + "imported": true, + "uuid": "211839e3-132d-429d-9e68-a96fcdfb0ff7", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "UpgradeButton" + } +} diff --git a/assets/Media/Prefabs/Menu/UpgradeLevelPointUI.prefab b/assets/Media/Prefabs/Menu/UpgradeLevelPointUI.prefab new file mode 100644 index 0000000..d19c218 --- /dev/null +++ b/assets/Media/Prefabs/Menu/UpgradeLevelPointUI.prefab @@ -0,0 +1,142 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "UpgradeLevelPointUI", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "UpgradeLevelPointUI", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 6 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -12.5, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 20, + "height": 20 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b52eZzV09InJK+jo6LzLIQ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "0a917d5c-2810-46e1-8332-63f00395d63a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b0oW25W9NI85/atu15qR76" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d316td07RIIriz5Jc4fIFq" + } +] \ No newline at end of file diff --git a/assets/Media/Prefabs/Menu/UpgradeLevelPointUI.prefab.meta b/assets/Media/Prefabs/Menu/UpgradeLevelPointUI.prefab.meta new file mode 100644 index 0000000..0c2d3bf --- /dev/null +++ b/assets/Media/Prefabs/Menu/UpgradeLevelPointUI.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.40", + "importer": "prefab", + "imported": true, + "uuid": "41ca6952-fa32-4e38-8d43-eec2e982533c", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "UpgradeLevelPointUI" + } +} diff --git a/assets/Media/Prefabs/ModalWindows/UpgradesModalWindow.prefab b/assets/Media/Prefabs/ModalWindows/UpgradesModalWindow.prefab new file mode 100644 index 0000000..156c147 --- /dev/null +++ b/assets/Media/Prefabs/ModalWindows/UpgradesModalWindow.prefab @@ -0,0 +1,963 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "UpgradesModalWindow", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "UpgradesModalWindow", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 42 + }, + { + "__id__": 44 + }, + { + "__id__": 46 + } + ], + "_prefab": { + "__id__": 48 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Animated", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 11 + } + ], + "_active": true, + "_components": [ + { + "__id__": 37 + }, + { + "__id__": 39 + } + ], + "_prefab": { + "__id__": 41 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 640, + "height": 960 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c5lhLHKUVHb6b9KM4Q1B77" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 147 + }, + "_spriteFrame": { + "__uuid__": "0a917d5c-2810-46e1-8332-63f00395d63a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0dDC5jMI5PKbDuUYgdvo4A" + }, + { + "__type__": "55e5f5nQ8dHiL5fPWjgdXbH", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "eda1SvtUlJ5L5fdr68l/iN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a4H4MOZL1Lx4AKbYuogwSa" + }, + { + "__type__": "cc.Node", + "_name": "Window", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 12 + }, + { + "__id__": 20 + } + ], + "_active": true, + "_components": [ + { + "__id__": 34 + } + ], + "_prefab": { + "__id__": 36 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "CloseBtn", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 13 + }, + { + "__id__": 15 + }, + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 19 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 270, + "y": 440, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 30, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4eBYmIh8NGK7XtpQUZubKx" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 7, + "b": 7, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "0a917d5c-2810-46e1-8332-63f00395d63a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f2OuXNwqVMRJ+k2WWL7t7m" + }, + { + "__type__": "55e5f5nQ8dHiL5fPWjgdXbH", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6cKPriiXpMaIUOeMX1Lu+M" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "e1nZEsKHtGbKN9vU8shK7O" + }, + { + "__type__": "cc.Node", + "_name": "Upgrades", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 21 + } + ], + "_active": true, + "_components": [ + { + "__id__": 27 + }, + { + "__id__": 29 + }, + { + "__id__": 31 + } + ], + "_prefab": { + "__id__": 33 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "UpgradesParent", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 24 + } + ], + "_prefab": { + "__id__": 26 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 430, + "height": 400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a0FPe6IdVGir8eMUlcyUyo" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "_resizeMode": 1, + "_layoutType": 3, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 1, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 20, + "_spacingY": 20, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 2, + "_constraintNum": 3, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "16rSeW+DZK+L8xOXoajX2E" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "8cdfKNiq1OsaOzNbcmcZcT" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 500, + "height": 500 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "78rflXTE1MLId+b816nwJs" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 30 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "0a917d5c-2810-46e1-8332-63f00395d63a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b847SCkLVEM5ju/Kb5eC5o" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 32 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "51X4WzzrxDnb8XUZALl9LH" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c4bnQcKr9B+IVWxA89z2AR" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 640, + "height": 960 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "fa4m+6cDBEPbDPsQkcim8p" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "e1AOGk0qpH6ZeVYP9+MiEv" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 38 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 640, + "height": 960 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e4B9UglJFDQYcryS0d+eE/" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 40 + }, + "playOnLoad": false, + "_clips": [ + { + "__uuid__": "db746fc0-e505-4f7e-a532-88cdba7d3482", + "__expectedType__": "cc.AnimationClip" + }, + { + "__uuid__": "e5bb5e18-b3a9-4d4b-bec5-439ff214d76a", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "db746fc0-e505-4f7e-a532-88cdba7d3482", + "__expectedType__": "cc.AnimationClip" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d7RrH28tFPG4ZxprKl97K+" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "8dMwoGhd1GUbOjpeRqLjco" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 43 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 640, + "height": 960 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2eO+M9deJI1KYyU2Otv4xD" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 45 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "67Ws0zREFMYKNYvOHw9C0b" + }, + { + "__type__": "854a4tmkIROzYFPAwDxL3/z", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 47 + }, + "animation": { + "__id__": 39 + }, + "closeButton": { + "__id__": 17 + }, + "backgroundCloseButton": { + "__id__": 8 + }, + "upgradeButtonPrefab": { + "__uuid__": "211839e3-132d-429d-9e68-a96fcdfb0ff7", + "__expectedType__": "cc.Prefab" + }, + "upgradeButtonParent": { + "__id__": 21 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dcTNwE4SNLOZujvnWi9lB6" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "32U/bJCUBDlaQxxGFNXZTu", + "targetOverrides": [] + } +] \ No newline at end of file diff --git a/assets/Media/Prefabs/ModalWindows/UpgradesModalWindow.prefab.meta b/assets/Media/Prefabs/ModalWindows/UpgradesModalWindow.prefab.meta new file mode 100644 index 0000000..39210e9 --- /dev/null +++ b/assets/Media/Prefabs/ModalWindows/UpgradesModalWindow.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.40", + "importer": "prefab", + "imported": true, + "uuid": "0b35c4ba-253d-4316-ad01-0ba40a2612fc", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "UpgradesModalWindow" + } +} diff --git a/assets/Scenes/Game.scene b/assets/Scenes/Game.scene index cc11fb3..38d2a61 100644 --- a/assets/Scenes/Game.scene +++ b/assets/Scenes/Game.scene @@ -2585,7 +2585,7 @@ "__id__": 76 }, "settingsAsset": { - "__uuid__": "737b7646-f050-47db-8f02-a204ad5f768b", + "__uuid__": "4a156ee8-535e-4443-8bf5-8b979a08d232", "__expectedType__": "cc.JsonAsset" }, "translationAsset": { diff --git a/assets/Scenes/Menu.scene b/assets/Scenes/Menu.scene index 3f774d2..fc62332 100644 --- a/assets/Scenes/Menu.scene +++ b/assets/Scenes/Menu.scene @@ -24,11 +24,11 @@ "_active": true, "_components": [], "_prefab": { - "__id__": 33 + "__id__": 36 }, "autoReleaseAssets": false, "_globals": { - "__id__": 34 + "__id__": 37 }, "_id": "1a3bccb5-bbb7-4058-846c-ed41b52415b0" }, @@ -156,28 +156,31 @@ }, { "__id__": 21 + }, + { + "__id__": 29 } ], "_active": true, "_components": [ - { - "__id__": 29 - }, - { - "__id__": 30 - }, - { - "__id__": 31 - }, { "__id__": 32 + }, + { + "__id__": 33 + }, + { + "__id__": 34 + }, + { + "__id__": 35 } ], "_prefab": null, "_lpos": { "__type__": "cc.Vec3", "x": 320, - "y": 480, + "y": 479.99999999999994, "z": 0 }, "_lrot": { @@ -258,7 +261,7 @@ "_priority": 1073741824, "_fov": 45, "_fovAxis": 0, - "_orthoHeight": 480, + "_orthoHeight": 479.99999999999994, "_near": 1, "_far": 2000, "_color": { @@ -876,6 +879,90 @@ "__prefab": null, "_id": "17dRwdDH1DH7KDpkjt3c0f" }, + { + "__type__": "cc.Node", + "_name": "ModalWindowManager", + "_objFlags": 0, + "_parent": { + "__id__": 10 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 31 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "01wdX287REE6Gr0JKdC+pi" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 29 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 640, + "height": 960 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "cfwsr07o9Od6unAYhU9sZV" + }, + { + "__type__": "c623fhj2b5Cyau8MBXLOmVF", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 29 + }, + "_enabled": true, + "__prefab": null, + "availableWindows": [ + { + "__uuid__": "0b35c4ba-253d-4316-ad01-0ba40a2612fc", + "__expectedType__": "cc.Prefab" + } + ], + "_id": "16B4Ez0O1Ob7mNngLSL2Y/" + }, { "__type__": "cc.UITransform", "_name": "", @@ -925,8 +1012,8 @@ "_target": null, "_left": 0, "_right": 0, - "_top": 0, - "_bottom": 0, + "_top": -5.684341886080802e-14, + "_bottom": -5.684341886080802e-14, "_horizontalCenter": 0, "_verticalCenter": 0, "_isAbsLeft": true, @@ -956,7 +1043,10 @@ "upgradeBtn": { "__id__": 28 }, - "_id": "12ZDz/3H9Ff76Ay4iDl43K" + "modalWindowManager": { + "__id__": 31 + }, + "_id": "4cQFnvx1xB65sFsTPGRrB7" }, { "__type__": "cc.PrefabInfo", @@ -970,19 +1060,19 @@ { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 35 - }, - "shadows": { - "__id__": 36 - }, - "_skybox": { - "__id__": 37 - }, - "fog": { "__id__": 38 }, - "octree": { + "shadows": { "__id__": 39 + }, + "_skybox": { + "__id__": 40 + }, + "fog": { + "__id__": 41 + }, + "octree": { + "__id__": 42 } }, { diff --git a/assets/Scripts/Game/ModalWIndows/GameModalLauncher.ts b/assets/Scripts/Game/ModalWIndows/GameModalLauncher.ts index 11b605e..c7bd2fb 100644 --- a/assets/Scripts/Game/ModalWIndows/GameModalLauncher.ts +++ b/assets/Scripts/Game/ModalWIndows/GameModalLauncher.ts @@ -21,7 +21,7 @@ export class GameModalLauncher { private async showLevelUpModal(): Promise { this.gamePauser.pause(); const skillToUpgrade: UpgradeType = await this.modalWindowManager.showModal( - GameModalWindowTypes.LevelUpModal, + GameModalWindowTypes.LevelUp, { availableUpgrades: Array.from(this.upgrader.getAvailableUpgrades()), translationData: this.translationData } ); this.gamePauser.resume(); diff --git a/assets/Scripts/Game/ModalWIndows/GameModalWindowTypes.ts b/assets/Scripts/Game/ModalWIndows/GameModalWindowTypes.ts index ddb3eed..8bbb5d9 100644 --- a/assets/Scripts/Game/ModalWIndows/GameModalWindowTypes.ts +++ b/assets/Scripts/Game/ModalWIndows/GameModalWindowTypes.ts @@ -1,3 +1,3 @@ export enum GameModalWindowTypes { - LevelUpModal = "LevelUpModalWindow" + LevelUp = "LevelUpModalWindow" } diff --git a/assets/Scripts/Menu/Menu.ts b/assets/Scripts/Menu/Menu.ts index 5f6e9c6..a633c9b 100644 --- a/assets/Scripts/Menu/Menu.ts +++ b/assets/Scripts/Menu/Menu.ts @@ -1,25 +1,31 @@ -import { _decorator, Component, Node, Button } from "cc"; -import { type } from "os"; +import { _decorator, Component } from "cc"; +import { ModalWindowManager } from "../Services/ModalWindowSystem/ModalWindowManager"; import { UIButton } from "../Services/UI/Button/UIButton"; - import { GameRunner } from "./GameRunner"; +import { MenuModalLauncher } from "./ModalWindows/MenuModalLauncher"; + const { ccclass, property } = _decorator; @ccclass("Menu") export class Menu extends Component { @property(UIButton) private playBtn: UIButton; @property(UIButton) private upgradeBtn: UIButton; + @property(ModalWindowManager) private modalWindowManager: ModalWindowManager; + + private menuModalLauncher: MenuModalLauncher; public async start(): Promise { this.playBtn.InteractedEvent.on(this.startGame, this); this.upgradeBtn.InteractedEvent.on(this.openUpgradesWindow, this); + + this.menuModalLauncher = new MenuModalLauncher(this.modalWindowManager); } private startGame(): void { GameRunner.Instance.playGame(); } - private openUpgradesWindow(): void {} + private openUpgradesWindow(): void { + this.menuModalLauncher.openUpgradesWindow(); + } } - - diff --git a/assets/Scripts/Menu/ModalWindows.meta b/assets/Scripts/Menu/ModalWindows.meta new file mode 100644 index 0000000..66f3a40 --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "ee6e2e1a-723c-4e5d-a689-95f478d0fc97", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/Scripts/Menu/ModalWindows/MenuModalLauncher.ts b/assets/Scripts/Menu/ModalWindows/MenuModalLauncher.ts new file mode 100644 index 0000000..86cd1de --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/MenuModalLauncher.ts @@ -0,0 +1,10 @@ +import { ModalWindowManager } from "../../Services/ModalWindowSystem/ModalWindowManager"; +import { MenuModalWindowTypes } from "./MenuModalWindowTypes"; + +export class MenuModalLauncher { + public constructor(private modalWindowManager: ModalWindowManager) {} + + public async openUpgradesWindow(): Promise { + await this.modalWindowManager.showModal(MenuModalWindowTypes.Upgrades, {}); + } +} diff --git a/assets/Scripts/Menu/ModalWindows/MenuModalLauncher.ts.meta b/assets/Scripts/Menu/ModalWindows/MenuModalLauncher.ts.meta new file mode 100644 index 0000000..bc5c198 --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/MenuModalLauncher.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "fc6227d2-7b1d-49f3-85a2-abdb82e1638b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/Menu/ModalWindows/MenuModalWindowTypes.ts b/assets/Scripts/Menu/ModalWindows/MenuModalWindowTypes.ts new file mode 100644 index 0000000..ff11621 --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/MenuModalWindowTypes.ts @@ -0,0 +1,3 @@ +export enum MenuModalWindowTypes { + Upgrades = "UpgradesModalWindow" +} diff --git a/assets/Scripts/Menu/ModalWindows/MenuModalWindowTypes.ts.meta b/assets/Scripts/Menu/ModalWindows/MenuModalWindowTypes.ts.meta new file mode 100644 index 0000000..ebc1c28 --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/MenuModalWindowTypes.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "5c0f41ea-f404-452a-b17b-0ecdfd0a5f71", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/Menu/ModalWindows/Upgrades.meta b/assets/Scripts/Menu/ModalWindows/Upgrades.meta new file mode 100644 index 0000000..b73367b --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/Upgrades.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "332aac81-54d3-4914-bc63-2efdecaef4b2", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradeUI.ts b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradeUI.ts new file mode 100644 index 0000000..4f38dba --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradeUI.ts @@ -0,0 +1,20 @@ +import { Component, instantiate, Label, Node, Prefab, _decorator } from "cc"; +const { ccclass, property } = _decorator; + +@ccclass("UpgradeUI") +export class UpgradeUI extends Component { + @property(Prefab) private levelPointPrefab: Prefab; + @property(Node) private levelPointsParent: Node; + @property(Label) private title: Label; + @property(Label) private description: Label; + + public init(titleText: string, descriptionText: string, levels: number): void { + for (let i = 0; i < levels; i++) { + const node: Node = instantiate(this.levelPointPrefab); + node.setParent(this.levelPointsParent); + } + + this.title.string = titleText; + this.description.string = descriptionText; + } +} diff --git a/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradeUI.ts.meta b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradeUI.ts.meta new file mode 100644 index 0000000..968dbb7 --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradeUI.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "76edae8c-16ba-482d-91fd-2833991475ac", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradesModalWindow.ts b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradesModalWindow.ts new file mode 100644 index 0000000..d4b45b2 --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradesModalWindow.ts @@ -0,0 +1,21 @@ +import { instantiate, Prefab, _decorator, Node } from "cc"; +import { ModalWindow } from "../../../Services/ModalWindowSystem/ModalWindow"; +import { UpgradeUI } from "./UpgradeUI"; + +const { ccclass, property } = _decorator; + +@ccclass("UpgradesModalWindow") +export class UpgradesModalWindow extends ModalWindow { + @property(Prefab) upgradeButtonPrefab: Prefab; + @property(Node) upgradeButtonParent: Node; + + public setup(params: Empty): void { + for (let index = 0; index < 6; index++) { + const upgradeButton: Node = instantiate(this.upgradeButtonPrefab); + upgradeButton.getComponent(UpgradeUI).init("Title", "Description", 5); + upgradeButton.setParent(this.upgradeButtonParent); + } + } +} + +export class Empty {} diff --git a/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradesModalWindow.ts.meta b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradesModalWindow.ts.meta new file mode 100644 index 0000000..87b6dd1 --- /dev/null +++ b/assets/Scripts/Menu/ModalWindows/Upgrades/UpgradesModalWindow.ts.meta @@ -0,0 +1 @@ +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"854a4b66-9084-4ecd-814f-0300f12f7ff3","files":[],"subMetas":{},"userData":{}} diff --git a/assets/Scripts/Services/ModalWindowSystem/ModalWindow.ts b/assets/Scripts/Services/ModalWindowSystem/ModalWindow.ts index 05c7cc8..fa5471b 100644 --- a/assets/Scripts/Services/ModalWindowSystem/ModalWindow.ts +++ b/assets/Scripts/Services/ModalWindowSystem/ModalWindow.ts @@ -1,15 +1,21 @@ import { Animation, Component, _decorator } from "cc"; +import { UIButton } from "../UI/Button/UIButton"; import { delay } from "../Utils/AsyncUtils"; const { property } = _decorator; export abstract class ModalWindow extends Component { @property(Animation) private animation: Animation; + @property(UIButton) private closeButton: UIButton; + @property(UIButton) private backgroundCloseButton: UIButton; private result: TResult; private isDismissed = false; public async runAsync(params?: TParam): Promise { + this.closeButton?.InteractedEvent.on(() => this.dismiss(), this); + this.backgroundCloseButton?.InteractedEvent.on(() => this.dismiss(), this); + this.setup(params); this.animation?.play("open"); while (!this.isDismissed) await delay(100);