Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
elephant
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
elephant
Commits
8b31d1a6
Commit
8b31d1a6
authored
Feb 02, 2024
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: use bundle load new skin
parent
307de46b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
4 deletions
+2
-4
elephant.ts
assets/elephant/scene/elephant.ts
+0
-2
shop.ts
assets/elephant/scene/model/shop.ts
+1
-1
pg.ts
assets/elephant/scene/pg.ts
+1
-1
No files found.
assets/elephant/scene/elephant.ts
View file @
8b31d1a6
...
...
@@ -490,7 +490,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
icon
=
pg
.
view
.
find
(
item
,
"
bg_food/icon
"
);
let
discount
=
pg
.
view
.
find
(
item
,
"
bg_food/discount
"
);
let
btn_buy
=
pg
.
view
.
find
(
item
,
"
bg_food/btn_buy
"
);
if
(([
ITEM_TYPE
.
HOUSE
,
ITEM_TYPE
.
CLOTHES
].
includes
(
data
.
type
))
&&
(
data
as
HouseItem
).
num
>
0
)
{
let
own
=
pg
.
view
.
find
(
item
,
"
bg_food/own
"
);
pg
.
view
.
visible
(
own
,
true
);
...
...
@@ -619,7 +618,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
updateChickenItem
(
item
,
data
:
Item
)
{
// console.log(data);
item
.
active
=
true
;
let
growth
=
pg
.
view
.
find
(
item
,
"
growth
"
);
let
name
=
pg
.
view
.
find
(
item
,
"
name
"
);
...
...
assets/elephant/scene/model/shop.ts
View file @
8b31d1a6
...
...
@@ -26,7 +26,7 @@ class Shop {
return
this
.
_list
.
filter
(
li
=>
{
return
li
.
type
==
type
&&
!
[
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
,
29
,
30
].
includes
(
li
.
id
);
}).
map
(
li
=>
{
if
(
li
.
type
==
ITEM_TYPE
.
FOOD
)
{
if
(
li
.
type
==
ITEM_TYPE
.
HOUSE
)
{
return
{...
li
,
num
:
(
house
.
has
(
li
.
id
)
?
1
:
0
)}
}
if
(
li
.
type
==
ITEM_TYPE
.
CLOTHES
)
{
...
...
assets/elephant/scene/pg.ts
View file @
8b31d1a6
...
...
@@ -353,7 +353,7 @@ let pg = {
// if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture));
// resolve(texture);
// });
console
.
log
(
'
loadNetImg
'
,
url
)
//
console.log('loadNetImg', url)
if
(
url
&&
typeof
url
==
'
string
'
)
{
if
(
url
.
startsWith
(
'
http
'
))
{
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
texture
)
=>
{
...
...
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