This commit is contained in:
DESKTOP-5RP3AKU\Jisol 2023-12-19 03:08:16 +08:00
parent a97f36aea1
commit d66f08455e
6 changed files with 13 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -795,7 +795,7 @@
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0.077707 "y": 0
}, },
"_id": "" "_id": ""
}, },
@ -867,11 +867,11 @@
"_offset": { "_offset": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0,
"y": 42.22925458281746 "y": 50
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 100, "width": 50,
"height": 100 "height": 100
}, },
"_id": "" "_id": ""

View File

@ -28,12 +28,12 @@ import AppAction from "./AppAction";
import { Asset } from "cc"; import { Asset } from "cc";
import { Component } from "cc"; import { Component } from "cc";
// let APIPath = `http://localhost:8080` let APIPath = `http://localhost:8080`
// let WsPath = `ws://localhost:8080/websocket` let WsPath = `ws://localhost:8080/websocket`
// let APIPath = `http://192.168.1.23:8080` // let APIPath = `http://192.168.1.23:8080`
// let WsPath = `ws://192.168.1.23:8080/websocket` // let WsPath = `ws://192.168.1.23:8080/websocket`
let APIPath = `http://192.168.0.122:8080` // let APIPath = `http://192.168.0.122:8080`
let WsPath = `ws://192.168.0.122:8080/websocket` // let WsPath = `ws://192.168.0.122:8080/websocket`
// let APIPath = `https://api.pet.jisol.cn` // let APIPath = `https://api.pet.jisol.cn`
// let WsPath = `wss://api.pet.jisol.cn/websocket` // let WsPath = `wss://api.pet.jisol.cn/websocket`

View File

@ -149,7 +149,7 @@ export default abstract class GRoleBase<T> extends GObject<T>{
return true; return true;
}else{ }else{
//移动 //移动
this.setWorldPosition(this.node.worldPosition.subtract(v3(normal.x*dt*this.moveSpeed,normal.y*dt*this.moveSpeed,0))); this.setWorldPosition(this.node.worldPosition.clone().subtract(v3(normal.x*dt*this.moveSpeed,normal.y*dt*this.moveSpeed,0)));
return false; return false;
} }
@ -157,9 +157,10 @@ export default abstract class GRoleBase<T> extends GObject<T>{
//设置世界坐标 //设置世界坐标
setWorldPosition(worldPos:Vec3){ setWorldPosition(worldPos:Vec3){
if(this.ov.moveTo(worldPos)){ // if(worldPos = this.ov.moveTo(worldPos)){
this.node.setWorldPosition(worldPos); this.node.setWorldPosition(worldPos);
} // }
// return worldPos;
} }
//朝向目标 //朝向目标

@ -1 +1 @@
Subproject commit 272edb60968029a231fb5291d8801f4d0a661273 Subproject commit 3a8c35bc7bc02e22021acfc4671e9d8ffaadd87b