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

View File

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

View File

@@ -2141,10 +2141,10 @@
"height": 160, "height": 160,
"rawWidth": 160, "rawWidth": 160,
"rawHeight": 160, "rawHeight": 160,
"borderTop": 0, "borderTop": 42,
"borderBottom": 0, "borderBottom": 39,
"borderLeft": 0, "borderLeft": 39,
"borderRight": 0, "borderRight": 43,
"packable": true, "packable": true,
"pixelsToUnit": 100, "pixelsToUnit": 100,
"pivotX": 0.5, "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.speed =mv.ospeed = 0;
mv.hero_name= "role"; mv.hero_name= "role";
buff.group= mv.box_group= BoxSet.HERO; 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.level = 1;
mv.atk = 5; mv.atk = smc.vm_data.role.atk;
mv.atk_cd = 0.5; mv.atk_cd = smc.vm_data.role.atk_cd;
mv.power = 300; mv.power = smc.vm_data.role.power;
mv.type = 1; mv.type = 1;
mv.skill_uuid = 9001; mv.skill_uuid = 9001;
mv.max_skill_uuid = 9001; mv.max_skill_uuid = 9001;
mv.Tpos = v3(0,0,0); mv.Tpos = v3(0,0,0);
mv.scale = 1; mv.scale = 1;
mv.atk_range=800; mv.atk_range=1000;
// mv.change_name(smc.heros[uuid].name,1) // mv.change_name(smc.heros[uuid].name,1)
this.add(mv); this.add(mv);
this.add(buff); this.add(buff);

View File

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

View File

@@ -11,26 +11,25 @@ export const CardType = {
export const CardList={ export const CardList={
1:[ 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: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: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: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: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: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: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}, {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}], 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,], // 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,], // 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) { switch (x) {
case 1: case 1:
monster_layer = scene.entityLayer1!.node!; monster_layer = scene.entityLayer1!.node!;
pos.y=pos.y+100; pos.y=pos.y+80;
break; break;
case 2: case 2:
monster_layer= scene.entityLayer2!.node!; monster_layer= scene.entityLayer2!.node!;
pos.y=pos.y-100; pos.y=pos.y-80;
break; break;
} }

View File

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

View File

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