Commit abf88f4b authored by 王勇霞's avatar 王勇霞

拼图小游戏

parent 3f987fa6
resource/game/tips.png

27.4 KB | W: | H:

resource/game/tips.png

4.3 KB | W: | H:

resource/game/tips.png
resource/game/tips.png
resource/game/tips.png
resource/game/tips.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"name": "common" "name": "common"
}, },
{ {
"keys": "1.png,2.png,3.png,4.png,back.png,cardBg.jpg,hand.png,tips.png,按钮.png,规则.png,返回.png", "keys": "hand.png,tips.png,底图背景.png,指向.png",
"name": "game" "name": "game"
}, },
{ {
......
...@@ -28,26 +28,24 @@ export class Main { ...@@ -28,26 +28,24 @@ export class Main {
private _pause: boolean; private _pause: boolean;
private canvas: HTMLCanvasElement private canvas: HTMLCanvasElement
constructor(canvas: HTMLCanvasElement, data = { constructor(canvas: HTMLCanvasElement, data = {
needGuide: true, needGuide: true,
uiConfig: { uiConfig: {
cardBackBg:
"https://yun.duiba.com.cn/aurora/assets/3ddcd8fae8c5f382c6a54a93a343b0f297f68d4e.png",
cardFontBg1:
"https://yun.duiba.com.cn/aurora/assets/4a1cb2affeb9024ada20078108cdd05737ba9168.png",
cardFontBg2:
"https://yun.duiba.com.cn/aurora/assets/96f167f23e8691e50e65dc79bb5b709272a447ee.png",
cardFontBg3:
"https://yun.duiba.com.cn/aurora/assets/1f4da40a6bd75817b2f3cc1d35ee2a436b4db39c.png",
cardFontBg4:
"https://yun.duiba.com.cn/aurora/assets/3fe99f439878e90979a779c12cbb25cfce48f725.png",
mainBg: mainBg:
"https://yun.duiba.com.cn/aurora/assets/cee253d9388f52840d17c05686200e631a2d826b.png", "https://yun.duiba.com.cn/aurora/assets/b76307c3830811177a4bce87a7d07fd04a9646de.png",
ruleBtn:
"https://yun.duiba.com.cn/aurora/assets/aa3c770ff5f844351a7bb4d2a2ee3f1574fb9a51.png",
serviceBtn: serviceBtn:
"https://yun.duiba.com.cn/aurora/assets/307a139dd1ec7a7e6b552faf17fd35c9e7032b10.png", "https://yun.duiba.com.cn/aurora/assets/925b347e43fde06f793ae313d3e67d06e17cec38.png",
ruleBtn:
"https://yun.duiba.com.cn/aurora/assets/fc23c1787f39e8ba169153daf0513448729133ef.png",
mainBtn: mainBtn:
"https://yun.duiba.com.cn/aurora/assets/5c56beda337c4513d7d6eeaee4da377a7090b3d2.png", "https://yun.duiba.com.cn/aurora/assets/b890b2c45802e5112b256db7594d4244901b0044.png",
cardBg1:
"https://yun.duiba.com.cn/aurora/assets/035c6e18dfed4edf140dc21d4a32e2ee2754079e.png",
cardBg2:
"https://yun.duiba.com.cn/aurora/assets/e2fa2ceef3208e261a752014433b4274dc6a4533.png",
cardBg3:
"https://yun.duiba.com.cn/aurora/assets/2d9cbb2af52668b1dd962aad03e0f833c7d0dc9d.png",
cardBg4:
"https://yun.duiba.com.cn/aurora/assets/40f7165b41c37956ee2c39c65b6b0be6b661a024.png",
} }
}) { }) {
Tools.gameData = data Tools.gameData = data
......
...@@ -533,89 +533,45 @@ export const ResJson = { ...@@ -533,89 +533,45 @@ export const ResJson = {
} }
}, },
{ {
"keys": "1.png,2.png,3.png,4.png,back.png,cardBg.jpg,hand.png,tips.png,按钮.png,规则.png,返回.png", "keys": "hand.png,tips.png,底图背景.png,指向.png",
"name": "game", "name": "game",
"atlas": { "atlas": {
"tips.png": { "底图背景.png": {
"x": 2, "x": 2,
"y": 2, "y": 2,
"w": 523, "w": 620,
"h": 72, "h": 620,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 523, "sw": 620,
"sh": 72, "sh": 620,
"ro": false "ro": false
}, },
"按钮.png": { "tips.png": {
"x": 2, "x": 624,
"y": 76, "y": 2,
"w": 348, "w": 414,
"h": 101, "h": 29,
"ox": 0,
"oy": 0,
"sw": 348,
"sh": 101,
"ro": false
},
"3.png": {
"x": 2,
"y": 179,
"w": 140,
"h": 265,
"ox": 0,
"oy": 0,
"sw": 140,
"sh": 265,
"ro": true
},
"back.png": {
"x": 2,
"y": 321,
"w": 140,
"h": 265,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 140, "sw": 414,
"sh": 265, "sh": 29,
"ro": true "ro": true
}, },
"1.png": { "指向.png": {
"x": 269,
"y": 179,
"w": 140,
"h": 264,
"ox": 0,
"oy": 0,
"sw": 140,
"sh": 264,
"ro": false
},
"2.png": {
"x": 2, "x": 2,
"y": 463, "y": 624,
"w": 141, "w": 151,
"h": 264, "h": 147,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 141, "sw": 151,
"sh": 264, "sh": 147,
"ro": true
},
"4.png": {
"x": 527,
"y": 2,
"w": 140,
"h": 264,
"ox": 0,
"oy": 0,
"sw": 140,
"sh": 264,
"ro": false "ro": false
}, },
"hand.png": { "hand.png": {
"x": 268, "x": 155,
"y": 463, "y": 624,
"w": 119, "w": 119,
"h": 120, "h": 120,
"ox": 0, "ox": 0,
...@@ -623,28 +579,6 @@ export const ResJson = { ...@@ -623,28 +579,6 @@ export const ResJson = {
"sw": 119, "sw": 119,
"sh": 120, "sh": 120,
"ro": false "ro": false
},
"规则.png": {
"x": 352,
"y": 76,
"w": 91,
"h": 50,
"ox": 0,
"oy": 0,
"sw": 91,
"sh": 50,
"ro": true
},
"返回.png": {
"x": 404,
"y": 76,
"w": 91,
"h": 53,
"ox": 0,
"oy": 0,
"sw": 91,
"sh": 53,
"ro": true
} }
} }
}, },
...@@ -892,5 +826,5 @@ export const ResJson = { ...@@ -892,5 +826,5 @@ export const ResJson = {
} }
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1669024227/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/template/1669103592/resource/"
} }
\ No newline at end of file
This diff is collapsed.
// 翻牌游戏卡片种类
export const cardTypeList = {
1: {
name: "香韵",
img: "https://yun.duiba.com.cn/aurora/assets/1f4da40a6bd75817b2f3cc1d35ee2a436b4db39c.png",
},
2: {
name: "七彩",
img: "https://yun.duiba.com.cn/aurora/assets/3fe99f439878e90979a779c12cbb25cfce48f725.png",
},
3: {
name: "阳光",
img: "https://yun.duiba.com.cn/aurora/assets/4a1cb2affeb9024ada20078108cdd05737ba9168.png",
},
4: {
name: "清甜",
img: "https://yun.duiba.com.cn/aurora/assets/96f167f23e8691e50e65dc79bb5b709272a447ee.png",
},
};
// 游戏列表
export const list = [
{
type: 1,
},
{
type: 2,
},
{
type: 1,
},
{
type: 2,
},
{
type: 3,
},
{
type: 3,
},
{
type: 4,
},
{
type: 4,
},
];
// 新手引导列表
export const guideList = [
{
type: 1,
isFront: false,
hand: false,
match: false, // 是否匹配
},
{
type: 2,
isFront: false,
hand: false,
match: false,
},
{
type: 3,
isFront: false,
hand: true,
match: false,
},
{
type: 2,
isFront: false,
hand: false,
match: false,
},
{
type: 1,
isFront: false,
hand: false,
match: false,
},
{
type: 3,
isFront: false,
hand: false,
match: false,
},
{
type: 4,
isFront: false,
hand: false,
match: false,
},
{
type: 4,
isFront: false,
hand: false,
match: false,
},
];
export const defaultUI = { export const defaultUI = {
mainBg:
"https://yun.duiba.com.cn/aurora/assets/b76307c3830811177a4bce87a7d07fd04a9646de.png",
cardBackBg: cardBackBg:
"https://yun.duiba.com.cn/aurora/assets/3ddcd8fae8c5f382c6a54a93a343b0f297f68d4e.png", "https://yun.duiba.com.cn/aurora/assets/3ddcd8fae8c5f382c6a54a93a343b0f297f68d4e.png",
cardFontBg1: cardFontBg1:
...@@ -106,8 +11,6 @@ export const defaultUI = { ...@@ -106,8 +11,6 @@ export const defaultUI = {
"https://yun.duiba.com.cn/aurora/assets/1f4da40a6bd75817b2f3cc1d35ee2a436b4db39c.png", "https://yun.duiba.com.cn/aurora/assets/1f4da40a6bd75817b2f3cc1d35ee2a436b4db39c.png",
cardFontBg4: cardFontBg4:
"https://yun.duiba.com.cn/aurora/assets/3fe99f439878e90979a779c12cbb25cfce48f725.png", "https://yun.duiba.com.cn/aurora/assets/3fe99f439878e90979a779c12cbb25cfce48f725.png",
mainBg:
"https://yun.duiba.com.cn/aurora/assets/cee253d9388f52840d17c05686200e631a2d826b.png",
ruleBtn: ruleBtn:
"https://yun.duiba.com.cn/aurora/assets/aa3c770ff5f844351a7bb4d2a2ee3f1574fb9a51.png", "https://yun.duiba.com.cn/aurora/assets/aa3c770ff5f844351a7bb4d2a2ee3f1574fb9a51.png",
serviceBtn: serviceBtn:
......
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