123456789101112131415161718192021222324252627 |
- import bundleManager from "../../../manager/bundleManager";
- import { GAME_OBJECT_TYPE } from "../../utrl/gameEnum";
- import GameObject from "../gameObject";
- const { ccclass, property } = cc._decorator;
- /**未营救npc类 */
- @ccclass
- export default class NpcObject extends GameObject {
- /**npc id */
- @property
- view_id = 0;
- start() {
- this.type = GAME_OBJECT_TYPE.lock_npc;
- this.loadView();
- }
- loadView() {
- this.node.addComponent(cc.Sprite);
- bundleManager.setBundleFrame('UI', 'main/npc_lock/' + this.view_id, this.node);
- let node = new cc.Node;
- node.addComponent(cc.Sprite)
- bundleManager.setBundleFrame('UI', 'main/help', node);
- node.parent = this.node;
- node.y = 100;
- let t = 0.25;
- cc.tween(node).repeatForever(cc.tween(node).to(t, { scale: 1.2 }).to(t, { scale: 1 })).start();
- }
- }
|