dd
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -93,6 +93,16 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
max: 5,
|
||||
speed:1,
|
||||
},
|
||||
item_box:{
|
||||
hp:0,
|
||||
atk:0,
|
||||
atk_cd:0,
|
||||
power:0,
|
||||
name:"",
|
||||
skillcd:0,
|
||||
skillsd:0,
|
||||
info:"",
|
||||
}
|
||||
|
||||
};
|
||||
vmAdd() {
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
/*
|
||||
* @Author: dgflash
|
||||
* @Date: 2021-11-23 15:28:39
|
||||
* @LastEditors: dgflash
|
||||
* @LastEditTime: 2022-01-26 16:42:00
|
||||
CardList type: 1:精灵 2:技能 3:装备
|
||||
*/
|
||||
export const CardType = {
|
||||
1: "前排",
|
||||
2: "后排",
|
||||
}
|
||||
|
||||
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},
|
||||
@@ -38,6 +32,10 @@ export const CardList={
|
||||
// 5:[5001,5002,5003,5004],
|
||||
|
||||
}
|
||||
/*
|
||||
CardSet type: 1:近战 2:远程 3:法术 暂定
|
||||
*/
|
||||
|
||||
export const CardSet = {
|
||||
1101:{uuid: 1101,path: "1101",type: 1,level: 1,name: "守护犬",atk: 4,hp: 8,atk_cd: 2,power: 50,speed: 80,skill: "base",max_skill: "base",int1: null,int2: null,dps: 2,word: "守护", info: "自身护盾",atktype: "攻击型", mon: "狗"},
|
||||
1102:{uuid: 1102,path: "1102",type: 1,level: 1,name: "狂暴犬",atk: 4,hp: 8,atk_cd: 2,power: 50,speed: 80,skill: "base",max_skill: "base",int1: null,int2: null,dps: 2,word: "狂暴", info: "全体攻击",atktype: "攻击型", mon: "狗"},
|
||||
|
||||
@@ -61,9 +61,20 @@ export class HeroCardViewComp extends CCComp {
|
||||
onTouchMove(event: EventTouch) {
|
||||
let delta = event.getDelta();
|
||||
this.node.setPosition(this.node.position.x+delta.x,this.node.position.y+delta.y);
|
||||
this.show_info()
|
||||
}
|
||||
show_info(){
|
||||
let parent = this.node.parent.parent
|
||||
if(this.card_type == 2){
|
||||
smc.vm_data.item_box.info = SkillSet[this.card_uid].info
|
||||
smc.vm_data.item_box.name = SkillSet[this.card_uid].name
|
||||
smc.vm_data.item_box.skillcd = SkillSet[this.card_uid].cd
|
||||
smc.vm_data.item_box.skillsd = SkillSet[this.card_uid].sd
|
||||
smc.vm_data.item_box.atk = SkillSet[this.card_uid].atk
|
||||
smc.vm_data.item_box.hp = SkillSet[this.card_uid].hp
|
||||
parent.getChildByName("item_box").active=true
|
||||
}
|
||||
}
|
||||
onTouchEnd(){
|
||||
if(this.node.position.y-this.pos_y > 150){
|
||||
this.use_card()
|
||||
|
||||
Reference in New Issue
Block a user