背后载入
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @LastEditors: dgflash
|
||||
* @LastEditTime: 2022-08-04 15:43:04
|
||||
*/
|
||||
import { instantiate, Node, Prefab, Vec3 } from "cc";
|
||||
import { instantiate, Node, Prefab, Vec3 ,tween} from "cc";
|
||||
import { UICallbacks } from "../../../../extensions/oops-plugin-framework/assets/core/gui/layer/Defines";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
@@ -14,7 +14,7 @@ import { smc } from "../common/SingletonModuleComp";
|
||||
import { MonsterModelComp } from "./MonsterModelComp";
|
||||
import { MonsterSpine } from "./MonsterSpine";
|
||||
import { MonsterViewComp } from "./MonsterViewComp";
|
||||
|
||||
import { MoveTo } from "../../../../extensions/oops-plugin-framework/assets/libs/animator-move/MoveTo";
|
||||
/** 角色实体 */
|
||||
@ecs.register(`Monster`)
|
||||
export class Monster extends ecs.Entity {
|
||||
@@ -48,7 +48,12 @@ export class Monster extends ecs.Entity {
|
||||
var mv = node.getComponent(MonsterViewComp)!;
|
||||
this.add(mv);
|
||||
node.setScale(-1, 1, 1);
|
||||
tween(node).to(1, { position: new Vec3(0, -60, 0) }, {
|
||||
onComplete: () => {
|
||||
// this.as.walk();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
* @LastEditTime: 2022-08-17 12:36:18
|
||||
*/
|
||||
|
||||
import { Vec3, _decorator } from "cc";
|
||||
import { Vec3, _decorator ,tween} from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { MonsterSpine } from "./MonsterSpine";
|
||||
@@ -23,6 +23,8 @@ export class MonsterViewComp extends CCComp {
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
onLoad() {
|
||||
this.as = this.getComponent(MonsterSpine);
|
||||
//移动到0,-60
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user