fix: enemy not active when appear

feature/ads-smart-display
tiendat3699 2024-06-20 09:46:35 +07:00
parent 97b8288c61
commit 4d25d06a38
4 changed files with 18 additions and 5 deletions

View File

@ -15226,7 +15226,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 1080,
"width": 1400,
"height": 2340
},
"_anchorPoint": {

View File

@ -118,6 +118,9 @@ export class Enemy extends Component {
.set(Vec3.ONE)
.to(0.1, new Vec3(1.2, 1.2), { easing: 'backInOut' })
.to(0.5, Vec3.ONE, { easing: 'backOut' })
.call(() => {
if (!this._isActive) this._isActive = true;
})
.start();
}
@ -131,9 +134,9 @@ export class Enemy extends Component {
.delay(1)
.to(0.5, Vec3.ONE, {
easing: 'backOut',
onComplete: () => {
})
.call(() => {
this._isActive = true;
},
})
.start();
}

BIN
settings/Asset 3@4x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -1,3 +1,13 @@
{
"__version__": "1.3.7"
"__version__": "1.3.7",
"splash-setting": {
"logo": {
"image": "project://settings/Asset 3@4x.png",
"type": "custom"
},
"displayRatio": 2,
"background": {
"type": "default"
}
}
}