feat: apply new effect
parent
708207daee
commit
caf9371c1e
|
@ -462,7 +462,7 @@
|
|||
"__id__": 22
|
||||
},
|
||||
"_hitSound": null,
|
||||
"_score": 5,
|
||||
"_score": 2,
|
||||
"_bonusTime": 0,
|
||||
"_id": ""
|
||||
},
|
||||
|
|
|
@ -462,7 +462,7 @@
|
|||
"__id__": 22
|
||||
},
|
||||
"_hitSound": null,
|
||||
"_score": 10,
|
||||
"_score": 5,
|
||||
"_bonusTime": 0,
|
||||
"_id": ""
|
||||
},
|
||||
|
|
|
@ -462,7 +462,7 @@
|
|||
"__id__": 22
|
||||
},
|
||||
"_hitSound": null,
|
||||
"_score": 10,
|
||||
"_score": 5,
|
||||
"_bonusTime": 0,
|
||||
"_id": ""
|
||||
},
|
||||
|
|
|
@ -462,7 +462,7 @@
|
|||
"__id__": 22
|
||||
},
|
||||
"_hitSound": null,
|
||||
"_score": 5,
|
||||
"_score": 2,
|
||||
"_bonusTime": 0,
|
||||
"_id": ""
|
||||
},
|
||||
|
|
|
@ -462,7 +462,7 @@
|
|||
"__id__": 22
|
||||
},
|
||||
"_hitSound": null,
|
||||
"_score": 30,
|
||||
"_score": 10,
|
||||
"_bonusTime": 0,
|
||||
"_id": ""
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "6f6d70c4-5527-4dd1-a490-84762c9dcea5",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "Vital_Garden_SecretBooster_flip_card"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "eeda07af-bf30-40b9-a951-a743e45f44e4",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "Vital_Garden_SecretBooster_free_reward"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "8895126c-cc00-4de6-9d61-66dac3208592",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "Vital_Garden_SecretBooster_lucky_chain"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "a0b8c1da-2679-4633-94ab-6043f19c420b",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "Vital_Garden_SecretBooster_lucky_wheel"
|
||||
}
|
||||
}
|
|
@ -29733,7 +29733,7 @@
|
|||
"__type__": "weightedBooster",
|
||||
"boosterType": 1,
|
||||
"prefab": {
|
||||
"__uuid__": "fd465778-69b4-4cf8-9be2-48528a561b58",
|
||||
"__uuid__": "6f6d70c4-5527-4dd1-a490-84762c9dcea5",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"weight": 10,
|
||||
|
@ -29745,7 +29745,7 @@
|
|||
"__type__": "weightedBooster",
|
||||
"boosterType": 4,
|
||||
"prefab": {
|
||||
"__uuid__": "3aaaa833-5e70-4ec2-9480-47180250bb9d",
|
||||
"__uuid__": "eeda07af-bf30-40b9-a951-a743e45f44e4",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"weight": 10,
|
||||
|
@ -29757,7 +29757,7 @@
|
|||
"__type__": "weightedBooster",
|
||||
"boosterType": 3,
|
||||
"prefab": {
|
||||
"__uuid__": "a0154013-d559-4ebd-9c19-e549f8759829",
|
||||
"__uuid__": "8895126c-cc00-4de6-9d61-66dac3208592",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"weight": 10,
|
||||
|
@ -29769,7 +29769,7 @@
|
|||
"__type__": "weightedBooster",
|
||||
"boosterType": 2,
|
||||
"prefab": {
|
||||
"__uuid__": "c4569dbe-f865-41fd-9cb9-d2be403e5c52",
|
||||
"__uuid__": "a0b8c1da-2679-4633-94ab-6043f19c420b",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"weight": 10,
|
||||
|
@ -34895,7 +34895,7 @@
|
|||
"y": -1200,
|
||||
"z": 0
|
||||
},
|
||||
"_timePlay": 120,
|
||||
"_timePlay": 20,
|
||||
"_clockIcon": {
|
||||
"__uuid__": "f7bd5166-9d5f-4d43-a3d3-58ae9a4957fc@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
|
|
|
@ -70,10 +70,6 @@ export class Enemy extends Component {
|
|||
this._collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
}
|
||||
|
||||
protected start(): void {
|
||||
this.init();
|
||||
}
|
||||
|
||||
private async init() {
|
||||
this._collider.node.setWorldPosition(this._patrolPoint1.worldPosition);
|
||||
const pos = this._patrolPoint1.getWorldPosition();
|
||||
|
@ -83,7 +79,6 @@ export class Enemy extends Component {
|
|||
this._direction = this._patrolPoint1.worldPosition.x < this._patrolPoint2.worldPosition.x ? 1 : -1;
|
||||
this._processDistance = 0;
|
||||
this._currentGoal = 0;
|
||||
this._isActive = false;
|
||||
this._collider.setNodeActive(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -122,17 +122,17 @@ export default class GachaManager extends Singleton<GachaManager>() {
|
|||
}
|
||||
|
||||
public async getReward(): Promise<RewardConfig> {
|
||||
if (!EDITOR && !PREVIEW) {
|
||||
try {
|
||||
const rw = await P4PSDK.spinGacha(this.gachaId);
|
||||
this._reward = this.rewards.find((r) => r.id == rw.id);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
this._reward = this.getRandomReward();
|
||||
}
|
||||
// if (!EDITOR && !PREVIEW) {
|
||||
// try {
|
||||
// const rw = await P4PSDK.spinGacha(this.gachaId);
|
||||
// this._reward = this.rewards.find((r) => r.id == rw.id);
|
||||
// } catch (error) {
|
||||
// console.log(error);
|
||||
// return null;
|
||||
// }
|
||||
// } else {
|
||||
// }
|
||||
this._reward = this.getRandomReward();
|
||||
return this._reward;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ export class GameManager extends Singleton<GameManager>() {
|
|||
opts?: { scaleMin?: number; scaleMax?: number; duration?: number },
|
||||
) {
|
||||
this._score += score;
|
||||
P4PSDK.updateScore(score);
|
||||
P4PSDK.updateScore(this.score);
|
||||
const floatingScore = this._floatingScoreFactory.create(this._topContainer);
|
||||
if (position) {
|
||||
floatingScore.show(
|
||||
|
@ -168,7 +168,7 @@ export class GameManager extends Singleton<GameManager>() {
|
|||
this._isWaitingUpdateScore = true;
|
||||
await Utils.waitUntil(predicate);
|
||||
this._score += score;
|
||||
P4PSDK.updateScore(score);
|
||||
P4PSDK.updateScore(this.score);
|
||||
const floatingScore = this._floatingScoreFactory.create(this._topContainer);
|
||||
floatingScore.show(`+${score}`, position, score >= 100 ? opts.scaleMax : opts.scaleMin, opts.duration);
|
||||
EventManger.instance.emit(GameEvent.Score, [this._score, score, type, position]);
|
||||
|
|
|
@ -51,7 +51,7 @@ export class GameOverPanel extends Component {
|
|||
protected onEnable(): void {
|
||||
this._ticketMinus.string = '-' + P4PSDK.getTicketNeedToContinue().toString();
|
||||
const currentScore = P4PSDK.getLatestScore();
|
||||
const gameScore = GameManager.instance.score;
|
||||
const gameScore = P4PSDK.getGameScore();
|
||||
this.topScore.string = P4PSDK.getTopScore().toString();
|
||||
this.yourScore.string = currentScore.toString();
|
||||
this.playCollectEffect(gameScore, currentScore);
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "c1fcbeb9-4e1f-4e2e-94f1-37863a9c2822",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "c1fcbeb9-4e1f-4e2e-94f1-37863a9c2822@6c48a",
|
||||
"displayName": "Box",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "c1fcbeb9-4e1f-4e2e-94f1-37863a9c2822",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "c1fcbeb9-4e1f-4e2e-94f1-37863a9c2822@f9941",
|
||||
"displayName": "Box",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 164,
|
||||
"height": 156,
|
||||
"rawWidth": 164,
|
||||
"rawHeight": 156,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-82,
|
||||
-78,
|
||||
0,
|
||||
82,
|
||||
-78,
|
||||
0,
|
||||
-82,
|
||||
78,
|
||||
0,
|
||||
82,
|
||||
78,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
156,
|
||||
164,
|
||||
156,
|
||||
0,
|
||||
0,
|
||||
164,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-82,
|
||||
-78,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
82,
|
||||
78,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "c1fcbeb9-4e1f-4e2e-94f1-37863a9c2822@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"hasAlpha": true,
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "c1fcbeb9-4e1f-4e2e-94f1-37863a9c2822@f9941"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue