12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- 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';
- const { ccclass, property } = _decorator;
- @ccclass('SuperFindPanel')
- export class SuperFindPanel extends Component {
- @property(SelectDifficultyPanel)
- selDifPanel: SelectDifficultyPanel = null
- @property(SelectSkinPanel)
- selSkinPanel: SelectSkinPanel = null
- @property(SelectMapPanel)
- selMapPanel: SelectMapPanel = null
- @property(LevelContainer)
- lvlContainer: LevelContainer = null
- @property(Label)
- tipLabel: Label = null
- @property(Label)
- tipLabel2: Label = null
- @property(Node)
- bottom: Node = null
- _editMode:boolean = false
- protected start(): void {
- this.init()
- }
- init()
- {
- this.tipLabel.string = SuperFind.superFindData.title
- this.tipLabel2.string = SuperFind.superFindData.levelDesc
- let bgPath = SuperFind.superFindData.imgPath
- let selectSkins:string[] = Skin.getSelectSkinPath()
- selectSkins = selectSkins.length > 0?selectSkins:[defaultSkin]
- this.lvlContainer.genLvlContent(bgPath,selectSkins,Difficulty.difficutyData.difficutyCount,Difficulty.difficutyData.scales)
- }
- OpenselDifPanel() {
- this.selDifPanel.node.active = true;
- this.selDifPanel.init();
- }
- OpenSelSkinPanel() {
- this.selSkinPanel.node.active = true;
- this.selSkinPanel.init();
- }
- OpenSelMapPanel() {
- this.selMapPanel.node.active = true;
- }
- CloseSelDifPanel() {
- this.selDifPanel.node.active = false;
- }
- CloseSelSkinPanel() {
- this.selSkinPanel.node.active = false;
- }
- CloseSelMapPanel() {
- this.selMapPanel.node.active = false;
- }
- close()
- {
- this.node.destroy()
- }
- onEditClick()
- {
- this._editMode = !this._editMode
- this.lvlContainer.swtichEditMode(this._editMode)
- }
- onRegenerateClick()
- {
- this.lvlContainer.regenerate()
- }
- onHideClick()
- {
- this.bottom.active = false
- }
- onTipClick()
- {
- this.lvlContainer.showOneHint()
- }
- }
|