Commit d733795c authored by 任建锋's avatar 任建锋

rjf

parent 9de15aad
{
"name": "sl",
"version": "1.0.3",
"description": "基于babylonjs的活动组件",
"main": "./dist/index.js",
"types": "./types/index.d.ts",
"scripts": {
},
"author": "",
"license": "ISC",
"dependencies": {
"duiba-yt": "git+ssh://git@gitlab2.dui88.com:renjianfeng/yt.git",
"duiba-tw": "git+ssh://git@gitlab2.dui88.com:clq/tw.git#1.0",
"duiba-tc": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#1.0",
}
}
\ No newline at end of file
{
"name": "sl",
"version": "1.0.3",
"description": "基于babylonjs的活动组件",
"main": "./dist/index.js",
"types": "./types/index.d.ts",
"scripts": {
},
"author": "",
"license": "ISC",
"dependencies": {
"duiba-yt": "git+ssh://git@gitlab2.dui88.com:renjianfeng/yt.git",
"duiba-tw": "git+ssh://git@gitlab2.dui88.com:clq/tw.git#1.0",
"duiba-tc": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#1.0"
}
}
\ No newline at end of file
{
"name": "sl",
"version": "1.0.4",
"description": "基于babylonjs的活动组件",
"main": "./dist/index.js",
"types": "./types/index.d.ts",
"scripts": {
},
"author": "",
"license": "ISC",
"dependencies": {
"duiba-yt": "git+ssh://git@gitlab2.dui88.com:renjianfeng/yt.git",
"duiba-tw": "git+ssh://git@gitlab2.dui88.com:clq/tw.git#1.0",
"duiba-tc": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#1.0"
}
}
\ No newline at end of file
/**
*Created by cuiliqiang on 2018/3/13
*/
export enum SlModuleName {
//游戏规则面板
RULE_PANEL = 'RulePanel',
//分享面板
SHARE_PANEL = 'SharePanel',
//未中奖面板
LOSE_PANEL = 'LosePanel',
//开始场景
GAME_START_GUI = 'GameStartScene',
//游戏玩法场景
GAME_PLAY_SCENE = 'GamePlayScene',
//游戏玩法场景GUI
GAME_PLAY_GUI = 'GamePlayGui',
//活动结束场景
GAME_END_GUI = 'GameEndScene',
//中奖信息场景
GAME_WINNER_GUI = 'GameWinnerScene',
//活动奖品面板
GAME_OPTION_PANEL = 'GameOptionPanel',
//游戏未中奖
GAME_LOSE_PANEL = 'GameLosePanel',
//游戏中奖面板
GAME_WIN_PANEL = 'GameWinPanel',
//排行榜面板
GAME_END_RANK_PANEL = 'GameEndRankPanel',
//实时排行榜面板
GAME_REAL_TIME_RANK_PANEL = 'GameRealTimeRankPanel',
//引导场景
GAME_GUIDE_GUI = 'GameGuideScene',
//自定义活动工具玩法场景
CUSTOM_PLAY_GUI = 'CustomPlayScene',
//自定义活动工具中奖面板
CUSTOM_WIN_PANEL = 'CustomWinPanel',
//自定义活动工具奖品详情面板
CUSTOM_OPTION_INFO_PANEL = 'CustomOptionInfoPanel',
//插件抽奖面板
PLUG_PANEL = 'PlugPanel',
//插件中奖面板
PLUG_WIN_PANEL = 'PlugWinPanel'
}
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/GameOptionModule"
import {RuleModule} from "./module/common/RuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/GameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/GameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/GameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/GameEndRankModule";
import {GameGuideModule} from "./module/game/GameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/GameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/GameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/GameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/GameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/GameEndRankModule";
import {GameGuideModule} from "./module/game/GameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/GameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/GameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/GameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/GameEndRankModule";
import {GameGuideModule} from "./module/game/GameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/GameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/GameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/GameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/GameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/GameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/GameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/GameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/GameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/GameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/GameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/GameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/GameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/GameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/GameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/SlGameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/SlGameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/SlGameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/GameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/WxLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/SlGameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/SlGameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/SlGameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/ModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/SlLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/SlGameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/SlGameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/SlGameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {ModuleName} from "./enum/SlModuleName";
import {SysLang} from "./util/SysLang";
import {WxLang} from "./util/SlLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/SlGameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/SlGameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/SlGameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {SlModuleName} from "./enum/SlModuleName";
import {SlSysLang} from "./util/SlSysLang";
import {SlLang} from "./util/SlLang";
import {GameOptionModule} from "./module/game/SlGameOptionModule"
import {RuleModule} from "./module/common/SlRuleModule";
import {GameWinModule} from "./module/game/SlGameWinModule";
import {GameLoseModule} from "./module/game/SlGameLoseModule";
import {GameStartModule} from "./module/game/SlGameStartModule";
import {GameGuiModule} from "./module/game/SlGameGuiModule";
import {GameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {GameEndModule} from "./module/game/SlGameEndModule";
import {GameWinnerModule} from "./module/game/SlGameWinnerModule";
import {GameEndRankModule} from "./module/game/SlGameEndRankModule";
import {GameGuideModule} from "./module/game/SlGameGuideModule";
import {GameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
GameSceneModule,
GameOptionModule,RuleModule,GameWinModule,GameLoseModule,
GameStartModule,GameGuiModule,GameRealTimeRankModule,
GameEndModule,GameWinnerModule,GameEndRankModule,GameGuideModule,
//枚举
ModuleName,
//工具
WxLang, SysLang,
}
\ No newline at end of file
import {SlModuleName} from "./enum/SlModuleName";
import {SlSysLang} from "./util/SlSysLang";
import {SlLang} from "./util/SlLang";
import {SlGameOptionModule} from "./module/game/SlGameOptionModule"
import {SlRuleModule} from "./module/common/SlRuleModule";
import {SlGameWinModule} from "./module/game/SlGameWinModule";
import {SlGameLoseModule} from "./module/game/SlGameLoseModule";
import {SlGameStartModule} from "./module/game/SlGameStartModule";
import {SlGameGuiModule} from "./module/game/SlGameGuiModule";
import {SlGameRealTimeRankModule} from "./module/game/SlGameRealTimeRankModule";
import {SlGameEndModule} from "./module/game/SlGameEndModule";
import {SlGameWinnerModule} from "./module/game/SlGameWinnerModule";
import {SlGameEndRankModule} from "./module/game/SlGameEndRankModule";
import {SlGameGuideModule} from "./module/game/SlGameGuideModule";
import {SlGameSceneModule} from "./module/game/SlGameSceneModule";
export {
//UI创建和scene创建
SlGameSceneModule,
SlGameOptionModule,SlRuleModule,SlGameWinModule,SlGameLoseModule,
SlGameStartModule,SlGameGuiModule,SlGameRealTimeRankModule,
SlGameEndModule,SlGameWinnerModule,SlGameEndRankModule,SlGameGuideModule,
//枚举
SlModuleName,
//工具
SlLang, SlSysLang,
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import {SysLang} from "../../util/Syslang";
import { RuleModel, TwFun } from "tw";
import {YtGuiCreate} from "yt";
export class RuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {GuiManager} from "yt";
import {PanelModule} from "yt";
import {DisplayPool} from "yt";
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import {SysLang} from "../../util/Syslang";
import { RuleModel, TwFun } from "tw";
import {GuiCreate} from "yt";
import {YtGuiCreate} from "yt";
export class RuleModule extends PanelModule {
export class RuleModule extends YtPanelModule {
/**
* 数据
......@@ -44,7 +44,7 @@ export class RuleModule extends PanelModule {
<div>${val}</div>
</div>`;
GuiCreate.ins.preventDefault(this.section)
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
......@@ -53,7 +53,7 @@ export class RuleModule extends PanelModule {
public init(){
DisplayPool.ins.displayPool[ModuleName.RULE_PANEL]=this;
YtDisplayPool.ins.displayPool[ModuleName.RULE_PANEL]=this;
}
......
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import {SysLang} from "../../util/Syslang";
import { RuleModel, TwFun } from "tw";
import {YtGuiCreate} from "yt";
export class RuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import {SysLang} from "../../util/Syslang";
import { RuleModel, TwFun } from "tw";
import {YtGuiCreate} from "yt";
export class SlRuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import {SysLang} from "../../util/SlSyslang";
import { RuleModel, TwFun } from "tw";
import {YtGuiCreate} from "yt";
export class SlRuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/SlModuleName";
import {SysLang} from "../../util/SlSyslang";
import { RuleModel, TwFun } from "tw";
import {YtGuiCreate} from "yt";
export class SlRuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/SlModuleName";
import {SlSysLang} from "../../util/SlSyslang";
import { RuleModel, TwFun } from "tw";
import {YtGuiCreate} from "yt";
export class SlRuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/SlModuleName";
import {SlSysLang} from "../../util/SlSyslang";
import { RuleModel, TwFun } from "tw";
import {YtGuiCreate} from "yt";
export class SlRuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SlSysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {YtGuiManager} from "duiba-yt";
import {YtPanelModule} from "duiba-yt";
import {YtDisplayPool} from "duiba-yt";
import {SlModuleName} from "../../enum/SlModuleName";
import {SlSysLang} from "../../util/SlSyslang";
import { RuleModel, TwFun } from "duiba-tw";
import {YtGuiCreate} from "duiba-yt";
export class SlRuleModule extends YtPanelModule {
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
constructor(){
super()
}
protected config={
x:16,
y:47,
width:68,
height:60,
lineHeight:7,
fontSize:3,
color:"#000000"
}
protected initHtml(x,y,width,height,lineHeight,fontSize,color,val){
this.section = document.createElement('div');
this.section.id="section"
this.section.innerHTML=`
<div>
<style>
#section{position: fixed;overflow-x: hidden;overflow-y: auto;top: ${y}vw; left: ${x}vw;width: ${width}vw;height: ${height}vw;line-height: ${lineHeight}vw;font-family: ${SlSysLang.lang_015};font-size: ${fontSize}vw;color: ${color};}
</style>
<div>${val}</div>
</div>`;
YtGuiCreate.ins.preventDefault(this.section)
}
protected appendHtml(){
document.body.appendChild(this.section);
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.RULE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
protected onOpened(){
this.initHtml(this.config.x,this.config.y,this.config.width,this.config.height,this.config.lineHeight,this.config.fontSize,this.config.color,this.model.ruleTxt)
this.appendHtml()
}
/**
* 关闭前
* */
protected onClose(){
this.removeHtml()
}
protected removeHtml(){
if(this.section){
document.body.removeChild(this.section);
}
}
}
\ No newline at end of file
import {Module} from "yt";
import {AnimationGui} from "yt";
import {SceneManager} from "yt";
import {GuiManager} from "yt";
import {DisplayPool} from "yt";
import {YtModule} from "yt";
import {YtAnimationGui} from "yt";
import {YtSceneManager} from "yt";
import {YtGuiManager} from "yt";
import {YtDisplayPool} from "yt";
import { GameEndModel, TwFun } from "tw";
import { ModuleName } from "../../enum/ModuleName";
import { WxLang } from "../../util/WxLang";
import {ModuleManager} from "yt";
import {YtModuleManager} from "yt";
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class GameEndModule extends Module {
export class GameEndModule extends YtModule {
//面板隐藏显示实例
protected panelsAn=new AnimationGui(SceneManager.ins.scene,GuiManager.ins.fullscreenUI)
protected panelsAn=new YtAnimationGui(YtSceneManager.ins.scene,YtGuiManager.ins.fullscreenUI)
public init(){
DisplayPool.ins.displayPool[ModuleName.GAME_END_GUI]=this;
YtDisplayPool.ins.displayPool[ModuleName.GAME_END_GUI]=this;
}
/**
......@@ -88,7 +88,7 @@ export class GameEndModule extends Module {
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.RULE_PANEL);
YtModuleManager.ins.openModule(ModuleName.RULE_PANEL);
}
protected onClick_optionBtn(e): void {
......@@ -101,7 +101,7 @@ export class GameEndModule extends Module {
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.GAME_OPTION_PANEL);
YtModuleManager.ins.openModule(ModuleName.GAME_OPTION_PANEL);
}
protected removeEvent(): void {
......
import {YtModule} from "yt";
import {YtAnimationGui} from "yt";
import {YtSceneManager} from "yt";
import {YtGuiManager} from "yt";
import {YtDisplayPool} from "yt";
import { GameEndModel, TwFun } from "tw";
import { SlModuleName } from "../../enum/ModuleName";
import { WxLang } from "../../util/WxLang";
import {YtModuleManager} from "yt";
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class SlGameEndModule extends YtModule {
//面板隐藏显示实例
protected panelsAn=new YtAnimationGui(YtSceneManager.ins.scene,YtGuiManager.ins.fullscreenUI)
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_END_GUI]=this;
}
/**
* 数据
*/
protected model: GameEndModel;
protected initModel(): void {
this.model = new GameEndModel();
}
public updateData(...args): void {
this.updateStatusTxt();
this.updateScoreTxt();
}
/**
* 更新活动状态文案
* @param str
*/
protected updateStatusTxt(str: string = WxLang.lang_004): void {
if (this.view.statusTxt) {
this.view.statusTxt.text = str;
}
}
/**
* 更新积分文案
*/
protected updateScoreTxt(): void {
if (this.view.scoreTxt) {
this.view.scoreTxt.text=this.model.getScoreTxt();
}
}
protected addEvent(): void {
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn.bind(this));
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn.bind(this));
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn.bind(this));
}
}
protected onClick_recordBtn(e): void {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = TwFun.getRecordUrl('00');
}
protected onClick_ruleBtn(e): void {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
}
protected getRule_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(ModuleName.RULE_PANEL);
}
protected onClick_optionBtn(e): void {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
}
protected getOptions_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(ModuleName.GAME_OPTION_PANEL);
}
protected removeEvent(): void {
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn)
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn)
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn)
}
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtAnimationGui} from "yt";
import {YtSceneManager} from "yt";
import {YtGuiManager} from "yt";
import {YtDisplayPool} from "yt";
import { GameEndModel, TwFun } from "tw";
import { SlModuleName } from "../../enum/ModuleName";
import { WxLang } from "../../util/WxLang";
import {YtModuleManager} from "yt";
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class SlGameEndModule extends YtModule {
//面板隐藏显示实例
protected panelsAn=new YtAnimationGui(YtSceneManager.ins.scene,YtGuiManager.ins.fullscreenUI)
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_END_GUI]=this;
}
/**
* 数据
*/
protected model: GameEndModel;
protected initModel(): void {
this.model = new GameEndModel();
}
public updateData(...args): void {
this.updateStatusTxt();
this.updateScoreTxt();
}
/**
* 更新活动状态文案
* @param str
*/
protected updateStatusTxt(str: string = WxLang.lang_004): void {
if (this.view.statusTxt) {
this.view.statusTxt.text = str;
}
}
/**
* 更新积分文案
*/
protected updateScoreTxt(): void {
if (this.view.scoreTxt) {
this.view.scoreTxt.text=this.model.getScoreTxt();
}
}
protected addEvent(): void {
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn.bind(this));
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn.bind(this));
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn.bind(this));
}
}
protected onClick_recordBtn(e): void {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = TwFun.getRecordUrl('00');
}
protected onClick_ruleBtn(e): void {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
}
protected getRule_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(ModuleName.RULE_PANEL);
}
protected onClick_optionBtn(e): void {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
}
protected getOptions_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(ModuleName.GAME_OPTION_PANEL);
}
protected removeEvent(): void {
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn)
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn)
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn)
}
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtAnimationGui} from "yt";
import {YtSceneManager} from "yt";
import {YtGuiManager} from "yt";
import {YtDisplayPool} from "yt";
import { GameEndModel, TwFun } from "tw";
import { SlModuleName } from "../../enum/ModuleName";
import { WxLang } from "../../util/WxLang";
import {YtModuleManager} from "yt";
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class SlGameEndModule extends YtModule {
//面板隐藏显示实例
protected panelsAn=new YtAnimationGui(YtSceneManager.ins.scene,YtGuiManager.ins.fullscreenUI)
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_END_GUI]=this;
}
/**
* 数据
*/
protected model: GameEndModel;
protected initModel(): void {
this.model = new GameEndModel();
}
public updateData(...args): void {
this.updateStatusTxt();
this.updateScoreTxt();
}
/**
* 更新活动状态文案
* @param str
*/
protected updateStatusTxt(str: string = WxLang.lang_004): void {
if (this.view.statusTxt) {
this.view.statusTxt.text = str;
}
}
/**
* 更新积分文案
*/
protected updateScoreTxt(): void {
if (this.view.scoreTxt) {
this.view.scoreTxt.text=this.model.getScoreTxt();
}
}
protected addEvent(): void {
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn.bind(this));
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn.bind(this));
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn.bind(this));
}
}
protected onClick_recordBtn(e): void {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = TwFun.getRecordUrl('00');
}
protected onClick_ruleBtn(e): void {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
}
protected getRule_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(SlModuleName.RULE_PANEL);
}
protected onClick_optionBtn(e): void {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
}
protected getOptions_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(SlModuleName.GAME_OPTION_PANEL);
}
protected removeEvent(): void {
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn)
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn)
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn)
}
}
}
\ No newline at end of file
import {SceneManager} from "yt";
import {GuiManager} from "yt";
import {PanelModule} from "yt";
import {AnimationGui} from "yt";
import {GuiCreate} from "yt";
import {DisplayPool} from "yt";
import {YtSceneManager} from "yt";
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtAnimationGui} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameEndRankModel, TwFun } from "tw";
export class GameEndRankModule extends PanelModule {
export class GameEndRankModule extends YtPanelModule {
......@@ -48,7 +48,7 @@ export class GameEndRankModule extends PanelModule {
}
public init(){
DisplayPool.ins.displayPool[ModuleName.GAME_END_RANK_PANEL]=this;
YtDisplayPool.ins.displayPool[ModuleName.GAME_END_RANK_PANEL]=this;
}
/**
......
import {YtSceneManager} from "yt";
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtAnimationGui} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import { GameEndRankModel, TwFun } from "tw";
export class SlGameEndRankModule extends YtPanelModule {
/**
* 数据
*/
protected model: GameEndRankModel;
protected initModel(): void {
this.model = new GameEndRankModel();
}
//UI配置
protected uiConfig={
bodyWidth:"440px",
bodyHeight:"680px",
bodyTop:"260px",
bodyLeft:"260px",
isVertical:true,
}
//事件
protected doEvents=[];
constructor(){
super()
this.initUI();
}
/**
* 打开后
* */
protected onOpened(...args){
this.htmlView=this.htmlCreate(this.uiConfig,this.model.rankList)
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_END_RANK_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
// this.viewHtml=this.listTemplateHtml(this.model.rankList,this.uiConfig)
this.view.closeBtn.isHitTestVisible=true;
}
/**
* 关闭前
* */
protected onClose(){
if(document.getElementById("viewNode")){
try {
document.body.removeChild(this.viewNode)
}catch (e) {
console.log(e)
}
}
}
}
\ No newline at end of file
import {Module} from "yt";
import {YtModule} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import {DisplayPool} from "yt";
import {YtDisplayPool} from "yt";
export class GameGuiModule extends Module {
export class GameGuiModule extends YtModule {
constructor(){
super()
}
public init(){
DisplayPool.ins.displayPool[ModuleName.GAME_PLAY_GUI]=this;
YtDisplayPool.ins.displayPool[ModuleName.GAME_PLAY_GUI]=this;
}
/**
* 添加事件
......
import {YtModule} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import {YtDisplayPool} from "yt";
export class SlGameGuiModule extends YtModule {
constructor(){
super()
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_PLAY_GUI]=this;
}
/**
* 添加事件
* */
protected addEvent(){
}
protected removeEvent(){
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
this.removeEvent()
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
}
}
\ No newline at end of file
import {Module} from "yt";
import {DisplayPool} from "yt";
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import { ModuleName } from "../../enum/ModuleName";
import {ModuleManager} from "yt";
import {YtModuleManager} from "yt";
import { GCache } from 'tc';
/**
......
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import { ModuleName } from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GCache } from 'tc';
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class GameGuideModule extends YtModule {
protected totalFrames=1;
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_GUIDE_GUI]=this;
}
/**
* 当前步骤
*/
protected currStep: number;
/**
* 最大步骤
*/
protected maxStep: number;
public updateData(): void {
super.updateData();
this.maxStep = this.totalFrames;
this.currStep = 1;
}
/**
* 引导是否完成
*/
public isComplete(): boolean {
if(this.currStep >= this.maxStep) {
GCache.writeCache('guide', 'true');
return true;
}
return false;
}
protected addEvent(): void {
super.addEvent();
if (this.view.sureBtn) {
this.addClick(this.view.sureBtn, this.onClick_sureBtn.bind(this));
}
}
protected onClick_sureBtn(): void {
this.currStep ++;
if (this.isComplete()) {
ModuleManager.ins.openModule(ModuleName.GAME_PLAY_SCENE);
} else {
// this.view.gotoAndStop(this.currStep);
}
}
protected removeEvent(): void {
super.removeEvent();
if (this.view.sureBtn) {
this.removeClick(this.view.sureBtn);
}
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import { ModuleName } from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GCache } from 'tc';
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class GameGuideModule extends YtModule {
protected totalFrames=1;
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_GUIDE_GUI]=this;
}
/**
* 当前步骤
*/
protected currStep: number;
/**
* 最大步骤
*/
protected maxStep: number;
public updateData(): void {
super.updateData();
this.maxStep = this.totalFrames;
this.currStep = 1;
}
/**
* 引导是否完成
*/
public isComplete(): boolean {
if(this.currStep >= this.maxStep) {
GCache.writeCache('guide', 'true');
return true;
}
return false;
}
protected addEvent(): void {
super.addEvent();
if (this.view.sureBtn) {
this.addClick(this.view.sureBtn, this.onClick_sureBtn.bind(this));
}
}
protected onClick_sureBtn(): void {
this.currStep ++;
if (this.isComplete()) {
YtModuleManager.ins.openModule(ModuleName.GAME_PLAY_SCENE);
} else {
// this.view.gotoAndStop(this.currStep);
}
}
protected removeEvent(): void {
super.removeEvent();
if (this.view.sureBtn) {
this.removeClick(this.view.sureBtn);
}
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import { SlModuleName } from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GCache } from 'tc';
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class GameGuideModule extends YtModule {
protected totalFrames=1;
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_GUIDE_GUI]=this;
}
/**
* 当前步骤
*/
protected currStep: number;
/**
* 最大步骤
*/
protected maxStep: number;
public updateData(): void {
super.updateData();
this.maxStep = this.totalFrames;
this.currStep = 1;
}
/**
* 引导是否完成
*/
public isComplete(): boolean {
if(this.currStep >= this.maxStep) {
GCache.writeCache('guide', 'true');
return true;
}
return false;
}
protected addEvent(): void {
super.addEvent();
if (this.view.sureBtn) {
this.addClick(this.view.sureBtn, this.onClick_sureBtn.bind(this));
}
}
protected onClick_sureBtn(): void {
this.currStep ++;
if (this.isComplete()) {
YtModuleManager.ins.openModule(SlModuleName.GAME_PLAY_SCENE);
} else {
// this.view.gotoAndStop(this.currStep);
}
}
protected removeEvent(): void {
super.removeEvent();
if (this.view.sureBtn) {
this.removeClick(this.view.sureBtn);
}
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import { SlModuleName } from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GCache } from 'tc';
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class SlGameGuideModule extends YtModule {
protected totalFrames=1;
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_GUIDE_GUI]=this;
}
/**
* 当前步骤
*/
protected currStep: number;
/**
* 最大步骤
*/
protected maxStep: number;
public updateData(): void {
super.updateData();
this.maxStep = this.totalFrames;
this.currStep = 1;
}
/**
* 引导是否完成
*/
public isComplete(): boolean {
if(this.currStep >= this.maxStep) {
GCache.writeCache('guide', 'true');
return true;
}
return false;
}
protected addEvent(): void {
super.addEvent();
if (this.view.sureBtn) {
this.addClick(this.view.sureBtn, this.onClick_sureBtn.bind(this));
}
}
protected onClick_sureBtn(): void {
this.currStep ++;
if (this.isComplete()) {
YtModuleManager.ins.openModule(SlModuleName.GAME_PLAY_SCENE);
} else {
// this.view.gotoAndStop(this.currStep);
}
}
protected removeEvent(): void {
super.removeEvent();
if (this.view.sureBtn) {
this.removeClick(this.view.sureBtn);
}
}
}
\ No newline at end of file
import {PanelModule} from "yt";
import {DisplayPool} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import {ModuleManager} from "yt";
import {YtModuleManager} from "yt";
import { GameLoseModel } from 'tw';
export class GameLoseModule extends PanelModule {
export class GameLoseModule extends YtPanelModule {
constructor(){
super()
}
......
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GameLoseModel } from 'tw';
export class GameLoseModule extends YtPanelModule {
constructor(){
super()
}
/**
* 数据
*/
protected model: GameLoseModel;
protected initModel(): void {
this.model = new GameLoseModel();
}
/**
* 更新剩余次数文案
*/
protected updateCountTxt(): void {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
}
/**
* 更新当前积分文案
*/
protected updateCurrScoreTxt(): void {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
}
/**
* 更新最高积分文案
*/
protected updateMaxScoreTxt(): void {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
}
/**
* 隐藏
*/
protected hide(): void {
this.removeEvent();
this.panelsAn.hide(this.view.view,()=>{
this.onClose()
},()=>{
this.onClosed()
})
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_LOSE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(): void {
super.updateData();
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
}
/**
* 关闭后
* */
protected onClosed(){
super.onClosed()
this.enableMouseEvt(true)
YtModuleManager.ins.openModule(ModuleName.GAME_START_GUI);
}
}
\ No newline at end of file
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GameLoseModel } from 'tw';
export class GameLoseModule extends YtPanelModule {
constructor(){
super()
}
/**
* 数据
*/
protected model: GameLoseModel;
protected initModel(): void {
this.model = new GameLoseModel();
}
/**
* 更新剩余次数文案
*/
protected updateCountTxt(): void {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
}
/**
* 更新当前积分文案
*/
protected updateCurrScoreTxt(): void {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
}
/**
* 更新最高积分文案
*/
protected updateMaxScoreTxt(): void {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
}
/**
* 隐藏
*/
protected hide(): void {
this.removeEvent();
this.panelsAn.hide(this.view.view,()=>{
this.onClose()
},()=>{
this.onClosed()
})
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_LOSE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(): void {
super.updateData();
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
}
/**
* 关闭后
* */
protected onClosed(){
super.onClosed()
this.enableMouseEvt(true)
YtModuleManager.ins.openModule(ModuleName.GAME_START_GUI);
}
}
\ No newline at end of file
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GameLoseModel } from 'tw';
export class SlGameLoseModule extends YtPanelModule {
constructor(){
super()
}
/**
* 数据
*/
protected model: GameLoseModel;
protected initModel(): void {
this.model = new GameLoseModel();
}
/**
* 更新剩余次数文案
*/
protected updateCountTxt(): void {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
}
/**
* 更新当前积分文案
*/
protected updateCurrScoreTxt(): void {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
}
/**
* 更新最高积分文案
*/
protected updateMaxScoreTxt(): void {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
}
/**
* 隐藏
*/
protected hide(): void {
this.removeEvent();
this.panelsAn.hide(this.view.view,()=>{
this.onClose()
},()=>{
this.onClosed()
})
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_LOSE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(): void {
super.updateData();
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
}
/**
* 关闭后
* */
protected onClosed(){
super.onClosed()
this.enableMouseEvt(true)
YtModuleManager.ins.openModule(ModuleName.GAME_START_GUI);
}
}
\ No newline at end of file
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GameLoseModel } from 'tw';
export class SlGameLoseModule extends YtPanelModule {
constructor(){
super()
}
/**
* 数据
*/
protected model: SlGameLoseModel;
protected initModel(): void {
this.model = new SlGameLoseModel();
}
/**
* 更新剩余次数文案
*/
protected updateCountTxt(): void {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
}
/**
* 更新当前积分文案
*/
protected updateCurrScoreTxt(): void {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
}
/**
* 更新最高积分文案
*/
protected updateMaxScoreTxt(): void {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
}
/**
* 隐藏
*/
protected hide(): void {
this.removeEvent();
this.panelsAn.hide(this.view.view,()=>{
this.onClose()
},()=>{
this.onClosed()
})
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_LOSE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(): void {
super.updateData();
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
}
/**
* 关闭后
* */
protected onClosed(){
super.onClosed()
this.enableMouseEvt(true)
YtModuleManager.ins.openModule(ModuleName.GAME_START_GUI);
}
}
\ No newline at end of file
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GameLoseModel } from 'tw';
export class SlGameLoseModule extends YtPanelModule {
constructor(){
super()
}
/**
* 数据
*/
protected model: SlGameLoseModel;
protected initModel(): void {
this.model = new SlGameLoseModel();
}
/**
* 更新剩余次数文案
*/
protected updateCountTxt(): void {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
}
/**
* 更新当前积分文案
*/
protected updateCurrScoreTxt(): void {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
}
/**
* 更新最高积分文案
*/
protected updateMaxScoreTxt(): void {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
}
/**
* 隐藏
*/
protected hide(): void {
this.removeEvent();
this.panelsAn.hide(this.view.view,()=>{
this.onClose()
},()=>{
this.onClosed()
})
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_LOSE_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(): void {
super.updateData();
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
}
/**
* 关闭后
* */
protected onClosed(){
super.onClosed()
this.enableMouseEvt(true)
YtModuleManager.ins.openModule(SlModuleName.GAME_START_GUI);
}
}
\ No newline at end of file
import {GuiManager} from "yt";
import {YtGuiManager} from "yt";
import {PanelModule} from "yt";
import {GuiCreate} from "yt";
import {DisplayPool} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameOptionModel, TwFun } from "tw";
......
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameOptionModel, TwFun } from "tw";
export class GameOptionModule extends PanelModule {
/**
* 数据
*/
protected model: GameOptionModel;
protected initModel(): void {
this.model = new GameOptionModel();
}
//UI配置
protected uiConfig={
bodyWidth:"440px",
bodyHeight:"680px",
bodyTop:"260px",
bodyLeft:"260px",
isVertical:true,
}
/**
* 打开后
* */
protected onOpened(...args){
this.htmlView=this.htmlCreate(this.uiConfig,this.model.optionList)
}
public init(){
DisplayPool.ins.displayPool[ModuleName.GAME_OPTION_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
/**
* 关闭前
* */
protected onClose(){
if(document.getElementById("viewNode")){
try {
document.body.removeChild(this.viewNode)
}catch (e) {
console.log(e)
}
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameOptionModel, TwFun } from "tw";
export class GameOptionModule extends YtPanelModule {
/**
* 数据
*/
protected model: GameOptionModel;
protected initModel(): void {
this.model = new GameOptionModel();
}
//UI配置
protected uiConfig={
bodyWidth:"440px",
bodyHeight:"680px",
bodyTop:"260px",
bodyLeft:"260px",
isVertical:true,
}
/**
* 打开后
* */
protected onOpened(...args){
this.htmlView=this.htmlCreate(this.uiConfig,this.model.optionList)
}
public init(){
DisplayPool.ins.displayPool[ModuleName.GAME_OPTION_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
/**
* 关闭前
* */
protected onClose(){
if(document.getElementById("viewNode")){
try {
document.body.removeChild(this.viewNode)
}catch (e) {
console.log(e)
}
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameOptionModel, TwFun } from "tw";
export class GameOptionModule extends YtPanelModule {
/**
* 数据
*/
protected model: GameOptionModel;
protected initModel(): void {
this.model = new GameOptionModel();
}
//UI配置
protected uiConfig={
bodyWidth:"440px",
bodyHeight:"680px",
bodyTop:"260px",
bodyLeft:"260px",
isVertical:true,
}
/**
* 打开后
* */
protected onOpened(...args){
this.htmlView=this.htmlCreate(this.uiConfig,this.model.optionList)
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_OPTION_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
/**
* 关闭前
* */
protected onClose(){
if(document.getElementById("viewNode")){
try {
document.body.removeChild(this.viewNode)
}catch (e) {
console.log(e)
}
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import { GameOptionModel, TwFun } from "tw";
export class SlGameOptionModule extends YtPanelModule {
/**
* 数据
*/
protected model: SlGameOptionModel;
protected initModel(): void {
this.model = new SlGameOptionModel();
}
//UI配置
protected uiConfig={
bodyWidth:"440px",
bodyHeight:"680px",
bodyTop:"260px",
bodyLeft:"260px",
isVertical:true,
}
/**
* 打开后
* */
protected onOpened(...args){
this.htmlView=this.htmlCreate(this.uiConfig,this.model.optionList)
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_OPTION_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
/**
* 关闭前
* */
protected onClose(){
if(document.getElementById("viewNode")){
try {
document.body.removeChild(this.viewNode)
}catch (e) {
console.log(e)
}
}
}
}
\ No newline at end of file
import {GuiManager} from "yt";
import {PanelModule} from "yt";
import {GuiCreate} from "yt";
import {DisplayPool} from "yt";
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameRealTimeRankModel, TwFun } from "tw";
export class GameRealTimeRankModule extends PanelModule {
export class GameRealTimeRankModule extends YtPanelModule {
/**
* 数据
......
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameRealTimeRankModel, TwFun } from "tw";
export class GameRealTimeRankModule extends YtPanelModule {
/**
* 数据
*/
protected model: GameRealTimeRankModel;
protected initModel(): void {
this.model = new GameRealTimeRankModel();
}
//UI配置
protected uiConfig={
bodyWidth:"440px",
bodyHeight:"680px",
bodyTop:"260px",
bodyLeft:"260px",
isVertical:true,
}
constructor(){
super()
}
/**
* 打开后
* */
protected onOpened(...args){
this.htmlView=this.htmlCreate(this.uiConfig,this.model.userList)
}
public init(){
YtDisplayPool.ins.displayPool[ModuleName.GAME_REAL_TIME_RANK_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
/**
* 关闭前
* */
protected onClose(){
if(document.getElementById("viewNode")){
try {
document.body.removeChild(this.viewNode)
}catch (e) {
console.log(e)
}
}
}
}
\ No newline at end of file
import {YtGuiManager} from "yt";
import {YtPanelModule} from "yt";
import {YtGuiCreate} from "yt";
import {YtDisplayPool} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import { GameRealTimeRankModel, TwFun } from "tw";
export class SlGameRealTimeRankModule extends YtPanelModule {
/**
* 数据
*/
protected model: SlGameRealTimeRankModel;
protected initModel(): void {
this.model = new SlGameRealTimeRankModel();
}
//UI配置
protected uiConfig={
bodyWidth:"440px",
bodyHeight:"680px",
bodyTop:"260px",
bodyLeft:"260px",
isVertical:true,
}
constructor(){
super()
}
/**
* 打开后
* */
protected onOpened(...args){
this.htmlView=this.htmlCreate(this.uiConfig,this.model.userList)
}
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_REAL_TIME_RANK_PANEL]=this;
}
/**
* 添加事件
* */
protected addEvent(){
if(this.view.closeBtn){
this.addClick(this.view.closeBtn,this.onClick_closeBtn.bind(this))
}
}
protected onClick_closeBtn(e): void {
this.enableMouseEvt(false)
this.hide();
}
protected removeEvent(){
if(this.view.closeBtn){
this.enableMouseEvt(true)
this.removeClick(this.view.closeBtn)
}
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
this.view.closeBtn.isHitTestVisible=true;
}
/**
* 关闭前
* */
protected onClose(){
if(document.getElementById("viewNode")){
try {
document.body.removeChild(this.viewNode)
}catch (e) {
console.log(e)
}
}
}
}
\ No newline at end of file
import {Module} from "yt";
import {SceneManager} from "yt";
import {ModuleManager} from "yt";
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {ModuleName} from "../../enum/ModuleName";
......
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GamePlayModel } from "tw";
export class GameSceneModule extends YtModule{
/**
* 是否校验积分
*/
protected checkScore: boolean;
/**
* 数据
*/
protected model: GamePlayModel;
protected initModel(): void {
this.model = new GamePlayModel();
}
/**
* 扩展数据
* */
protected other: any;
protected score=0;
//销毁
public dispose(){
var j;
for(j in this.display){
console.log(this.display[j])
if( this.display[j]){
this.display[j].dispose()
}
}
}
public show(){
this.resetGame()
SceneManager.ins.change(this.display);
}
protected resetGame(){
this.model.update();
}
protected gameOver(): void {
this.removeEvent();
//将最高纪录缓存
this.enableMouseEvt(false);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
/**
* 更新游戏积分
* @param type 1 增加, 2 简少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected submit_result(): void {
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = ModuleName.GAME_WIN_PANEL;
} else {
moduleName = ModuleName.GAME_LOSE_PANEL;
}
ModuleManager.ins.openModule(moduleName);
this.enableMouseEvt(true);
}
/**
* 导入外部网格
* @param importMeshes 网格资源列表
* @param onSuccess 成功回调
*/
protected ImportMeshes(importMeshes,onSuccess){
ModuleManager.ins.openModule(YtModuleName.WAITING_PANEL,YtLang.lang_004);
var _length=importMeshes.length;
var _meshes=[]
var _skeletons=[]
var _loadCount=0;
importMeshes.forEach((list)=>{
BABYLON.SceneLoader.ImportMesh(
"",
list.rootUrl,
list.sceneFilename,
SceneManager.ins.scene,
(_mesh,_skeleton)=> {
try {
_meshes.push(_mesh)
_skeletons.push(_skeleton)
_loadCount++
if(_loadCount==_length){
setTimeout(()=>{
ModuleManager.ins.closeModule(YtModuleName.WAITING_PANEL);
},100)
//ModuleManager.ins.openModule(ModuleName.GAME_PLAY_GUI);
onSuccess(_meshes,_skeletons)
}
} catch (e) {
console.error(e)
}
}
);
})
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GamePlayModel } from "tw";
export class GameSceneModule extends YtModule{
/**
* 是否校验积分
*/
protected checkScore: boolean;
/**
* 数据
*/
protected model: GamePlayModel;
protected initModel(): void {
this.model = new GamePlayModel();
}
/**
* 扩展数据
* */
protected other: any;
protected score=0;
//销毁
public dispose(){
var j;
for(j in this.display){
console.log(this.display[j])
if( this.display[j]){
this.display[j].dispose()
}
}
}
public show(){
this.resetGame()
YtSceneManager.ins.change(this.display);
}
protected resetGame(){
this.model.update();
}
protected gameOver(): void {
this.removeEvent();
//将最高纪录缓存
this.enableMouseEvt(false);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
/**
* 更新游戏积分
* @param type 1 增加, 2 简少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected submit_result(): void {
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = ModuleName.GAME_WIN_PANEL;
} else {
moduleName = ModuleName.GAME_LOSE_PANEL;
}
ModuleManager.ins.openModule(moduleName);
this.enableMouseEvt(true);
}
/**
* 导入外部网格
* @param importMeshes 网格资源列表
* @param onSuccess 成功回调
*/
protected ImportMeshes(importMeshes,onSuccess){
ModuleManager.ins.openModule(YtModuleName.WAITING_PANEL,YtLang.lang_004);
var _length=importMeshes.length;
var _meshes=[]
var _skeletons=[]
var _loadCount=0;
importMeshes.forEach((list)=>{
BABYLON.SceneLoader.ImportMesh(
"",
list.rootUrl,
list.sceneFilename,
SceneManager.ins.scene,
(_mesh,_skeleton)=> {
try {
_meshes.push(_mesh)
_skeletons.push(_skeleton)
_loadCount++
if(_loadCount==_length){
setTimeout(()=>{
ModuleManager.ins.closeModule(YtModuleName.WAITING_PANEL);
},100)
//ModuleManager.ins.openModule(ModuleName.GAME_PLAY_GUI);
onSuccess(_meshes,_skeletons)
}
} catch (e) {
console.error(e)
}
}
);
})
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GamePlayModel } from "tw";
export class GameSceneModule extends YtModule{
/**
* 是否校验积分
*/
protected checkScore: boolean;
/**
* 数据
*/
protected model: GamePlayModel;
protected initModel(): void {
this.model = new GamePlayModel();
}
/**
* 扩展数据
* */
protected other: any;
protected score=0;
//销毁
public dispose(){
var j;
for(j in this.display){
console.log(this.display[j])
if( this.display[j]){
this.display[j].dispose()
}
}
}
public show(){
this.resetGame()
YtSceneManager.ins.change(this.display);
}
protected resetGame(){
this.model.update();
}
protected gameOver(): void {
this.removeEvent();
//将最高纪录缓存
this.enableMouseEvt(false);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
/**
* 更新游戏积分
* @param type 1 增加, 2 简少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected submit_result(): void {
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = ModuleName.GAME_WIN_PANEL;
} else {
moduleName = ModuleName.GAME_LOSE_PANEL;
}
YtModuleManager.ins.openModule(moduleName);
this.enableMouseEvt(true);
}
/**
* 导入外部网格
* @param importMeshes 网格资源列表
* @param onSuccess 成功回调
*/
protected ImportMeshes(importMeshes,onSuccess){
YtModuleManager.ins.openModule(YtModuleName.WAITING_PANEL,YtLang.lang_004);
var _length=importMeshes.length;
var _meshes=[]
var _skeletons=[]
var _loadCount=0;
importMeshes.forEach((list)=>{
BABYLON.SceneLoader.ImportMesh(
"",
list.rootUrl,
list.sceneFilename,
YtSceneManager.ins.scene,
(_mesh,_skeleton)=> {
try {
_meshes.push(_mesh)
_skeletons.push(_skeleton)
_loadCount++
if(_loadCount==_length){
setTimeout(()=>{
YtModuleManager.ins.closeModule(YtModuleName.WAITING_PANEL);
},100)
//ModuleManager.ins.openModule(ModuleName.GAME_PLAY_GUI);
onSuccess(_meshes,_skeletons)
}
} catch (e) {
console.error(e)
}
}
);
})
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import { GamePlayModel } from "tw";
export class GameSceneModule extends YtModule{
/**
* 是否校验积分
*/
protected checkScore: boolean;
/**
* 数据
*/
protected model: GamePlayModel;
protected initModel(): void {
this.model = new GamePlayModel();
}
/**
* 扩展数据
* */
protected other: any;
protected score=0;
//销毁
public dispose(){
var j;
for(j in this.display){
console.log(this.display[j])
if( this.display[j]){
this.display[j].dispose()
}
}
}
public show(){
this.resetGame()
YtSceneManager.ins.change(this.display);
}
protected resetGame(){
this.model.update();
}
protected gameOver(): void {
this.removeEvent();
//将最高纪录缓存
this.enableMouseEvt(false);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
/**
* 更新游戏积分
* @param type 1 增加, 2 简少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected submit_result(): void {
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = ModuleName.GAME_WIN_PANEL;
} else {
moduleName = ModuleName.GAME_LOSE_PANEL;
}
YtModuleManager.ins.openModule(moduleName);
this.enableMouseEvt(true);
}
/**
* 导入外部网格
* @param importMeshes 网格资源列表
* @param onSuccess 成功回调
*/
protected ImportMeshes(importMeshes,onSuccess){
YtModuleManager.ins.openModule(YtModuleName.WAITING_PANEL,YtLang.lang_004);
var _length=importMeshes.length;
var _meshes=[]
var _skeletons=[]
var _loadCount=0;
importMeshes.forEach((list)=>{
BABYLON.SceneLoader.ImportMesh(
"",
list.rootUrl,
list.sceneFilename,
YtSceneManager.ins.scene,
(_mesh,_skeleton)=> {
try {
_meshes.push(_mesh)
_skeletons.push(_skeleton)
_loadCount++
if(_loadCount==_length){
setTimeout(()=>{
YtModuleManager.ins.closeModule(YtModuleName.WAITING_PANEL);
},100)
//ModuleManager.ins.openModule(ModuleName.GAME_PLAY_GUI);
onSuccess(_meshes,_skeletons)
}
} catch (e) {
console.error(e)
}
}
);
})
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import { GamePlayModel } from "tw";
export class GameSceneModule extends YtModule{
/**
* 是否校验积分
*/
protected checkScore: boolean;
/**
* 数据
*/
protected model: GamePlayModel;
protected initModel(): void {
this.model = new GamePlayModel();
}
/**
* 扩展数据
* */
protected other: any;
protected score=0;
//销毁
public dispose(){
var j;
for(j in this.display){
console.log(this.display[j])
if( this.display[j]){
this.display[j].dispose()
}
}
}
public show(){
this.resetGame()
YtSceneManager.ins.change(this.display);
}
protected resetGame(){
this.model.update();
}
protected gameOver(): void {
this.removeEvent();
//将最高纪录缓存
this.enableMouseEvt(false);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
/**
* 更新游戏积分
* @param type 1 增加, 2 简少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected submit_result(): void {
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = SlModuleName.GAME_WIN_PANEL;
} else {
moduleName = SlModuleName.GAME_LOSE_PANEL;
}
YtModuleManager.ins.openModule(moduleName);
this.enableMouseEvt(true);
}
/**
* 导入外部网格
* @param importMeshes 网格资源列表
* @param onSuccess 成功回调
*/
protected ImportMeshes(importMeshes,onSuccess){
YtModuleManager.ins.openModule(YtModuleName.WAITING_PANEL,YtLang.lang_004);
var _length=importMeshes.length;
var _meshes=[]
var _skeletons=[]
var _loadCount=0;
importMeshes.forEach((list)=>{
BABYLON.SceneLoader.ImportMesh(
"",
list.rootUrl,
list.sceneFilename,
YtSceneManager.ins.scene,
(_mesh,_skeleton)=> {
try {
_meshes.push(_mesh)
_skeletons.push(_skeleton)
_loadCount++
if(_loadCount==_length){
setTimeout(()=>{
YtModuleManager.ins.closeModule(YtModuleName.WAITING_PANEL);
},100)
//ModuleManager.ins.openModule(ModuleName.GAME_PLAY_GUI);
onSuccess(_meshes,_skeletons)
}
} catch (e) {
console.error(e)
}
}
);
})
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import { GamePlayModel } from "tw";
export class SlGameSceneModule extends YtModule{
/**
* 是否校验积分
*/
protected checkScore: boolean;
/**
* 数据
*/
protected model: SlGamePlayModel;
protected initModel(): void {
this.model = new SlGamePlayModel();
}
/**
* 扩展数据
* */
protected other: any;
protected score=0;
//销毁
public dispose(){
var j;
for(j in this.display){
console.log(this.display[j])
if( this.display[j]){
this.display[j].dispose()
}
}
}
public show(){
this.resetGame()
YtSceneManager.ins.change(this.display);
}
protected resetGame(){
this.model.update();
}
protected gameOver(): void {
this.removeEvent();
//将最高纪录缓存
this.enableMouseEvt(false);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
/**
* 更新游戏积分
* @param type 1 增加, 2 简少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected submit_result(): void {
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = SlModuleName.GAME_WIN_PANEL;
} else {
moduleName = SlModuleName.GAME_LOSE_PANEL;
}
YtModuleManager.ins.openModule(moduleName);
this.enableMouseEvt(true);
}
/**
* 导入外部网格
* @param importMeshes 网格资源列表
* @param onSuccess 成功回调
*/
protected ImportMeshes(importMeshes,onSuccess){
YtModuleManager.ins.openModule(YtModuleName.WAITING_PANEL,YtLang.lang_004);
var _length=importMeshes.length;
var _meshes=[]
var _skeletons=[]
var _loadCount=0;
importMeshes.forEach((list)=>{
BABYLON.SceneLoader.ImportMesh(
"",
list.rootUrl,
list.sceneFilename,
YtSceneManager.ins.scene,
(_mesh,_skeleton)=> {
try {
_meshes.push(_mesh)
_skeletons.push(_skeleton)
_loadCount++
if(_loadCount==_length){
setTimeout(()=>{
YtModuleManager.ins.closeModule(YtModuleName.WAITING_PANEL);
},100)
//ModuleManager.ins.openModule(ModuleName.GAME_PLAY_GUI);
onSuccess(_meshes,_skeletons)
}
} catch (e) {
console.error(e)
}
}
);
})
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtSceneManager} from "yt";
import {YtModuleManager} from "yt";
import {YtModuleName} from "yt";
import {YtLang} from "yt";
import {SlModuleName} from "../../enum/ModuleName";
import { GamePlayModel } from "tw";
export class SlGameSceneModule extends YtModule{
/**
* 是否校验积分
*/
protected checkScore: boolean;
/**
* 数据
*/
protected model: GamePlayModel;
protected initModel(): void {
this.model = new GamePlayModel();
}
/**
* 扩展数据
* */
protected other: any;
protected score=0;
//销毁
public dispose(){
var j;
for(j in this.display){
console.log(this.display[j])
if( this.display[j]){
this.display[j].dispose()
}
}
}
public show(){
this.resetGame()
YtSceneManager.ins.change(this.display);
}
protected resetGame(){
this.model.update();
}
protected gameOver(): void {
this.removeEvent();
//将最高纪录缓存
this.enableMouseEvt(false);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
/**
* 更新游戏积分
* @param type 1 增加, 2 简少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected submit_result(): void {
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = SlModuleName.GAME_WIN_PANEL;
} else {
moduleName = SlModuleName.GAME_LOSE_PANEL;
}
YtModuleManager.ins.openModule(moduleName);
this.enableMouseEvt(true);
}
/**
* 导入外部网格
* @param importMeshes 网格资源列表
* @param onSuccess 成功回调
*/
protected ImportMeshes(importMeshes,onSuccess){
YtModuleManager.ins.openModule(YtModuleName.WAITING_PANEL,YtLang.lang_004);
var _length=importMeshes.length;
var _meshes=[]
var _skeletons=[]
var _loadCount=0;
importMeshes.forEach((list)=>{
BABYLON.SceneLoader.ImportMesh(
"",
list.rootUrl,
list.sceneFilename,
YtSceneManager.ins.scene,
(_mesh,_skeleton)=> {
try {
_meshes.push(_mesh)
_skeletons.push(_skeleton)
_loadCount++
if(_loadCount==_length){
setTimeout(()=>{
YtModuleManager.ins.closeModule(YtModuleName.WAITING_PANEL);
},100)
//ModuleManager.ins.openModule(ModuleName.GAME_PLAY_GUI);
onSuccess(_meshes,_skeletons)
}
} catch (e) {
console.error(e)
}
}
);
})
}
}
\ No newline at end of file
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import {YtModuleName} from "../../enum/ModuleName";
import {YtModuleManager} from "yt";
import { GameStartModel, TwFun } from "tw";
import { IModuleData, GCache, GFun, GDispatcher } from 'tc';
export class GameStartModule extends YtModule {
/**
* 数据
*/
protected model: GameStartModel;
protected initModel(): void {
this.model = new GameStartModel();
}
//游戏场景对象
protected gameSceneObject:any;
constructor(){
super()
}
public init():void{
DisplayPool.ins.displayPool[ModuleName.GAME_START_GUI]=this;
}
/**
* 更新开始按钮状态
*/
protected updateStartBtnStatus(): void {
if (this.view.startBtn) {
const enable: boolean = this.model.startBtnEnable;
// this.view.startBtn.mouseEnable = enable;
this.enableMouseEvtView(this.view.startBtn,enable)
/* if (enable) {
this.view.startBtn.gotoAndStop(1);
} else {
this.view.startBtn.gotoAndStop(3);
} */
}
}
/**
* 更新次数文案
*/
protected updateCountTxt(): void {
if (this.view.countTxt) {
this.view.countTxt.text = ""+this.model.countTxt;
}
}
/**
* 添加事件
* */
protected addEvent(): void{
//开始游戏
if(this.view.startBtn){
this.addClick(this.view.startBtn,this.onClick_startBtn.bind(this))
}
//活动规则
if(this.view.ruleBtn){
this.addClick(this.view.ruleBtn,this.onClick_ruleBtn.bind(this))
}
//活动奖品
if(this.view.optionBtn){
this.addClick(this.view.optionBtn,this.onClick_optionBtn.bind(this))
}
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn,this.onClick_recordBtn.bind(this))
}
//实时排行榜
if(this.view.realTimeRankBtn) {
this.addClick(this.view.realTimeRankBtn,this.onClick_realTimeRankBtn.bind(this))
}
}
protected removeEvent(){
//开始游戏
if(this.view.startBtn){
this.removeClick(this.view.startBtn)
}
//活动规则
if(this.view.ruleBtn){
this.removeClick(this.view.ruleBtn)
}
//活动奖品
if(this.view.optionBtn){
this.removeClick(this.view.optionBtn)
}
//兑换记录
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn)
}
//实时排行榜
if(this.view.realTimeRankBtn) {
this.removeClick(this.view.realTimeRankBtn)
}
}
protected onClick_ruleBtn(): void {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
}
protected onClick_optionBtn(): void {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
}
protected onClick_startBtn(): void {
this.enableMouseEvt(false);
this.model.doStart(this.doStart_result.bind(this));
}
protected onClick_recordBtn(): void {
this.enableMouseEvt(false);
window.location.href = TwFun.getRecordUrl('00');
}
protected onClick_realTimeRankBtn(): void {
this.enableMouseEvt(false);
this.model.realtimerank(this.realtimerank_result.bind(this));
}
protected doStart_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
const module = ModuleManager.ins.getModule(ModuleName.GAME_GUIDE_GUI);
if(GCache.readCache('guide') || !module) {
ModuleManager.ins.openModule(ModuleName.GAME_PLAY_SCENE);
} else {
ModuleManager.ins.openModule(ModuleName.GAME_GUIDE_GUI);
}
}
protected realtimerank_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.GAME_REAL_TIME_RANK_PANEL);
}
protected getRule_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.RULE_PANEL);
}
protected getOptions_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.GAME_OPTION_PANEL);
this.view.startBtn.isHitTestVisible=true;
}
/**
* 更新页面
* @param args
*/
public updateData(...args): void {
this.updateCountTxt();
this.updateStartBtnStatus();
}
}
\ No newline at end of file
import {Module} from "yt";
import {DisplayPool} from "yt";
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import {ModuleManager} from "yt";
import {YtModuleManager} from "yt";
import { GameStartModel, TwFun } from "tw";
import { IModuleData, GCache, GFun, GDispatcher } from 'tc';
export class GameStartModule extends Module {
export class GameStartModule extends YtModule {
/**
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import {PanelModule} from "yt";
import {DisplayPool} from "yt";
import {ModuleManager} from "yt";
import {YtPanelModule} from "yt";
import {YtDisplayPool} from "yt";
import {YtModuleManager} from "yt";
import {ModuleName} from "../../enum/ModuleName";
import { GameWinModel } from 'tw';
export class GameWinModule extends PanelModule {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import {Module} from "yt";
import {DisplayPool} from "yt";
import {YtModule} from "yt";
import {YtDisplayPool} from "yt";
import { GameWinnerModel, TwFun } from "tw";
import { ModuleName } from "../../enum/ModuleName";
import {ModuleManager} from "yt";
import {YtModuleManager} from "yt";
/**
*Created by cuiliqiang on 2018/3/16
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import {YtModule} from "yt";
import {YtAnimationGui} from "yt";
import {YtSceneManager} from "yt";
import {YtGuiManager} from "yt";
import {YtDisplayPool} from "yt";
import { GameEndModel, TwFun } from "tw";
import { SlModuleName } from "../../enum/ModuleName";
import { WxLang } from "../../util/WxLang";
import {YtModuleManager} from "yt";
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class SlGameEndModule extends YtModule {
//面板隐藏显示实例
protected panelsAn=new YtAnimationGui(YtSceneManager.ins.scene,YtGuiManager.ins.fullscreenUI)
public init(){
YtDisplayPool.ins.displayPool[SlModuleName.GAME_END_GUI]=this;
}
/**
* 数据
*/
protected model: GameEndModel;
protected initModel(): void {
this.model = new GameEndModel();
}
public updateData(...args): void {
this.updateStatusTxt();
this.updateScoreTxt();
}
/**
* 更新活动状态文案
* @param str
*/
protected updateStatusTxt(str: string = WxLang.lang_004): void {
if (this.view.statusTxt) {
this.view.statusTxt.text = str;
}
}
/**
* 更新积分文案
*/
protected updateScoreTxt(): void {
if (this.view.scoreTxt) {
this.view.scoreTxt.text=this.model.getScoreTxt();
}
}
protected addEvent(): void {
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn.bind(this));
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn.bind(this));
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn.bind(this));
}
}
protected onClick_recordBtn(e): void {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = TwFun.getRecordUrl('00');
}
protected onClick_ruleBtn(e): void {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
}
protected getRule_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(SlModuleName.RULE_PANEL);
}
protected onClick_optionBtn(e): void {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
}
protected getOptions_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
YtModuleManager.ins.openModule(SlModuleName.GAME_OPTION_PANEL);
}
protected removeEvent(): void {
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn)
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn)
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn)
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment