Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kww_dayDayGetCredits_250512
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
kww_dayDayGetCredits_250512
Commits
d92410fa
Commit
d92410fa
authored
May 13, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
b4a72beb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
1 deletion
+35
-1
Game.ts
src/pages/HomePage/Top/Game.ts
+4
-0
Top.module.less
src/pages/HomePage/Top/Top.module.less
+26
-0
Top.tsx
src/pages/HomePage/Top/Top.tsx
+5
-0
LoadingDemo.tsx
src/pages/LoadingDemo/LoadingDemo.tsx
+0
-1
No files found.
src/pages/HomePage/Top/Game.ts
View file @
d92410fa
...
...
@@ -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
);
...
...
src/pages/HomePage/Top/Top.module.less
View file @
d92410fa
...
...
@@ -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;
}
}
}
src/pages/HomePage/Top/Top.tsx
View file @
d92410fa
...
...
@@ -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
>;
}
}
...
...
src/pages/LoadingDemo/LoadingDemo.tsx
View file @
d92410fa
...
...
@@ -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"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment