ui设计,卡牌规则修改,不需升级卡牌词,卡牌召唤兽不再有等级

This commit is contained in:
2024-09-04 17:03:44 +08:00
parent ad52a9ad9c
commit 44cb46e7de
11 changed files with 2111 additions and 2174 deletions

View File

@@ -685,7 +685,7 @@
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.00986288187235107,
"y": 0.3422935810543142
"y": 0
},
"_id": ""
},
@@ -1085,7 +1085,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"y": -7.821,
"z": 0
},
"_lrot": {
@@ -2104,6 +2104,8 @@
"__id__": 0
},
"fileId": "a8xJwPSnJC46y3h55Dx4+q",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -2126,7 +2128,7 @@
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
"y": 0
},
"_id": ""
},
@@ -2175,7 +2177,7 @@
"__id__": 128
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 134
@@ -2189,8 +2191,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -34.832,
"y": 109.029,
"x": -22.542,
"y": 74.394,
"z": 0
},
"_lrot": {
@@ -2202,8 +2204,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.0000000000000002,
"y": 1.0000000000000002,
"x": 0.6,
"y": 0.6,
"z": 1
},
"_mobility": 0,
@@ -2225,7 +2227,7 @@
"__id__": 97
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 99
@@ -2361,7 +2363,7 @@
"__id__": 97
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 105
@@ -2497,7 +2499,7 @@
"__id__": 97
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 111
@@ -2633,7 +2635,7 @@
"__id__": 97
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 117
@@ -2769,7 +2771,7 @@
"__id__": 97
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 123
@@ -2905,7 +2907,7 @@
"__id__": 97
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 129
@@ -3139,7 +3141,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 31.47,
"y": 97.195,
"y": 88.257,
"z": 0
},
"_lrot": {
@@ -3275,7 +3277,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 14.47,
"y": 96.369,
"y": 87.431,
"z": 0
},
"_lrot": {
@@ -3434,7 +3436,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 31.47,
"y": 112.195,
"y": 103.257,
"z": 0
},
"_lrot": {
@@ -3570,7 +3572,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 14.47,
"y": 112.195,
"y": 103.257,
"z": 0
},
"_lrot": {

View File

@@ -48,8 +48,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 1.5,
"y": 1.5,
"z": 1
},
"_mobility": 0,

View File

@@ -2141,10 +2141,10 @@
"height": 160,
"rawWidth": 160,
"rawHeight": 160,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderTop": 42,
"borderBottom": 39,
"borderLeft": 39,
"borderRight": 43,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -76,17 +76,17 @@ export class Role extends ecs.Entity {
mv.speed =mv.ospeed = 0;
mv.hero_name= "role";
buff.group= mv.box_group= BoxSet.HERO;
mv.hp= mv.hp_max = 1000;
mv.hp= mv.hp_max = smc.vm_data.role.hp;
mv.level = 1;
mv.atk = 5;
mv.atk_cd = 0.5;
mv.power = 300;
mv.atk = smc.vm_data.role.atk;
mv.atk_cd = smc.vm_data.role.atk_cd;
mv.power = smc.vm_data.role.power;
mv.type = 1;
mv.skill_uuid = 9001;
mv.max_skill_uuid = 9001;
mv.Tpos = v3(0,0,0);
mv.scale = 1;
mv.atk_range=800;
mv.atk_range=1000;
// mv.change_name(smc.heros[uuid].name,1)
this.add(mv);
this.add(buff);

View File

@@ -63,12 +63,14 @@ export class SingletonModuleComp extends ecs.Comp {
g_level:1,
g_time:0,
},
player:{
hp_max:30,
role:{
hp:300,
atk:10,
lv:1,
exp:0,
next_exp:100,
power:300,
atk_cd:1.5,
},
/** 当前等级 */
cards:{
@@ -78,14 +80,6 @@ export class SingletonModuleComp extends ecs.Comp {
ref_cost:1,
up_cost:4,
},
hp: {
min:20,
max:30
},
power: {
min: 10,
max: 30
},
gold: {
min: 200,
max: 200,

View File

@@ -11,26 +11,25 @@ export const CardType = {
export const CardList={
1:[
{uuid:1101,type:1},{uuid:1102,type:1},{uuid:1201,type:1},{uuid:1202,type:1},{uuid:1301,type:1},{uuid:1302,type:1},
{uuid:1001,type:2},{uuid:1002,type:2},
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},
],
2:[
{uuid:2101,type:1},{uuid:2102,type:1},{uuid:2201,type:1},{uuid:2202,type:1},{uuid:2301,type:1},{uuid:2302,type:1},
{uuid:1001,type:2},{uuid:1002,type:2},
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},
],
3:[
{uuid:3101,type:1},{uuid:3102,type:1},{uuid:3201,type:1},{uuid:3202,type:1},{uuid:3301,type:1},{uuid:3302,type:1},
{uuid:1001,type:2},{uuid:1002,type:2},{uuid:4011,type:2},{uuid:4012,type:2},
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},{uuid:6002,type:3},{uuid:6003,type:3},{uuid:6005,type:3},{uuid:6006,type:3},{uuid:6102,type:3},{uuid:6103,type:3},
{uuid:6210,type:3},{uuid:6213,type:3},{uuid:6216,type:3},
],
4:[
{uuid:4101,type:1},{uuid:4102,type:1},{uuid:4201,type:1},{uuid:4202,type:1},{uuid:4301,type:1},{uuid:4302,type:1},
{uuid:1001,type:2},{uuid:1002,type:2},{uuid:4011,type:2},{uuid:4012,type:2},
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},{uuid:6002,type:3},{uuid:6003,type:3},{uuid:6005,type:3},{uuid:6006,type:3},{uuid:6102,type:3},{uuid:6103,type:3},
{uuid:6210,type:3},{uuid:6213,type:3},{uuid:6216,type:3},{uuid:6211,type:3},{uuid:6212,type:3},{uuid:6214,type:3},{uuid:6215,type:3},{uuid:6217,type:3},{uuid:6218,type:3},
],
2:[
{uuid:1001,type:2},{uuid:1002,type:2},
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},
],
3:[
{uuid:1001,type:2},{uuid:1002,type:2},{uuid:4011,type:2},{uuid:4012,type:2},
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},{uuid:6002,type:3},{uuid:6003,type:3},{uuid:6005,type:3},{uuid:6006,type:3},{uuid:6102,type:3},{uuid:6103,type:3},
{uuid:6210,type:3},{uuid:6213,type:3},{uuid:6216,type:3},
],
4:[
{uuid:5001,type:1},{uuid:5002,type:1},{uuid:5003,type:1},{uuid:5004,type:1}
],
5:[{uuid:5001,type:1},{uuid:5002,type:1},{uuid:5003,type:1},{uuid:5004,type:1}],
// 1:[1101,1102,1103,1104,1105,1106,1201,1202,1203,1204,1205,1301,1302,1303,1304,],
// 2:[2101,2102,2103,2104,2105,2201,2202,2203,2204,2301,2302,2303,2304,2305,],

View File

@@ -111,11 +111,11 @@ export class MapMonsterComp extends CCComp {
switch (x) {
case 1:
monster_layer = scene.entityLayer1!.node!;
pos.y=pos.y+100;
pos.y=pos.y+80;
break;
case 2:
monster_layer= scene.entityLayer2!.node!;
pos.y=pos.y-100;
pos.y=pos.y-80;
break;
}

View File

@@ -45,9 +45,7 @@ export class Hero extends ecs.Entity {
var node = instantiate(prefab);
node.parent=layer
// let ratio=this.set_ratio(uuid);
// node.setScale(ratio*node.scale.x, ratio*node.scale.y, node.scale.z);
node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*scale, node.getChildByName("avatar").scale.y, node.getChildByName("avatar").scale.z);
node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*scale, node.getChildByName("avatar").scale.y,0);
node.setPosition(pos)
// console.log(node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite))
const url = 'game/heros/heros';
@@ -59,26 +57,26 @@ export class Hero extends ecs.Entity {
this.hero_init(uuid,node)
oops.message.dispatchEvent("hero_load",this)
}
// set_ratio(uuid:number){
// let ratio=1;
// switch (smc.heros[uuid].level) {
// case 2:
// ratio=1.1
// break;
// case 3:
// ratio=1.2
// break;
// case 4:
// ratio=1.3
// break;
// case 5:
// ratio=1.4
// break;
// default:
// ratio=1
// }
// return ratio;
// }
set_ratio(uuid:number){
let ratio=1;
switch (smc.heros[uuid].level) {
case 2:
ratio=1.1
break;
case 3:
ratio=1.2
break;
case 4:
ratio=1.3
break;
case 5:
ratio=1.4
break;
default:
ratio=1
}
return ratio;
}
hero_init(uuid:number=1001,node:Node,pos:Vec3=v3(0,0,0)){
var mv = node.getComponent(MonsterViewComp)!;
var buff =node.getComponent(MonsterBuffComp)!;

View File

@@ -328,16 +328,22 @@ export class MonsterViewComp extends CCComp {
}
in_atked() {
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.1);
// var path = "game/skills/atked";
// var prefab: Prefab = oops.res.get(path, Prefab)!;
// var node = instantiate(prefab);
// let pos = v3(0,30)
// node.setPosition(pos)
// node.parent = this.node;
if(this.is_role){
var path = "game/skills/atked";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
let pos = v3(0,60)
node.setPosition(pos)
node.parent = this.node;
}else{
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.1);
}
}
dead(){
var path = "game/skills/dead";