跑马灯修改

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() {
let diff = GameDataManager.instance.chooseDiff;
// this.node.getChildByName('Btn_L1').getChildByName('Choose').children.forEach((child: Node, index: number) => {
// child.active = index == diff - 1;
// })
this.node.getChildByName('Btn_L1').getChildByName('Choose').children.forEach((child: Node, index: number) => {
child.active = index == diff - 1;
})
// this.getBtnNode(Btn_Key.SpinBtn).children.forEach((child: Node, index: number) => {
// child.getComponent(sp.Skeleton).setAnimation(0, '1', true);

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 136
"__id__": 133
},
"_lpos": {
"__type__": "cc.Vec3",
@ -54,7 +54,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 137
"__id__": 134
},
"_id": "047bc2a0-3759-4c52-a603-35f19f0b22ac"
},
@ -84,24 +84,21 @@
},
{
"__id__": 117
},
{
"__id__": 129
}
],
"_active": true,
"_components": [
{
"__id__": 129
},
{
"__id__": 130
},
{
"__id__": 131
},
{
"__id__": 132
},
{
"__id__": 133
},
{
"__id__": 134
},
{
"__id__": 135
}
],
"_prefab": null,
@ -4887,115 +4884,6 @@
"_lockFlags": 0,
"_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",
"_name": "",
@ -5093,28 +4981,28 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 138
"__id__": 135
},
"shadows": {
"__id__": 139
"__id__": 136
},
"_skybox": {
"__id__": 140
"__id__": 137
},
"fog": {
"__id__": 141
"__id__": 138
},
"octree": {
"__id__": 142
"__id__": 139
},
"skin": {
"__id__": 143
"__id__": 140
},
"lightProbeInfo": {
"__id__": 144
"__id__": 141
},
"postSettings": {
"__id__": 145
"__id__": 142
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false