Menu modal WIP, new settigns

This commit is contained in:
Martin 2022-12-16 11:49:52 +01:00
parent 44d6ba6fc7
commit 40ebf267e0
32 changed files with 2519 additions and 607 deletions

View File

@ -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
}
]
}
}

View File

@ -1 +0,0 @@
{"ver":"1.0.0","importer":"json","imported":true,"uuid":"4a156ee8-535e-4443-8bf5-8b979a08d232","files":[".json"],"subMetas":{},"userData":{}}

View File

@ -17,8 +17,8 @@
"regenerationDelay": 5, "regenerationDelay": 5,
"collisionDelay": 0.5, "collisionDelay": 0.5,
"weapon": { "weapon": {
"strikeDelay": 2.5, "strikeDelay": 2,
"damage": 5 "damage": 2
}, },
"haloLauncher": { "haloLauncher": {
"projectilesToSpawn": 24, "projectilesToSpawn": 24,
@ -73,7 +73,7 @@
{ {
"id": "BasicEnemy", "id": "BasicEnemy",
"moveType": "Follow", "moveType": "Follow",
"health": 3, "health": 2,
"damage": 1, "damage": 1,
"speed": 60, "speed": 60,
"lifetime": -1, "lifetime": -1,
@ -81,14 +81,44 @@
"goldReward": 0 "goldReward": 0
}, },
{ {
"id": "CircleEnemy", "id": "StandardEnemy",
"moveType": "Follow", "moveType": "Follow",
"health": 10, "health": 3,
"damage": 1, "damage": 2,
"speed": 25, "speed": 65,
"lifetime": -1, "lifetime": -1,
"xpReward": 0, "xpReward": 0,
"goldReward": 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", "id": "WaveEnemy",
@ -96,39 +126,59 @@
"health": 1, "health": 1,
"damage": 2, "damage": 2,
"speed": 390, "speed": 390,
"lifetime": -1, "lifetime": 20,
"xpReward": 0, "xpReward": 0,
"goldReward": 0 "goldReward": 0.2
}, },
{ {
"id": "WaveEnemyArmor", "id": "WaveEnemyArmor",
"moveType": "Launch", "moveType": "Launch",
"health": 7, "health": 5,
"damage": 3, "damage": 3,
"speed": 70, "speed": 70,
"lifetime": -1, "lifetime": 30,
"xpReward": 0, "xpReward": 0,
"goldReward": 0 "goldReward": 1
},
{
"id": "WaveEnemyArmorFast",
"moveType": "Launch",
"health": 5,
"damage": 3,
"speed": 320,
"lifetime": 30,
"xpReward": 0,
"goldReward": 1
}, },
{ {
"id": "BasicBoss", "id": "BasicBoss",
"moveType": "Follow", "moveType": "Follow",
"health": 12, "health": 8,
"damage": 2, "damage": 2,
"speed": 65, "speed": 65,
"lifetime": -1, "lifetime": -1,
"xpReward": 0, "xpReward": 0,
"goldReward": 0 "goldReward": 3
},
{
"id": "StandardBoss",
"moveType": "Follow",
"health": 12,
"damage": 3,
"speed": 75,
"lifetime": -1,
"xpReward": 2,
"goldReward": 5
}, },
{ {
"id": "BasicCheetah", "id": "BasicCheetah",
"moveType": "PeriodicFollow", "moveType": "PeriodicFollow",
"health": 5, "health": 4,
"damage": 2, "damage": 1,
"speed": 140, "speed": 120,
"lifetime": -1, "lifetime": -1,
"xpReward": 0, "xpReward": 0,
"goldReward": 0 "goldReward": 1
} }
], ],
"individualEnemySpawners": [ "individualEnemySpawners": [
@ -136,41 +186,105 @@
"common": { "common": {
"enemyId": "BasicEnemy", "enemyId": "BasicEnemy",
"startDelay": 0, "startDelay": 0,
"stopDelay": 29, "stopDelay": 59,
"cooldown": 1 "cooldown": 1
} }
}, },
{
"common": {
"enemyId": "BasicEnemy",
"startDelay": 30,
"stopDelay": 59,
"cooldown": 0.9
}
},
{ {
"common": { "common": {
"enemyId": "BasicBoss", "enemyId": "BasicBoss",
"startDelay": 60, "startDelay": 89,
"stopDelay": 61, "stopDelay": 90,
"cooldown": 0.9 "cooldown": 0.9
} }
}, },
{ {
"common": { "common": {
"enemyId": "BasicEnemy", "enemyId": "BasicEnemy",
"startDelay": 62, "startDelay": 61,
"stopDelay": 120, "stopDelay": 120,
"cooldown": 0.7 "cooldown": 0.9
} }
}, },
{ {
"common": { "common": {
"enemyId": "BasicEnemy", "enemyId": "BasicEnemy",
"startDelay": 121, "startDelay": 121,
"stopDelay": 240, "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 "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": [ "circularEnemySpawners": [
@ -178,28 +292,73 @@
"common": { "common": {
"enemyId": "CircleEnemy", "enemyId": "CircleEnemy",
"startDelay": 1, "startDelay": 1,
"stopDelay": 240, "stopDelay": 130,
"cooldown": 35 "cooldown": 45
}, },
"enemiesToSpawn": 40 "enemiesToSpawn": 38
}, },
{ {
"common": { "common": {
"enemyId": "BasicEnemy", "enemyId": "BasicEnemy",
"startDelay": 59, "startDelay": 0,
"stopDelay": 63, "stopDelay": 122,
"cooldown": 3 "cooldown": 60
}, },
"enemiesToSpawn": 10 "enemiesToSpawn": 10
}, },
{ {
"common": { "common": {
"enemyId": "BasicCheetah", "enemyId": "CircleEnemyStandard",
"startDelay": 119, "startDelay": 280,
"stopDelay": 123, "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 "cooldown": 2
}, },
"enemiesToSpawn": 10 "enemiesToSpawn": 8
},
{
"common": {
"enemyId": "BasicCheetah",
"startDelay": 139,
"stopDelay": 140,
"cooldown": 0.9
},
"enemiesToSpawn": 6
} }
], ],
"waveEnemySpawners": [ "waveEnemySpawners": [
@ -207,21 +366,37 @@
"common": { "common": {
"enemyId": "WaveEnemy", "enemyId": "WaveEnemy",
"startDelay": 1, "startDelay": 1,
"stopDelay": -1, "stopDelay": 201,
"cooldown": 20 "cooldown": 25
}, },
"enemiesToSpawn": 15, "enemiesToSpawn": 12
"waveLifetime": 50 },
{
"common": {
"enemyId": "WaveEnemy",
"startDelay": 420,
"stopDelay": 600,
"cooldown": 35
},
"enemiesToSpawn": 30
}, },
{ {
"common": { "common": {
"enemyId": "WaveEnemyArmor", "enemyId": "WaveEnemyArmor",
"startDelay": 1, "startDelay": 1,
"stopDelay": -1, "stopDelay": 199,
"cooldown": 50 "cooldown": 50
}, },
"enemiesToSpawn": 12, "enemiesToSpawn": 10
"waveLifetime": 20 },
{
"common": {
"enemyId": "WaveEnemyArmorFast",
"startDelay": 200,
"stopDelay": 600,
"cooldown": 27
},
"enemiesToSpawn": 14
} }
] ]
} }

