添加部分动效

This commit is contained in:
TJH 2026-04-21 13:47:36 +08:00
parent a66dcfe1ec
commit 5365884190
8 changed files with 3394 additions and 2742 deletions

File diff suppressed because it is too large Load Diff

View File

@ -349,7 +349,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 120,
"y": 0,
"z": 0
},
"_lrot": {
@ -389,12 +389,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1091.43994140625,
"height": 1920
"width": 855.9600219726562,
"height": 855.9600219726562
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5052408121796527,
"x": 0.5,
"y": 0.5
},
"_id": ""
@ -411,7 +411,7 @@
"node": {
"__id__": 13
},
"_enabled": false,
"_enabled": true,
"__prefab": {
"__id__": 17
},
@ -426,7 +426,7 @@
"a": 255
},
"_skeletonData": {
"__uuid__": "48a56e4b-f8b0-424c-af81-4de65acce65d",
"__uuid__": "8add889f-bdb0-48ec-99a5-11213b2fca76",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
@ -488,7 +488,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -166.768,
"y": -167,
"z": 0
},
"_lrot": {
@ -643,7 +643,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": -9.097,
"y": 4.359,
"y": 4,
"z": 0
},
"_lrot": {
@ -777,8 +777,6 @@
"__id__": 0
},
"fileId": "72u1qqbeJALKQBtDCODQE6",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{

View File

@ -392,13 +392,13 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2541.320068359375,
"height": 5225.080078125
"width": 2020.27001953125,
"height": 2560.080078125
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.26915145735325524,
"y": 0.7739747559191863
"x": 0.4930677559200418,
"y": 0.4609230820874286
},
"_id": ""
},
@ -414,7 +414,7 @@
"node": {
"__id__": 13
},
"_enabled": false,
"_enabled": true,
"__prefab": {
"__id__": 17
},
@ -429,11 +429,11 @@
"a": 255
},
"_skeletonData": {
"__uuid__": "7ee1b7fc-09ac-4f61-af8a-402ffdaa1a6b",
"__uuid__": "4ce3c03b-55e1-4a50-b464-81a497247799",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "animation",
"defaultAnimation": "animation2",
"_premultipliedAlpha": false,
"_timeScale": 1,
"_preCacheMode": 0,

View File

@ -3,17 +3,6 @@ const { ccclass, property } = _decorator;
@ccclass('FeatureBuyPopup')
export class FeatureBuyPopup extends Component {
@property(Node)
buyFreeSpinNode: Node = null;
@property(Node)
buySuperSpinNode: Node = null;
@property(Node)
buyFreeSpinBgSprite: Node = null;
@property(Node)
buySuperFreeSpinBgSprite: Node = null;
BuyType: number = 1;
@ -24,22 +13,18 @@ export class FeatureBuyPopup extends Component {
// this.buySuperSpinNode.on(Node.EventType.TOUCH_START, this.onClickBuySuperSpin, this);
}
show() {
// show() {
// this.buyFreeSpinBgSprite.active = this.BuyType == 1;
}
// }
onClickBuyFreeSpin() {
if (this.BuyType == 1) return;
this.BuyType = 1;
this.buyFreeSpinBgSprite.active = true;
this.buySuperFreeSpinBgSprite.active = false;
}
// onClickBuyFreeSpin() {
// if (this.BuyType == 1) return;
// this.BuyType = 1;
// }
onClickBuySuperSpin() {
if (this.BuyType == 2) return;
this.BuyType = 2;
this.buyFreeSpinBgSprite.active = false;
this.buySuperFreeSpinBgSprite.active = true;
}
// onClickBuySuperSpin() {
// if (this.BuyType == 2) return;
// this.BuyType = 2;
// }
}

View File

@ -7,7 +7,7 @@ import { UIManager } from '../../Main/Scripts/managers/UIManager';
import { GameDataManager } from '../../Main/Scripts/managers/GameDataManager';
import { gold2cash } from '../../Main/Scripts/main/comm';
import { AudioManager } from '../../Main/Scripts/managers/AudioManager';
import { FeatureBuyPopup } from './FeatureBuyPopup';
// import { FeatureBuyPopup } from './FeatureBuyPopup';
const { ccclass, property } = _decorator;
@ccclass('SlotGame')
@ -566,18 +566,17 @@ export class SlotGame extends Component {
// goldSpine.setCompleteListener(() => {
// goldSpine.setAnimation(0, '1', true);
// goldSpine.setCompleteListener(null);
let scp = null;
// let scp = null;
UIManager.instance.showPopupDynamic('FeatureBuyPopUp', 'Prefab/FeatureBuyPopUp', 'Game', (prefab) => {
let main = prefab.getChildByName('main');
scp = prefab.getComponent(FeatureBuyPopup);
scp.show();
// scp = prefab.getComponent(FeatureBuyPopup);
// scp.show();
let freeNeedCount = main.getChildByName('needCount');
freeNeedCount.getComponent(Label).string = `${gold2cash(GameDataManager.instance.curBet * 100)}`;
}, (prefab) => {
}, () => {
let buyType = scp.BuyType;
this.node.emit(SLOT_GAME_EVENT.FEATURE_BUY, buyType);
this.node.emit(SLOT_GAME_EVENT.FEATURE_BUY);
this.setBtnEnable(this.featureBuyNode, false);
this.setBtnEnable(this.doubleWinBtnNode.getChildByName('pt_11'), false);
AudioManager.instance.playSFX('Click_Small_Game_Start');

View File

@ -356,10 +356,10 @@ export class SlotScene extends Component {
}
}
onFeatureBuy(buyType: number) {
onFeatureBuy() {
this.isFeatureBuySpin = true;
this.slotBar.featureBuySpin();
this.onClickSpin(buyType, false);
this.onClickSpin(1, false);
}
async allRollerStop() {
@ -740,11 +740,11 @@ export class SlotScene extends Component {
this.slotBar.setBalance(this.slotBar.getBalance() - spinCost);
} else {
if (buyType == 1) {
// if (buyType == 1) {
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet() * this.gameInfo.BuyMul)
} else {
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet() * 500)
}
// } else {
// this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet() * 500)
// }
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 133
"__id__": 136
},
"_lpos": {
"__type__": "cc.Vec3",
@ -54,7 +54,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 134
"__id__": 137
},
"_id": "047bc2a0-3759-4c52-a603-35f19f0b22ac"
},
@ -84,21 +84,24 @@
},
{
"__id__": 117
},
{
"__id__": 129
}
],
"_active": true,
"_components": [
{
"__id__": 129
},
{
"__id__": 130
},
{
"__id__": 131
},
{
"__id__": 132
},
{
"__id__": 133
},
{
"__id__": 134
},
{
"__id__": 135
}
],
"_prefab": null,
@ -4884,6 +4887,115 @@
"_lockFlags": 0,
"_id": "e0wy3m1ilD4amtkpxrqBwr"
},
{
"__type__": "cc.Node",
"_name": "test",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
},
{
"__id__": 131
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -155.04,
"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": 1082,
"height": 2362
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_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__": "d62a8256-af0c-4b19-881a-5b853fedc053",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "xiaoshi",
"_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": "",
@ -4981,29 +5093,29 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 135
},
"shadows": {
"__id__": 136
},
"_skybox": {
"__id__": 137
},
"fog": {
"__id__": 138
},
"octree": {
"shadows": {
"__id__": 139
},
"skin": {
"_skybox": {
"__id__": 140
},
"lightProbeInfo": {
"fog": {
"__id__": 141
},
"postSettings": {
"octree": {
"__id__": 142
},
"skin": {
"__id__": 143
},
"lightProbeInfo": {
"__id__": 144
},
"postSettings": {
"__id__": 145
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
},