添加角色 远程攻击逻辑

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-10-27 02:38:08 +08:00
parent 39dd60bb8d
commit 7e402432dd
199 changed files with 7059 additions and 5 deletions

View File

@@ -1 +1 @@
{"10001":{"id":10001,"roleName":"小石头","spine":"spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a"},"10002":{"id":10002,"roleName":"坚强小石","spine":"spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a"}}
{"10001":{"id":10001,"roleName":"小石头","spine":"spine/召唤与合成819个Spine/小石头/guaiA1a/spine/guaiA1a","roleSkillId":0,"roleAttackRange":100},"10002":{"id":10002,"roleName":"坚强小石","spine":"spine/召唤与合成819个Spine/坚强小石/guaiA1a_1/spine/guaiA1a","roleSkillId":0,"roleAttackRange":100},"10003":{"id":10003,"roleName":"疯狂松鼠","spine":"spine/召唤与合成819个Spine/疯狂松鼠/guaiA4e_2/spine/guaiA4e","roleSkillId":0,"roleAttackRange":500}}

View File

@@ -0,0 +1 @@
{"10001":{"roleId":10001,"attackWay":"Normal","attackArgs":[]},"10002":{"roleId":10002,"attackWay":"Normal","attackArgs":[]},"10003":{"roleId":10003,"attackWay":"Remote","attackArgs":["20001"]}}

View File

@@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "75a65c75-47c9-4167-ba79-55548af8cc79",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1 @@
{"20001":{"id":20001,"bulletName":"炸弹","bulletSrc":"bullets/疯狂松鼠/attack/spriteFrame"}}

View File

@@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "9e1a69f7-e3db-4165-abc2-aa96ed577b2d",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "59d1c66b-278d-4af3-8bb9-864840cfbc5f",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@@ -32,4 +32,12 @@ export class TableGRole {
/** Spine地址 */
get spine(): string {
return this.data.spine;
}
/** 角色技能Id */
get roleSkillId(): number {
return this.data.roleSkillId;
}
/** 角色攻击范围 */
get roleAttackRange(): number {
return this.data.roleAttackRange;
}

View File

@@ -0,0 +1,35 @@
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
export class TableGRoleAttack {
static TableName: string = "GRoleAttack";
static getAllConfig(): { [id: string]: TableGRoleAttack } {
return JsonUtil.get(TableGRoleAttack.TableName);
}
static getConfig(id: number | string) {
return TableGRoleAttack.getAllConfig()[id] as TableGRoleAttack;
}
private data: any;
init(roleId: number) {
var table = JsonUtil.get(TableGRoleAttack.TableName);
this.data = table[roleId];
this._roleId = roleId;
}
/** 角色Id */
private _roleId: number = 0;
/** 角色Id */
get roleId(): number {
return this.data.roleId;
}
/** 攻击方式 */
get attackWay(): string {
return this.data.attackWay;
}
/** 攻击参数 */
get attackArgs(): string[] {
return this.data.attackArgs;
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "4879e3d4-3b08-4e70-af99-add884d50af3",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,35 @@
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
export class TableGRoleAttackBullet {
static TableName: string = "GRoleAttackBullet";
static getAllConfig(): { [id: string]: TableGRoleAttackBullet } {
return JsonUtil.get(TableGRoleAttackBullet.TableName);
}
static getConfig(id: number | string) {
return TableGRoleAttackBullet.getAllConfig()[id] as TableGRoleAttackBullet;
}
private data: any;
init(id: number) {
var table = JsonUtil.get(TableGRoleAttackBullet.TableName);
this.data = table[id];
this._id = id;
}
/** Id */
private _id: number = 0;
/** Id */
get id(): number {
return this.data.id;
}
/** 子弹名称 */
get bulletName(): string {
return this.data.bulletName;
}
/** 子弹地址 */
get bulletSrc(): string {
return this.data.bulletSrc;
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "0c4a411b-9551-4944-9662-79468f748d6e",
"files": [],
"subMetas": {},
"userData": {}
}