View File

@ -1,11 +1 @@
{ {"ver":"1.0.0","importer":"json","imported":true,"uuid":"4a156ee8-535e-4443-8bf5-8b979a08d232","files":[".json"],"subMetas":{},"userData":{}}
"ver": "1.0.0",
"importer": "json",
"imported": true,
"uuid": "737b7646-f050-47db-8f02-a204ad5f768b",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "76b20dbf-cc02-46ff-9770-7ff180008804",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -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": [
{}
]
}

View File

@ -0,0 +1,11 @@
{
"ver": "1.0.16",
"importer": "material",
"imported": true,
"uuid": "9cb17675-370b-48ed-bfa2-bb613a88af44",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -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 <builtin/uniforms/cc-global>
#if USE_LOCAL
#include <builtin/uniforms/cc-local>
#endif
#if SAMPLE_FROM_RT
#include <common/common-define>
#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 <builtin/internal/embedded-alpha>
#include <builtin/internal/alpha-test>
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;
}
}%

View File

@ -0,0 +1,15 @@
{
"ver": "1.6.0",
"importer": "effect",
"imported": true,
"uuid": "7397d178-7d57-417a-9c48-4b90855a0014",
"files": [
".json"
],
"subMetas": {},
"userData": {
"combinations": [
{}
]
}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "63c984ff-f414-4b17-947c-cf8c6e809a4e",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -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"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.40",
"importer": "prefab",
"imported": true,
"uuid": "211839e3-132d-429d-9e68-a96fcdfb0ff7",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "UpgradeButton"
}
}

