Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-libs
Commits
06309eb6
Commit
06309eb6
authored
Jun 30, 2020
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5555555
parent
55cac8e5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
+38
-5
.DS_Store
dist/.DS_Store
+0
-0
main.js
src/custom/rockji/debug/main.js
+15
-2
main.js.map
src/custom/rockji/debug/main.js.map
+1
-1
GameView.ts
src/custom/rockji/src/game/GameView.ts
+22
-2
No files found.
dist/.DS_Store
View file @
06309eb6
No preview for this file type
src/custom/rockji/debug/main.js
View file @
06309eb6
...
...
@@ -38,7 +38,7 @@
this
.
viewContainer
.
width
=
props
.
viewWidth
;
this
.
viewContainer
.
height
=
props
.
viewHeight
;
this
.
bgImg
=
new
engine
.
Image
();
this
.
bgImg
.
source
=
engine
.
getAssetByName
(
"rock-背景"
).
url
;
this
.
bgImg
.
source
=
getAssetByName
(
"rock-背景"
).
url
;
this
.
viewContainer
.
addChild
(
this
.
bgImg
);
this
.
container0
=
new
engine
.
Container
();
this
.
container1
=
new
engine
.
Container
();
...
...
@@ -148,7 +148,20 @@
}
}
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
this
.
itemInfo
[
"items"
+
i
][
1
].
texture
=
engine
.
Texture
.
fromImage
(
this
.
getPrizeUrl
(
this
.
prizeId
));
var
p
=
this
.
itemInfo
[
"items"
+
i
][
1
].
parent
;
p
.
removeChild
(
this
.
itemInfo
[
"items"
+
i
][
1
]);
var
ix
=
this
.
itemInfo
[
"items"
+
i
][
1
].
x
;
var
iy
=
this
.
itemInfo
[
"items"
+
i
][
1
].
y
;
var
iw
=
this
.
itemInfo
[
"items"
+
i
][
1
].
width
;
var
ih
=
this
.
itemInfo
[
"items"
+
i
][
1
].
height
;
var
nItem
=
new
engine
.
Sprite
();
nItem
.
texture
=
engine
.
Texture
.
fromImage
(
this
.
getPrizeUrl
(
this
.
prizeId
));
this
.
itemInfo
[
"items"
+
i
][
1
]
=
nItem
;
nItem
.
x
=
ix
;
nItem
.
y
=
iy
;
nItem
.
width
=
iw
;
nItem
.
height
=
ih
;
p
.
addChild
(
nItem
);
}
};
GameView
.
prototype
.
getPrizeUrl
=
function
(
pid
)
{
...
...
src/custom/rockji/debug/main.js.map
View file @
06309eb6
This diff is collapsed.
Click to expand it.
src/custom/rockji/src/game/GameView.ts
View file @
06309eb6
...
...
@@ -138,7 +138,7 @@ export default class GameView extends engine.Container {
// this.bgImg = new engine.Sprite(getTextureByName('rock-背景'));
this
.
bgImg
=
new
engine
.
Image
();
this
.
bgImg
.
source
=
engine
.
getAssetByName
(
"rock-背景"
).
url
;
this
.
bgImg
.
source
=
getAssetByName
(
"rock-背景"
).
url
;
this
.
viewContainer
.
addChild
(
this
.
bgImg
);
this
.
container0
=
new
engine
.
Container
();
...
...
@@ -285,7 +285,27 @@ export default class GameView extends engine.Container {
for
(
let
i
=
0
;
i
<
3
;
i
++
){
// this.prizeId = "sss_3";
this
.
itemInfo
[
"items"
+
i
][
1
].
texture
=
engine
.
Texture
.
fromImage
(
this
.
getPrizeUrl
(
this
.
prizeId
));
// this.itemInfo["items" + i][1].texture = engine.Texture.fromImage(this.getPrizeUrl(this.prizeId));
let
p
=
this
.
itemInfo
[
"items"
+
i
][
1
].
parent
;
p
.
removeChild
(
this
.
itemInfo
[
"items"
+
i
][
1
]);
let
ix
=
this
.
itemInfo
[
"items"
+
i
][
1
].
x
;
let
iy
=
this
.
itemInfo
[
"items"
+
i
][
1
].
y
;
let
iw
=
this
.
itemInfo
[
"items"
+
i
][
1
].
width
;
let
ih
=
this
.
itemInfo
[
"items"
+
i
][
1
].
height
;
let
nItem
=
new
engine
.
Sprite
();
nItem
.
texture
=
engine
.
Texture
.
fromImage
(
this
.
getPrizeUrl
(
this
.
prizeId
));
this
.
itemInfo
[
"items"
+
i
][
1
]
=
nItem
;
nItem
.
x
=
ix
;
nItem
.
y
=
iy
;
nItem
.
width
=
iw
;
nItem
.
height
=
ih
;
p
.
addChild
(
nItem
);
// this.itemInfo["items" + i][1].source = this.getPrizeUrl(this.prizeId);
}
...
...
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