|
@@ -1,5 +1,5 @@
|
|
|
import { _decorator, Button, Component, instantiate, Node, Prefab, sp, Sprite, Vec2, Vec3 } from 'cc';
|
|
|
-import {Skin } from '../../script/Manager/LocalDataMgr';
|
|
|
+import {allSkinList, Skin } from '../../script/Manager/LocalDataMgr';
|
|
|
import { LayerMgr } from '../../script/Manager/LayerMgr';
|
|
|
import EventMgr from '../../script/Manager/EventMgr';
|
|
|
const { ccclass, property } = _decorator;
|
|
@@ -31,7 +31,7 @@ export class SkinItem extends Component {
|
|
|
this.skinRoot.addChild(skin)
|
|
|
skin.setPosition(Vec3.ZERO)
|
|
|
skin.position = skin.position.clone().add3f(spineOffset.x,spineOffset.y,0)
|
|
|
- this.selectedSprite.node.active = isSelect
|
|
|
+ this.setSelevtFrame()
|
|
|
this._isSelected = isSelect
|
|
|
this._key = key
|
|
|
this._spine = skin.getComponent(sp.Skeleton)
|
|
@@ -62,8 +62,12 @@ export class SkinItem extends Component {
|
|
|
EventMgr.ins.dispatchEvent("refreshSelectFrame",this.node)
|
|
|
}
|
|
|
|
|
|
- setSelevtFrame(isShow) {
|
|
|
- this.selectedSprite.node.active = isShow
|
|
|
+ setSelevtFrame() {
|
|
|
+ this.selectedSprite.node.active = this._isSelected
|
|
|
+ if(Skin.skinData._lastSelectSpinePath !== allSkinList[this._key] && Skin.skinData.singleSelect == "true")
|
|
|
+ {
|
|
|
+ this.selectedSprite.node.active = false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|