Commit d92410fa authored by haiyoucuv's avatar haiyoucuv

init

parent b4a72beb
......@@ -10,6 +10,10 @@ export class Game extends Container {
initUI() {
const bg = this.addChild(new Sprite(Assets.get("招财猫_底.png")));
bg.position.set(168, 332);
const top = this.addChild(new Sprite(Assets.get("招财猫_叠.png")));
top.position.set(168, 332);
this.on("pointerdown", this.onPointerDown, this);
this.on("pointerup", this.onPointerUp, this);
......
......@@ -15,4 +15,30 @@
height: 1000px;
touch-action: auto !important;
}
.handSvga {
position: absolute;
left: 100px;
top: 520px;
width: 201px;
height: 292px;
touch-action: auto !important;
}
.credits {
position: absolute;
left: 0;
top: 880px;
width: 750px;
font-size: 26px;
text-align: center;
color: #6f243d;
span {
color: #f3304a;
font-weight: bold;
}
}
}
......@@ -8,6 +8,9 @@ import { Application, Assets, Ticker } from "pixi.js";
import { Game } from "@/pages/HomePage/Top/Game.ts";
import { initBundle } from "@/pages/HomePage/Top/Helper.ts";
import { Tween } from "@/core/tween";
import { SvgaPlayer } from "@grace/svgaplayer";
import handSvga from "@/assets/svga/3牌子转动.svga";
export function getApp(): Application {
return window["__app"];
......@@ -79,6 +82,8 @@ class Top extends React.Component<any, any> {
const {} = store.indexData
return <div className={styles.top} ref={(el) => this.gameDiv = el}>
<canvas className={styles.gameCanvas} ref={(el) => this.gameCanvas = el}/>
<SvgaPlayer className={styles.handSvga} src={handSvga}/>
<div className={styles.credits}>积分:<span>200</span>/300</div>
</div>;
}
}
......
......@@ -4,7 +4,6 @@ import { preload } from "@/core/preload.ts";
import styles from "./LoadingDemo.module.less";
import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import HomePage from "@/pages/HomePage/HomePage.tsx";
import { waitTime } from "@/utils/utils.ts";
import { initBundle } from "@/pages/HomePage/Top/Helper.ts";
import { Assets } from "pixi.js";
......
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