提交捕捉

This commit is contained in:
PC-20230316NUNE\Administrator
2023-11-17 18:29:39 +08:00
parent 62b72bdcfc
commit cb64a6c25f
59 changed files with 4757 additions and 953 deletions

View File

@@ -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){
//关闭状态机

View File

@@ -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;
}

View File

@@ -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": {}

View File

@@ -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;

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "3c2ff03b-a7e4-4afb-bb3c-ceacb17300ae",
"files": [],
"subMetas": {},
"userData": {}
}