Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fucking_flirt
Project
Overview
Details
Activity
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
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
william
fucking_flirt
Commits
2700aa4c
Commit
2700aa4c
authored
May 05, 2018
by
Tulip Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add beauty picturegst
parent
b8715fce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
96 deletions
+97
-96
game.fire
assets/game.fire
+18
-94
Game.js
assets/scripts/Game.js
+79
-2
No files found.
assets/game.fire
View file @
2700aa4c
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"__id__": 2
"__id__": 2
},
},
{
{
"__id__": 9
3
"__id__": 9
1
}
}
],
],
"_tag": -1,
"_tag": -1,
...
@@ -90,10 +90,10 @@
...
@@ -90,10 +90,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
90
"__id__":
88
},
},
{
{
"__id__":
91
"__id__":
89
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2767,9 +2767,6 @@
...
@@ -2767,9 +2767,6 @@
},
},
{
{
"__id__": 86
"__id__": 86
},
{
"__id__": 88
}
}
],
],
"_tag": -1,
"_tag": -1,
...
@@ -3312,7 +3309,7 @@
...
@@ -3312,7 +3309,7 @@
"_scaleY": 1,
"_scaleY": 1,
"_position": {
"_position": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x":
-9
,
"x":
0
,
"y": 241
"y": 241
},
},
"_skewX": 0,
"_skewX": 0,
...
@@ -3346,80 +3343,6 @@
...
@@ -3346,80 +3343,6 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "subtitle",
"_objFlags": 0,
"_parent": {
"__id__": 70
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 85
}
],
"_prefab": null,
"_id": "b1KfGWjbNCRYDR/FY52SG2",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 10,
"g": 10,
"b": 10,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 243,
"height": 40
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 3,
"y": -43
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
},
"_enabled": true,
"_useOriginalSize": false,
"_actualFontSize": 25,
"_fontSize": 25,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_N$string": "获得\"撩妹小能手\"称号",
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0
},
{
"__type__": "cc.Node",
"_name": "heart",
"_name": "heart",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
...
@@ -3430,7 +3353,7 @@
...
@@ -3430,7 +3353,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
7
"__id__": 8
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3460,7 +3383,7 @@
...
@@ -3460,7 +3383,7 @@
"_scaleY": 1,
"_scaleY": 1,
"_position": {
"_position": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x":
-12
,
"x":
0
,
"y": 188
"y": 188
},
},
"_skewX": 0,
"_skewX": 0,
...
@@ -3475,7 +3398,7 @@
...
@@ -3475,7 +3398,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
6
"__id__": 8
4
},
},
"_enabled": true,
"_enabled": true,
"_useOriginalSize": false,
"_useOriginalSize": false,
...
@@ -3504,7 +3427,7 @@
...
@@ -3504,7 +3427,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
9
"__id__": 8
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3534,8 +3457,8 @@
...
@@ -3534,8 +3457,8 @@
"_scaleY": 1,
"_scaleY": 1,
"_position": {
"_position": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x":
-8
,
"x":
0
,
"y":
72
"y":
120
},
},
"_skewX": 0,
"_skewX": 0,
"_skewY": 0,
"_skewY": 0,
...
@@ -3549,14 +3472,14 @@
...
@@ -3549,14 +3472,14 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 8
8
"__id__": 8
6
},
},
"_enabled": true,
"_enabled": true,
"_useOriginalSize": false,
"_useOriginalSize": false,
"_actualFontSize": 100,
"_actualFontSize": 100,
"_fontSize": 100,
"_fontSize": 100,
"_lineHeight": 100,
"_lineHeight": 100,
"_enableWrapText":
fals
e,
"_enableWrapText":
tru
e,
"_N$file": null,
"_N$file": null,
"_isSystemFontUsed": true,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_spacingX": 0,
...
@@ -3624,10 +3547,10 @@
...
@@ -3624,10 +3547,10 @@
"__id__": 70
"__id__": 70
},
},
"success_result": {
"success_result": {
"__id__": 8
9
"__id__": 8
7
},
},
"bgMusic": {
"bgMusic": {
"__id__": 9
2
"__id__": 9
0
},
},
"slider1": {
"slider1": {
"__id__": 21
"__id__": 21
...
@@ -3637,14 +3560,15 @@
...
@@ -3637,14 +3560,15 @@
},
},
"slider3": {
"slider3": {
"__id__": 17
"__id__": 17
}
},
"spriteFrame": null
},
},
{
{
"__type__": "cc.AudioSource",
"__type__": "cc.AudioSource",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 9
3
"__id__": 9
1
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3668,7 +3592,7 @@
...
@@ -3668,7 +3592,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 9
2
"__id__": 9
0
}
}
],
],
"_prefab": null,
"_prefab": null,
...
...
assets/scripts/Game.js
View file @
2700aa4c
...
@@ -101,7 +101,13 @@ cc.Class({
...
@@ -101,7 +101,13 @@ cc.Class({
slider3
:
{
slider3
:
{
default
:
null
,
default
:
null
,
type
:
cc
.
Node
,
type
:
cc
.
Node
,
}
},
// 动态图片
spriteFrame
:
{
default
:
null
,
type
:
cc
.
SpriteFrame
},
},
},
initNode
:
function
()
{
initNode
:
function
()
{
...
@@ -115,7 +121,7 @@ cc.Class({
...
@@ -115,7 +121,7 @@ cc.Class({
initData
:
function
()
{
initData
:
function
()
{
// 初始化游戏数据
// 初始化游戏数据
this
.
score
=
0
;
// 分数
this
.
score
=
0
;
// 分数
this
.
timer
=
10
;
// 每一盘游戏的总时间
this
.
timer
=
3
;
// 每一盘游戏的总时间
this
.
leftLife
=
3
;
// 剩余的命条数
this
.
leftLife
=
3
;
// 剩余的命条数
this
.
swivelAnimationTime
=
0.5
;
//转头动画时间 (单向)
this
.
swivelAnimationTime
=
0.5
;
//转头动画时间 (单向)
this
.
flirtAnimationTime
=
0.5
;
//摸的动画时间(单向)
this
.
flirtAnimationTime
=
0.5
;
//摸的动画时间(单向)
...
@@ -234,6 +240,7 @@ cc.Class({
...
@@ -234,6 +240,7 @@ cc.Class({
// 游戏结束
// 游戏结束
gameOver
:
function
()
{
gameOver
:
function
()
{
var
self
=
this
this
.
success_result
.
string
=
this
.
score
.
toString
()
this
.
success_result
.
string
=
this
.
score
.
toString
()
this
.
classroom
.
active
=
false
this
.
classroom
.
active
=
false
this
.
success
.
active
=
true
this
.
success
.
active
=
true
...
@@ -241,5 +248,75 @@ cc.Class({
...
@@ -241,5 +248,75 @@ cc.Class({
this
.
board
.
active
=
false
this
.
board
.
active
=
false
this
.
teacher
.
active
=
false
this
.
teacher
.
active
=
false
this
.
gameState
=
'waiting'
this
.
gameState
=
'waiting'
var
remoteDomain
=
'https://nzr2ybsda.qnssl.com/images/153823/'
var
pictures
=
[
{
"level"
:
1
,
"pictures"
:
[
"https://nzr2ybsda.qnssl.com/images/153823/Fo5on4A0pScy96ePN-2vtToLhHWN.jpg?imageMogr2/strip/thumbnail/260x260>/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/FlJQyhmeWyked6lekjh-Yln9nJUD.jpg?imageMogr2/strip/thumbnail/260x260>/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/Filk-VYB6CVCDEkHHgRPUc2c6k9T.jpg?imageMogr2/strip/thumbnail/130x130>/interlace/1/format/jpg"
]
},
{
"level"
:
2
,
"pictures"
:
[
"https://nzr2ybsda.qnssl.com/images/153823/FukPQtvtJr-lKlYJPANNPdjjEiyt.jpeg?imageMogr2/strip/thumbnail/130x130>/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/Flhh6hGAhnSbuHajEEN-c2dCJfaK.jpg?imageMogr2/strip/thumbnail/130x130>/quality/90!/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/FjcKpOaAtIfz4L4Vvkif-EClqn64.jpg?imageMogr2/strip/thumbnail/260x260>/quality/90!/interlace/1/format/jpg"
]
},
{
"level"
:
3
,
"pictures"
:
[
"https://nzr2ybsda.qnssl.com/images/153823/FpyOcbiPM8tDXogYzGDPDEFrO_T9.jpg?imageMogr2/strip/thumbnail/130x130>/quality/90!/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/Fn939nNNkFzW_htvSvBkvwvl6TMh.jpg?imageMogr2/strip/thumbnail/130x130>/quality/90!/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/Fo_IiyCr10dZIR6J7dJ9y7hs8nae.jpeg?imageMogr2/strip/thumbnail/260x260>/quality/90!/interlace/1/format/jpg"
]
},
{
"level"
:
4
,
"pictures"
:
[
"https://nzr2ybsda.qnssl.com/images/153823/FhUfcO8E990i02gJ7hnpz7xCSc3o.jpg?imageMogr2/strip/thumbnail/130x130>/quality/90!/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/FvoIECoOwdGFgeFMuIOIWzAkg61Y.jpg?imageMogr2/strip/thumbnail/260x260>/quality/90!/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/FqxgwpiGV-U3KiwK4CHUm1B0zdSH.jpg?imageMogr2/strip/thumbnail/260x260>/interlace/1/format/jpg"
]
},
{
"level"
:
5
,
"pictures"
:
[
"https://nzr2ybsda.qnssl.com/images/153823/Fk-9x5cihrhKFGMZHMglOqQEddkv.jpg?imageMogr2/strip/thumbnail/260x260>/quality/90!/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/FkdzV_YWdahiMGKB02Yp2CoTYgMS.jpg?imageMogr2/strip/thumbnail/260x260>/quality/90!/interlace/1/format/jpg"
,
"https://nzr2ybsda.qnssl.com/images/153823/Fi76VUfm2q-M-4Yyls6V8SbGOBIn.jpg?imageMogr2/strip/thumbnail/260x260>/quality/90!/interlace/1/format/jpg"
]
}
]
var
index
=
Math
.
floor
(
Math
.
random
()
*
3
)
var
pictureUrl
=
''
if
(
this
.
score
<
300
)
{
pictureUrl
=
pictures
[
0
].
pictures
[
index
]
}
else
if
(
this
.
score
<
600
)
{
pictureUrl
=
pictures
[
1
].
pictures
[
index
]
}
else
if
(
this
.
score
<
900
)
{
pictureUrl
=
pictures
[
2
].
pictures
[
index
]
}
else
if
(
this
.
score
<
1200
)
{
pictureUrl
=
pictures
[
3
].
pictures
[
index
]
}
else
if
(
this
.
score
<
1500
)
{
pictureUrl
=
pictures
[
4
].
pictures
[
index
]
}
else
if
(
this
.
score
<
1800
)
{
pictureUrl
=
pictures
[
5
].
pictures
[
index
]
}
else
{
pictureUrl
=
pictures
[
index
].
pictures
[
index
]
}
self
.
success
.
addComponent
(
cc
.
Sprite
)
cc
.
loader
.
load
(
pictureUrl
,
function
(
err
,
texture
)
{
// Use texture to create sprite frame
var
picture
=
new
cc
.
SpriteFrame
(
texture
);
console
.
info
(
picture
)
self
.
success
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
picture
;
});
},
},
});
});
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