31 lines
678 B
TypeScript
31 lines
678 B
TypeScript
/*
|
|
* @Author: dgflash
|
|
* @Date: 2022-08-04 15:08:35
|
|
* @LastEditors: dgflash
|
|
* @LastEditTime: 2022-08-04 15:28:02
|
|
*/
|
|
|
|
import { Component, v3, _decorator } from "cc";
|
|
import { smc } from "../../common/SingletonModuleComp";
|
|
import MapRoadUtils from "../../map/view/map/road/MapRoadUtils";
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('RoleViewOwn')
|
|
export class RoleViewOwn extends Component {
|
|
|
|
onLoad() {
|
|
|
|
}
|
|
|
|
|
|
|
|
private aStarToVec3(str: string) {
|
|
let array = str.split(",");
|
|
let x = parseInt(array[0]);
|
|
let y = parseInt(array[1]);
|
|
let p = MapRoadUtils.instance.getPixelByDerect(x, y);
|
|
return v3(p.x, p.y);
|
|
}
|
|
}
|