ui设计,卡牌规则修改,不需升级卡牌词,卡牌召唤兽不再有等级
This commit is contained in:
@@ -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)!;
|
||||
|
||||
Reference in New Issue
Block a user