跑马灯修改

This commit is contained in:
TJH 2026-04-24 15:25:27 +08:00
parent 70b2a8e4e0
commit 43eb7d101d
4 changed files with 1901 additions and 1877 deletions

View File

@ -126,9 +126,9 @@ export class SlotBar extends Component {
updateChooseDiff() { updateChooseDiff() {
let diff = GameDataManager.instance.chooseDiff; let diff = GameDataManager.instance.chooseDiff;
// this.node.getChildByName('Btn_L1').getChildByName('Choose').children.forEach((child: Node, index: number) => { this.node.getChildByName('Btn_L1').getChildByName('Choose').children.forEach((child: Node, index: number) => {
// child.active = index == diff - 1; child.active = index == diff - 1;
// }) })
// this.getBtnNode(Btn_Key.SpinBtn).children.forEach((child: Node, index: number) => { // this.getBtnNode(Btn_Key.SpinBtn).children.forEach((child: Node, index: number) => {
// child.getComponent(sp.Skeleton).setAnimation(0, '1', true); // child.getComponent(sp.Skeleton).setAnimation(0, '1', true);

View File

@ -25,16 +25,16 @@ export class SlotMsg extends Component {
// largeMsgSpine: sp.Skeleton = null; // largeMsgSpine: sp.Skeleton = null;
// 展示文字信息 // 展示文字信息
@property(Sprite) @property(Node)
smallMsgSpine: Sprite = null; smallMsgNode: Node = null;
// 展示普通赢分信息 // 展示普通赢分信息
@property(Sprite) @property(Node)
middleMsgSpine: Sprite = null; middleMsgNode: Node = null;
// 展示总赢分信息 // 展示总赢分信息
@property(Sprite) @property(Node)
largeMsgSpine: Sprite = null; largeMsgNode: Node = null;
@property(Sprite) @property(Sprite)
i18nSpriteMsg: Sprite = null; i18nSpriteMsg: Sprite = null;
@ -42,9 +42,6 @@ export class SlotMsg extends Component {
@property(Node) @property(Node)
grayMsgNode: Node = null; grayMsgNode: Node = null;
@property(Node)
multiNode: Node = null;
protected onLoad(): void { protected onLoad(): void {
this.grayMsgNode.active = false; this.grayMsgNode.active = false;
} }
@ -55,14 +52,14 @@ export class SlotMsg extends Component {
currRoundWinMsg: string = '' currRoundWinMsg: string = ''
showLabelMsgForTween() { showLabelMsgForTween() {
Tween.stopAllByTarget(this.i18nSpriteMsg.node); Tween.stopAllByTarget(this.i18nSpriteMsg.node);
this.smallMsgSpine.node.active = true; this.smallMsgNode.active = true;
// this.smallMsgSpine.setAnimation(0, '2', false); // this.smallMsgSpine.setAnimation(0, '2', false);
// this.smallMsgSpine.setCompleteListener(() => { // this.smallMsgSpine.setCompleteListener(() => {
// this.smallMsgSpine.setAnimation(0, '1', true); // this.smallMsgSpine.setAnimation(0, '1', true);
// this.smallMsgSpine.setCompleteListener(null); // this.smallMsgSpine.setCompleteListener(null);
// }); // });
this.middleMsgSpine.node.active = false; this.middleMsgNode.active = false;
this.largeMsgSpine.node.active = false; this.largeMsgNode.active = false;
let add = 0; let add = 0;
let isFirst = true; let isFirst = true;
@ -121,16 +118,16 @@ export class SlotMsg extends Component {
showTotalWinAnimaiton(startScore: number, endScore: number, cb) { showTotalWinAnimaiton(startScore: number, endScore: number, cb) {
this.smallMsgSpine.node.active = false; this.smallMsgNode.active = false;
this.middleMsgSpine.node.active = false; this.middleMsgNode.active = false;
this.largeMsgSpine.node.active = true; this.largeMsgNode.active = true;
// this.largeMsgSpine.setAnimation(0, '2', false); // this.largeMsgSpine.setAnimation(0, '2', false);
// this.largeMsgSpine.setCompleteListener(() => { // this.largeMsgSpine.setCompleteListener(() => {
// this.largeMsgSpine.setAnimation(0, '1', true); // this.largeMsgSpine.setAnimation(0, '1', true);
// this.largeMsgSpine.setCompleteListener(null); // this.largeMsgSpine.setCompleteListener(null);
// }); // });
let msg = this.largeMsgSpine.node.getChildByName('msg'); let msg = this.largeMsgNode.getChildByName('msg');
let winCount = msg.getChildByName('winCount'); let winCount = msg.getChildByName('winCount');
winCount.getComponent(Label).string = gold2cash(startScore); winCount.getComponent(Label).string = gold2cash(startScore);
@ -156,16 +153,16 @@ export class SlotMsg extends Component {
showRoundWinMsg(endScore: number, currMulti: number = 0) { showRoundWinMsg(endScore: number, currMulti: number = 0) {
if (endScore === 0) return; if (endScore === 0) return;
this.smallMsgSpine.node.active = false; this.smallMsgNode.active = false;
this.middleMsgSpine.node.active = true; this.middleMsgNode.active = true;
this.largeMsgSpine.node.active = false; this.largeMsgNode.active = false;
// this.middleMsgSpine.setAnimation(0, '2', false); // this.middleMsgSpine.setAnimation(0, '2', false);
// this.middleMsgSpine.setCompleteListener(() => { // this.middleMsgSpine.setCompleteListener(() => {
// this.middleMsgSpine.setAnimation(0, '1', true); // this.middleMsgSpine.setAnimation(0, '1', true);
// this.middleMsgSpine.setCompleteListener(null); // this.middleMsgSpine.setCompleteListener(null);
// }); // });
let msg = this.middleMsgSpine.node.getChildByName('msg'); let msg = this.middleMsgNode.getChildByName('msg');
let winCount = msg.getChildByName('winCount'); let winCount = msg.getChildByName('winCount');
if (currMulti == 0) { if (currMulti == 0) {
winCount.getComponent(Label).string = gold2cash(endScore); winCount.getComponent(Label).string = gold2cash(endScore);
@ -179,25 +176,26 @@ export class SlotMsg extends Component {
showTotalWinMsg(endScore: number) { showTotalWinMsg(endScore: number) {
if (endScore === 0) return; if (endScore === 0) return;
this.smallMsgSpine.node.active = false; this.smallMsgNode.active = false;
this.middleMsgSpine.node.active = false; this.middleMsgNode.active = false;
this.largeMsgSpine.node.active = true; this.largeMsgNode.active = true;
// this.largeMsgSpine.setAnimation(0, '2', false); this.largeMsgNode.getChildByName('pmd3_spine').getComponent(sp.Skeleton).setAnimation(0, 'animation', false)
// this.largeMsgSpine.setCompleteListener(() => { // this.largeMsgNode.setAnimation(0, '2', false);
// this.largeMsgSpine.setAnimation(0, '1', true); // this.largeMsgNode.setCompleteListener(() => {
// this.largeMsgSpine.setCompleteListener(null); // this.largeMsgNode.setAnimation(0, '1', true);
// this.largeMsgNode.setCompleteListener(null);
// }); // });
let msg = this.largeMsgSpine.node.getChildByName('msg'); let msg = this.largeMsgNode.getChildByName('msg');
let winCount = msg.getChildByName('winCount'); let winCount = msg.getChildByName('winCount');
winCount.getComponent(Label).string = gold2cash(endScore); winCount.getComponent(Label).string = gold2cash(endScore);
AudioManager.instance.playSFX('Slot_Msg_Total_Win'); AudioManager.instance.playSFX('Slot_Msg_Total_Win');
} }
hideWinSpine() { hideWinSpine() {
this.smallMsgSpine.node.active = true; this.smallMsgNode.active = true;
this.middleMsgSpine.node.active = false; this.middleMsgNode.active = false;
this.largeMsgSpine.node.active = false; this.largeMsgNode.active = false;
} }
/** /**
@ -222,7 +220,7 @@ export class SlotMsg extends Component {
} }
// 提示分数的spine节点和最终显示位置 // 提示分数的spine节点和最终显示位置
let msg = this.largeMsgSpine.node.getChildByName('msg'); let msg = this.largeMsgNode.getChildByName('msg');
let winCount = msg.getChildByName('winCount'); let winCount = msg.getChildByName('winCount');
let uiTf = this.node.getComponent(UITransform); let uiTf = this.node.getComponent(UITransform);
let centerLocalPos = v3(50, -500, 0); // 信息栏坐标(本地) let centerLocalPos = v3(50, -500, 0); // 信息栏坐标(本地)

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 136 "__id__": 133
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -54,7 +54,7 @@
}, },
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 137 "__id__": 134
}, },
"_id": "047bc2a0-3759-4c52-a603-35f19f0b22ac" "_id": "047bc2a0-3759-4c52-a603-35f19f0b22ac"
}, },
@ -84,24 +84,21 @@
}, },
{ {
"__id__": 117 "__id__": 117
},
{
"__id__": 129
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 129
},
{
"__id__": 130
},
{
"__id__": 131
},
{ {
"__id__": 132 "__id__": 132
},
{
"__id__": 133
},
{
"__id__": 134
},
{
"__id__": 135
} }
], ],
"_prefab": null, "_prefab": null,
@ -4887,115 +4884,6 @@
"_lockFlags": 0, "_lockFlags": 0,
"_id": "e0wy3m1ilD4amtkpxrqBwr" "_id": "e0wy3m1ilD4amtkpxrqBwr"
}, },
{
"__type__": "cc.Node",
"_name": "test",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 130
},
{
"__id__": 131
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -267.445,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "5atnW0IOFBf53Iro7J622Q"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 129
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 85.33000183105469,
"height": 85.33000183105469
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.49994139144488553,
"y": 0.49994139144488553
},
"_id": "d7h41v8UxIZ4ItxMyPmPlz"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 129
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_skeletonData": {
"__uuid__": "6e401c08-7ca6-43e4-8c4f-40efcc3c56ec",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "animation",
"_premultipliedAlpha": false,
"_timeScale": 1,
"_preCacheMode": 0,
"_cacheMode": 0,
"_sockets": [],
"_useTint": false,
"_debugMesh": false,
"_debugBones": false,
"_debugSlots": false,
"_enableBatch": false,
"loop": true,
"_id": "b5b6i/lf9PTqOYinFrvgr8"
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
@ -5093,28 +4981,28 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 138 "__id__": 135
}, },
"shadows": { "shadows": {
"__id__": 139 "__id__": 136
}, },
"_skybox": { "_skybox": {
"__id__": 140 "__id__": 137
}, },
"fog": { "fog": {
"__id__": 141 "__id__": 138
}, },
"octree": { "octree": {
"__id__": 142 "__id__": 139
}, },
"skin": { "skin": {
"__id__": 143 "__id__": 140
}, },
"lightProbeInfo": { "lightProbeInfo": {
"__id__": 144 "__id__": 141
}, },
"postSettings": { "postSettings": {
"__id__": 145 "__id__": 142
}, },
"bakedWithStationaryMainLight": false, "bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false "bakedWithHighpLightmap": false