View File

@ -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"
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.40",
"importer": "prefab",
"imported": true,
"uuid": "41ca6952-fa32-4e38-8d43-eec2e982533c",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "UpgradeLevelPointUI"
}
}

View File

@ -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": []
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.40",
"importer": "prefab",
"imported": true,
"uuid": "0b35c4ba-253d-4316-ad01-0ba40a2612fc",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "UpgradesModalWindow"
}
}

View File

@ -2585,7 +2585,7 @@
"__id__": 76 "__id__": 76
}, },
"settingsAsset": { "settingsAsset": {
"__uuid__": "737b7646-f050-47db-8f02-a204ad5f768b", "__uuid__": "4a156ee8-535e-4443-8bf5-8b979a08d232",
"__expectedType__": "cc.JsonAsset" "__expectedType__": "cc.JsonAsset"
}, },
"translationAsset": { "translationAsset": {

View File

@ -24,11 +24,11 @@
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 33 "__id__": 36
}, },
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 34 "__id__": 37
}, },
"_id": "1a3bccb5-bbb7-4058-846c-ed41b52415b0" "_id": "1a3bccb5-bbb7-4058-846c-ed41b52415b0"
}, },
@ -156,28 +156,31 @@
}, },
{ {
"__id__": 21 "__id__": 21
},
{
"__id__": 29
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 29
},
{
"__id__": 30
},
{
"__id__": 31
},
{ {
"__id__": 32 "__id__": 32
},
{
"__id__": 33
},
{
"__id__": 34
},
{
"__id__": 35
} }
], ],
"_prefab": null, "_prefab": null,
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 320, "x": 320,
"y": 480, "y": 479.99999999999994,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@ -258,7 +261,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 480, "_orthoHeight": 479.99999999999994,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
@ -876,6 +879,90 @@
"__prefab": null, "__prefab": null,
"_id": "17dRwdDH1DH7KDpkjt3c0f" "_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", "__type__": "cc.UITransform",
"_name": "", "_name": "",
@ -925,8 +1012,8 @@
"_target": null, "_target": null,
"_left": 0, "_left": 0,
"_right": 0, "_right": 0,
"_top": 0, "_top": -5.684341886080802e-14,
"_bottom": 0, "_bottom": -5.684341886080802e-14,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
@ -956,7 +1043,10 @@
"upgradeBtn": { "upgradeBtn": {
"__id__": 28 "__id__": 28
}, },
"_id": "12ZDz/3H9Ff76Ay4iDl43K" "modalWindowManager": {
"__id__": 31
},
"_id": "4cQFnvx1xB65sFsTPGRrB7"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
@ -970,19 +1060,19 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 35
},
"shadows": {
"__id__": 36
},
"_skybox": {
"__id__": 37
},
"fog": {
"__id__": 38 "__id__": 38
}, },
"octree": { "shadows": {
"__id__": 39 "__id__": 39
},
"_skybox": {
"__id__": 40
},
"fog": {
"__id__": 41
},
"octree": {
"__id__": 42
} }
}, },
{ {

View File

@ -21,7 +21,7 @@ export class GameModalLauncher {
private async showLevelUpModal(): Promise<void> { private async showLevelUpModal(): Promise<void> {
this.gamePauser.pause(); this.gamePauser.pause();
const skillToUpgrade: UpgradeType = await this.modalWindowManager.showModal<LevelUpModalWindowParams, UpgradeType>( const skillToUpgrade: UpgradeType = await this.modalWindowManager.showModal<LevelUpModalWindowParams, UpgradeType>(
GameModalWindowTypes.LevelUpModal, GameModalWindowTypes.LevelUp,
{ availableUpgrades: Array.from(this.upgrader.getAvailableUpgrades()), translationData: this.translationData } { availableUpgrades: Array.from(this.upgrader.getAvailableUpgrades()), translationData: this.translationData }
); );
this.gamePauser.resume(); this.gamePauser.resume();

View File

@ -1,3 +1,3 @@
export enum GameModalWindowTypes { export enum GameModalWindowTypes {
LevelUpModal = "LevelUpModalWindow" LevelUp = "LevelUpModalWindow"
} }

View File

@ -1,25 +1,31 @@
import { _decorator, Component, Node, Button } from "cc"; import { _decorator, Component } from "cc";
import { type } from "os"; import { ModalWindowManager } from "../Services/ModalWindowSystem/ModalWindowManager";
import { UIButton } from "../Services/UI/Button/UIButton"; import { UIButton } from "../Services/UI/Button/UIButton";
import { GameRunner } from "./GameRunner"; import { GameRunner } from "./GameRunner";
import { MenuModalLauncher } from "./ModalWindows/MenuModalLauncher";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass("Menu") @ccclass("Menu")
export class Menu extends Component { export class Menu extends Component {
@property(UIButton) private playBtn: UIButton; @property(UIButton) private playBtn: UIButton;
@property(UIButton) private upgradeBtn: UIButton; @property(UIButton) private upgradeBtn: UIButton;
@property(ModalWindowManager) private modalWindowManager: ModalWindowManager;
private menuModalLauncher: MenuModalLauncher;
public async start(): Promise<void> { public async start(): Promise<void> {
this.playBtn.InteractedEvent.on(this.startGame, this); this.playBtn.InteractedEvent.on(this.startGame, this);
this.upgradeBtn.InteractedEvent.on(this.openUpgradesWindow, this); this.upgradeBtn.InteractedEvent.on(this.openUpgradesWindow, this);
this.menuModalLauncher = new MenuModalLauncher(this.modalWindowManager);
} }
private startGame(): void { private startGame(): void {
GameRunner.Instance.playGame(); GameRunner.Instance.playGame();
} }
private openUpgradesWindow(): void {} private openUpgradesWindow(): void {
this.menuModalLauncher.openUpgradesWindow();
}
} }

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "ee6e2e1a-723c-4e5d-a689-95f478d0fc97",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -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<void> {
await this.modalWindowManager.showModal(MenuModalWindowTypes.Upgrades, {});
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "fc6227d2-7b1d-49f3-85a2-abdb82e1638b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,3 @@
export enum MenuModalWindowTypes {
Upgrades = "UpgradesModalWindow"
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "5c0f41ea-f404-452a-b17b-0ecdfd0a5f71",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "332aac81-54d3-4914-bc63-2efdecaef4b2",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -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;
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "76edae8c-16ba-482d-91fd-2833991475ac",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -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<Empty, Empty> {
@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 {}

View File

@ -0,0 +1 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"854a4b66-9084-4ecd-814f-0300f12f7ff3","files":[],"subMetas":{},"userData":{}}

View File

@ -1,15 +1,21 @@
import { Animation, Component, _decorator } from "cc"; import { Animation, Component, _decorator } from "cc";
import { UIButton } from "../UI/Button/UIButton";
import { delay } from "../Utils/AsyncUtils"; import { delay } from "../Utils/AsyncUtils";
const { property } = _decorator; const { property } = _decorator;
export abstract class ModalWindow<TParam, TResult> extends Component { export abstract class ModalWindow<TParam, TResult> extends Component {
@property(Animation) private animation: Animation; @property(Animation) private animation: Animation;
@property(UIButton) private closeButton: UIButton;
@property(UIButton) private backgroundCloseButton: UIButton;
private result: TResult; private result: TResult;
private isDismissed = false; private isDismissed = false;
public async runAsync(params?: TParam): Promise<TResult> { public async runAsync(params?: TParam): Promise<TResult> {
this.closeButton?.InteractedEvent.on(() => this.dismiss(), this);
this.backgroundCloseButton?.InteractedEvent.on(() => this.dismiss(), this);
this.setup(params); this.setup(params);
this.animation?.play("open"); this.animation?.play("open");
while (!this.isDismissed) await delay(100); while (!this.isDismissed) await delay(100);