dd
This commit is contained in:
@@ -319,13 +319,13 @@
|
|||||||
"_restitution": 0,
|
"_restitution": 0,
|
||||||
"_offset": {
|
"_offset": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
"x": 0,
|
"x": -1.3,
|
||||||
"y": 0
|
"y": 1
|
||||||
},
|
},
|
||||||
"_size": {
|
"_size": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 20,
|
"width": 35.4,
|
||||||
"height": 160
|
"height": 39.2
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
@@ -360,7 +360,6 @@
|
|||||||
"__id__": 0
|
"__id__": 0
|
||||||
},
|
},
|
||||||
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
|
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
|
||||||
"instance": null,
|
"instance": null
|
||||||
"targetOverrides": null
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -591,7 +591,7 @@
|
|||||||
"__id__": 23
|
"__id__": 23
|
||||||
},
|
},
|
||||||
"templateMode": false,
|
"templateMode": false,
|
||||||
"watchPath": "data.gems",
|
"watchPath": "data.role.energy",
|
||||||
"labelType": "cc.Label",
|
"labelType": "cc.Label",
|
||||||
"watchPathArr": [
|
"watchPathArr": [
|
||||||
"data.hp_min"
|
"data.hp_min"
|
||||||
@@ -1697,7 +1697,7 @@
|
|||||||
"__id__": 73
|
"__id__": 73
|
||||||
},
|
},
|
||||||
"templateMode": false,
|
"templateMode": false,
|
||||||
"watchPath": "data.gems",
|
"watchPath": "data.role.gems",
|
||||||
"labelType": "cc.Label",
|
"labelType": "cc.Label",
|
||||||
"watchPathArr": [
|
"watchPathArr": [
|
||||||
"data.hp_min"
|
"data.hp_min"
|
||||||
@@ -2803,7 +2803,7 @@
|
|||||||
"__id__": 123
|
"__id__": 123
|
||||||
},
|
},
|
||||||
"templateMode": false,
|
"templateMode": false,
|
||||||
"watchPath": "data.gems",
|
"watchPath": "data.role.gold",
|
||||||
"labelType": "cc.Label",
|
"labelType": "cc.Label",
|
||||||
"watchPathArr": [
|
"watchPathArr": [
|
||||||
"data.hp_min"
|
"data.hp_min"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -106,6 +106,8 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
t_dps:0,
|
t_dps:0,
|
||||||
h_dps:0,
|
h_dps:0,
|
||||||
m_dps:0,
|
m_dps:0,
|
||||||
|
reward_gold:0,
|
||||||
|
reward_exp:0,
|
||||||
hero:{
|
hero:{
|
||||||
atk:1,
|
atk:1,
|
||||||
atk_cd:1,
|
atk_cd:1,
|
||||||
@@ -118,6 +120,9 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
role:{
|
role:{
|
||||||
|
gold:9999999,
|
||||||
|
gems:0,
|
||||||
|
energy:0,
|
||||||
mission:1,
|
mission:1,
|
||||||
mission_finish:false,
|
mission_finish:false,
|
||||||
mission_num:0,
|
mission_num:0,
|
||||||
@@ -125,7 +130,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
hero_num:12,
|
hero_num:12,
|
||||||
hp:300,
|
hp:300,
|
||||||
hp_max:300,
|
hp_max:300,
|
||||||
speed:60,
|
speed:40,
|
||||||
atk:10,
|
atk:10,
|
||||||
atk_dis:100,
|
atk_dis:100,
|
||||||
buff_atk:0,
|
buff_atk:0,
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ sk_uuid:子技能id
|
|||||||
sk_count:子技能个数
|
sk_count:子技能个数
|
||||||
sp_name : 预制体名称
|
sp_name : 预制体名称
|
||||||
path: 图片地址
|
path: 图片地址
|
||||||
|
run:number = 0; // 0有目标 带方向,1贝塞尔曲线 2 不动 ,3 直线
|
||||||
|
|
||||||
*/
|
*/
|
||||||
export const SkillSet={
|
export const SkillSet={
|
||||||
1001:{uuid: 1001,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人",
|
1001:{uuid: 1001,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人",
|
||||||
@@ -52,7 +54,7 @@ export const SkillSet={
|
|||||||
dis:1,count:5,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:2,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, },
|
dis:1,count:5,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:2,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, },
|
||||||
|
|
||||||
9001:{uuid: 9001,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "普攻",sp_name:"patk",info:"释放一个魔法球攻击敌人",
|
9001:{uuid: 9001,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "普攻",sp_name:"patk",info:"释放一个魔法球攻击敌人",
|
||||||
dis:1,count:1,in:0,run:3,atk:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600,},
|
dis:1,count:1,in:0,run:0,atk:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600,},
|
||||||
9002:{uuid: 9002,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "魔法小球",sp_name:"mball",info:"释放一个魔法球攻击敌人",
|
9002:{uuid: 9002,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "魔法小球",sp_name:"mball",info:"释放一个魔法球攻击敌人",
|
||||||
dis:1,count:1,in:0,run:0,atk:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600,},
|
dis:1,count:1,in:0,run:0,atk:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600,},
|
||||||
9003:{uuid: 9003,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "射击",sp_name:"arrow",info:"释放一个魔法球攻击敌人",
|
9003:{uuid: 9003,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "射击",sp_name:"arrow",info:"释放一个魔法球攻击敌人",
|
||||||
|
|||||||
@@ -2,66 +2,59 @@
|
|||||||
export const HeroSet = {
|
export const HeroSet = {
|
||||||
9001: {
|
9001: {
|
||||||
uuid: 9001, path: "k3", type: 1, level: 1,cost:2, name: "骑士", atk: 10, hp: 100, atk_dis: 100, atk_cd: 1, power: 0, power_max: 20, speed: 40,
|
uuid: 9001, path: "k3", type: 1, level: 1,cost:2, name: "骑士", atk: 10, hp: 100, atk_dis: 100, atk_cd: 1, power: 0, power_max: 20, speed: 40,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 2002, word: "守护", info: "自身护盾", atktype: 1,
|
skill_uuid: 9001, max_skill_uuid: 2002, atktype: 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
9002: {
|
9002: {
|
||||||
uuid: 9002, path: "k1", type: 1, level: 1,cost:2, name: "战士", atk: 20, hp: 50, atk_dis: 100, atk_cd: 1, power: 0, power_max: 20, speed: 40,
|
uuid: 9002, path: "k1", type: 1, level: 1,cost:2, name: "战士", atk: 20, hp: 50, atk_dis: 100, atk_cd: 1, power: 0, power_max: 20, speed: 40,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 2003, word: "守护", info: "自身护盾", atktype: 1,
|
skill_uuid: 9001, max_skill_uuid: 2003, atktype: 1,
|
||||||
},
|
},
|
||||||
9011: {
|
9011: {
|
||||||
uuid: 9004, path: "m1", type: 3, level: 1,cost:2, name: "冰法", atk: 25, hp: 50, atk_dis: 260, atk_cd: 2.5, power: 0, power_max: 20, speed: 30,
|
uuid: 9004, path: "m1", type: 3, level: 1,cost:2, name: "冰法", atk: 25, hp: 50, atk_dis: 260, atk_cd: 2.5, power: 0, power_max: 20, speed: 20,
|
||||||
max_skill: "寒冰箭", skill_uuid: 9002, max_skill_uuid: 1002, word: "守护", info: "自身护盾", atktype: 1,
|
skill_uuid: 9002, max_skill_uuid: 1002, atktype: 1,
|
||||||
},
|
},
|
||||||
9021: {
|
9021: {
|
||||||
uuid: 9006, path: "m3", type: 3, level: 1,cost:2, name: "火法", atk: 20, hp: 50, atk_dis: 260, atk_cd: 2, power: 0, power_max: 20, speed: 30,
|
uuid: 9006, path: "m3", type: 3, level: 1,cost:2, name: "火法", atk: 20, hp: 50, atk_dis: 260, atk_cd: 2, power: 0, power_max: 20, speed: 20,
|
||||||
max_skill: "火球术", skill_uuid: 9002, max_skill_uuid: 1001, word: "守护", info: "自身护盾", atktype: 2
|
skill_uuid: 9002, max_skill_uuid: 1001, atktype: 2
|
||||||
},
|
},
|
||||||
|
|
||||||
9031: {
|
9031: {
|
||||||
uuid: 9005, path: "m2", type: 3, level: 1,cost:2, name: "牧师", atk: 10, hp: 50, atk_dis: 260, atk_cd: 2, power: 1, power_max: 1, speed: 30,
|
uuid: 9005, path: "m2", type: 3, level: 1,cost:2, name: "牧师", atk: 10, hp: 50, atk_dis: 260, atk_cd: 2, power: 1, power_max: 1, speed: 20,
|
||||||
max_skill: "治愈术", skill_uuid: 9002, max_skill_uuid: 2001, word: "守护", info: "自身护盾", atktype: 2
|
skill_uuid: 9002, max_skill_uuid: 2001, atktype: 2
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
9041: {
|
9041: {
|
||||||
uuid: 9009, path: "arc1", type: 2, level: 1,cost:2, name: "弓箭手", atk: 15, hp: 50, atk_dis: 200, atk_cd: 1.5, power: 0, power_max: 20, speed: 30,
|
uuid: 9009, path: "arc1", type: 2, level: 1,cost:2, name: "弓箭手", atk: 15, hp: 50, atk_dis: 200, atk_cd: 1.5, power: 0, power_max: 20, speed: 30,
|
||||||
max_skill: "精准射击", skill_uuid: 9003, max_skill_uuid: 1003, word: "狂暴", info: "全体攻击", atktype: 2
|
skill_uuid: 9003, max_skill_uuid: 1003, atktype: 2
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MonSet = {
|
export const MonSet = {
|
||||||
|
|
||||||
1011: {
|
1011: {
|
||||||
uuid: 1011, path: "orc1", type: 1, level: 1,cost:2, name: "森林兽人", atk: 5, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 20, speed: 30,
|
uuid: 1011, path: "orc1", type: 1, level: 1,cost:2, name: "森林兽人", atk: 5, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 20, speed: 30,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, word: "守护", info: "自身护盾", atktype: 1
|
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, atktype: 1
|
||||||
},
|
},
|
||||||
1012: {
|
1012: {
|
||||||
uuid: 1012, path: "orc2", type: 1, level: 1,cost:2, name: "荒野兽人", atk: 10, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 20, speed: 30,
|
uuid: 1012, path: "orc2", type: 1, level: 1,cost:2, name: "荒野兽人", atk: 10, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 20, speed: 30,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, word: "守护", info: "自身护盾", atktype: 1
|
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, atktype: 1
|
||||||
},
|
},
|
||||||
1013: {
|
1013: {
|
||||||
uuid: 1013, path: "orc3", type: 1, level: 1,cost:2, name: "兽人战士", atk: 15, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 20, speed: 30,
|
uuid: 1013, path: "orc3", type: 1, level: 1,cost:2, name: "兽人战士", atk: 15, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 20, speed: 30,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, word: "守护", info: "自身护盾", atktype: 1
|
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, atktype: 1
|
||||||
},
|
},
|
||||||
|
|
||||||
1031: {
|
1031: {
|
||||||
uuid: 1031, path: "du1", type: 1, level: 1,cost:2, name: "独眼巨人", atk: 5, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 10, speed: 30,
|
uuid: 1031, path: "du1", type: 1, level: 1,cost:2, name: "独眼巨人", atk: 5, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 10, speed: 30,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, word: "守护", info: "自身护盾", atktype: 1
|
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, atktype: 1
|
||||||
},
|
},
|
||||||
1032: {
|
1032: {
|
||||||
uuid: 1032, path: "du2", type: 1, level: 1,cost:2, name: "狂暴独眼", atk: 10, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 10, speed: 30,
|
uuid: 1032, path: "du2", type: 1, level: 1,cost:2, name: "狂暴独眼", atk: 10, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 10, speed: 30,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, word: "守护", info: "自身护盾", atktype: 1
|
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, atktype: 1
|
||||||
},
|
},
|
||||||
1033: {
|
1033: {
|
||||||
uuid: 1033, path: "du3", type: 1, level: 1,cost:2, name: "独眼首领", atk: 15, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 10, speed: 30,
|
uuid: 1033, path: "du3", type: 1, level: 1,cost:2, name: "独眼首领", atk: 15, hp: 15, atk_dis: 100, atk_cd: 2, power: 0, power_max: 10, speed: 30,
|
||||||
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, word: "守护", info: "自身护盾", atktype: 1
|
max_skill: "精准打击", skill_uuid: 9001, max_skill_uuid: 0, atktype: 1
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
5001: {
|
5001: {
|
||||||
uuid: 5001, path: "boss1", type: 1, level: 1,cost:2, name: "骷髅王", atk: 30, hp: 150, atk_dis: 200, atk_cd: 2, power: 0, power_max: 10, speed: 7,
|
uuid: 5001, path: "boss1", type: 1, level: 1,cost:2, name: "骷髅王", atk: 30, hp: 150, atk_dis: 200, atk_cd: 2, power: 0, power_max: 10, speed: 7,
|
||||||
max_skill: "精准打击", skill_uuid: 1001, max_skill_uuid: 1002, word: "守护", info: "自身护盾", atktype: 1
|
max_skill: "精准打击", skill_uuid: 1001, max_skill_uuid: 1002, atktype: 1
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -214,6 +214,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
if(dir < this.atk_dis){
|
if(dir < this.atk_dis){
|
||||||
this.is_atking=true
|
this.is_atking=true
|
||||||
|
this.stop_cd = 0.1
|
||||||
}else{
|
}else{
|
||||||
this.is_atking=false
|
this.is_atking=false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { _decorator ,Vec3,v3, Prefab, instantiate,Node} from "cc";
|
|||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||||
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||||
import { BoxSet } from "../common/config/BoxSet";
|
import { BoxSet, GameSet } from "../common/config/BoxSet";
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||||
import { MapViewScene } from "./view/MapViewScene";
|
import { MapViewScene } from "./view/MapViewScene";
|
||||||
@@ -15,6 +15,7 @@ import { Mon } from "../mon/Mon";
|
|||||||
import { MonModelComp } from "../mon/MonModelComp";
|
import { MonModelComp } from "../mon/MonModelComp";
|
||||||
import { Boss} from "../Boss/Boss";
|
import { Boss} from "../Boss/Boss";
|
||||||
import { UIID } from "../common/config/GameUIConfig";
|
import { UIID } from "../common/config/GameUIConfig";
|
||||||
|
import { Talents } from "../common/config/TalentSet";
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
/** 视图层对象 */
|
/** 视图层对象 */
|
||||||
@@ -59,8 +60,10 @@ export class MapMonsterComp extends CCComp {
|
|||||||
oops.message.on("do_add_hero", this.on_do_add_hero, this);
|
oops.message.on("do_add_hero", this.on_do_add_hero, this);
|
||||||
oops.message.on("mission_start", this.mission_start, this);
|
oops.message.on("mission_start", this.mission_start, this);
|
||||||
oops.message.on("normal_call", this.on_normal_call, this);
|
oops.message.on("normal_call", this.on_normal_call, this);
|
||||||
oops.message.on("better_call", this.on_better_call, this);
|
oops.message.on("better_call", this.on_better_call, this);
|
||||||
|
oops.message.on("mon_dead", this.on_mon_dead, this);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
// this.scene = this.getComponent(MapViewScene);
|
// this.scene = this.getComponent(MapViewScene);
|
||||||
@@ -121,7 +124,18 @@ export class MapMonsterComp extends CCComp {
|
|||||||
smc.vm_data.mission.coin = 0
|
smc.vm_data.mission.coin = 0
|
||||||
this.load_role()
|
this.load_role()
|
||||||
}
|
}
|
||||||
|
on_mon_dead(){
|
||||||
|
let coin =(GameSet.MON_COIN_ADD*smc.vm_data.mission.coin_reward_add*(1+Talents[1006].bonus*smc.vm_data.talent[1006].lv)).toFixed(0)
|
||||||
|
smc.vm_data.mission.coin += parseFloat(coin)
|
||||||
|
smc.vm_data.mission.reward_num += 1;
|
||||||
|
smc.vm_data.mission.reward_gold +=10+(1-smc.vm_data.mission.mission_lv)*1
|
||||||
|
smc.vm_data.mission.reward_exp +=10+(1-smc.vm_data.mission.mission_lv)*1
|
||||||
|
smc.vm_data.mission.m_alive -= 1;
|
||||||
|
if(smc.vm_data.mission.m_alive <= 0){
|
||||||
|
smc.vm_data.mission.victory = 1;
|
||||||
|
oops.message.dispatchEvent("minssion_victory");
|
||||||
|
}
|
||||||
|
}
|
||||||
on_normal_call(){
|
on_normal_call(){
|
||||||
let hero:any =RandomManager.instance.getRandomByObjectList(smc.cards, 1);
|
let hero:any =RandomManager.instance.getRandomByObjectList(smc.cards, 1);
|
||||||
this.addHero(hero[0].uuid)
|
this.addHero(hero[0].uuid)
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ export class VictoryComp extends CCComp {
|
|||||||
}
|
}
|
||||||
end_mission(){
|
end_mission(){
|
||||||
this.node.getChildByName("Node").active=false
|
this.node.getChildByName("Node").active=false
|
||||||
|
smc.vm_data.role.gold += smc.vm_data.mission.reward_gold
|
||||||
|
smc.vm_data.role.exp += smc.vm_data.mission.reward_exp
|
||||||
|
smc.vm_data.mission.reward_gold=0
|
||||||
|
smc.vm_data.mission.reward_exp=0
|
||||||
this.empty_mission()
|
this.empty_mission()
|
||||||
oops.message.dispatchEvent("to_mission")
|
oops.message.dispatchEvent("to_mission")
|
||||||
console.log("end_mission")
|
console.log("end_mission")
|
||||||
|
|||||||
@@ -430,14 +430,8 @@ export class MonViewComp extends CCComp {
|
|||||||
|
|
||||||
}
|
}
|
||||||
dead(){
|
dead(){
|
||||||
let coin =(GameSet.MON_COIN_ADD*smc.vm_data.mission.coin_reward_add*(1+Talents[1006].bonus*smc.vm_data.talent[1006].lv)).toFixed(0)
|
|
||||||
smc.vm_data.mission.coin += parseFloat(coin)
|
oops.message.dispatchEvent("mon_dead");
|
||||||
smc.vm_data.mission.reward_num += 1;
|
|
||||||
smc.vm_data.mission.m_alive -= 1;
|
|
||||||
if(smc.vm_data.mission.m_alive <= 0){
|
|
||||||
smc.vm_data.mission.victory = 1;
|
|
||||||
oops.message.dispatchEvent("minssion_victory");
|
|
||||||
}
|
|
||||||
var path = "game/skills/dead";
|
var path = "game/skills/dead";
|
||||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||||
var node = instantiate(prefab);
|
var node = instantiate(prefab);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export class SkillCom extends CCComp {
|
|||||||
box_tag:number=0;
|
box_tag:number=0;
|
||||||
type:number = 1;
|
type:number = 1;
|
||||||
time:Timer = new Timer(0.01);
|
time:Timer = new Timer(0.01);
|
||||||
run_type:number = 0; // 0直线,1贝塞尔曲线 2 不动
|
run_type:number = 0; // 0有目标 带方向,1贝塞尔曲线 2 不动 ,3 直线
|
||||||
in_time:number = 0.3; // 不动技能持续时间
|
in_time:number = 0.3; // 不动技能持续时间
|
||||||
start() {
|
start() {
|
||||||
// console.log("skill start run_type",this.run_type)
|
// console.log("skill start run_type",this.run_type)
|
||||||
@@ -55,7 +55,7 @@ export class SkillCom extends CCComp {
|
|||||||
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.run_type == 3){ //直线,默认直线,有特定目标 朝向目标直线
|
if(this.run_type == 3){ //直线,默认直线
|
||||||
let tx=this.node.position.x+this.dis
|
let tx=this.node.position.x+this.dis
|
||||||
// console.log("skill tx:"+tx+" node :"+this.node.position.x)
|
// console.log("skill tx:"+tx+" node :"+this.node.position.x)
|
||||||
let e_pos=v3(tx,this.node.position.y)
|
let e_pos=v3(tx,this.node.position.y)
|
||||||
|
|||||||
Reference in New Issue
Block a user