lzj500 пре 1 година
родитељ
комит
5692f58e53
3 измењених фајлова са 25 додато и 12 уклоњено
  1. 2 2
      game_test1/src/libs/game1/Game.ts
  2. 3 3
      game_test1/src/pages.json
  3. 20 7
      game_test1/src/pages/index/index.vue

+ 2 - 2
game_test1/src/libs/game1/Game.ts

@@ -30,7 +30,7 @@ let stepArray = [
 	{ x: 430, y: 320, bomX: 460, bomY: 280, position: -1, bomShow: true, workLong: 3000, step: 13 },
 	{ x: 560, y: 200, bomX: 460, bomY: 180, position: -1, bomShow: true, workLong: 2000, step: 14 },
 	{ x: 560, y: 100, bomX: 730, bomY: 80, position: -1, bomShow: true, workLong: 1000, step: 15 },
-	{ x: 860, y: 30, bomX: 830, bomY: 80, position: -1, bomShow: false, workLong: 3000, step: 16 }
+	{ x: 860, y: 30, bomX: 830, bomY: 80, position: -1, bomShow: true, workLong: 3000, step: 16 }
 ];
 class Game {
 	private stage: any;
@@ -190,7 +190,7 @@ class Game {
 		this.man.x = stepArray[0].x;
 		this.man.y = stepArray[0].y;
 		this.man.scaleX = 0.5 * stepArray[0].position;
-		this.goStep(7);
+		this.goStep(1);
 		console.log("#debug#🚀 ~ file: Game.ts:181 ~ Game ~ 结束动画 ");
 	}
 	async goStep(step: number) {

+ 3 - 3
game_test1/src/pages.json

@@ -1,13 +1,13 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/hilo/index1"
+			"path": "pages/index/index"
 		},
 		{
-			"path": "pages/hilo/index"
+			"path": "pages/hilo/index1"
 		},
 		{
-			"path": "pages/index/index"
+			"path": "pages/hilo/index"
 		}
 	],
 	"globalStyle": {

+ 20 - 7
game_test1/src/pages/index/index.vue

@@ -1,14 +1,27 @@
 <template>
-  <view class="content">
-    <view class="p20 fs40 text_color_link" @click="Page.goto('/pages/hilo/index')">演示1</view>
-  </view>
+	<view class="content">
+		<view class="p40 tc fs40">红军长征动画DEMO</view>
+		<view class="pl40 pr40 pt15 pb15 fs40 bds_t bds_b dis_flex_align_between_center center" @click="Page.goto('/pages/hilo/index')">
+			<view>
+				<view class="fs32 text_color_link">版本1</view>
+				<view class="fs24 mt10 text_color_tips">手动控制</view>
+			</view>
+			<u-icon name="arrow-right" color="#999999"></u-icon>
+		</view>
+		<view class="pl40 pr40 pt15 pb15 fs40 bds_t bds_b dis_flex_align_between_center center" @click="Page.goto('/pages/hilo/index1')">
+			<view>
+				<view class="fs32 text_color_link">版本2</view>
+				<view class="fs24 mt10 text_color_tips">预设动画,地图放大,镜头随主人公移动</view>
+			</view>
+			<u-icon name="arrow-right" color="#999999"></u-icon>
+		</view>
+	</view>
 </template>
 
 <script setup lang="ts">
-import { ref } from 'vue'
+import { ref } from "vue";
 import Page from "@/libs/pages/Page";
-const title = ref('Hello')
+const title = ref("Hello");
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>