Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ns20_jsqj
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
ns20_jsqj
Commits
3ca854f0
Commit
3ca854f0
authored
Nov 13, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
飞行棋修改
parent
8cdc0b84
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
713 additions
and
405 deletions
+713
-405
hand_ani.ts
assets/ns20_jsqj/scene/hand_ani.ts
+12
-8
ns20_jsqj.fire
assets/ns20_jsqj/scene/ns20_jsqj.fire
+669
-387
ns20_jsqj.ts
assets/ns20_jsqj/scene/ns20_jsqj.ts
+19
-2
speak.ts
assets/ns20_jsqj/scene/speak.ts
+1
-1
GameNS16.ts
assets/ns20_jsqj/scene/tool/GameNS16.ts
+5
-0
bg_bg.png.meta
assets/ns20_jsqj/textures/bg_bg.png.meta
+1
-1
bg_map.png.meta
assets/ns20_jsqj/textures/bg_map.png.meta
+2
-2
btn_audio-stop.png.meta
assets/ns20_jsqj/textures/btn_audio-stop.png.meta
+2
-2
btn_start.png
assets/ns20_jsqj/textures/btn_start.png
+0
-0
icon_player.png.meta
assets/ns20_jsqj/textures/icon_player.png.meta
+2
-2
No files found.
assets/ns20_jsqj/scene/hand_ani.ts
View file @
3ca854f0
...
@@ -21,6 +21,7 @@ export default class NewClass extends cc.Component {
...
@@ -21,6 +21,7 @@ export default class NewClass extends cc.Component {
private
aning
;
private
aning
;
onLoad
()
{
onLoad
()
{
this
.
aning
=
false
;
this
.
aning
=
false
;
this
.
showAni
();
}
}
protected
onDestroy
():
void
{
protected
onDestroy
():
void
{
cc
.
Tween
.
stopAll
();
cc
.
Tween
.
stopAll
();
...
@@ -29,16 +30,19 @@ export default class NewClass extends cc.Component {
...
@@ -29,16 +30,19 @@ export default class NewClass extends cc.Component {
showAni
()
{
showAni
()
{
if
(
this
.
aning
)
return
;
if
(
this
.
aning
)
return
;
if
(
this
.
node
&&
this
.
node
.
active
)
{
if
(
this
.
node
&&
this
.
node
.
active
)
{
this
.
node
.
x
+=
400
;
// this.node.y -= 200;
this
.
node
.
y
-=
200
;
// this.aning = true;
this
.
aning
=
true
;
cc
.
tween
(
this
.
node
).
repeatForever
(
cc
.
tween
(
this
.
node
).
by
(
0.3
,
{
x
:
-
400
,
y
:
200
}).
delay
(
1.5
).
call
(()
=>
{
cc
.
tween
()
this
.
aning
=
false
;
.
by
(.
5
,
{
y
:
-
50
})
this
.
showAni
();
.
by
(.
5
,
{
y
:
50
}).
start
()
}).
start
();
).
start
();
// this.aning = false;
// this.showAni();
// }).start();
}
}
}
}
update
(
dt
)
{
update
(
dt
)
{
this
.
showAni
();
//
this.showAni();
}
}
}
}
assets/ns20_jsqj/scene/ns20_jsqj.fire
View file @
3ca854f0
This diff is collapsed.
Click to expand it.
assets/ns20_jsqj/scene/ns20_jsqj.ts
View file @
3ca854f0
...
@@ -76,6 +76,8 @@ export default class NewClass extends MyCocosSceneComponent {
...
@@ -76,6 +76,8 @@ export default class NewClass extends MyCocosSceneComponent {
this
.
layout_start
.
active
=
true
;
this
.
layout_start
.
active
=
true
;
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
question
.
audio
);
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
question
.
audio
);
this
.
initMap
();
}
}
initEvent
()
{
initEvent
()
{
pg
.
view
.
touchOn
(
pg
.
view
.
find
(
this
.
layout_start
,
'
btn_start
'
),
this
.
onTouchStart
,
this
);
pg
.
view
.
touchOn
(
pg
.
view
.
find
(
this
.
layout_start
,
'
btn_start
'
),
this
.
onTouchStart
,
this
);
...
@@ -107,6 +109,7 @@ export default class NewClass extends MyCocosSceneComponent {
...
@@ -107,6 +109,7 @@ export default class NewClass extends MyCocosSceneComponent {
pg
.
audio
.
resumeBgm
();
pg
.
audio
.
resumeBgm
();
}
}
onTouchStart
()
{
onTouchStart
()
{
this
.
layout_start
.
active
=
false
;
this
.
layout_start
.
active
=
false
;
cc
.
audioEngine
.
stopAllEffects
();
cc
.
audioEngine
.
stopAllEffects
();
...
@@ -134,8 +137,21 @@ export default class NewClass extends MyCocosSceneComponent {
...
@@ -134,8 +137,21 @@ export default class NewClass extends MyCocosSceneComponent {
vs
.
active
=
false
;
vs
.
active
=
false
;
}).
start
();
}).
start
();
}
}
initMap
()
{
let
chess
=
pg
.
view
.
find
(
this
,
'
chess
'
);
let
items
=
pg
.
view
.
find
(
chess
,
'
items
'
);
let
item
=
pg
.
view
.
find
(
chess
,
'
item
'
);
item
.
active
=
false
;
let
list
=
Game
.
getIns
().
getItemList
();
list
.
forEach
(
li
=>
{
let
node
=
cc
.
instantiate
(
item
);
node
.
x
=
li
.
box_x
;
node
.
y
=
li
.
box_y
;
node
.
active
=
true
;
pg
.
view
.
setNetImg
(
node
.
getChildByName
(
'
img
'
),
li
.
ext
.
img
,
{
w
:
75
,
h
:
75
})
node
.
parent
=
items
;
})
}
//-----------------------------流程------------------------------
//-----------------------------流程------------------------------
private
playerPoint
:
number
;
//
private
playerPoint
:
number
;
//
private
robotPoint
:
number
;
//
private
robotPoint
:
number
;
//
...
@@ -344,6 +360,7 @@ export default class NewClass extends MyCocosSceneComponent {
...
@@ -344,6 +360,7 @@ export default class NewClass extends MyCocosSceneComponent {
let
hand
=
pg
.
view
.
find
(
touzi_ani
,
"
hand
"
);
let
hand
=
pg
.
view
.
find
(
touzi_ani
,
"
hand
"
);
let
btn_stop
=
pg
.
view
.
find
(
touzi_ani
,
"
btn_stop
"
);
let
btn_stop
=
pg
.
view
.
find
(
touzi_ani
,
"
btn_stop
"
);
pg
.
view
.
visible
(
touzi_ani
,
true
);
pg
.
view
.
visible
(
touzi_ani
,
true
);
pg
.
event
.
emit
(
"
player_point_update
"
,
{
isRobot
:
this
.
turnRobot
,
num
:
0
});
touzi
.
startAni
();
touzi
.
startAni
();
if
(
this
.
turnRobot
)
{
if
(
this
.
turnRobot
)
{
this
.
scheduleOnce
(
this
.
stopTouzi
,
1
);
this
.
scheduleOnce
(
this
.
stopTouzi
,
1
);
...
...
assets/ns20_jsqj/scene/speak.ts
View file @
3ca854f0
...
@@ -98,7 +98,7 @@ export default class SpeakRecord extends cc.Component {
...
@@ -98,7 +98,7 @@ export default class SpeakRecord extends cc.Component {
let
img
=
pg
.
view
.
find
(
this
.
text_tip
,
"
img
"
);
let
img
=
pg
.
view
.
find
(
this
.
text_tip
,
"
img
"
);
let
ext
=
this
.
data
.
ext
;
let
ext
=
this
.
data
.
ext
;
pg
.
view
.
setNetImg
(
img
,
ext
.
img
,
{
w
:
550
,
h
:
270
})
pg
.
view
.
setNetImg
(
img
,
ext
.
img
,
{
w
:
550
,
h
:
270
})
pg
.
view
.
setString
(
text
,
ext
.
t
ext
);
pg
.
view
.
setString
(
text
,
ext
.
t
ip
);
this
.
onTouchVoice
();
this
.
onTouchVoice
();
pg
.
view
.
touchOn
(
img
,
this
.
onTouchVoice
,
this
);
pg
.
view
.
touchOn
(
img
,
this
.
onTouchVoice
,
this
);
}
}
...
...
assets/ns20_jsqj/scene/tool/GameNS16.ts
View file @
3ca854f0
...
@@ -112,6 +112,11 @@ export default class Game {
...
@@ -112,6 +112,11 @@ export default class Game {
})
})
}
}
}
}
getItemList
()
{
return
this
.
map
.
filter
(
m
=>
{
return
m
.
type
===
'
1
'
;
})
}
mapFull
()
{
mapFull
()
{
}
}
...
...
assets/ns20_jsqj/textures/bg_bg.png.meta
View file @
3ca854f0
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
"rawHeight": 750,
"rawHeight": 750,
"borderTop": 0,
"borderTop": 0,
"borderBottom": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderLeft":
20
0,
"borderRight": 0,
"borderRight": 0,
"subMetas": {}
"subMetas": {}
}
}
...
...
assets/ns20_jsqj/textures/bg_map.png.meta
View file @
3ca854f0
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"premultiplyAlpha": false,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width":
1920
,
"width":
983
,
"height":
1200
,
"height":
702
,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"bg_map": {
"bg_map": {
...
...
assets/ns20_jsqj/textures/btn_audio-stop.png.meta
View file @
3ca854f0
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"premultiplyAlpha": false,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width": 2
2
9,
"width": 2
7
9,
"height": 1
45
,
"height": 1
01
,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"btn_audio-stop": {
"btn_audio-stop": {
...
...
assets/ns20_jsqj/textures/btn_start.png
View replaced file @
8cdc0b84
View file @
3ca854f0
6.51 KB
|
W:
|
H:
6.02 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/ns20_jsqj/textures/icon_player.png.meta
View file @
3ca854f0
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"premultiplyAlpha": false,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width":
102
,
"width":
39
,
"height":
98
,
"height":
59
,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"icon_player": {
"icon_player": {
...
...
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