mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
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';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HomeView')
|
||||
@@ -12,6 +15,21 @@ export class HomeView extends JNGLayerBase {
|
||||
this.frameText.string = `当前帧数: ${app.sync.frame}`;
|
||||
}
|
||||
|
||||
//设置移动
|
||||
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