局内设置
This commit is contained in:
@@ -29,19 +29,22 @@
|
||||
},
|
||||
{
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 54
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 54
|
||||
"__id__": 64
|
||||
},
|
||||
{
|
||||
"__id__": 56
|
||||
"__id__": 66
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 58
|
||||
"__id__": 68
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -851,8 +854,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 104.71875,
|
||||
"height": 33.2
|
||||
"width": 128.8984375,
|
||||
"height": 39.5
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -882,15 +885,15 @@
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"r": 253,
|
||||
"g": 253,
|
||||
"b": 253,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "skill name",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 20,
|
||||
"_actualFontSize": 25,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 20,
|
||||
@@ -1400,6 +1403,257 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "uskill",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 55
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 61
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 63
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "name",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 54
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 56
|
||||
},
|
||||
{
|
||||
"__id__": 58
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 60
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -37.462,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 55
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 57
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 128.8984375,
|
||||
"height": 39.5
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "941tf3HwJB/Z/7grZXdYGJ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 55
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 59
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "skill name",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 25,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 20,
|
||||
"_overflow": 0,
|
||||
"_enableWrapText": true,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": true,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_enableOutline": true,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 4,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "42pLIlbx5DwbXQDeTfi7Rz"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "817XrTzARFqJaCHcjREYUE",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 54
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 62
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "faY8Z/d/BAVbpBMXjW14hS"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "f4AmCxJuVN5qK7D586YOsS",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@@ -1410,7 +1664,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 55
|
||||
"__id__": 65
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -1438,7 +1692,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 57
|
||||
"__id__": 67
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
2517
assets/resources/gui/element/hcard.prefab
Normal file
2517
assets/resources/gui/element/hcard.prefab
Normal file
File diff suppressed because it is too large
Load Diff
13
assets/resources/gui/element/hcard.prefab.meta
Normal file
13
assets/resources/gui/element/hcard.prefab.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "316eaee3-6339-4f61-a104-b3484b3e7c84",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "hcard"
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -71.376,
|
||||
"y": -68.957,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -269,8 +269,8 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 18.571,
|
||||
"x": -6.086,
|
||||
"y": 25.829,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -282,8 +282,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 3,
|
||||
"y": 3,
|
||||
"x": 2.5,
|
||||
"y": 2.5,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -352,7 +352,7 @@
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
|
||||
@@ -2831,10 +2831,10 @@
|
||||
"height": 114,
|
||||
"rawWidth": 70,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderTop": 40,
|
||||
"borderBottom": 48,
|
||||
"borderLeft": 31,
|
||||
"borderRight": 28,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ export const HeroInfo = {
|
||||
uuid: 9001, path: "k1", type: 1, lv: 1,name: "白骑士", wp:1001,arm:2001,ring:3001,shoes:4001,
|
||||
exp_type:0,lv2:5,lv3:10,lv4:20,lv5:30,a_exp:1,ua_exp:1,d_exp:10,ed_exp:1,a_buff:8101,ua_buff:8201,d_buff:8301,ed_buff:8401,
|
||||
ap: 20, ap_rate:0.1, hp: 100, hp_rate:0.1, def:10,def_rate:0.1,dis: 100, a_cd: 1, power: 0, power_max: 15, speed: 100,vun:0,crit:20,crit_add:0,dodge:0,
|
||||
sk1: 9001, sk2: 2002, sk3: 9003, sk4: 9004, sk5: 9005, sk6: 9006, atktype: 1,skr:[0,10,20,30,40,50],uar:[0,10,20,30,40,50],
|
||||
sk1: 9001, sk2: 2002, sk3: 9003, sk4: 9004, sk5: 9005, sk6: 9006, atktype: 1,skr:[0,10,20,30,40,50],uar:[0,10,20,30,40,50],dr:[0,10,20,30,40,50],
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -396,6 +396,8 @@ export class HeroViewComp extends CCComp {
|
||||
//使用max_skill
|
||||
handle_skill(skill:number){
|
||||
this.as.atk()
|
||||
this.tooltip(3,smc.skills[skill].name,skill);
|
||||
|
||||
switch (smc.skills[skill].tg) {
|
||||
case 0: //自己
|
||||
this.to_add_buff(this.node.getComponent(HeroViewComp),skill)
|
||||
@@ -416,37 +418,36 @@ export class HeroViewComp extends CCComp {
|
||||
break;
|
||||
}
|
||||
}
|
||||
shoot_enemy(sk1:number,y:number=0,x:number=0){
|
||||
shoot_enemy(sk:number,y:number=0,x:number=0){
|
||||
// console.log("mon shoot_enemy");
|
||||
let skill = ecs.getEntity<Skill>(Skill);
|
||||
let increase_ap=Math.floor(this.ap*smc.vm_data.mission.hero.ap)
|
||||
let ap = smc.skills[sk1].ap+this.ap_buff+increase_ap;
|
||||
let ap = smc.skills[sk].ap+this.ap_buff+increase_ap;
|
||||
let {pos,t_pos}=this.get_enemy_pos()
|
||||
pos.y=pos.y + y
|
||||
pos.x=pos.x + x
|
||||
let is_crit=this.check_crit()
|
||||
skill.load(pos,this.box_group,this.node,sk1,ap,t_pos,is_crit,this.crit_add);
|
||||
console.log(this.scale+this.hero_name+"使用技能:"+sk1);
|
||||
// this.tooltip(3,smc.skills[sk1].name,this.sk1);
|
||||
skill.load(pos,this.box_group,this.node,sk,ap,t_pos,is_crit,this.crit_add);
|
||||
console.log(this.scale+this.hero_name+"使用技能:"+sk);
|
||||
}
|
||||
to_add_buff(hero:any,s_uuid:number){
|
||||
to_add_buff(hero:any,sk:number){
|
||||
let skill = ecs.getEntity<Skill>(Skill);
|
||||
let ap = smc.skills[s_uuid].ap+this.ap;
|
||||
let ap = smc.skills[sk].ap+this.ap;
|
||||
let {pos,t_pos}=this.get_hero_pos(hero)
|
||||
console.log("to_add_buff:"+hero.hero_name+" "+s_uuid);
|
||||
console.log("to_add_buff:"+hero.hero_name+" "+sk);
|
||||
let is_crit=this.check_crit()
|
||||
skill.load(pos,this.box_group,this.node,this.sk2,ap,t_pos,is_crit,this.crit_add);
|
||||
if(smc.skills[s_uuid].hp > 0){ //buff加血
|
||||
let increase_hp=Math.floor(smc.skills[s_uuid].hp*this.ap)
|
||||
skill.load(pos,this.box_group,this.node,sk,ap,t_pos,is_crit,this.crit_add);
|
||||
if(smc.skills[sk].hp > 0){ //buff加血
|
||||
let increase_hp=Math.floor(smc.skills[sk].hp*this.ap)
|
||||
hero.add_hp(increase_hp)
|
||||
}
|
||||
if(smc.skills[s_uuid].ap > 0){ //buff加攻击
|
||||
let increase_atk=Math.floor(smc.skills[s_uuid].ap*this.ap)
|
||||
hero.add_ap(increase_atk,smc.skills[s_uuid].bsd)
|
||||
if(smc.skills[sk].ap > 0){ //buff加攻击
|
||||
let increase_atk=Math.floor(smc.skills[sk].ap*this.ap)
|
||||
hero.add_ap(increase_atk,smc.skills[sk].bsd)
|
||||
}
|
||||
|
||||
if(smc.skills[s_uuid].shield > 0){ //buff护盾
|
||||
hero.add_shield(smc.skills[s_uuid].shield)
|
||||
if(smc.skills[sk].shield > 0){ //buff护盾
|
||||
hero.add_shield(smc.skills[sk].shield)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
38
assets/script/game/map/MIssionController.ts
Normal file
38
assets/script/game/map/MIssionController.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,UITransform,v3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { RewardSet } from "../common/config/RewardSet";
|
||||
import { GameSet } from "../common/config/BoxSet";
|
||||
import { GameMap } from "./GameMap";
|
||||
import { MapModelComp } from "./model/MapModelComp";
|
||||
import { Talent } from "../Role/Talent";
|
||||
import { Talents } from "../common/config/TalentSet";
|
||||
import { MonViewComp } from "../mon/MonViewComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { RoleViewComp } from "../Role/RoleViewComp";
|
||||
import { BossViewComp } from "../Boss/BossViewComp";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('MissionComp')
|
||||
@ecs.register('Mission', false)
|
||||
export class MissionComp extends CCComp {
|
||||
|
||||
protected onLoad(): void {
|
||||
|
||||
|
||||
}
|
||||
start() {
|
||||
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
1
assets/script/game/map/MIssionController.ts.meta
Normal file
1
assets/script/game/map/MIssionController.ts.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"9cbe48f9-8c14-41b7-b699-2ae076311a17","files":[],"subMetas":{},"userData":{}}
|
||||
@@ -51,13 +51,13 @@ export class TooltipCom extends CCComp {
|
||||
).start()
|
||||
break
|
||||
case 3:
|
||||
this.node.getChildByName("skill").getChildByName("name").getComponent(Label).string = smc.skills[this.s_uuid].name;
|
||||
this.node.getChildByName("skill").getChildByName("name").getComponent(Label).string = "<"+smc.skills[this.s_uuid].name+">";
|
||||
this.node.getChildByName("skill").active=true;
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y+60))
|
||||
// this.alive_time = 2
|
||||
tween(this.node).to(
|
||||
this.alive_time,
|
||||
{position:v3(this.node.position.x,this.node.position.y+30), },
|
||||
{position:v3(this.node.position.x,this.node.position.y), },
|
||||
{
|
||||
onComplete:()=>{ this.ent.destroy()},
|
||||
easing:"linear"
|
||||
@@ -77,13 +77,13 @@ export class TooltipCom extends CCComp {
|
||||
).start()
|
||||
break
|
||||
case 5:
|
||||
this.node.getChildByName("skill").getChildByName("name").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("skill").active=true;
|
||||
this.node.getChildByName("uskill").getChildByName("name").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("uskill").active=true;
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y+60))
|
||||
// this.alive_time = 2
|
||||
tween(this.node).to(
|
||||
this.alive_time,
|
||||
{position:v3(this.node.position.x-20,this.node.position.y+30), },
|
||||
{position:v3(this.node.position.x-20,this.node.position.y), },
|
||||
{
|
||||
onComplete:()=>{ this.ent.destroy()},
|
||||
easing:"linear"
|
||||
|
||||
Reference in New Issue
Block a user