panhui 2 年之前
父节点
当前提交
f5f2e3cc9e

+ 18 - 7
src/components/game/Game.vue

@@ -1,22 +1,33 @@
 <script setup lang="ts">
 import PhaserContainer from '@/components/game/PhaserContainer.vue'
+import { emitter } from '@/plugins'
+
+emitter.on('completeGame', () => {
+    console.log('complete122')
+    const splash = document.getElementById('splash-screen')
+    if (splash) {
+        splash.removeAttribute('isHold')
+        splash.style.opacity = '0'
+        splash.style.display = 'none'
+    }
+})
 </script>
 
 <template>
-  <Suspense>
-    <PhaserContainer />
+    <Suspense>
+        <PhaserContainer />
 
-    <template #fallback>
+        <!-- <template #fallback>
       <div class="placeholder">
         Downloading ...
       </div>
-    </template>
-  </Suspense>
+    </template> -->
+    </Suspense>
 </template>
 
 <style scoped>
 .placeholder {
-  font-size: 2rem;
-  font-family: 'Courier New', Courier, monospace;
+    font-size: 2rem;
+    font-family: 'Courier New', Courier, monospace;
 }
 </style>

+ 0 - 0
src/game/assets/btn.png → src/game/assets/enter.png


+ 272 - 0
src/game/assets/fire.json

@@ -0,0 +1,272 @@
+{
+	"textures": [
+		{
+			"image": "fire.png",
+			"format": "RGBA8888",
+			"size": {
+				"w": 28,
+				"h": 47
+			},
+			"scale": 1,
+			"frames": [
+				{
+					"filename": "Fire-0.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 0,
+						"w": 7,
+						"h": 12
+					},
+					"frame": {
+						"x": 1,
+						"y": 1,
+						"w": 7,
+						"h": 12
+					}
+				},
+				{
+					"filename": "Fire-2.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 1,
+						"w": 8,
+						"h": 11
+					},
+					"frame": {
+						"x": 1,
+						"y": 15,
+						"w": 8,
+						"h": 11
+					}
+				},
+				{
+					"filename": "Fire-1.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 2,
+						"w": 8,
+						"h": 10
+					},
+					"frame": {
+						"x": 10,
+						"y": 1,
+						"w": 8,
+						"h": 10
+					}
+				},
+				{
+					"filename": "Fire-3.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 2,
+						"w": 8,
+						"h": 10
+					},
+					"frame": {
+						"x": 1,
+						"y": 28,
+						"w": 8,
+						"h": 10
+					}
+				},
+				{
+					"filename": "Fire-11.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 2,
+						"y": 6,
+						"w": 5,
+						"h": 6
+					},
+					"frame": {
+						"x": 1,
+						"y": 40,
+						"w": 5,
+						"h": 6
+					}
+				},
+				{
+					"filename": "Fire-4.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 1,
+						"w": 7,
+						"h": 11
+					},
+					"frame": {
+						"x": 11,
+						"y": 13,
+						"w": 7,
+						"h": 11
+					}
+				},
+				{
+					"filename": "Fire-5.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 1,
+						"w": 7,
+						"h": 11
+					},
+					"frame": {
+						"x": 11,
+						"y": 26,
+						"w": 7,
+						"h": 11
+					}
+				},
+				{
+					"filename": "Fire-10.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 1,
+						"y": 5,
+						"w": 6,
+						"h": 7
+					},
+					"frame": {
+						"x": 11,
+						"y": 39,
+						"w": 6,
+						"h": 7
+					}
+				},
+				{
+					"filename": "Fire-6.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 1,
+						"w": 7,
+						"h": 11
+					},
+					"frame": {
+						"x": 20,
+						"y": 1,
+						"w": 7,
+						"h": 11
+					}
+				},
+				{
+					"filename": "Fire-7.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 2,
+						"w": 7,
+						"h": 10
+					},
+					"frame": {
+						"x": 20,
+						"y": 14,
+						"w": 7,
+						"h": 10
+					}
+				},
+				{
+					"filename": "Fire-8.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 3,
+						"w": 7,
+						"h": 9
+					},
+					"frame": {
+						"x": 20,
+						"y": 26,
+						"w": 7,
+						"h": 9
+					}
+				},
+				{
+					"filename": "Fire-9.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 8,
+						"h": 12
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 4,
+						"w": 7,
+						"h": 8
+					},
+					"frame": {
+						"x": 20,
+						"y": 37,
+						"w": 7,
+						"h": 8
+					}
+				}
+			]
+		}
+	],
+	"meta": {
+		"app": "https://www.codeandweb.com/texturepacker",
+		"version": "3.0",
+		"smartupdate": "$TexturePacker:SmartUpdate:b0d91c9adb88509d0b572ce4c3e0b4c9:bd4ea297fe559af8a00f8112e1b84995:fe85b518f19a08db92d89ee48ba7169f$"
+	}
+}

