mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交捕捉
This commit is contained in:
@@ -58,7 +58,7 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
|
||||
//攻击回调
|
||||
attackCallbacks:Function[] = [];
|
||||
//添加受击回调
|
||||
//添加攻击回调
|
||||
addAttackCallback(fun:Function){this.attackCallbacks.push(fun)};
|
||||
|
||||
get():this{
|
||||
@@ -147,7 +147,7 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
onHit(){
|
||||
// return;
|
||||
this.blood -= 10;
|
||||
this.hitCallbacks.forEach(fun => fun());
|
||||
this.hitCallbacks.forEach(fun => fun(this,10));
|
||||
//检测是否死亡
|
||||
if(this.blood <= 0){
|
||||
//关闭状态机
|
||||
|
@@ -0,0 +1,18 @@
|
||||
import { _decorator } from "cc";
|
||||
import GRoleExpandBase from "../GRoleExpandBase";
|
||||
import { GOnHookPet } from "../../../../../../../extensions/ngame/assets/ngame/message/proto";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
* 无限模式 野怪 扩展类
|
||||
*/
|
||||
@ccclass('GRoleOnHookCreepsExpand')
|
||||
export default class GRoleOnHookCreepsExpand extends GRoleExpandBase<{}>{
|
||||
|
||||
//野怪
|
||||
creeps:GOnHookPet;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "edf60f56-5d3e-48d1-90b4-6deef4b5635c",
|
||||
"uuid": "3a21518a-766b-4f61-a59f-3e8825cf08f0",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
@@ -1,13 +1,12 @@
|
||||
import { _decorator } from "cc";
|
||||
import GRoleDefault from "../../GRoleDefault";
|
||||
import GRoleExpandBase from "../GRoleExpandBase";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
* 角色 无限模式 扩展类
|
||||
* 无限模式 玩家 扩展类
|
||||
*/
|
||||
@ccclass('GRoleDefault')
|
||||
export default class GRoleOnHookExpand extends GRoleExpandBase<{}>{
|
||||
@ccclass('GRoleOnHookPlayerExpand')
|
||||
export default class GRoleOnHookPlayerExpand extends GRoleExpandBase<{}>{
|
||||
|
||||
//角色Id
|
||||
petId:number;
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3c2ff03b-a7e4-4afb-bb3c-ceacb17300ae",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user