Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
5cde1400
Commit
5cde1400
authored
Dec 24, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
0958ae10
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1020 additions
and
79 deletions
+1020
-79
241106_YOGURT_Snake.iml
.idea/241106_YOGURT_Snake.iml
+0
-1
PropPop.prefab
assets/Bundles/PropPop/PropPop.prefab
+714
-68
减.png
assets/Bundles/PropPop/png/减.png
+0
-0
减.png.meta
assets/Bundles/PropPop/png/减.png.meta
+134
-0
加.png
assets/Bundles/PropPop/png/加.png
+0
-0
加.png.meta
assets/Bundles/PropPop/png/加.png.meta
+134
-0
ProPop.ts
assets/Scripts/Panels/ProPop.ts
+33
-6
Global.ts
assets/Scripts/Scenes/MainGame/Global.ts
+2
-2
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+2
-2
queryExchangeList.do.json
preview-template/mock/exchange/queryExchangeList.do.json
+1
-0
No files found.
.idea/241106_YOGURT_Snake.iml
View file @
5cde1400
...
...
@@ -12,6 +12,5 @@
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"rem"
level=
"application"
/>
</component>
</module>
\ No newline at end of file
assets/Bundles/PropPop/PropPop.prefab
View file @
5cde1400
This diff is collapsed.
Click to expand it.
assets/Bundles/PropPop/png/减.png
0 → 100644
View file @
5cde1400
1.6 KB
assets/Bundles/PropPop/png/减.png.meta
0 → 100644
View file @
5cde1400
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "2f6698ad-1617-4e04-a3b8-c65e9f3957f0",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "2f6698ad-1617-4e04-a3b8-c65e9f3957f0@6c48a",
"displayName": "减",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "2f6698ad-1617-4e04-a3b8-c65e9f3957f0",
"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": "2f6698ad-1617-4e04-a3b8-c65e9f3957f0@f9941",
"displayName": "减",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 48,
"height": 48,
"rawWidth": 48,
"rawHeight": 48,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-24,
-24,
0,
24,
-24,
0,
-24,
24,
0,
24,
24,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
48,
48,
48,
0,
0,
48,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-24,
-24,
0
],
"maxPos": [
24,
24,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "2f6698ad-1617-4e04-a3b8-c65e9f3957f0@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "2f6698ad-1617-4e04-a3b8-c65e9f3957f0@6c48a"
}
}
assets/Bundles/PropPop/png/加.png
0 → 100644
View file @
5cde1400
1.69 KB
assets/Bundles/PropPop/png/加.png.meta
0 → 100644
View file @
5cde1400
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "0fd20aff-b339-4a94-bb30-ce1975a7c805",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "0fd20aff-b339-4a94-bb30-ce1975a7c805@6c48a",
"displayName": "加",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "0fd20aff-b339-4a94-bb30-ce1975a7c805",
"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": "0fd20aff-b339-4a94-bb30-ce1975a7c805@f9941",
"displayName": "加",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 48,
"height": 48,
"rawWidth": 48,
"rawHeight": 48,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-24,
-24,
0,
24,
-24,
0,
-24,
24,
0,
24,
24,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
48,
48,
48,
0,
0,
48,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-24,
-24,
0
],
"maxPos": [
24,
24,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "0fd20aff-b339-4a94-bb30-ce1975a7c805@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "0fd20aff-b339-4a94-bb30-ce1975a7c805@6c48a"
}
}
assets/Scripts/Panels/ProPop.ts
View file @
5cde1400
import
Panel
from
"../../Module/Panel"
;
import
{
_decorator
,
Button
,
Node
,
Sprite
,
Label
}
from
"cc"
;
import
{
_decorator
,
Button
,
Node
,
Sprite
,
Label
,
math
}
from
"cc"
;
import
{
observer
}
from
"../store/decorators"
;
import
{
showPanel
,
showToast
}
from
"db://assets/Module/UIFast"
;
import
ExchangeSuccess
from
"db://assets/Scripts/Panels/ExchangeSuccess"
;
import
{
creditsCost
,
sendWebNetWithToken
,
WebNetName
}
from
"db://assets/Scripts/Utils/WebNet/WebNet"
;
import
{
_asyncThrottle
}
from
"../Utils/Utils"
;
import
store
from
"../store/store"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -22,9 +23,26 @@ export default class ProPop extends Panel {
@
property
(
Label
)
explanation
:
Label
=
null
;
@
property
(
Label
)
num
:
Label
=
null
;
@
property
(
Node
)
add
:
Node
=
null
;
@
property
(
Node
)
sub
:
Node
=
null
;
@
property
(
Label
)
numTxt
:
Label
=
null
;
private
_buyNum
:
number
=
1
;
get
buyNum
()
{
return
this
.
_buyNum
;
}
set
buyNum
(
val
)
{
val
=
math
.
clamp
(
1
,
99
,
val
);
this
.
_buyNum
=
val
;
this
.
numTxt
.
string
=
`
${
val
}
`
;
}
onLoad
()
{
this
.
closeBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickClose
);
this
.
btn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickExchange
);
this
.
add
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickAdd
);
this
.
sub
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickSub
);
}
start
()
{
...
...
@@ -49,14 +67,19 @@ export default class ProPop extends Panel {
this
.
prizeName
.
string
=
optionName
;
}
clickAdd
=
()
=>
{
this
.
buyNum
++
;
};
clickSub
=
()
=>
{
this
.
buyNum
--
;
};
clickClose
=
()
=>
{
this
.
hidePanel
();
};
clickExchange
=
_asyncThrottle
(
async
()
=>
{
const
num
=
1
;
const
{
id
,
optionName
,
...
...
@@ -68,10 +91,14 @@ export default class ProPop extends Panel {
consumeCreditsNum
}
=
this
.
data
;
if
((
+
consumeCreditsNum
)
*
this
.
buyNum
>
store
.
exchangeInfo
.
remainCredits
){
return
showToast
(
"积分数量不足"
);
}
const
{
success
:
costSuc
,
ticket
}
=
await
creditsCost
(
"exchange"
,
"exchangeSp"
,
`sp_deduct_desc`
,
(
+
consumeCreditsNum
)
*
n
um
);
}
=
await
creditsCost
(
"exchange"
,
"exchangeSp"
,
`sp_deduct_desc`
,
(
+
consumeCreditsNum
)
*
this
.
buyN
um
);
if
(
!
costSuc
)
{
showToast
(
"网络异常,请稍后重试~"
);
...
...
@@ -82,7 +109,7 @@ export default class ProPop extends Panel {
const
{
success
,
data
}
=
await
sendWebNetWithToken
(
WebNetName
.
propExchange
,
{
id
,
ticketNum
:
ticket
,
num
:
n
um
,
num
:
this
.
buyN
um
,
// ruId: item.ruleId,
});
...
...
assets/Scripts/Scenes/MainGame/Global.ts
View file @
5cde1400
...
...
@@ -32,10 +32,10 @@ export class Global {
/** 磁吸道具持续时间 */
static
PROP_MAGNET_DUR_TIME
:
number
=
10
;
/** 磁吸吸取半径 */
static
PROP_MAGNET_RADIUS
:
number
=
2
00
;
static
PROP_MAGNET_RADIUS
:
number
=
1
00
;
/** 加长道具增加能量值百分比 */
static
PROP_ADD_LENGTH
:
number
=
.
1
;
static
PROP_ADD_LENGTH
:
number
=
.
05
;
/** 双倍经验持续时间 */
...
...
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
5cde1400
...
...
@@ -259,8 +259,8 @@ export class MainGame extends Scene {
if (!currentStage || currentStage == 3) {
PropManager.ins.init(gameStore.startInfo?.barrierFlag ?
2 : 5
);
CardManager.ins.init(gameStore.startInfo?.barrierFlag ?
2 : 5
);
PropManager.ins.init(gameStore.startInfo?.barrierFlag ?
1 : 2
);
CardManager.ins.init(gameStore.startInfo?.barrierFlag ?
1 : 2
);
LuckyBagManager.ins.init();
await Target.ins.showTarget3();
// await PreCd.ins.startCd();
...
...
preview-template/mock/exchange/queryExchangeList.do.json
View file @
5cde1400
...
...
@@ -10,6 +10,7 @@
"optionName"
:
"optionName1"
,
"optionImg"
:
"optionImg1"
,
"prizeId"
:
"prizeId1"
,
"spDetail"
:
"spDetail1"
,
"alreadyUserCount"
:
21
,
"userLimitCount"
:
121
,
"consumeCreditsNum"
:
123
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment