mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-09 00:26:11 +00:00
update
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
import { Node } from "cc";
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import GRoleBase from "../role/GRoleBase";
|
||||
import GAttackNormal from "./GAttackNormal";
|
||||
import GAttackRemote from "./GAttackRemote";
|
||||
import GAttackParabolicRemote from "./GAttackParabolicRemote";
|
||||
import { UITransform } from "cc";
|
||||
import GButtleBase from "../bullet/GButtleBase";
|
||||
|
||||
//攻击子弹类
|
||||
export class GAttackBullet{
|
||||
|
||||
//创建子弹
|
||||
static create<T extends GButtleBase<{}>>(GClass:{new():T},data:{}):T{
|
||||
let bulletNode = new Node();
|
||||
bulletNode.addComponent(UITransform);
|
||||
let bullet = bulletNode.addComponent(GClass);
|
||||
bullet.setData(data);
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//攻击方式基类
|
||||
export class GAttackBase{
|
||||
@@ -12,8 +26,8 @@ export class GAttackBase{
|
||||
}
|
||||
|
||||
//攻击方式
|
||||
export const GAttack:{[key:string]:new () => GAttackBase} = {
|
||||
export const GAttack:{[key:string]:(new () => GAttackBase)} = {
|
||||
["Normal"]:GAttackNormal,
|
||||
["Remote"]:GAttackRemote,
|
||||
["ParabolicRemote"]:GAttackParabolicRemote,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user