Commit bf527327 authored by haiyoucuv's avatar haiyoucuv

init

parent 015df223
......@@ -19,6 +19,14 @@
background-position: top center;
background-color: #fff2e4;
.homeSvga{
position: absolute;
left: 53px;
top: 78px;
width: 644px;
height: 665px;
}
.credits {
position: absolute;
left: 37px;
......
......@@ -16,6 +16,10 @@ import SignSucPanel from "@/panels/SignSucPanel/SignSucPanel.tsx";
import WedExpPanel from "@/panels/WedExpPanel/WedExpPanel.tsx";
import SkyFullGoldPanel from "@/panels/SkyFullGoldPanel/SkyFullGoldPanel.tsx";
import Top from "@/pages/HomePage/Top/Top.tsx";
import { SvgaPlayer } from "@grace/svgaplayer";
import lightSvga from "@/assets/svga/5光点飘散.svga";
@observer
......@@ -44,6 +48,8 @@ class HomePage extends React.Component<any, any> {
<Top/>
<SvgaPlayer className="homeSvga" src={lightSvga}/>
<Sign/>
<Check/>
......
......@@ -9,23 +9,44 @@ export class Game extends Container {
this.initUI();
}
fullAni: AnimatedSprite;
dropAni: AnimatedSprite;
initUI() {
const bg = this.addChild(new Sprite(Assets.get("招财猫_底.png")));
bg.position.set(168, 332);
const textures = new Array(300).fill(0).map((_, i) => {
const fullTextures = new Array(300).fill(0).map((_, i) => {
return Assets.get(`落金币/落金币_${prefixInteger(i, 5)}.png`);
});
const as = this.addChild(new AnimatedSprite(textures));
as.scale.set(0.66, 0.66);
as.anchor.set(0.5);
as.position.set(375, 553);
as.loop = false;
as.play();
const fullAni = this.fullAni = this.addChild(new AnimatedSprite(fullTextures));
fullAni.scale.set(0.66, 0.66);
fullAni.anchor.set(0.5);
fullAni.position.set(375, 553);
fullAni.loop = false;
fullAni.play();
const dropTextures = new Array(300).fill(0).map((_, i) => {
return Assets.get(`撒金币/撒金币_${prefixInteger(i, 5)}.png`);
});
const dropAni = this.dropAni = this.addChild(new AnimatedSprite(dropTextures));
dropAni.scale.set(0.66, 0.66);
dropAni.anchor.set(0.5);
dropAni.position.set(375, 339);
dropAni.loop = true;
dropAni.play();
// this.dropAni.visible = false;
const top = this.addChild(new Sprite(Assets.get("招财猫_叠.png")));
top.position.set(168, 332);
// top.alpha = 0.7;
const smile = this.addChild(new Sprite(Assets.get("表情_微笑.png")));
smile.anchor.set(0.5);
smile.scale.set(0.66, 0.66);
smile.position.set(378, 564);
this.on("pointerdown", this.onPointerDown, this);
this.on("pointerup", this.onPointerUp, this);
......
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