Commit 9478927f authored by Master Q's avatar Master Q

复活卡天假放练点

parent d2093c22
......@@ -716,5 +716,5 @@ export const ResJson = {
}
],
// eslint-disable-next-line
"path": "https://yun.duiba.com.cn/db_games/activity/template/1670242040/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1670478326/resource/"
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ import getEnv = FYGE.getEnv;
export const GDispatcher = new EventDispatcher();
export const loadAllGroups = async function() {
FYGE.setEnv('tb')
RES.loadConfig(ResJson)
await RES.loadAllGroup()
}
......
......@@ -173,8 +173,8 @@ export const ModalCtroller = (function() {
ModalMap.set(ModalNode, el)
el.showModal()
}}
closeModal={() => {
ModalCtroller.closeModal(ModalNode)
closeModal={async () => {
await ModalCtroller.closeModal(ModalNode)
}}
></M>)
},
......
......@@ -25,10 +25,10 @@ export class DrawFailModal extends Dream.RenderContainer {
<DreamContainer>
<DreamSprite src={roleCont} />
<DreamSprite onClick={this.onConfirm} inlineProps={{
{/* <DreamSprite onClick={this.onConfirm} inlineProps={{
x: roleCont.width - 50,
y: -50
}} src={RES.getRes('closebtn.png')}/>
}} src={RES.getRes('closebtn.png')}/> */}
<DreamSprite onClick={this.onConfirm} inlineProps={{
x: roleCont.width / 2 - confirmbtn.width / 2,
y: 300
......
......@@ -20,9 +20,9 @@ export class DrawSucModal extends Dream.RenderContainer<{
img: string
}> {
onClose2GameOver = () => {
onClose2GameOver = async () => {
await this.props.closeModal()
this.props.onConfirm()
this.props.closeModal()
}
onConfirm = () => {
......@@ -42,11 +42,11 @@ export class DrawSucModal extends Dream.RenderContainer<{
<DreamContainer>
<DreamSprite src={roleCont}></DreamSprite>
<DreamSprite onClick={() => {
{/* <DreamSprite onClick={() => {
this.onClose2GameOver()
}} inlineProps={{
x: roleWidth - 50
}} src={RES.getRes('closebtn.png')}/>
}} src={RES.getRes('closebtn.png')}/> */}
<DreamSprite inlineProps={{
x: roleWidth / 2 - 100,
......
import { DreamContainer } from "../../components/DreamContainer/DreamContainer";
import { DreamSprite } from "../../components/DreamSprite/DreamSprite";
import Dream from "../../Dream";
import { layers } from "../../modules/layers";
import { RES } from "../../modules/RES";
import { UsePreload } from "../../modules/UseDecorator/usePreload";
......@@ -15,13 +16,17 @@ export class FinalGiftModal extends Dream.RenderContainer {
this.props.onConfirm()
}
didRendered(): void {
layers.stage.once(FYGE.MouseEvent.CLICK, this.onConfirm, this)
}
render() {
const roleCont = RES.getRes('FGMB.png')
const confirmbtn = RES.getRes('FGM1.png')
return (
<DreamContainer>
<DreamSprite src={roleCont} />
<DreamSprite src={confirmbtn} onClick={this.onConfirm.bind(this)} inlineProps={{
<DreamSprite src={confirmbtn} inlineProps={{
x: roleCont.width / 2 - confirmbtn.width / 2,
y: 500
}} />
......
import { throttle } from "@lightfish/tools";
import { DreamContainer } from "../../components/DreamContainer/DreamContainer";
import { DreamSprite } from "../../components/DreamSprite/DreamSprite";
import { DreamTextField } from "../../components/DreamTextField/DreamTextField";
......@@ -24,6 +25,7 @@ export class GameResumeModal extends Dream.RenderContainer<{
didRendered(): void {
this.intervalId = setInterval(() => {
if (this.count == 0) {
this.props.onCancel()
this.props.closeModal()
clearInterval(this.intervalId)
return
......@@ -49,7 +51,7 @@ export class GameResumeModal extends Dream.RenderContainer<{
/**
* 确认走复活逻辑
*/
onConfirm = async () => {
onConfirm = throttle(async () => {
clearInterval(this.intervalId)
const {
......@@ -62,7 +64,7 @@ export class GameResumeModal extends Dream.RenderContainer<{
this.props.closeModal()
}
}
})
render() {
const RoleContBack = RES.getRes('GameResumeModalBack.png')
......
......@@ -23,7 +23,7 @@ export const BoxTypeList: BoxType[] = [
export const GameConfig = {
debugger: true,
GenerateSpace: [300, 400], // 生成间距
finalGiftPart: 0.1, // 最终奖励 概率 100%
finalGiftPart: 1, // 最终奖励 概率 100%
maxLen: 550,
totoalPart: 0, // 全部概率
PartList: [] as {
......
......@@ -231,7 +231,8 @@ export class GameScene extends Dream.RenderContainer {
oz
} = this.CurrBoxItem
FYGE.Tween.removeTweens(touchPushObj)
// Math.abs(this.GameEleStack.stackHead.x - this.CurrBoxItem.x)
// TODO TEST
// touchPushObj.tl = Math.random() > 0.5 ? Math.abs(this.GameEleStack.stackHead.x - this.CurrBoxItem.x) : touchPushObj.tl
let tl = Math.abs(PlayerTarget.x + touchPushObj.tl * this.dir - cx)
const _i = this.onGetCurrJumpIndex(tl)
let currTanN = GameConfig.GenerateConfig.tanNum
......
......@@ -940,6 +940,13 @@
"@babel/helper-validator-option" "^7.18.6"
"@babel/plugin-transform-typescript" "^7.18.6"
"@babel/runtime@^7.17.2":
version "7.20.6"
resolved "http://npm.dui88.com:80/@babel%2fruntime/-/runtime-7.20.6.tgz#facf4879bfed9b5326326273a64220f099b0fce3"
integrity sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==
dependencies:
regenerator-runtime "^0.13.11"
"@babel/runtime@^7.8.4":
version "7.19.0"
resolved "http://npm.dui88.com:80/@babel%2fruntime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259"
......@@ -1039,6 +1046,13 @@
resolved "http://npm.dui88.com:80/@leichtgewicht%2fip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b"
integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==
"@lightfish/tools@^1.0.5":
version "1.0.5"
resolved "http://npm.dui88.com:80/@lightfish%2ftools/-/tools-1.0.5.tgz#96aedb363d6b8a9d83fa6ae4d6d8a2fd4bc06582"
integrity sha512-APtNnurmB3jzWwFnYrb3uK9UppFjPTmOEowNMd+P6R4vadr/V2QNX+Xd/Wl/17dAkswnplLzsphXHtoeiIXX8g==
dependencies:
"@babel/runtime" "^7.17.2"
"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3":
version "2.1.8-no-fsevents.3"
resolved "http://npm.dui88.com:80/@nicolo-ribaudo%2fchokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b"
......@@ -3414,6 +3428,11 @@ regenerate@^1.4.2:
resolved "http://npm.dui88.com:80/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha1-uTRtiCfo9aMve6KWN9OYtpAUhIo=
regenerator-runtime@^0.13.11:
version "0.13.11"
resolved "http://npm.dui88.com:80/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
regenerator-runtime@^0.13.4:
version "0.13.9"
resolved "http://npm.dui88.com:80/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
......
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