二进制
src/game/assets/fire.png


+ 145 - 2
src/game/assets/map.json

@@ -81,6 +81,87 @@
          "x":0,
          "y":0
         }, 
+        {
+         "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+         "height":68,
+         "id":7,
+         "name":"fire",
+         "offsetx":13.2519529215706,
+         "offsety":-14.2935110925946,
+         "opacity":1,
+         "type":"tilelayer",
+         "visible":true,
+         "width":68,
+         "x":0,
+         "y":0
+        }, 
         {
          "draworder":"topdown",
          "id":6,
@@ -380,8 +461,8 @@
          "x":0,
          "y":0
         }],
- "nextlayerid":2,
- "nextobjectid":1,
+ "nextlayerid":8,
+ "nextobjectid":9,
  "orientation":"orthogonal",
  "renderorder":"right-down",
  "tiledversion":"1.10.1",
@@ -399,6 +480,68 @@
          "tilecount":2345,
          "tileheight":32,
          "tilewidth":32
+        }, 
+        {
+         "columns":12,
+         "firstgid":2346,
+         "image":"fire.png",
+         "imageheight":12,
+         "imagewidth":96,
+         "margin":0,
+         "name":"fire",
+         "spacing":0,
+         "tilecount":12,
+         "tileheight":12,
+         "tiles":[
+                {
+                 "animation":[
+                        {
+                         "duration":100,
+                         "tileid":0
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":1
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":2
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":3
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":4
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":5
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":6
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":7
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":8
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":9
+                        }, 
+                        {
+                         "duration":100,
+                         "tileid":10
+                        }],
+                 "id":0
+                }],
+         "tilewidth":8
         }],
  "tilewidth":32,
  "type":"map",

+ 104 - 0
src/game/assets/pool.json

@@ -0,0 +1,104 @@
+{
+	"textures": [
+		{
+			"image": "pool.png",
+			"format": "RGBA8888",
+			"size": {
+				"w": 112,
+				"h": 29
+			},
+			"scale": 1,
+			"frames": [
+				{
+					"filename": "上-0.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 32,
+						"h": 73
+					},
+					"spriteSourceSize": {
+						"x": 3,
+						"y": 24,
+						"w": 26,
+						"h": 27
+					},
+					"frame": {
+						"x": 1,
+						"y": 1,
+						"w": 26,
+						"h": 27
+					}
+				},
+				{
+					"filename": "上-1.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 32,
+						"h": 73
+					},
+					"spriteSourceSize": {
+						"x": 3,
+						"y": 24,
+						"w": 26,
+						"h": 27
+					},
+					"frame": {
+						"x": 29,
+						"y": 1,
+						"w": 26,
+						"h": 27
+					}
+				},
+				{
+					"filename": "上-2.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 32,
+						"h": 73
+					},
+					"spriteSourceSize": {
+						"x": 3,
+						"y": 24,
+						"w": 26,
+						"h": 27
+					},
+					"frame": {
+						"x": 57,
+						"y": 1,
+						"w": 26,
+						"h": 27
+					}
+				},
+				{
+					"filename": "上-3.png",
+					"rotated": false,
+					"trimmed": true,
+					"sourceSize": {
+						"w": 32,
+						"h": 73
+					},
+					"spriteSourceSize": {
+						"x": 3,
+						"y": 24,
+						"w": 26,
+						"h": 27
+					},
+					"frame": {
+						"x": 85,
+						"y": 1,
+						"w": 26,
+						"h": 27
+					}
+				}
+			]
+		}
+	],
+	"meta": {
+		"app": "https://www.codeandweb.com/texturepacker",
+		"version": "3.0",
+		"smartupdate": "$TexturePacker:SmartUpdate:c57cd5d25a114c9d70e895fb5dbf1809:41472b483e80c6e595aa5d4e35dfb717:17c1abeeff32c07a23aa06a20c173689$"
+	}
+}

二进制
src/game/assets/pool.png


+ 104 - 0
src/game/assets/tree.json

