手动控制spine 动画
This commit is contained in:
@@ -2,11 +2,8 @@ import { Camera, CCBoolean, Component, EventTouch, Node, screen, Size, Texture2D
|
||||
import { oops } from "../../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import MapData from "./map/base/MapData";
|
||||
import { MapLoadModel } from "./map/base/MapLoadModel";
|
||||
import MapParams from "./map/base/MapParams";
|
||||
import Charactor from "./map/charactor/Charactor";
|
||||
import EntityLayer from "./map/layer/EntityLayer";
|
||||
import MapLayer from "./map/layer/MapLayer";
|
||||
import IRoadSeeker from "./map/road/IRoadSeeker";
|
||||
import RoadNode from "./map/road/RoadNode";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
@@ -39,24 +36,9 @@ export class MapViewScene extends Component {
|
||||
ratio: Vec2 = new Vec2();
|
||||
|
||||
private _roadDic: { [key: string]: RoadNode } = {};
|
||||
private _roadSeeker!: IRoadSeeker;
|
||||
private _mapParams: MapParams | null = null;
|
||||
|
||||
private player: Charactor | null = null; // 主角玩家
|
||||
private targetPos: Vec3 = new Vec3(); // 摄像机位置
|
||||
private winSize!: Size; // 屏幕尺寸
|
||||
private screenCenter: Vec3 = new Vec3(); // 屏幕中心位置
|
||||
private boundary: Vec2 = new Vec2(); // 边界位置
|
||||
|
||||
setPlayer(value: Charactor | Vec3) {
|
||||
if (value instanceof Charactor) {
|
||||
this.enabled = true;
|
||||
this.player = value;
|
||||
}
|
||||
else {
|
||||
this.player!.pos = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onLoad() {
|
||||
this.enabled = false;
|
||||
|
||||
Reference in New Issue
Block a user