mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
基础的数值计算
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import GRoleAttack from "../common/GRoleAttack";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import { GRoleAttackType } from "../values/GRoleValues";
|
||||
import { GAttackBase } from "./GAttack";
|
||||
|
||||
|
||||
@@ -7,7 +9,7 @@ import { GAttackBase } from "./GAttack";
|
||||
export default class GAttackNormal implements GAttackBase{
|
||||
|
||||
attack(role: GRoleDefault, info: TB.TbGRoleAttack) {
|
||||
role.fsm.enemy.onHit();
|
||||
GRoleAttack.onNormalAttack(role,role.fsm.enemy); //普通攻击
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@ import GDetection from "../common/GDetection";
|
||||
import { rect } from "cc";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import GRoleAttack from "../common/GRoleAttack";
|
||||
|
||||
/**
|
||||
* 抛物线 爆炸普攻
|
||||
@@ -76,12 +77,10 @@ export default class GAttackParabolicRemote implements GAttackBase{
|
||||
//销毁
|
||||
bullet.node.destroy();
|
||||
|
||||
// enemy.getComponent(BoxCollider2D).apply();
|
||||
|
||||
// console.log(enemy.v2World,enemy.getComponent(BoxCollider2D).worldPoints,enemy.getComponent(UITransform).getBoundingBoxToWorld());
|
||||
GDetection.testAABBRole(rect(effect.node.worldPosition.x,effect.node.worldPosition.y,aw,ah)).forEach(role =>{
|
||||
role.onHit();
|
||||
GDetection.testAABBCenterRole(rect(effect.node.worldPosition.x,effect.node.worldPosition.y,aw,ah)).forEach(enemy =>{
|
||||
GRoleAttack.onNormalAttack(role,enemy); //普通攻击
|
||||
});
|
||||
|
||||
})
|
||||
.start();
|
||||
|
||||
|
Reference in New Issue
Block a user