|
@@ -1,7 +1,7 @@
|
|
|
import { _decorator, Color, Component, instantiate, Node, Prefab, Sprite, Vec2, Vec3 } from 'cc';
|
|
|
import { SkinItem } from './SkinItem';
|
|
|
import EventMgr from '../../script/Manager/EventMgr';
|
|
|
-import { Skin } from '../../script/Manager/LocalDataMgr';
|
|
|
+import { allSkinList, Skin } from '../../script/Manager/LocalDataMgr';
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('SkinItem2')
|
|
@@ -48,9 +48,12 @@ export class SkinItem2 extends SkinItem {
|
|
|
|
|
|
onBtnUseClick()
|
|
|
{
|
|
|
+ Skin.setCurrentSelSingleSkin(this.key)
|
|
|
Skin.setSelectStatu(true)
|
|
|
EventMgr.ins.dispatchEvent("showUsingLabel",[this.node,this.isUnlock])
|
|
|
EventMgr.ins.dispatchEvent("regenerate")
|
|
|
+ console.log("当前被选中的皮肤",allSkinList[this.key])
|
|
|
+
|
|
|
}
|
|
|
|
|
|
setBgColor(isUnlock)
|