|
@@ -2,9 +2,8 @@ import { _decorator, Component, Label, Node, Prefab } from 'cc';
|
|
|
import { SelectDifficultyPanel } from './SelectDifficultyPanel';
|
|
|
import { SelectSkinPanel } from './SelectSkinPanel';
|
|
|
import { SelectMapPanel } from './SelectMapPanel';
|
|
|
-import { LayerMgr } from '../../script/Manager/LayerMgr';
|
|
|
import { LevelContainer } from './LevelContainer';
|
|
|
-import { allSkinList, defaultSkin, Difficulty, Skin, SuperFind, UserSuperFindData } from '../../script/Manager/LocalDataMgr';
|
|
|
+import { defaultSkin, Difficulty, Skin, SuperFind} from '../../script/Manager/LocalDataMgr';
|
|
|
import EventMgr from '../../script/Manager/EventMgr';
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
@@ -18,15 +17,22 @@ export class SuperFindPanel extends Component {
|
|
|
selMapPanel: SelectMapPanel = null
|
|
|
@property(LevelContainer)
|
|
|
lvlContainer: LevelContainer = null
|
|
|
+
|
|
|
+ @property(Node)
|
|
|
+ editBtns:Node = null
|
|
|
+ @property(Node)
|
|
|
+ noEditBtns:Node = null
|
|
|
@property(Label)
|
|
|
tipLabel: Label = null
|
|
|
@property(Label)
|
|
|
tipLabel2: Label = null
|
|
|
+ @property(Label)
|
|
|
+ showOrHideScaleLabel: Label = null
|
|
|
|
|
|
@property(Node)
|
|
|
bottom: Node = null
|
|
|
|
|
|
- _editMode:boolean = false
|
|
|
+ _showScale:boolean = false
|
|
|
|
|
|
protected start(): void {
|
|
|
this.init()
|
|
@@ -53,6 +59,18 @@ export class SuperFindPanel extends Component {
|
|
|
this.selMapPanel.node.active = true;
|
|
|
this.selMapPanel.init();
|
|
|
}
|
|
|
+ OpenEditBtns()
|
|
|
+ {
|
|
|
+ this.editBtns.active = true
|
|
|
+ this.lvlContainer.swtichEditMode(true)
|
|
|
+ this.noEditBtns.active = false
|
|
|
+ }
|
|
|
+ CloseEditBtns()
|
|
|
+ {
|
|
|
+ this.editBtns.active = false
|
|
|
+ this.lvlContainer.swtichEditMode(false)
|
|
|
+ this.noEditBtns.active = true
|
|
|
+ }
|
|
|
CloseSelDifPanel() {
|
|
|
this.selDifPanel.node.active = false;
|
|
|
}
|
|
@@ -62,16 +80,16 @@ export class SuperFindPanel extends Component {
|
|
|
CloseSelMapPanel() {
|
|
|
this.selMapPanel.node.active = false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
close()
|
|
|
{
|
|
|
this.node.destroy()
|
|
|
}
|
|
|
|
|
|
- onEditClick()
|
|
|
+ onEditFinishClick()
|
|
|
{
|
|
|
- this._editMode = !this._editMode
|
|
|
- this.lvlContainer.swtichEditMode(this._editMode)
|
|
|
+
|
|
|
+ this.CloseEditBtns()
|
|
|
}
|
|
|
|
|
|
onRegenerateClick()
|
|
@@ -94,6 +112,13 @@ export class SuperFindPanel extends Component {
|
|
|
this.tipLabel.string = SuperFind.superFindData.title
|
|
|
this.tipLabel2.string = SuperFind.superFindData.levelDesc
|
|
|
}
|
|
|
+
|
|
|
+ showOrHideScale()
|
|
|
+ {
|
|
|
+ this._showScale = !this._showScale
|
|
|
+ this.lvlContainer.showOrHideScale(this._showScale)
|
|
|
+ this.showOrHideScaleLabel.string = this._showScale?"隐藏缩放":"显示缩放"
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|