重构继承关系

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-01 02:01:35 +08:00
parent e59c5640d7
commit 6ebed0b45e
43 changed files with 496 additions and 524 deletions

View File

@@ -1,7 +1,5 @@
import { _decorator, Component, Label, Node } from 'cc';
import { app, JNGLayerBase } from '../../App';
import { director } from 'cc';
import GRolePVPEntity from '../../battle/base/role/PVP/GRolePVPEntity';
import { Toggle } from 'cc';
import { JNSyncAction } from '../../../../extensions/ngame/assets/ngame/sync/JNSyncAction';
const { ccclass, property } = _decorator;
@@ -19,17 +17,11 @@ export class HomeView extends JNGLayerBase {
//设置移动
setRoleMove(data:Toggle){
console.log("移动",data.isChecked);
director.getScene().getComponentsInChildren(GRolePVPEntity).forEach((role) => {
role.input.isRun = data.isChecked;
})
}
//设置攻击
setRoleAttack(data){
console.log("攻击",data.isChecked);
director.getScene().getComponentsInChildren(GRolePVPEntity).forEach((role) => {
role.input.isAttack = data.isChecked;
})
}
//重置