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
6e7ab706
Commit
6e7ab706
authored
Feb 01, 2024
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: 123
parent
a8dc2e13
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
18 deletions
+63
-18
elephant.fire
assets/elephant/scene/elephant.fire
+4
-1
elephant.ts
assets/elephant/scene/elephant.ts
+0
-1
pengpeng.ts
assets/elephant/scene/pengpeng.ts
+4
-2
pg.ts
assets/elephant/scene/pg.ts
+17
-12
cover.png
assets/elephant/textures/ani/cover.png
+0
-0
cover.png.meta
assets/elephant/textures/ani/cover.png.meta
+36
-0
eating_tex.png.meta
assets/elephant/textures/ani/eating/eating_tex.png.meta
+1
-1
walkinghungryhappy_tex.png.meta
...es/ani/walkinghungryhappy/walkinghungryhappy_tex.png.meta
+1
-1
No files found.
assets/elephant/scene/elephant.fire
View file @
6e7ab706
...
...
@@ -7628,7 +7628,7 @@
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha":
fals
e,
"premultipliedAlpha":
tru
e,
"_armatureKey": "7a783421-6db0-47e9-a39a-c825dd0e27a4#e9ae3350-11dc-4713-b44a-339c5b1a133f",
"_accTime": 0,
"_playCount": 0,
...
...
@@ -7748,6 +7748,9 @@
"__id__": 163
},
"_enabled": true,
"defaultCover": {
"__uuid__": "97b97a55-719c-48ff-81e0-269363ee147c"
},
"_id": "bbaF/xfq1D4ZUceYJYzAlJ"
},
{
...
...
assets/elephant/scene/elephant.ts
View file @
6e7ab706
...
...
@@ -310,7 +310,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
updateMyHouseItem
(
item
,
data
:
HouseItem
)
{
item
.
active
=
true
;
let
icon
=
pg
.
view
.
find
(
item
,
"
icon
"
);
let
current
=
pg
.
view
.
find
(
item
,
"
current
"
);
pg
.
view
.
setNetImg
(
icon
,
data
.
cover
,
true
);
...
...
assets/elephant/scene/pengpeng.ts
View file @
6e7ab706
...
...
@@ -12,6 +12,8 @@ import pg from "./pg";
@
ccclass
export
default
class
PengPeng
extends
cc
.
Component
{
// LIFE-CYCLE CALLBACKS:
@
property
({
type
:
cc
.
SpriteFrame
})
defaultCover
:
cc
.
SpriteFrame
|
null
=
null
// onLoad () {}
...
...
@@ -39,8 +41,8 @@ export default class PengPeng extends cc.Component {
const
eatArmatureName
=
eatDragonDisplay
.
armatureName
;
console
.
log
(
'
this.defaultCover.getTexture()
'
,
this
.
defaultCover
.
getTexture
())
dress
.
defaultSkin
.
cover
=
this
.
defaultCover
.
getTexture
();
dress
.
defaultSkin
.
meta_value
.
walk
.
tex_png
=
null
;
dress
.
defaultSkin
.
meta_value
.
walk
.
ske_json
=
walkAsset
dress
.
defaultSkin
.
meta_value
.
walk
.
tex_json
=
walkAtlasAsset
...
...
assets/elephant/scene/pg.ts
View file @
6e7ab706
...
...
@@ -139,8 +139,9 @@ let pg = {
node
.
active
=
false
;
return
pg
.
logger
.
w
(
"
图片更换失败,传入了错误的res
"
);
}
if
(
!
node
)
return
pg
.
logger
.
w
(
"
图片更换失败,传入了错误的item
"
);
if
(
cache
&&
node
.
net_url
==
res
)
return
;
if
(
cache
&&
typeof
res
==
'
string
'
&&
node
.
net_url
==
res
)
return
;
let
w
=
node
.
width
;
let
h
=
node
.
height
;
node
.
active
=
false
;
//
...
...
@@ -322,7 +323,8 @@ let pg = {
// if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture));
// resolve(texture);
// });
if
(
url
&&
typeof
url
==
'
string
'
&&
url
.
startsWith
(
'
http
'
))
{
if
(
url
&&
typeof
url
==
'
string
'
)
{
if
(
url
.
startsWith
(
'
http
'
))
{
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
texture
)
=>
{
if
(
err
&&
!
texture
)
return
resolve
(
pg
.
logger
.
w
(
'
loading loadNetImg warn->
'
+
texture
));
resolve
(
texture
);
...
...
@@ -335,6 +337,9 @@ let pg = {
resolve
(
texture
);
});
}
}
else
{
resolve
(
url
);
}
})
},
loadAsset
:
async
function
(
url
,
option
)
{
...
...
assets/elephant/textures/ani/cover.png
0 → 100644
View file @
6e7ab706
8.5 KB
assets/elephant/textures/ani/cover.png.meta
0 → 100644
View file @
6e7ab706
{
"ver": "2.3.5",
"uuid": "5512a68c-2fab-403b-b0ff-2a9c4694d147",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 160,
"height": 183,
"platformSettings": {},
"subMetas": {
"cover": {
"ver": "1.0.4",
"uuid": "97b97a55-719c-48ff-81e0-269363ee147c",
"rawTextureUuid": "5512a68c-2fab-403b-b0ff-2a9c4694d147",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": -7,
"trimX": 13,
"trimY": 26,
"width": 133,
"height": 145,
"rawWidth": 160,
"rawHeight": 183,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/elephant/textures/ani/eating/eating_tex.png.meta
View file @
6e7ab706
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 512,
...
...
assets/elephant/textures/ani/walkinghungryhappy/walkinghungryhappy_tex.png.meta
View file @
6e7ab706
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 256,
...
...
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