feat: update goal asset

main
tiendat3699 2024-03-22 17:27:52 +07:00
parent 980b11dc0c
commit a2a735f97f
14 changed files with 2978 additions and 1768 deletions

View File

@ -81,7 +81,7 @@
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
"interpolationMode": 0, "interpolationMode": 0,
"tangentWeightMode": 0, "tangentWeightMode": 0,
"value": 1.2630000114440918, "value": 1.3,
"rightTangent": 0, "rightTangent": 0,
"rightTangentWeight": 1, "rightTangentWeight": 1,
"leftTangent": 0, "leftTangent": 0,
@ -93,7 +93,7 @@
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
"interpolationMode": 0, "interpolationMode": 0,
"tangentWeightMode": 0, "tangentWeightMode": 0,
"value": 0.753000020980835, "value": 0.7,
"rightTangent": 0, "rightTangent": 0,
"rightTangentWeight": 1, "rightTangentWeight": 1,
"leftTangent": 0, "leftTangent": 0,
@ -135,7 +135,7 @@
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
"interpolationMode": 0, "interpolationMode": 0,
"tangentWeightMode": 0, "tangentWeightMode": 0,
"value": 0.6650000214576721, "value": 0.6,
"rightTangent": 0, "rightTangent": 0,
"rightTangentWeight": 1, "rightTangentWeight": 1,
"leftTangent": 0, "leftTangent": 0,
@ -147,7 +147,7 @@
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
"interpolationMode": 0, "interpolationMode": 0,
"tangentWeightMode": 0, "tangentWeightMode": 0,
"value": 1.1160000562667847, "value": 1.5,
"rightTangent": 0, "rightTangent": 0,
"rightTangentWeight": 1, "rightTangentWeight": 1,
"leftTangent": 0, "leftTangent": 0,

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@ enum TimeConfig {
DelayPLay = 1, DelayPLay = 1,
DelayMultiBall = 2, DelayMultiBall = 2,
DelayGoal = 2, DelayGoal = 2,
DelayCannonFire = 1, DelayCannonFire = 0.4,
DelayCannonDone = 0.5, DelayCannonDone = 0.5,
} }

View File

