Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
l2_boardgame2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
l2_boardgame2
Commits
4277b60f
Commit
4277b60f
authored
Jul 20, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
b712af47
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1551 additions
and
530 deletions
+1551
-530
L2BG2-下雪动效_ske.json
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_ske.json
+0
-0
L2BG2-下雪动效_ske.json.meta
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_ske.json.meta
+6
-0
L2BG2-下雪动效_tex.json
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.json
+2
-0
L2BG2-下雪动效_tex.json.meta
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.json.meta
+6
-0
L2BG2-下雪动效_tex.png
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.png
+0
-0
L2BG2-下雪动效_tex.png.meta
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.png.meta
+37
-0
l2_boardgame2.fire
assets/l2_boardgame2/scene/l2_boardgame2.fire
+1430
-477
l2_boardgame2.ts
assets/l2_boardgame2/scene/l2_boardgame2.ts
+40
-26
MyCocosSceneComponent.ts
assets/l2_boardgame2/script/MyCocosSceneComponent.ts
+18
-15
frameBlue.png.meta
assets/l2_boardgame2/textures/end/frameBlue.png.meta
+2
-2
life.png.meta
assets/l2_boardgame2/textures/life.png.meta
+2
-2
pieceRed.png.meta
assets/l2_boardgame2/textures/pieceRed.png.meta
+2
-2
prograssbar.png.meta
assets/l2_boardgame2/textures/prograssbar.png.meta
+2
-2
tree.png
assets/l2_boardgame2/textures/tree.png
+0
-0
tree.png.meta
assets/l2_boardgame2/textures/tree.png.meta
+4
-4
No files found.
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_ske.json
0 → 100644
View file @
4277b60f
This diff is collapsed.
Click to expand it.
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_ske.json.meta
0 → 100644
View file @
4277b60f
{
"ver": "1.0.1",
"uuid": "cd6fe422-c574-4b3d-92fe-b213e3e420f6",
"subMetas": {}
}
\ No newline at end of file
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.json
0 → 100644
View file @
4277b60f
{
"width"
:
256
,
"imagePath"
:
"L2BG2-下雪动效_tex.png"
,
"height"
:
128
,
"name"
:
"L2BG2-下雪动效"
,
"SubTexture"
:[{
"width"
:
39
,
"y"
:
1
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17"
,
"x"
:
124
},{
"width"
:
39
,
"y"
:
45
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝"
,
"x"
:
83
},{
"width"
:
39
,
"y"
:
1
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_7"
,
"x"
:
1
},{
"width"
:
39
,
"y"
:
45
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_2"
,
"x"
:
165
},{
"width"
:
39
,
"y"
:
1
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_6"
,
"x"
:
83
},{
"width"
:
39
,
"y"
:
45
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_3"
,
"x"
:
1
},{
"width"
:
39
,
"y"
:
45
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_9"
,
"x"
:
42
},{
"width"
:
39
,
"y"
:
1
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_8"
,
"x"
:
206
},{
"width"
:
39
,
"y"
:
45
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_4"
,
"x"
:
124
},{
"width"
:
39
,
"y"
:
1
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17 拷贝 5_0"
,
"x"
:
165
},{
"width"
:
39
,
"y"
:
1
,
"height"
:
42
,
"name"
:
"下雪效果9秒内循环/图层17_拷贝_5"
,
"x"
:
42
}]}
\ No newline at end of file
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.json.meta
0 → 100644
View file @
4277b60f
{
"ver": "1.0.1",
"uuid": "a12678ab-a8ee-4074-8d5c-74a81a328ad2",
"subMetas": {}
}
\ No newline at end of file
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.png
0 → 100644
View file @
4277b60f
8.22 KB
assets/l2_boardgame2/dragonBones/L2BG2-下雪动效_tex.png.meta
0 → 100644
View file @
4277b60f
{
"ver": "2.3.5",
"uuid": "d575b0a8-c642-41cc-a562-3f5a5f752255",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 128,
"platformSettings": {},
"subMetas": {
"L2BG2-下雪动效_tex": {
"ver": "1.0.4",
"uuid": "a8d48cce-7bc1-48a5-b57a-f0aaba3863d7",
"rawTextureUuid": "d575b0a8-c642-41cc-a562-3f5a5f752255",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -5,
"offsetY": 20,
"trimX": 1,
"trimY": 1,
"width": 244,
"height": 86,
"rawWidth": 256,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/l2_boardgame2/scene/l2_boardgame2.fire
View file @
4277b60f
This diff is collapsed.
Click to expand it.
assets/l2_boardgame2/scene/l2_boardgame2.ts
View file @
4277b60f
...
...
@@ -159,9 +159,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
(
chessBoardBg
.
width
*
chessBoardBg
.
scaleX
)
/
2
+
(
canvas
.
width
-
chessBoardBg
.
width
*
chessBoardBg
.
scaleX
)
/
4
;
const
lifeblue
=
cc
.
find
(
"
Canvas/bg/Lifeblue
"
);
lifeblue
.
x
=
-
offsetX
;
lifeblue
.
x
=
offsetX
;
const
lifered
=
cc
.
find
(
"
Canvas/bg/Lifered
"
);
lifered
.
x
=
offsetX
;
lifered
.
x
=
-
offsetX
;
}
loadingLayer
;
...
...
@@ -285,21 +285,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
catBtn
=
cc
.
find
(
"
Canvas/bg/tree/catBase/catBtn
"
);
catBtn
.
on
(
"
click
"
,
async
()
=>
{
asyncPlayDragonBoneAnimation
(
coolCat
,
"
begin
"
);
const
playerMe
=
this
.
allPlayerList
.
find
(
(
player
)
=>
player
.
uuid
==
this
.
playerId
);
const
playerMe
=
this
.
allPlayerList
.
find
((
player
)
=>
player
.
uuid
==
this
.
playerId
);
if
(
this
.
audioId
)
cc
.
audioEngine
.
stop
(
this
.
audioId
);
if
(
playerMe
.
color
==
this
.
_status
.
current
)
{
if
(
this
.
_status
.
letter
==
""
)
{
await
this
.
playAudioByUrl
(
this
.
data
.
waitingWheel
);
this
.
audioId
=
await
this
.
playAudioByUrl
(
this
.
data
.
waitingWheel
);
}
else
{
await
this
.
playAudioByUrl
(
this
.
data
.
waitingPiece
);
this
.
audioId
=
await
this
.
playAudioByUrl
(
this
.
data
.
waitingPiece
);
}
}
else
{
await
this
.
playAudioByUrl
(
this
.
data
.
waitingTurn
);
this
.
audioId
=
await
this
.
playAudioByUrl
(
this
.
data
.
waitingTurn
);
}
asyncPlayDragonBoneAnimation
(
coolCat
,
"
normal
"
);
asyncPlayDragonBoneAnimation
(
coolCat
,
"
normal
"
,
0
);
});
}
private
audioId
:
any
;
addPieceTouchEventListener
(
node
:
cc
.
Node
,
color
)
{
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
(
event
:
cc
.
Event
.
EventTouch
)
=>
{
...
...
@@ -668,26 +668,39 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
greyDice
();
}
const
blueFrame
=
cc
.
find
(
"
Canvas/bg/Lifeblue/faceFrame
"
);
const
redFrame
=
cc
.
find
(
"
Canvas/bg/Lifered/faceFrame
"
);
let
blinkFrame
:
cc
.
Node
,
stopBlinkFrame
:
cc
.
Node
;
// const blueFrame = cc.find("Canvas/bg/Lifeblue/faceFrame");
// const redFrame = cc.find("Canvas/bg/Lifered/faceFrame");
// let blinkFrame: cc.Node, stopBlinkFrame: cc.Node;
// if (this._status.current == "Red") {
// blinkFrame = redFrame;
// stopBlinkFrame = blueFrame;
// } else {
// blinkFrame = blueFrame;
// stopBlinkFrame = redFrame;
// }
// blinkFrame.stopAllActions();
// cc.tween(blinkFrame)
// .set({ opacity: 100 })
// .to(1.5, { opacity: 255 }, { easing: "cubicOut" })
// .to(1.5, { opacity: 100 }, { easing: "cubicIn" })
// .union()
// .repeatForever()
// .start();
// stopBlinkFrame.stopAllActions();
// stopBlinkFrame.opacity = 0;
const
blueMask
=
cc
.
find
(
"
Canvas/bg/Lifeblue/faceMask
"
);
const
redMask
=
cc
.
find
(
"
Canvas/bg/Lifered/faceMask
"
);
let
blinkMask
:
cc
.
Node
,
stopBlinkMask
:
cc
.
Node
;
if
(
this
.
_status
.
current
==
"
Red
"
)
{
blink
Frame
=
redFrame
;
stopBlink
Frame
=
blueFrame
;
blink
Mask
=
blueMask
;
stopBlink
Mask
=
redMask
;
}
else
{
blink
Frame
=
blueFrame
;
stopBlink
Frame
=
redFrame
;
blink
Mask
=
redMask
;
stopBlink
Mask
=
blueMask
;
}
blinkFrame
.
stopAllActions
();
cc
.
tween
(
blinkFrame
)
.
set
({
opacity
:
100
})
.
to
(
1.5
,
{
opacity
:
255
},
{
easing
:
"
cubicOut
"
})
.
to
(
1.5
,
{
opacity
:
100
},
{
easing
:
"
cubicIn
"
})
.
union
()
.
repeatForever
()
.
start
();
stopBlinkFrame
.
stopAllActions
();
stopBlinkFrame
.
opacity
=
0
;
blinkMask
.
active
=
true
;
stopBlinkMask
.
active
=
false
;
}
getCurrentPiece
()
{
...
...
@@ -975,6 +988,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
imgLight
.
active
=
false
;
imgGood
.
active
=
false
;
imgTry
.
active
=
false
;
catBase
.
active
=
true
;
//img需要clone对应的节点塞进去。
img
.
removeAllChildren
();
...
...
assets/l2_boardgame2/script/MyCocosSceneComponent.ts
View file @
4277b60f
...
...
@@ -123,17 +123,17 @@ export class MyCocosSceneComponent extends cc.Component {
});
}
log
(
str
)
{
log
(
str
)
{
const
node
=
cc
.
find
(
'
middleLayer
'
);
if
(
node
)
{
if
(
node
)
{
node
.
getComponent
(
'
middleLayer
'
).
log
(
str
);
}
else
{
}
else
{
cc
.
log
(
str
);
}
}
onLoadEnd
()
{
}
...
...
@@ -150,7 +150,7 @@ export class MyCocosSceneComponent extends cc.Component {
// ------------------------------------------------
getSprNode
(
resName
)
{
const
sf
=
cc
.
find
(
'
Canvas/res/img/
'
+
resName
).
getComponent
(
cc
.
Sprite
).
spriteFrame
;
...
...
@@ -181,15 +181,18 @@ export class MyCocosSceneComponent extends cc.Component {
}
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
if
(
audio_url
)
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
if
(
cb
)
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cb
();
});
}
});
}
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
audio_url
)
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
resolve
(
audioId
);
if
(
cb
)
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cb
();
});
}
});
}
});
}
}
\ No newline at end of file
assets/l2_boardgame2/textures/end/frameBlue.png.meta
View file @
4277b60f
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 3
15
,
"height": 3
15
,
"width": 3
24
,
"height": 3
78
,
"platformSettings": {},
"subMetas": {
"frameBlue": {
...
...
assets/l2_boardgame2/textures/life.png.meta
View file @
4277b60f
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width":
15
1,
"height": 4
87
,
"width":
28
1,
"height": 4
69
,
"platformSettings": {},
"subMetas": {
"life": {
...
...
assets/l2_boardgame2/textures/pieceRed.png.meta
View file @
4277b60f
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width":
98
,
"height":
151
,
"width":
109
,
"height":
200
,
"platformSettings": {},
"subMetas": {
"pieceRed": {
...
...
assets/l2_boardgame2/textures/prograssbar.png.meta
View file @
4277b60f
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width":
15
1,
"height": 4
87
,
"width":
28
1,
"height": 4
69
,
"platformSettings": {},
"subMetas": {
"prograssbar": {
...
...
assets/l2_boardgame2/textures/tree.png
View replaced file @
b712af47
View file @
4277b60f
41.8 KB
|
W:
|
H:
16.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/l2_boardgame2/textures/tree.png.meta
View file @
4277b60f
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width":
591
,
"height":
298
,
"width":
656
,
"height":
443
,
"platformSettings": {},
"subMetas": {
"tree": {
...
...
@@ -23,9 +23,9 @@
"trimX": 0,
"trimY": 0,
"width": 656,
"height":
443
,
"height":
311
,
"rawWidth": 656,
"rawHeight":
443
,
"rawHeight":
311
,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
...
...
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