mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
重构继承关系
This commit is contained in:
@@ -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;
|
||||
})
|
||||
}
|
||||
|
||||
//重置
|
||||
|
Reference in New Issue
Block a user