@ -1,8 +1,7 @@
import { _decorator, Component, Label, Node, ParticleSystem, tween } from 'cc'; import { _decorator, Component, Label, Node, ParticleSystem, Tween, tween, Vec3 } from 'cc';
import { EventManger } from '../Manager/EventManger'; import { EventManger } from '../Manager/EventManger';
import GameEvent from '../Events/GameEvent'; import GameEvent from '../Events/GameEvent';
import ScoreType from '../Enum/ScoreType'; import ScoreType from '../Enum/ScoreType';
import Utilities from '../Utilities';
import GameState from '../Enum/GameState'; import GameState from '../Enum/GameState';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ -11,7 +10,7 @@ export class UIController extends Component {
@property({ type: Label, visible: true }) @property({ type: Label, visible: true })
private _scoreLabel: Label; private _scoreLabel: Label;
@property({ type: Label, visible: true }) @property({ type: Label, visible: true })
private _goalLabel: Label; private _eventLabel: Label;
@property({ type: Label, visible: true }) @property({ type: Label, visible: true })
private _resultLabel: Label; private _resultLabel: Label;
@property({ type: ParticleSystem, visible: true }) @property({ type: ParticleSystem, visible: true })
@ -27,13 +26,13 @@ export class UIController extends Component {
private _timer = 0; private _timer = 0;
private _playing = false; private _playing = false;
protected onLoad(): void { protected async onLoad() {
EventManger.instance.on(GameEvent.Score, this.onScore, this); EventManger.instance.on(GameEvent.Score, this.onScore, this);
EventManger.instance.on(GameEvent.BallOut, this.onBallOut, this); EventManger.instance.on(GameEvent.BallOut, this.onBallOut, this);
EventManger.instance.on(GameEvent.GameStateChange, this.onGameStateChange, this); EventManger.instance.on(GameEvent.GameStateChange, this.onGameStateChange, this);
EventManger.instance.on(GameEvent.MultiBall, this.onMultiBall, this); EventManger.instance.on(GameEvent.MultiBall, this.onMultiBall, this);
EventManger.instance.on(GameEvent.TimeUpdate, this.onTimeUpdate, this); EventManger.instance.on(GameEvent.TimeUpdate, this.onTimeUpdate, this);
this._goalLabel.string = ''; this._eventLabel.string = '';
} }
protected update(dt: number): void { protected update(dt: number): void {
@ -43,16 +42,32 @@ export class UIController extends Component {
private async onScore(score: number, type: ScoreType) { private async onScore(score: number, type: ScoreType) {
this._scoreLabel.string = `Score: ${score}`; this._scoreLabel.string = `Score: ${score}`;
if (type == ScoreType.Goal) { if (type == ScoreType.Goal) {
this._goalLabel.string = 'Goal!!'; this.showEventLabel('GOAL!!!');
await Utilities.delay(1);
this._goalLabel.string = '';
} }
} }
private async onBallOut() { private onBallOut() {
this._goalLabel.string = 'Ball Out!!'; this.showEventLabel('BALL OUT!!!');
await Utilities.delay(1); }
this._goalLabel.string = '';
private showEventLabel(string: string) {
this._eventLabel.string = string;
Tween.stopAllByTarget(this._eventLabel.node);
this._eventLabel.node.setScale(Vec3.ZERO);
tween(this._eventLabel.node)
.to(0.2, { scale: Vec3.ONE }, { easing: 'backOut' })
.delay(1)
.to(
0.1,
{ scale: Vec3.ZERO },
{
onComplete: () => {
this._eventLabel.string = '';
},
easing: 'backIn',
},
)
.start();
} }
private onGameStateChange(state: GameState) { private onGameStateChange(state: GameState) {
@ -78,8 +93,12 @@ export class UIController extends Component {
} }
private onMultiBall(active: boolean) { private onMultiBall(active: boolean) {
if (active) this._buffFx.play(); if (active) {
else this._buffFx.stop(); this._buffFx.play();
this.showEventLabel('MULTI BALL!!!');
} else {
this._buffFx.stop();
}
} }
private onTimeUpdate(time: number) { private onTimeUpdate(time: number) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.25",
"importer": "image",
"imported": true,
"uuid": "7bf69df0-eb9e-4e6c-8180-2262e14dd089",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "7bf69df0-eb9e-4e6c-8180-2262e14dd089@6c48a",
"displayName": "Ear",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "7bf69df0-eb9e-4e6c-8180-2262e14dd089",
"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": "7bf69df0-eb9e-4e6c-8180-2262e14dd089@f9941",
"displayName": "Ear",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 33.5,
"trimX": 46,
"trimY": 147,
"width": 419,
"height": 151,
"rawWidth": 512,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-209.5,
-75.5,
0,
209.5,
-75.5,
0,
-209.5,
75.5,
0,
209.5,
75.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
46,
365,
465,
365,
46,
214,
465,
214
],
"nuv": [
0.08984375,
0.41796875,
0.908203125,
0.41796875,
0.08984375,
0.712890625,
0.908203125,
0.712890625
],
"minPos": [
-209.5,
-75.5,
0
],
"maxPos": [
209.5,
75.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "7bf69df0-eb9e-4e6c-8180-2262e14dd089@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "7bf69df0-eb9e-4e6c-8180-2262e14dd089@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.25",
"importer": "image",
"imported": true,
"uuid": "e063d2ff-bdc2-49a7-ba2c-f85247e2c4aa",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "e063d2ff-bdc2-49a7-ba2c-f85247e2c4aa@6c48a",
"displayName": "Slide",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "e063d2ff-bdc2-49a7-ba2c-f85247e2c4aa",
"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": "e063d2ff-bdc2-49a7-ba2c-f85247e2c4aa@f9941",
"displayName": "Slide",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 727,
"height": 310,
"rawWidth": 727,
"rawHeight": 310,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-363.5,
-155,
0,
363.5,
-155,
0,
-363.5,
155,
0,
363.5,
155,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
310,
727,
310,
0,
0,
727,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-363.5,
-155,
0
],
"maxPos": [
363.5,
155,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "e063d2ff-bdc2-49a7-ba2c-f85247e2c4aa@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "e063d2ff-bdc2-49a7-ba2c-f85247e2c4aa@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.25",
"importer": "image",
"imported": true,
"uuid": "9dd03a8e-ade0-4747-aa3a-71ae273a467b",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "9dd03a8e-ade0-4747-aa3a-71ae273a467b@6c48a",
"displayName": "Slide2",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "9dd03a8e-ade0-4747-aa3a-71ae273a467b",
"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": "9dd03a8e-ade0-4747-aa3a-71ae273a467b@f9941",
"displayName": "Slide2",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 729,
"height": 312,
"rawWidth": 729,
"rawHeight": 312,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-364.5,
-156,
0,
364.5,
-156,
0,
-364.5,
156,
0,
364.5,
156,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
312,
729,
312,
0,
0,
729,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-364.5,
-156,
0
],
"maxPos": [
364.5,
156,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "9dd03a8e-ade0-4747-aa3a-71ae273a467b@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "9dd03a8e-ade0-4747-aa3a-71ae273a467b@f9941"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -43,11 +43,11 @@
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 3.5, "offsetY": 0,
"trimX": 1, "trimX": 36,
"trimY": 126, "trimY": 133,
"width": 510, "width": 440,
"height": 253, "height": 246,
"rawWidth": 512, "rawWidth": 512,
"rawHeight": 512, "rawHeight": 512,
"borderTop": 0, "borderTop": 0,
@ -61,17 +61,17 @@
"meshType": 0, "meshType": 0,
"vertices": { "vertices": {
"rawPosition": [ "rawPosition": [
-255, -220,
-126.5, -123,
0, 0,
255, 220,
-126.5, -123,
0, 0,
-255, -220,
126.5, 123,
0, 0,
255, 220,
126.5, 123,
0 0
], ],
"indexes": [ "indexes": [
@ -83,33 +83,33 @@
3 3
], ],
"uv": [ "uv": [
1, 36,
386, 379,
511, 476,
386, 379,
1, 36,
133, 133,
511, 476,
133 133
], ],
"nuv": [ "nuv": [
0.001953125, 0.0703125,
0.259765625, 0.259765625,
0.998046875, 0.9296875,
0.259765625, 0.259765625,
0.001953125, 0.0703125,
0.75390625, 0.740234375,
0.998046875, 0.9296875,
0.75390625 0.740234375
], ],
"minPos": [ "minPos": [
-255, -220,
-126.5, -123,
0 0
], ],
"maxPos": [ "maxPos": [
255, 220,
126.5, 123,
0 0
] ]
}, },

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.25",
"importer": "image",
"imported": true,
"uuid": "ef391040-552c-4b57-a9f4-8508aa94b03e",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "ef391040-552c-4b57-a9f4-8508aa94b03e@6c48a",
"displayName": "x2 copy",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "ef391040-552c-4b57-a9f4-8508aa94b03e",
"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": "ef391040-552c-4b57-a9f4-8508aa94b03e@f9941",
"displayName": "x2 copy",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 51,
"height": 65,
"rawWidth": 51,
"rawHeight": 65,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-25.5,
-32.5,
0,
25.5,
-32.5,
0,
-25.5,
32.5,
0,
25.5,
32.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
65,
51,
65,
0,
0,
51,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-25.5,
-32.5,
0
],
"maxPos": [
25.5,
32.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "ef391040-552c-4b57-a9f4-8508aa94b03e@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "ef391040-552c-4b57-a9f4-8508aa94b03e@f9941"
}
}