@@ -0,0 +1,104 @@
+{
+	"textures": [
+		{
+			"image": "tree.png",
+			"format": "RGBA8888",
+			"size": {
+				"w": 164,
+				"h": 34
+			},
+			"scale": 1,
+			"frames": [
+				{
+					"filename": "Front Palm Tree Top 01.png",
+					"rotated": false,
+					"trimmed": false,
+					"sourceSize": {
+						"w": 39,
+						"h": 32
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 0,
+						"w": 39,
+						"h": 32
+					},
+					"frame": {
+						"x": 1,
+						"y": 1,
+						"w": 39,
+						"h": 32
+					}
+				},
+				{
+					"filename": "Front Palm Tree Top 02.png",
+					"rotated": false,
+					"trimmed": false,
+					"sourceSize": {
+						"w": 39,
+						"h": 32
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 0,
+						"w": 39,
+						"h": 32
+					},
+					"frame": {
+						"x": 42,
+						"y": 1,
+						"w": 39,
+						"h": 32
+					}
+				},
+				{
+					"filename": "Front Palm Tree Top 03.png",
+					"rotated": false,
+					"trimmed": false,
+					"sourceSize": {
+						"w": 39,
+						"h": 32
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 0,
+						"w": 39,
+						"h": 32
+					},
+					"frame": {
+						"x": 83,
+						"y": 1,
+						"w": 39,
+						"h": 32
+					}
+				},
+				{
+					"filename": "Front Palm Tree Top 04.png",
+					"rotated": false,
+					"trimmed": false,
+					"sourceSize": {
+						"w": 39,
+						"h": 32
+					},
+					"spriteSourceSize": {
+						"x": 0,
+						"y": 0,
+						"w": 39,
+						"h": 32
+					},
+					"frame": {
+						"x": 124,
+						"y": 1,
+						"w": 39,
+						"h": 32
+					}
+				}
+			]
+		}
+	],
+	"meta": {
+		"app": "https://www.codeandweb.com/texturepacker",
+		"version": "3.0",
+		"smartupdate": "$TexturePacker:SmartUpdate:46d4e2e477fa3abd70657340319a030e:c9c40138ba03293bd056a9c9d56025d0:4e275c72fcbe49e6d6a6cf9ad6765a40$"
+	}
+}

二进制
src/game/assets/tree.png


+ 2 - 2
src/game/game.ts

@@ -3,12 +3,12 @@ import BootScene from '@/game/scenes/BootScene'
 import PlayScene from '@/game/scenes/PlayScene'
 
 function launch(containerId: string) {
-
     return new Phaser.Game({
         type: Phaser.CANVAS,
         width: 2172,
         height: 3000,
         parent: containerId,
+        backgroundColor: '#090A20',
         physics: {
             default: 'arcade',
             arcade: {
@@ -22,7 +22,7 @@ function launch(containerId: string) {
             width: 2172,
             height: 2400
         },
-        scene: [BootScene, PlayScene],
+        scene: [BootScene, PlayScene]
     })
 }
 

+ 11 - 0
src/game/scenes/BootScene.ts

@@ -6,6 +6,10 @@ import bg from '@/game/assets/bg.png'
 import castle from '@/game/assets/castle.png'
 import atlas from '@/game/assets/atlas.json'
 import castleMap from '@/game/assets/map.json'
+import enter from '@/game/assets/enter.png'
+import fire from '@/game/assets/fire.png'
+import fireJson from '@/game/assets/fire.json'
+import { emitter } from '@/plugins'
 export default class BootScene extends Scene {
     constructor() {
         super({ key: 'BootScene' })
@@ -14,10 +18,17 @@ export default class BootScene extends Scene {
     preload() {
         this.load.image('bg', bg)
         this.load.image('castle', castle)
+        this.load.image('enter', enter)
         this.load.atlas('Isabella_Rodriguez', Isabella_Rodriguez, atlas)
         this.load.atlas('Tamara_Taylor', Tamara_Taylor, atlas)
         this.load.atlas('Arthur_Burton', Arthur_Burton, atlas)
+        this.load.atlas('fire', fire, fireJson)
         this.load.tilemapTiledJSON('castleMap', castleMap)
+
+        this.load.on('complete', () => {
+            emitter.emit('completeGame')
+            // progressBar.destroy();
+        })
     }
 
     create() {

+ 42 - 5
src/game/scenes/PlayScene.ts

@@ -32,6 +32,7 @@ export default class PlayScene extends Scene {
     private walker: any
     private person1: any
     private map: any
+    private enterBtn: any
     private anims_direction = {
         Isabella_Rodriguez: 'l',
         Tamara_Taylor: 'l'
@@ -93,7 +94,6 @@ export default class PlayScene extends Scene {
             tileWidth: 32,
             tileHeight: 32
         })
-
         const castle = this.map.addTilesetImage('castle', 'castle')
         this.map.createLayer('castle', castle, 0, 0)
         const objects = [...this.map.objects]
@@ -101,6 +101,9 @@ export default class PlayScene extends Scene {
                 return obj.objects
             })
             .flat()
+        objects.forEach((obj: any) => {
+            this.add.text(obj.x, obj.y, obj.name, { fontSize: 30 })
+        })
         this.personInfo.Arthur_Burton.paths = objects.map((obj: any) => {
             return {
                 postion: {
@@ -111,6 +114,17 @@ export default class PlayScene extends Scene {
             }
         })
 
+        this.anims.create({
+            key: 'firePlay',
+            frames: 'fire',
+            frameRate: 10,
+            repeat: -1
+        })
+        const fire1 = this.add.sprite(685, 1510, 'fire', 'firePlay').setScale(3)
+        fire1.play('firePlay')
+        const fire2 = this.add.sprite(1490, 1510, 'fire', 'firePlay').setScale(3)
+        fire2.play('firePlay')
+
         const anims = this.anims
         Object.keys(this.personInfo).forEach((key: string) => {
             const left_walk_name = key + '-left-walk'
@@ -130,7 +144,7 @@ export default class PlayScene extends Scene {
                     end: 3,
                     zeroPad: 3
                 }),
-                frameRate: 4,
+                frameRate: 6,
                 repeat: -1
             })
 
@@ -142,7 +156,7 @@ export default class PlayScene extends Scene {
                     end: 3,
                     zeroPad: 3
                 }),
-                frameRate: 4,
+                frameRate: 6,
                 repeat: -1
             })
 
@@ -154,7 +168,7 @@ export default class PlayScene extends Scene {
                     end: 3,
                     zeroPad: 3
                 }),
-                frameRate: 4,
+                frameRate: 6,
                 repeat: -1
             })
 
@@ -166,7 +180,7 @@ export default class PlayScene extends Scene {
                     end: 3,
                     zeroPad: 3
                 }),
-                frameRate: 4,
+                frameRate: 6,
                 repeat: -1
             })
             info['sprite'] = this.add.sprite(path.postion.x, path.postion.y, key, direction).setScale(3)
@@ -187,6 +201,29 @@ export default class PlayScene extends Scene {
                     break
             }
         })
+
+        //朋友圈跳转入口
+        this.enterBtn = this.add.image(1100, 158, 'enter')
+        const key = this.add.image(-200, 200, 'enter', 'simple-key-gold')
+        this.tweens.chain({
+            targets: this.enterBtn,
+            tweens: [
+                {
+                    y: 1700,
+                    scale: 1.2,
+                    duration: 300,
+                    ease: 'quad.out'
+                },
+                {
+                    y: 1800,
+                    scale: 1,
+                    duration: 1000,
+                    ease: 'bounce.out'
+                }
+            ],
+            loop: -1,
+            loopDelay: 300
+        })
     }
 
     update() {

+ 4 - 2
src/main.ts

@@ -46,10 +46,12 @@ const loadSplash = (onload?: any, onerror?: any) =>
         function hideSplash() {
             if (isHide) return
             isHide = true
-            if (splash) {
+            if (splash && !splash.hasAttribute('isHold')) {
                 splash.style.opacity = '0'
                 setTimeout(() => {
-                    splash.style.display = 'none'
+                    if (!splash.hasAttribute('isHold')) {
+                        splash.style.display = 'none'
+                    }
                 }, 800)
             }
             resolve('')

+ 12 - 1
src/views/page/HomeView1.vue

@@ -1,9 +1,20 @@
 <template>
-    <game />
+    <div class="h-full bg-[#090A20]">
+        <game />
+    </div>
 </template>
 <script setup lang="ts">
 import robot1Img from '@/assets/robot1.gif'
 import Game from '@/components/game/Game.vue'
+import { onMounted } from 'vue'
+onMounted(() => {
+    const splash = document.getElementById('splash-screen')
+    if (splash) {
+        splash.setAttribute('isHold', 'true')
+        splash.style.opacity = '1'
+        splash.style.display = 'block'
+    }
+})
 </script>
 
 <style lang="less" scoped>