Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
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
劳工
zeroing-libs
Commits
77f8872c
Commit
77f8872c
authored
Jul 11, 2020
by
汪欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addother
parent
b0afd988
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
352 additions
and
235 deletions
+352
-235
app.js
src/custom/getAwayFromCloud/debug/app.js
+1
-2
main.js
src/custom/getAwayFromCloud/debug/main.js
+54
-18
main.js.map
src/custom/getAwayFromCloud/debug/main.js.map
+1
-1
meta.json
src/custom/getAwayFromCloud/meta.json
+27
-12
GameTest.ts
src/custom/getAwayFromCloud/src/game/GameTest.ts
+240
-201
GameView.ts
src/custom/getAwayFromCloud/src/game/GameView.ts
+1
-1
Human.ts
src/custom/getAwayFromCloud/src/game/Human.ts
+23
-0
TimeCounter.ts
src/custom/getAwayFromCloud/src/game/TimeCounter.ts
+3
-0
utils.ts
src/custom/getAwayFromCloud/src/game/utils.ts
+2
-0
No files found.
src/custom/getAwayFromCloud/debug/app.js
View file @
77f8872c
...
...
@@ -47,8 +47,7 @@ function launchWithCustomModule(customModule) {
setTimeout
(()
=>
{
engine
.
globalEvent
.
dispatchEvent
(
'pictures-start'
,
{
picUrl
:
"//yun.duiba.com.cn/aurora/assets/f57e4cbfe6bb27333c8d53ed1031624c4e0500aa.pnghttp://yun.duiba.com.cn/aurora/assets/e1593b97c27077b85b92f7eaaeae1ed64a1eb79a.png"
,
blockUrl
:
"c9ff7c30-2734-417d-a811-d88b6b7140b8"
,
});
// const d = engine.gameStage.sceneContainer.getChildAt(0);
...
...
src/custom/getAwayFromCloud/debug/main.js
View file @
77f8872c
...
...
@@ -7,6 +7,11 @@
function
getTexture
(
uuid
)
{
return
engine
.
Texture
.
from
(
getAssetByUUID
(
uuid
).
uuid
);
}
function
createSvga
(
name
,
anchorName
)
{
var
inst
=
new
svga
.
Svga
();
inst
.
source
=
'asset://'
+
engine
.
getAssetByName
(
name
).
uuid
;
return
inst
;
}
//# sourceMappingURL=utils.js.map
var
Human
=
(
function
(
_super
)
{
...
...
@@ -32,6 +37,27 @@
Human
.
prototype
.
removeFace
=
function
(
face
)
{
this
.
human
.
removeChild
(
face
);
};
Human
.
prototype
.
scaleEffect
=
function
()
{
var
_this
=
this
;
var
aaa
=
0
;
var
pt
=
Date
.
now
();
this
.
addEventListener
(
engine
.
Event
.
ENTER_FRAME
,
function
()
{
var
dt
=
Date
.
now
()
-
pt
;
aaa
+=
dt
;
_this
.
anchorX
=
_this
.
width
;
_this
.
anchorY
=
_this
.
height
;
if
(
aaa
>
90
&&
aaa
<=
100
)
{
_this
.
scaleY
=
0.99
;
_this
.
scaleX
=
1.01
;
}
if
(
aaa
>
190
&&
aaa
<
200
)
{
_this
.
scaleX
=
1
;
_this
.
scaleY
=
1
;
aaa
=
0
;
}
pt
=
Date
.
now
();
});
};
return
Human
;
}(
engine
.
Container
));
//# sourceMappingURL=Human.js.map
...
...
@@ -163,6 +189,9 @@
_this
.
R
=
250
;
_this
.
D
=
340
;
_this
.
con
=
new
engine
.
Sprite
();
_this
.
t1
=
new
engine
.
Sprite
(
getTexture
(
'a163b74f-32bc-43d2-8015-7cf1eac71501'
));
_this
.
t2
=
new
engine
.
Sprite
(
getTexture
(
'22de82d1-97ec-4195-a32c-f4fc1656e2de'
));
_this
.
t3
=
new
engine
.
Sprite
(
getTexture
(
'cc952365-a990-4912-98af-50905559b9d5'
));
_this
.
once
(
engine
.
Event
.
ADDED_TO_STAGE
,
_this
.
setup
,
_this
);
return
_this
;
}
...
...
@@ -196,6 +225,11 @@
var
middleX
=
this
.
humanbeing
.
x
+
this
.
humanbeing
.
width
/
2
;
var
validX1
=
this
.
humanbeing
.
x
;
var
validX2
=
this
.
humanbeing
.
x
+
this
.
humanbeing
.
width
;
var
drip
=
new
engine
.
Sprite
(
getTexture
(
"07f74bf6-416f-445e-98d5-021efe4c9fdc"
));
drip
.
x
=
200
;
drip
.
y
=
0
;
this
.
dripArray
.
push
(
drip
);
this
.
addChild
(
drip
);
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
{
var
y
=
-
Math
.
sqrt
(
this
.
R
*
this
.
R
-
(
i
-
middleX
-
50
)
*
(
i
-
middleX
-
50
))
+
(
this
.
humanbeing
.
y
+
180
);
...
...
@@ -210,6 +244,7 @@
var
point1
=
new
engine
.
Graphics
();
point1
.
beginFill
(
0xff0000
);
point1
.
drawRect
(
0
,
0
,
10
,
10
);
point1
.
x
=
0
;
point1
.
y
=
100
;
point1
.
endFill
();
this
.
rightHand
.
addChild
(
point1
);
...
...
@@ -217,6 +252,7 @@
point2
.
beginFill
(
0xff0000
);
point2
.
drawRect
(
0
,
0
,
10
,
10
);
point2
.
x
=
170
;
point2
.
y
=
0
;
point2
.
endFill
();
this
.
rightHand
.
addChild
(
point2
);
var
point3
=
new
engine
.
Graphics
();
...
...
@@ -231,25 +267,25 @@
var
ld
=
Date
.
now
();
var
a
=
0
;
var
b
=
0
;
var
drip
=
new
engine
.
Sprite
(
getTexture
(
"07f74bf6-416f-445e-98d5-021efe4c9fdc"
)
);
drip
.
x
=
Math
.
random
()
*
(
this
.
humanbeing
.
x
+
160
)
+
(
this
.
humanbeing
.
x
-
160
);
drip
.
worldMatrix
.
ty
=
Math
.
random
()
*
100
+
300
;
this
.
dripArray
.
push
(
drip
);
this
.
addChild
(
drip
);
this
.
winds
=
createSvga
(
"wind"
);
this
.
addChild
(
this
.
winds
);
this
.
winds
.
visible
=
true
;
this
.
winds
.
play
(
true
,
true
);
this
.
winds
.
once
(
engine
.
Event
.
END_FRAME
,
function
()
{
_this
.
removeChild
(
_this
.
winds
);
},
this
);
this
.
addEventListener
(
engine
.
Event
.
ENTER_FRAME
,
function
()
{
var
dt
=
Date
.
now
()
-
ld
;
a
+=
dt
;
b
+=
dt
;
if
(
a
>
200
)
{
a
=
0
;
if
(
_this
.
timeCounter
.
time
>
0
)
{
if
(
_this
.
moists
.
percent
<
1
&&
_this
.
timeCounter
.
time
>
0
)
{
var
drip_1
=
new
engine
.
Sprite
(
getTexture
(
"07f74bf6-416f-445e-98d5-021efe4c9fdc"
));
drip_1
.
x
=
Math
.
random
()
*
(
_this
.
humanbeing
.
x
+
160
)
+
(
_this
.
humanbeing
.
x
-
160
);
drip_1
.
worldMatrix
.
t
y
=
Math
.
random
()
*
100
+
300
;
drip_1
.
y
=
Math
.
random
()
*
100
+
300
;
_this
.
dripArray
.
push
(
drip_1
);
_this
.
addChild
(
drip_1
);
}
...
...
@@ -268,12 +304,12 @@
}
if
(
b
>=
1000
)
{
b
=
0
;
_this
.
timeCounter
.
time
-=
1
;
if
(
_this
.
timeCounter
.
time
<=
0
)
{
_this
.
timeCounter
.
time
=
0
;
if
(
_this
.
moists
.
percent
<
1
)
{
_this
.
timeCounter
.
time
-=
1
;
_this
.
timeCounter
.
updateTime
(
_this
.
timeCounter
.
time
)
;
}
_this
.
timeCounter
.
updateTime
(
_this
.
timeCounter
.
time
);
if
(
_this
.
timeCounter
.
time
<=
0
)
{
_this
.
timeCounter
.
time
=
0
;
console
.
log
(
"游戏成功!"
);
_this
.
success
();
}
...
...
@@ -289,7 +325,6 @@
ld
=
Date
.
now
();
_this
.
angle
=
Math
.
asin
(
_this
.
D
/
2
/
_this
.
R
)
*
57.18
;
_this
.
rightHand
.
name
=
"aaa"
;
if
(
_this
.
stage
.
height
>
1334
)
;
var
k12
=
(
point1
.
worldMatrix
.
ty
-
point2
.
worldMatrix
.
ty
)
/
(
point1
.
worldMatrix
.
tx
-
point2
.
worldMatrix
.
tx
);
var
k23
=
(
point2
.
worldMatrix
.
ty
-
point3
.
worldMatrix
.
ty
)
/
...
...
@@ -306,16 +341,16 @@
point2
.
worldMatrix
.
tx
*
k23
-
50
;
var
y12
=
k12
*
drip_3
.
x
+
b12
;
var
y23
=
k23
*
drip_3
.
x
+
b23
;
if
(
drip_3
.
x
>
minX
&&
drip_3
.
x
<
maxX
)
{
if
(
drip_3
.
x
>
=
minX
&&
drip_3
.
x
<
maxX
)
{
if
(
drip_3
.
x
<
px2
)
{
if
(
drip_3
.
worldMatrix
.
t
y
>=
y12
)
{
if
(
drip_3
.
y
>=
y12
)
{
var
index_2
=
_this
.
dripArray
.
indexOf
(
drip_3
);
_this
.
removeChild
(
drip_3
);
_this
.
dripArray
=
_this
.
dripArray
.
filter
(
function
(
ele
,
i
)
{
return
i
!=
index_2
;
});
}
}
if
(
drip_3
.
x
>=
px2
)
{
if
(
drip_3
.
worldMatrix
.
t
y
>=
y23
)
{
if
(
drip_3
.
y
>=
y23
)
{
var
index_3
=
_this
.
dripArray
.
indexOf
(
drip_3
);
_this
.
removeChild
(
drip_3
);
_this
.
dripArray
=
_this
.
dripArray
.
filter
(
function
(
ele
,
i
)
{
return
i
!=
index_3
;
});
...
...
@@ -339,10 +374,11 @@
face_1
.
y
=
22
;
setTimeout
(
function
()
{
_this
.
humanbeing
.
removeFace
(
face_1
);
},
10
00
);
},
5
00
);
console
.
log
(
"人"
);
var
index_4
=
_this
.
dripArray
.
indexOf
(
drip_3
);
_this
.
dripArray
=
_this
.
dripArray
.
filter
(
function
(
ele
,
i
)
{
return
i
!=
index_4
;
});
_this
.
humanbeing
.
scaleEffect
();
}
}
};
...
...
src/custom/getAwayFromCloud/debug/main.js.map
View file @
77f8872c
{"version":3,"file":"index.js","sources":["src/custom/getAwayFromCloud/src/game/utils.ts","src/custom/getAwayFromCloud/src/game/Human.ts","src/custom/getAwayFromCloud/src/game/Moist.ts","src/custom/getAwayFromCloud/src/game/TimeCounter.ts","src/custom/getAwayFromCloud/src/game/CloudRain.ts","src/custom/getAwayFromCloud/src/game/GameTest.ts","src/custom/getAwayFromCloud/src/props.ts","src/custom/getAwayFromCloud/src/game/GameWrapper.ts","src/custom/getAwayFromCloud/src/index.ts"],"sourcesContent":["/**\r\n * Created by rockyl on 2020-01-21.\r\n */\r\n\r\nexport function getTexture(uuid) {\r\n\treturn engine.Texture.from(getAssetByUUID(uuid).uuid);\r\n}\r\n\r\nexport function getTextureByName(name) {\r\n\treturn getTexture(engine.getAssetByName(name).uuid);\r\n}\r\n\r\nexport function playSound(name) {\r\n\tengine.playSound(engine.getAssetByName(name).uuid, {keep: true});\r\n}\r\nexport function createSvga(name, anchorName?) {\r\n\tlet inst = new svga.Svga();\r\n\tinst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\treturn inst;\r\n}\r\n\r\nexport function getIndexFromRC(row,col,maxCol){\r\n\tlet index;\r\n\tindex = row * maxCol + col ;\r\n\treturn index\r\n}\r\n\r\n\r\n\r\n\r\nexport function getRandomArray(array){\r\n\tarray.sort(function() {\r\n\t\treturn .5 - Math.random();\r\n\t});\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class Human extends engine.Container{\r\n \r\n //常态,吃力,沮丧\r\n humanArray = [\r\n '487c1ca7-dea5-4732-b4b6-acb5406ee3a4',\r\n '71e07cee-fd6d-40bb-ac0b-5bb28c87276e',\r\n '2cd9f1bb-d0d8-42ea-941b-dcd0428e474d'\r\n ]\r\n //三张面部表情\r\n human:engine.Sprite = new engine.Sprite(getTexture(this.humanArray[0]))\r\n\r\n constructor(){\r\n super();\r\n this.addChild(this.human)\r\n this.width = this.human.width;\r\n this.height = this.human.height;\r\n }\r\n\r\n facialChange(num){\r\n let face = new engine.Sprite(getTexture(this.humanArray[num]));\r\n this.human.addChild(face);\r\n return face;\r\n }\r\n\r\n removeFace(face){\r\n this.human.removeChild(face);\r\n }\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class Moist extends engine.Container{\r\n\r\n percent:number\r\n moistBg:engine.Sprite = new engine.Sprite(getTexture('8a8e79b6-2c6f-441b-81ae-c441465abfb0'))\r\n moist:engine.Sprite = new engine.Sprite(getTexture('024d67e9-ed7f-4481-94ca-a15bd5226cad'))\r\n moistCover:any = new engine.Sprite(getTexture('024d67e9-ed7f-4481-94ca-a15bd5226cad'))\r\n txt = new engine.TextInput();\r\n hintpic:engine.Sprite = new engine.Sprite(getTexture('ed0e8931-2557-4527-bcfc-9071f90d5737'))\r\n constructor(){\r\n super();\r\n this.percent = 0;\r\n this.addChild(this.moistBg)\r\n this.moistBg.addChild(this.moist)\r\n this.moist.mask = this.moistCover;\r\n\r\n\r\n this.txt.text = this.percent*100+'%';\r\n this.txt.size = 30;\r\n this.txt.fillColor = '#7A83C5';\r\n this.addChild(this.txt)\r\n this.txt.x = 0;\r\n this.txt.y = -50;\r\n\r\n this.hintpic.x = -10;\r\n this.hintpic.y = 440;\r\n this.addChild(this.hintpic)\r\n }\r\n\r\n cover(percent){\r\n this.moistCover.anchorY = 416;\r\n this.moistBg.addChild(this.moistCover)\r\n this.moistCover.scaleY = percent;\r\n }\r\n\r\n stopScale(){\r\n this.moistCover.scaleY = 1;\r\n this.txt.text = '100%';\r\n }\r\n\r\n updateText(percent){\r\n let a = percent * 100;\r\n if(a <=90){\r\n this.txt.text = a.toPrecision(2)+'%';\r\n }else{\r\n this.txt.text = a.toPrecision(3)+'%';\r\n }\r\n }\r\n\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class TimeCounter extends engine.Container{\r\n timeCounter:engine.Sprite = new engine.Sprite(getTexture('b7d2a60a-9e60-4eca-be80-a991abea47c9'));\r\n timeText:any;\r\n time:number\r\n constructor(){\r\n super()\r\n this.time = 20\r\n this.addChild(this.timeCounter)\r\n\r\n this.timeCounter.x = 256;\r\n this.timeCounter.y = 50;\r\n // 计时文本\r\n this.timeText = new engine.TextInput();\r\n this.timeText.text = this.time +'s';\r\n this.timeText.size = 48;\r\n this.timeText.fillColor = '#7A83C5';\r\n this.timeCounter.addChild(this.timeText);\r\n this.timeText.x = 100;\r\n this.timeText.y = 15;\r\n }\r\n\r\n updateTime(time){\r\n this.time = time;\r\n this.timeText.text = this.time + 's'\r\n }\r\n\r\n\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class CloudRain extends engine.Container{\r\n\r\n clound1:engine.Sprite = new engine.Sprite(getTexture('1e1a6993-9da0-4813-b1bd-00f2dbae2af2'))\r\n clound2:engine.Sprite = new engine.Sprite(getTexture('6ed0e2e7-3ba3-4967-8fe0-39667792e343'))\r\n sun = new engine.Sprite(getTexture(\"0f05aaae-338a-439a-82b0-20efcee5cca4\"));\r\n \r\n constructor(){\r\n super()\r\n this.sun.x = 90;\r\n this.sun.y = 120;\r\n this.addChild(this.sun)\r\n\r\n this.addChild(this.clound1);\r\n this.addChild(this.clound2);\r\n\r\n this.clound1.x = 100;\r\n this.clound1.y = 220;\r\n this.clound2.x = 150;\r\n this.clound2.y = 220;\r\n\r\n }\r\n\r\n succeed(){\r\n // 380 580\r\n let a = 0\r\n let ld = Date.now();\r\n this.addEventListener(engine.Event.ENTER_FRAME,()=>{\r\n let dt = Date.now() - ld;\r\n a += dt;\r\n if(a>100){\r\n this.clound1.x -= (800 * dt) / 1000;\r\n this.clound2.x += (820*dt)/1000;\r\n if(this.clound1.x <= -380){\r\n this.clound1.x = -380;\r\n }\r\n if(this.clound2.x >= 750){\r\n this.clound2.x = 750;\r\n }\r\n\r\n this.sun.y -= (150 * dt) / 1000;\r\n if(this.sun.y <= 60){\r\n this.sun.y = 60;\r\n }\r\n }\r\n ld = Date.now();\r\n })\r\n }\r\n\r\n\r\n \r\n\r\n\r\n\r\n}","import { getTexture } from \"./utils\";\r\n\r\nimport Human from \"./Human\";\r\nimport Moist from \"./Moist\";\r\nimport TimeCounter from \"./TimeCounter\";\r\nimport CloudRain from \"./CloudRain\";\r\n\r\nexport default class GameTest extends engine.Container {\r\n constructor() {\r\n super();\r\n this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\r\n }\r\n\r\n rightHand: engine.Sprite;\r\n ambrella: engine.Sprite;\r\n playBtn: engine.Sprite;\r\n human: engine.Sprite;\r\n\r\n humanbeing: Human;\r\n moists: Moist;\r\n contain: any;\r\n timeCounter: TimeCounter;\r\n cloudRain: CloudRain;\r\n cloud: CloudRain;\r\n\r\n setup() {\r\n let playBg = new engine.Sprite(\r\n getTexture(\"5ab43bdc-a6ce-46fb-99c2-a806f57f7484\")\r\n );\r\n this.addChild(playBg);\r\n\r\n // this.human = new engine.Sprite(\r\n // getTexture(\"487c1ca7-dea5-4732-b4b6-acb5406ee3a4\")\r\n // );\r\n // this.human.x = 290;\r\n // this.human.y = 900;\r\n // 人\r\n this.humanbeing = new Human();\r\n this.humanbeing.x = 290;\r\n // this.humanbeing.y = 900;\r\n this.humanbeing.y = 750;\r\n this.addChild(this.humanbeing);\r\n\r\n // this.contain = new engine.Sprite()\r\n console.log(\r\n \"xxxxxx\",\r\n this.stage.width,\r\n this.stage.height,\r\n this.width,\r\n this.height\r\n );\r\n\r\n // 手和伞为一个整体\r\n this.rightHand = new engine.Sprite(\r\n getTexture(\"c7129f77-92a6-479e-9994-7d4b39040a15\")\r\n );\r\n this.rightHand.x = -70;\r\n this.rightHand.y = -65;\r\n this.rightHand.anchorX = 196;\r\n this.rightHand.anchorY = 253;\r\n\r\n this.humanbeing.addChild(this.rightHand);\r\n\r\n // this.addChild(this.human);\r\n // this.human.addChild(this.rightHand);\r\n\r\n this.playBtn = new engine.Sprite(\r\n getTexture(\"9e347bef-6e91-4c92-ba5f-f9a52e656207\")\r\n );\r\n this.playBtn.x = 138;\r\n this.playBtn.y = 1150;\r\n this.addChild(this.playBtn);\r\n // 湿润度\r\n this.moists = new Moist();\r\n this.moists.x = 20;\r\n this.moists.y = 450;\r\n this.addChild(this.moists);\r\n\r\n // 云\r\n this.cloud = new CloudRain();\r\n this.addChild(this.cloud);\r\n }\r\n\r\n dripArray: any[] = [];\r\n clicknum: number = 0;\r\n R: number = 250;\r\n D: number = 340;\r\n angle: number;\r\n\r\n con: engine.Sprite = new engine.Sprite();\r\n\r\n start() {\r\n const middleX = this.humanbeing.x + this.humanbeing.width / 2;\r\n const validX1 = this.humanbeing.x;\r\n const validX2 = this.humanbeing.x + this.humanbeing.width;\r\n\r\n // 弧形参考线\r\n for (let i = 0; i < 1000; i++) {\r\n let y =\r\n -Math.sqrt(\r\n this.R * this.R - (i - middleX - 50) * (i - middleX - 50)\r\n ) +\r\n (this.humanbeing.y + 180);\r\n\r\n let img = new engine.Sprite(\r\n getTexture(\"e4a82aee-4472-4b06-bd75-02fb64f1c8c8\")\r\n );\r\n img.width = 2;\r\n img.height = 2;\r\n img.x = i;\r\n img.y = y;\r\n this.con.addChild(img);\r\n }\r\n this.addChild(this.con);\r\n\r\n // 位移\r\n // setInterval(()=>{\r\n // for(let drip of this.dripArray){\r\n // drip.worldMatrix.ty += 10;\r\n // if(drip.y > this.stage.height){\r\n // this.removeChild(drip);\r\n // let index = this.dripArray.indexOf(drip)\r\n // this.dripArray = this.dripArray.filter((ele,i)=>i != index)\r\n // }\r\n // }\r\n // },100)\r\n\r\n let point1 = new engine.Graphics();\r\n point1.beginFill(0xff0000);\r\n point1.drawRect(0, 0, 10, 10);\r\n point1.y = 100;\r\n point1.endFill();\r\n // this.addChild(point1)\r\n this.rightHand.addChild(point1);\r\n\r\n let point2 = new engine.Graphics();\r\n point2.beginFill(0xff0000);\r\n point2.drawRect(0, 0, 10, 10);\r\n point2.x = 170;\r\n point2.endFill();\r\n // this.addChild(point2)\r\n this.rightHand.addChild(point2);\r\n\r\n let point3 = new engine.Graphics();\r\n point3.beginFill(0xff0000);\r\n point3.drawRect(0, 0, 10, 10);\r\n point3.x = 330;\r\n point3.y = 100;\r\n point3.endFill();\r\n // this.addChild(point3)\r\n this.rightHand.addChild(point3);\r\n\r\n //计时器\r\n this.timeCounter = new TimeCounter();\r\n this.addChild(this.timeCounter);\r\n // setInterval(()=>{\r\n // this.timeCounter.time -= 1;\r\n // this.timeCounter.updateTime(this.timeCounter.time);\r\n // if(this.timeCounter.time <= 0){\r\n // console.log('游戏结束!');\r\n\r\n // }\r\n // },1000)\r\n\r\n let ld = Date.now();\r\n\r\n let a = 0;\r\n let b = 0;\r\n \r\n let drip = new engine.Sprite(\r\n getTexture(\"07f74bf6-416f-445e-98d5-021efe4c9fdc\")\r\n );\r\n drip.x =\r\n Math.random() * (this.humanbeing.x + 160) +\r\n (this.humanbeing.x - 160);\r\n drip.worldMatrix.ty = Math.random() * 100 + 300;\r\n this.dripArray.push(drip);\r\n this.addChild(drip);\r\n\r\n this.addEventListener(engine.Event.ENTER_FRAME, () => {\r\n let dt = Date.now() - ld;\r\n\r\n a += dt;\r\n b += dt;\r\n\r\n if (a > 200) {\r\n a = 0;\r\n if (this.timeCounter.time > 0) {\r\n let drip = new engine.Sprite(\r\n getTexture(\"07f74bf6-416f-445e-98d5-021efe4c9fdc\")\r\n );\r\n drip.x =\r\n Math.random() * (this.humanbeing.x + 160) +\r\n (this.humanbeing.x - 160);\r\n drip.worldMatrix.ty = Math.random() * 100 + 300;\r\n this.dripArray.push(drip);\r\n this.addChild(drip);\r\n }\r\n\r\n // this.cloudRain = new CloudRain();\r\n // let x = Math.random() * (this.humanbeing.x + 160) + (this.humanbeing.x - 160);\r\n // let y = Math.random() * (100) + 200;\r\n // this.cloudRain.setPosition(x,y);\r\n\r\n // this.dripArray.push(this.cloudRain);\r\n }\r\n\r\n // 位移\r\n for (let drip of this.dripArray) {\r\n drip.y += (300 * dt) / 1000;\r\n if (drip.y > this.stage.height) {\r\n let index = this.dripArray.indexOf(drip);\r\n this.removeChild(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n }\r\n }\r\n //计时器\r\n if (b >= 1000) {\r\n b = 0;\r\n this.timeCounter.time -= 1;\r\n if (this.timeCounter.time <= 0) {\r\n this.timeCounter.time = 0;\r\n }\r\n this.timeCounter.updateTime(this.timeCounter.time);\r\n\r\n if (this.timeCounter.time <= 0) {\r\n console.log(\"游戏成功!\");\r\n // 云动画\r\n // 雨水结束\r\n // 太阳出来\r\n this.success();\r\n // this.removeEventListener(engine.Event.END_FRAME,()=>{})\r\n }\r\n }\r\n\r\n // for(let cloudrain of this.dripArray){\r\n // cloudrain.drip.y += (300 * dt) / 1000;\r\n // if (cloudrain.drip.y > this.stage.height) {\r\n // this.removeChild(cloudrain);\r\n // let index = this.dripArray.indexOf(cloudrain);\r\n // this.dripArray = this.dripArray.filter(\r\n // (ele, i) => i != index\r\n // );\r\n // }\r\n // }\r\n\r\n let wind = -40;\r\n this.rightHand.rotation += wind / 60;\r\n\r\n if (this.rightHand.rotation <= -90) {\r\n this.rightHand.rotation = -90;\r\n } else if (this.rightHand.rotation >= 90) {\r\n this.rightHand.rotation = 90;\r\n }\r\n ld = Date.now();\r\n\r\n // return;\r\n // 扇形的角度\r\n this.angle = Math.asin(this.D / 2 / this.R) * 57.18;\r\n\r\n // 伞的偏移角度距离水平位置\r\n let validMaxX;\r\n let validMinX;\r\n // 伞的圆函数\r\n let ambrellaFuncY;\r\n\r\n this.rightHand.name = \"aaa\";\r\n\r\n // a.worldMatrix.tx\r\n\r\n // point1,2线性方程斜率\r\n let aa = 0;\r\n if (this.stage.height > 1334) {\r\n aa = 290;\r\n }\r\n let k12 =\r\n (point1.worldMatrix.ty - point2.worldMatrix.ty) /\r\n (point1.worldMatrix.tx - point2.worldMatrix.tx);\r\n let k23 =\r\n (point2.worldMatrix.ty - point3.worldMatrix.ty) /\r\n (point2.worldMatrix.tx - point3.worldMatrix.tx);\r\n\r\n let px1 = point1.worldMatrix.tx;\r\n let px2 = point2.worldMatrix.tx;\r\n let px3 = point3.worldMatrix.tx;\r\n let maxX =\r\n px1 >= px2 ? (px1 >= px3 ? px1 : px3) : px2 >= px3 ? px2 : px3;\r\n let minX =\r\n px1 >= px2 ? (px2 >= px3 ? px3 : px2) : px1 >= px3 ? px3 : px1;\r\n\r\n // let x2 = (middleX + this.R) < maxX ? (middleX+this.R):maxX;\r\n for (let drip of this.dripArray) {\r\n // point1,2线性方程\r\n let b12 =\r\n point1.worldMatrix.ty -\r\n point1.worldMatrix.tx * k12 - 50;\r\n let b23 =\r\n point2.worldMatrix.ty -\r\n point2.worldMatrix.tx * k23 - 50;\r\n let y12 = k12 * drip.x + b12;\r\n let y23 = k23 * drip.x + b23;\r\n if (drip.x > minX && drip.x < maxX) {\r\n // 伞碰撞12\r\n if (drip.x < px2) {\r\n // if (Math.abs(y12 -drip.worldMatrix.ty) <= 20) {\r\n if (drip.worldMatrix.ty >= y12) {\r\n let index = this.dripArray.indexOf(drip);\r\n this.removeChild(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n }\r\n // }\r\n }\r\n // 23\r\n if (drip.x >= px2) {\r\n // if (Math.abs(y23 -drip.worldMatrix.ty) <= 20) {\r\n if (drip.worldMatrix.ty >= y23) {\r\n let index = this.dripArray.indexOf(drip);\r\n this.removeChild(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n }\r\n // }\r\n }\r\n }\r\n\r\n // 碰人\r\n if (\r\n drip.x > this.humanbeing.x &&\r\n drip.x < this.humanbeing.x + this.humanbeing.width\r\n ) {\r\n if (drip.y >= this.humanbeing.y) {\r\n this.moists.percent += 0.1;\r\n this.moists.cover(this.moists.percent);\r\n this.moists.updateText(this.moists.percent);\r\n\r\n if (this.moists.percent >= 1) {\r\n // 游戏结束\r\n this.moists.stopScale();\r\n console.log(\"游戏结束!\");\r\n // 清除事件\r\n this.stop();\r\n }\r\n\r\n this.removeChild(drip);\r\n let face = this.humanbeing.facialChange(2);\r\n face.x = 7;\r\n face.y = 22;\r\n setTimeout(() => {\r\n this.humanbeing.removeFace(face);\r\n }, 1000);\r\n console.log(\"人\");\r\n\r\n let index = this.dripArray.indexOf(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n }\r\n }\r\n }\r\n\r\n ld = Date.now();\r\n });\r\n\r\n this.playBtn.addEventListener(\r\n engine.MouseEvent.CLICK,\r\n this.onClick,\r\n this\r\n );\r\n // this.rightHand.rotation = 0;\r\n }\r\n\r\n onClick() {\r\n this.clicknum += 1;\r\n this.rightHand.rotation += 10 * this.clicknum;\r\n this.clicknum = 0;\r\n }\r\n stop() {\r\n // this.removeAllEventListener();\r\n // this.playBtn.removeAllEventListener();\r\n engine.globalEvent.dispatchEvent(\"cloud-game-fail\", { reason: 1 });\r\n }\r\n\r\n success() {\r\n this.cloud.succeed();\r\n engine.globalEvent.dispatchEvent(\"cloud-game-success\", {\r\n moist: this.moists.percent,\r\n });\r\n }\r\n}\r\n","\r\n\r\nexport let props: any = {};\r\n\r\nexport function prepareProps() {\r\n\tlet metaProps = getProps();\r\n\r\n\tengine.injectProp(props, metaProps);\r\n}\r\n\r\nexport function injectProps(p) {\r\n\tengine.injectProp(props, p);\r\n}\r\n","\r\nimport GameView from \"./GameView\";\r\nimport GameTest from \"./GameTest\";\r\n\r\nimport { injectProps } from \"../props\";\r\n\r\n\r\nexport class GameWrapper extends engine.Container {\r\n\t// private _status;\r\n\tprivate _gameView: GameView;\r\n\tprivate _gameTest: GameTest;\r\n\r\n\r\n\r\n\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tengine.globalEvent.addEventListener('pictures-start', this.start, this);\r\n\t\tengine.globalEvent.addEventListener('pictures-stop', this.stop, this);\r\n\r\n\t\t//创建实例\r\n\t\t// let gameView = this._gameView = new GameView();\r\n\t\tlet gameTest = this._gameTest = new GameTest();\r\n\t\tthis.addChild(gameTest);\r\n\r\n\t}\r\n\r\n\tstart(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\r\n\t\t// this._status = 1;\r\n\r\n\t\t// this._gameView.start();\r\n\t\tthis._gameTest.start();\r\n\t}\r\n\tstop(event: engine.Event) {\r\n\t\t\r\n\t\t// this._gameView.stop();\r\n\t\tthis._gameTest.stop();\r\n\t}\r\n}\r\n","\r\n\r\nimport {GameWrapper} from \"./game/GameWrapper\";\r\nimport {injectProps, prepareProps} from \"./props\";\r\n\r\nexport default function (props) {\r\n\tprepareProps();\r\n\tinjectProps(props);\r\n\r\n\tlet instance = new GameWrapper();\r\n\t\r\n\treturn instance;\r\n}\r\n"],"names":["__extends"],"mappings":";;;;;;UAIgB,UAAU,CAAC,IAAI;KAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACvD,CAAC;;;CCJD;KAAmCA,+BAAgB;KAW/C;SAAA,YACI,iBAAO,SAIV;SAbD,gBAAU,GAAG;aACT,sCAAsC;aACtC,sCAAsC;aACtC,sCAAsC;UACzC,CAAA;SAED,WAAK,GAAiB,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;SAInE,KAAI,CAAC,QAAQ,CAAC,KAAI,CAAC,KAAK,CAAC,CAAA;SACzB,KAAI,CAAC,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC;SAC9B,KAAI,CAAC,MAAM,GAAG,KAAI,CAAC,KAAK,CAAC,MAAM,CAAC;;MACnC;KAED,4BAAY,GAAZ,UAAa,GAAG;SACZ,IAAI,IAAI,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SAC/D,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAC1B,OAAO,IAAI,CAAC;MACf;KAED,0BAAU,GAAV,UAAW,IAAI;SACX,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;MAChC;KACL,YAAC;CAAD,CAAC,CA3BkC,MAAM,CAAC,SAAS,GA2BlD;;;CC3BD;KAAmCA,+BAAgB;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xB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;MACvB;KACD,0BAAI,GAAJ,UAAK,KAAmB;SAGvB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;MACtB;KACF,kBAAC;CAAD,CAAC,CAnCgC,MAAM,CAAC,SAAS,GAmChD;;;iBCrCwB,KAAK;KAC7B,YAAY,EAAE,CAAC;KACf,WAAW,CAAC,KAAK,CAAC,CAAC;KAEnB,IAAI,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;KAEjC,OAAO,QAAQ,CAAC;CACjB,CAAC;;;;;;;;;"}
\ No newline at end of file
{"version":3,"file":"index.js","sources":["src/custom/getAwayFromCloud/src/game/utils.ts","src/custom/getAwayFromCloud/src/game/Human.ts","src/custom/getAwayFromCloud/src/game/Moist.ts","src/custom/getAwayFromCloud/src/game/TimeCounter.ts","src/custom/getAwayFromCloud/src/game/CloudRain.ts","src/custom/getAwayFromCloud/src/game/GameTest.ts","src/custom/getAwayFromCloud/src/props.ts","src/custom/getAwayFromCloud/src/game/GameWrapper.ts","src/custom/getAwayFromCloud/src/index.ts"],"sourcesContent":["/**\r\n * Created by rockyl on 2020-01-21.\r\n */\r\n\r\nexport function getTexture(uuid) {\r\n\treturn engine.Texture.from(getAssetByUUID(uuid).uuid);\r\n}\r\n\r\nexport function getTextureByName(name) {\r\n\treturn getTexture(engine.getAssetByName(name).uuid);\r\n}\r\n\r\nexport function playSound(name) {\r\n\tengine.playSound(engine.getAssetByName(name).uuid, {keep: true});\r\n}\r\nexport function createSvga(name, anchorName?) {\r\n\tlet inst = new svga.Svga();\r\n\tinst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\treturn inst;\r\n}\r\n\r\n\r\n\r\nexport function getIndexFromRC(row,col,maxCol){\r\n\tlet index;\r\n\tindex = row * maxCol + col ;\r\n\treturn index\r\n}\r\n\r\n\r\n\r\n\r\nexport function getRandomArray(array){\r\n\tarray.sort(function() {\r\n\t\treturn .5 - Math.random();\r\n\t});\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class Human extends engine.Container{\r\n \r\n //常态,吃力,沮丧\r\n humanArray = [\r\n '487c1ca7-dea5-4732-b4b6-acb5406ee3a4',\r\n '71e07cee-fd6d-40bb-ac0b-5bb28c87276e',\r\n '2cd9f1bb-d0d8-42ea-941b-dcd0428e474d'\r\n ]\r\n //三张面部表情\r\n human:engine.Sprite = new engine.Sprite(getTexture(this.humanArray[0]))\r\n\r\n constructor(){\r\n super();\r\n this.addChild(this.human)\r\n this.width = this.human.width;\r\n this.height = this.human.height;\r\n }\r\n\r\n facialChange(num){\r\n let face = new engine.Sprite(getTexture(this.humanArray[num]));\r\n this.human.addChild(face);\r\n return face;\r\n }\r\n\r\n removeFace(face){\r\n this.human.removeChild(face);\r\n }\r\n\r\n scaleEffect(){\r\n let aaa = 0;\r\n let pt = Date.now();\r\n this.addEventListener(engine.Event.ENTER_FRAME,()=>{\r\n let dt = Date.now() -pt;\r\n aaa += dt;\r\n this.anchorX = this.width\r\n this.anchorY = this.height;\r\n if(aaa > 90 && aaa<=100 ){\r\n this.scaleY = 0.99;\r\n this.scaleX = 1.01;\r\n }\r\n\r\n if(aaa >190 && aaa < 200){\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n aaa = 0;\r\n }\r\n\r\n pt = Date.now();\r\n })\r\n }\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class Moist extends engine.Container{\r\n\r\n percent:number\r\n moistBg:engine.Sprite = new engine.Sprite(getTexture('8a8e79b6-2c6f-441b-81ae-c441465abfb0'))\r\n moist:engine.Sprite = new engine.Sprite(getTexture('024d67e9-ed7f-4481-94ca-a15bd5226cad'))\r\n moistCover:any = new engine.Sprite(getTexture('024d67e9-ed7f-4481-94ca-a15bd5226cad'))\r\n txt = new engine.TextInput();\r\n hintpic:engine.Sprite = new engine.Sprite(getTexture('ed0e8931-2557-4527-bcfc-9071f90d5737'))\r\n constructor(){\r\n super();\r\n this.percent = 0;\r\n this.addChild(this.moistBg)\r\n this.moistBg.addChild(this.moist)\r\n this.moist.mask = this.moistCover;\r\n\r\n\r\n this.txt.text = this.percent*100+'%';\r\n this.txt.size = 30;\r\n this.txt.fillColor = '#7A83C5';\r\n this.addChild(this.txt)\r\n this.txt.x = 0;\r\n this.txt.y = -50;\r\n\r\n this.hintpic.x = -10;\r\n this.hintpic.y = 440;\r\n this.addChild(this.hintpic)\r\n }\r\n\r\n cover(percent){\r\n this.moistCover.anchorY = 416;\r\n this.moistBg.addChild(this.moistCover)\r\n this.moistCover.scaleY = percent;\r\n }\r\n\r\n stopScale(){\r\n this.moistCover.scaleY = 1;\r\n this.txt.text = '100%';\r\n }\r\n\r\n updateText(percent){\r\n let a = percent * 100;\r\n if(a <=90){\r\n this.txt.text = a.toPrecision(2)+'%';\r\n }else{\r\n this.txt.text = a.toPrecision(3)+'%';\r\n }\r\n }\r\n\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class TimeCounter extends engine.Container{\r\n timeCounter:engine.Sprite = new engine.Sprite(getTexture('b7d2a60a-9e60-4eca-be80-a991abea47c9'));\r\n timeText:any;\r\n time:number\r\n\r\n \r\n constructor(){\r\n super()\r\n this.time = 20\r\n this.addChild(this.timeCounter)\r\n\r\n this.timeCounter.x = 256;\r\n this.timeCounter.y = 50;\r\n // 计时文本\r\n this.timeText = new engine.TextInput();\r\n this.timeText.text = this.time +'s';\r\n this.timeText.size = 48;\r\n this.timeText.fillColor = '#7A83C5';\r\n this.timeCounter.addChild(this.timeText);\r\n this.timeText.x = 100;\r\n this.timeText.y = 15;\r\n\r\n }\r\n\r\n updateTime(time){\r\n this.time = time;\r\n this.timeText.text = this.time + 's'\r\n }\r\n\r\n\r\n}","import {getTexture} from './utils'\r\n\r\nexport default class CloudRain extends engine.Container{\r\n\r\n clound1:engine.Sprite = new engine.Sprite(getTexture('1e1a6993-9da0-4813-b1bd-00f2dbae2af2'))\r\n clound2:engine.Sprite = new engine.Sprite(getTexture('6ed0e2e7-3ba3-4967-8fe0-39667792e343'))\r\n sun = new engine.Sprite(getTexture(\"0f05aaae-338a-439a-82b0-20efcee5cca4\"));\r\n \r\n constructor(){\r\n super()\r\n this.sun.x = 90;\r\n this.sun.y = 120;\r\n this.addChild(this.sun)\r\n\r\n this.addChild(this.clound1);\r\n this.addChild(this.clound2);\r\n\r\n this.clound1.x = 100;\r\n this.clound1.y = 220;\r\n this.clound2.x = 150;\r\n this.clound2.y = 220;\r\n\r\n }\r\n\r\n succeed(){\r\n // 380 580\r\n let a = 0\r\n let ld = Date.now();\r\n this.addEventListener(engine.Event.ENTER_FRAME,()=>{\r\n let dt = Date.now() - ld;\r\n a += dt;\r\n if(a>100){\r\n this.clound1.x -= (800 * dt) / 1000;\r\n this.clound2.x += (820*dt)/1000;\r\n if(this.clound1.x <= -380){\r\n this.clound1.x = -380;\r\n }\r\n if(this.clound2.x >= 750){\r\n this.clound2.x = 750;\r\n }\r\n\r\n this.sun.y -= (150 * dt) / 1000;\r\n if(this.sun.y <= 60){\r\n this.sun.y = 60;\r\n }\r\n }\r\n ld = Date.now();\r\n })\r\n }\r\n\r\n\r\n \r\n\r\n\r\n\r\n}","import { getTexture,createSvga } from \"./utils\";\r\n\r\nimport Human from \"./Human\";\r\nimport Moist from \"./Moist\";\r\nimport TimeCounter from \"./TimeCounter\";\r\nimport CloudRain from \"./CloudRain\";\r\n\r\nexport default class GameTest extends engine.Container {\r\n constructor() {\r\n super();\r\n this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\r\n }\r\n\r\n rightHand: engine.Sprite;\r\n // ambrella: engine.Sprite;\r\n playBtn: engine.Sprite;\r\n human: engine.Sprite;\r\n\r\n humanbeing: Human;winds\r\n moists: Moist;\r\n contain: any;\r\n timeCounter: TimeCounter;\r\n cloudRain: CloudRain;\r\n cloud: CloudRain;\r\n winds\r\n setup() {\r\n let playBg = new engine.Sprite(\r\n getTexture(\"5ab43bdc-a6ce-46fb-99c2-a806f57f7484\")\r\n );\r\n this.addChild(playBg);\r\n\r\n // this.human = new engine.Sprite(\r\n // getTexture(\"487c1ca7-dea5-4732-b4b6-acb5406ee3a4\")\r\n // );\r\n // this.human.x = 290;\r\n // this.human.y = 900;\r\n // 人\r\n this.humanbeing = new Human();\r\n this.humanbeing.x = 290;\r\n // this.humanbeing.y = 900;\r\n this.humanbeing.y = 750;\r\n this.addChild(this.humanbeing);\r\n\r\n // this.contain = new engine.Sprite()\r\n console.log(\r\n \"xxxxxx\",\r\n this.stage.width,\r\n this.stage.height,\r\n this.width,\r\n this.height\r\n );\r\n\r\n // 手和伞为一个整体\r\n this.rightHand = new engine.Sprite(\r\n getTexture(\"c7129f77-92a6-479e-9994-7d4b39040a15\")\r\n );\r\n this.rightHand.x = -70;\r\n this.rightHand.y = -65;\r\n this.rightHand.anchorX = 196;\r\n this.rightHand.anchorY = 253;\r\n\r\n this.humanbeing.addChild(this.rightHand);\r\n\r\n // this.addChild(this.human);\r\n // this.human.addChild(this.rightHand);\r\n\r\n this.playBtn = new engine.Sprite(\r\n getTexture(\"9e347bef-6e91-4c92-ba5f-f9a52e656207\")\r\n );\r\n this.playBtn.x = 138;\r\n this.playBtn.y = 1150;\r\n this.addChild(this.playBtn);\r\n // 湿润度\r\n this.moists = new Moist();\r\n this.moists.x = 20;\r\n this.moists.y = 450;\r\n this.addChild(this.moists);\r\n\r\n // 云\r\n this.cloud = new CloudRain();\r\n this.addChild(this.cloud);\r\n //风\r\n }\r\n\r\n dripArray: any[] = [];\r\n clicknum: number = 0;\r\n R: number = 250;\r\n D: number = 340;\r\n angle: number;\r\n\r\n con: engine.Sprite = new engine.Sprite();\r\n\r\n // 游戏开始前倒计时三张图\r\n t1 = new engine.Sprite(getTexture('a163b74f-32bc-43d2-8015-7cf1eac71501'));\r\n t2 = new engine.Sprite(getTexture('22de82d1-97ec-4195-a32c-f4fc1656e2de'));\r\n t3 = new engine.Sprite(getTexture('cc952365-a990-4912-98af-50905559b9d5'));\r\n\r\n start() {\r\n const middleX = this.humanbeing.x + this.humanbeing.width / 2;\r\n const validX1 = this.humanbeing.x;\r\n const validX2 = this.humanbeing.x + this.humanbeing.width;\r\n\r\n let drip = new engine.Sprite(\r\n getTexture(\"07f74bf6-416f-445e-98d5-021efe4c9fdc\")\r\n );\r\n drip.x = 200;\r\n drip.y = 0;\r\n this.dripArray.push(drip);\r\n this.addChild(drip);\r\n\r\n // 弧形参考线\r\n for (let i = 0; i < 1000; i++) {\r\n let y =\r\n -Math.sqrt(\r\n this.R * this.R - (i - middleX - 50) * (i - middleX - 50)\r\n ) +\r\n (this.humanbeing.y + 180);\r\n\r\n let img = new engine.Sprite(\r\n getTexture(\"e4a82aee-4472-4b06-bd75-02fb64f1c8c8\")\r\n );\r\n img.width = 2;\r\n img.height = 2;\r\n img.x = i;\r\n img.y = y;\r\n this.con.addChild(img);\r\n }\r\n this.addChild(this.con);\r\n\r\n\r\n let point1 = new engine.Graphics();\r\n point1.beginFill(0xff0000);\r\n point1.drawRect(0, 0, 10, 10);\r\n point1.x = 0;\r\n point1.y = 100;\r\n point1.endFill();\r\n // this.addChild(point1)\r\n this.rightHand.addChild(point1);\r\n\r\n let point2 = new engine.Graphics();\r\n point2.beginFill(0xff0000);\r\n point2.drawRect(0, 0, 10, 10);\r\n point2.x = 170;\r\n point2.y = 0;\r\n point2.endFill();\r\n // this.addChild(point2)\r\n this.rightHand.addChild(point2);\r\n\r\n let point3 = new engine.Graphics();\r\n point3.beginFill(0xff0000);\r\n point3.drawRect(0, 0, 10, 10);\r\n point3.x = 330;\r\n point3.y = 100;\r\n point3.endFill();\r\n // this.addChild(point3)\r\n this.rightHand.addChild(point3);\r\n\r\n //计时器\r\n this.timeCounter = new TimeCounter();\r\n this.addChild(this.timeCounter);\r\n\r\n let ld = Date.now();\r\n\r\n let a = 0;\r\n let b = 0;\r\n \r\n // let drip = new engine.Sprite(\r\n // getTexture(\"07f74bf6-416f-445e-98d5-021efe4c9fdc\")\r\n // );\r\n // drip.x =\r\n // Math.random() * (this.humanbeing.x + 160) +\r\n // (this.humanbeing.x - 160);\r\n // drip.worldMatrix.ty = Math.random() * 100 + 300;\r\n // this.dripArray.push(drip);\r\n // this.addChild(drip);\r\n let timer = 0;\r\n\r\n // 风吹动效\r\n this.winds = createSvga(\"wind\");\r\n this.addChild(this.winds);\r\n this.winds.visible = true;\r\n this.winds.play(true,true)\r\n this.winds.once(engine.Event.END_FRAME,()=>{\r\n this.removeChild(this.winds);\r\n },this)\r\n\r\n this.addEventListener(engine.Event.ENTER_FRAME, () => {\r\n let dt = Date.now() - ld;\r\n\r\n a += dt;\r\n b += dt;\r\n timer += dt;\r\n // 添加倒数三秒\r\n // if(timer >990 && timer <=1000){\r\n // this.addChild(this.t3);\r\n // }\r\n // if(timer > 1990 && timer <= 2000){\r\n // this.removeChild(this.t3);\r\n // this.addChild(this.t2);\r\n // }\r\n // if(timer > 2990 && timer < 3000){\r\n // this.removeChild(this.t2);\r\n // this.addChild(this.t1);\r\n // this.removeChild(this.t1);\r\n // }\r\n\r\n \r\n // 延迟三秒执行\r\n // if(timer >= 3000){\r\n if (a > 200) {\r\n a = 0;\r\n if (this.moists.percent < 1 && this.timeCounter.time > 0) {\r\n let drip = new engine.Sprite(\r\n getTexture(\"07f74bf6-416f-445e-98d5-021efe4c9fdc\")\r\n );\r\n drip.x =\r\n Math.random() * (this.humanbeing.x + 160) +\r\n (this.humanbeing.x - 160);\r\n drip.y = Math.random() * 100 + 300;\r\n this.dripArray.push(drip);\r\n this.addChild(drip);\r\n }\r\n \r\n }\r\n \r\n // 雨滴下落\r\n for (let drip of this.dripArray) {\r\n drip.y += (300 * dt) / 1000;\r\n if (drip.y > this.stage.height) {\r\n let index = this.dripArray.indexOf(drip);\r\n this.removeChild(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n }\r\n }\r\n\r\n \r\n\r\n //计时器\r\n if (b >= 1000) {\r\n b = 0;\r\n // if (this.timeCounter.time <= 0) {\r\n // this.timeCounter.time = 0;\r\n // }\r\n if(this.moists.percent < 1){\r\n this.timeCounter.time -= 1;\r\n this.timeCounter.updateTime(this.timeCounter.time);\r\n }\r\n \r\n if (this.timeCounter.time <= 0) {\r\n this.timeCounter.time = 0;\r\n console.log(\"游戏成功!\");\r\n // 云动画\r\n // 雨水结束\r\n // 太阳出来\r\n this.success();\r\n // this.removeEventListener(engine.Event.END_FRAME,()=>{})\r\n }\r\n }\r\n \r\n // 伞的旋转\r\n let wind = -40;\r\n this.rightHand.rotation += wind / 60;\r\n \r\n if (this.rightHand.rotation <= -90) {\r\n this.rightHand.rotation = -90;\r\n } else if (this.rightHand.rotation >= 90) {\r\n this.rightHand.rotation = 90;\r\n }\r\n\r\n // 吃力表情\r\n // if(this.rightHand.rotation <= -60){\r\n // let face = this.humanbeing.facialChange(1);\r\n // face.x = 7;\r\n // face.y = 22;\r\n // setTimeout(() => {\r\n // this.humanbeing.removeFace(face);\r\n // }, 100);\r\n // }\r\n\r\n ld = Date.now();\r\n \r\n // return;\r\n // 扇形的角度\r\n this.angle = Math.asin(this.D / 2 / this.R) * 57.18;\r\n \r\n // 伞的偏移角度距离水平位置\r\n let validMaxX;\r\n let validMinX;\r\n // 伞的圆函数\r\n let ambrellaFuncY;\r\n \r\n this.rightHand.name = \"aaa\";\r\n \r\n // a.worldMatrix.tx\r\n \r\n // point1,2线性方程斜率\r\n // let aa = 0;\r\n // if (this.stage.height > 1334) {\r\n // aa = 290;\r\n // }\r\n let k12 =\r\n (point1.worldMatrix.ty - point2.worldMatrix.ty) /\r\n (point1.worldMatrix.tx - point2.worldMatrix.tx);\r\n let k23 =\r\n (point2.worldMatrix.ty - point3.worldMatrix.ty) /\r\n (point2.worldMatrix.tx - point3.worldMatrix.tx);\r\n \r\n // let px1 = point1.worldMatrix.tx;\r\n // let px2 = point2.worldMatrix.tx;\r\n // let px3 = point3.worldMatrix.tx;\r\n\r\n let px1 = point1.worldMatrix.tx;\r\n let px2 = point2.worldMatrix.tx;\r\n let px3 = point3.worldMatrix.tx;\r\n\r\n let maxX =\r\n px1 >= px2 ? (px1 >= px3 ? px1 : px3) : px2 >= px3 ? px2 : px3;\r\n let minX =\r\n px1 >= px2 ? (px2 >= px3 ? px3 : px2) : px1 >= px3 ? px3 : px1;\r\n \r\n // let x2 = (middleX + this.R) < maxX ? (middleX+this.R):maxX;\r\n for (let drip of this.dripArray) {\r\n // point1,2线性方程\r\n let b12 =\r\n point1.worldMatrix.ty -\r\n point1.worldMatrix.tx * k12 - 50;\r\n let b23 =\r\n point2.worldMatrix.ty -\r\n point2.worldMatrix.tx * k23 - 50;\r\n let y12 = k12 * drip.x + b12;\r\n let y23 = k23 * drip.x + b23;\r\n if (drip.x >= minX && drip.x <maxX) {\r\n // 伞碰撞12\r\n if (drip.x < px2) {\r\n // if (Math.abs(y12 -drip.worldMatrix.ty) <= 20) {\r\n if (drip.y >= y12) {\r\n let index = this.dripArray.indexOf(drip);\r\n this.removeChild(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n }\r\n // }\r\n }\r\n // 23\r\n if (drip.x >= px2) {\r\n // if (Math.abs(y23 -drip.worldMatrix.ty) <= 20) {\r\n if (drip.y >= y23) {\r\n let index = this.dripArray.indexOf(drip);\r\n this.removeChild(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n }\r\n // }\r\n }\r\n }\r\n \r\n // 碰人\r\n if (\r\n drip.x > this.humanbeing.x &&\r\n drip.x < this.humanbeing.x + this.humanbeing.width\r\n ) {\r\n if (drip.y >= this.humanbeing.y) {\r\n this.moists.percent += 0.1;\r\n this.moists.cover(this.moists.percent);\r\n this.moists.updateText(this.moists.percent);\r\n\r\n \r\n \r\n if (this.moists.percent >= 1) {\r\n // 游戏结束\r\n this.moists.stopScale();\r\n console.log(\"游戏结束!\");\r\n // 清除事件\r\n this.stop();\r\n // this.timeCounter.updateTime(this.timeCounter.time);\r\n }\r\n \r\n this.removeChild(drip);\r\n let face = this.humanbeing.facialChange(2);\r\n face.x = 7;\r\n face.y = 22;\r\n setTimeout(() => {\r\n this.humanbeing.removeFace(face);\r\n }, 500);\r\n console.log(\"人\");\r\n \r\n let index = this.dripArray.indexOf(drip);\r\n this.dripArray = this.dripArray.filter(\r\n (ele, i) => i != index\r\n );\r\n\r\n // 动效\r\n this.humanbeing.scaleEffect();\r\n }\r\n }\r\n }\r\n // }\r\n \r\n\r\n ld = Date.now();\r\n });\r\n\r\n this.playBtn.addEventListener(\r\n engine.MouseEvent.CLICK,\r\n this.onClick,\r\n this\r\n );\r\n // this.rightHand.rotation = 0;\r\n }\r\n\r\n onClick() {\r\n this.clicknum += 1;\r\n this.rightHand.rotation += 10 * this.clicknum;\r\n this.clicknum = 0;\r\n }\r\n stop() {\r\n // this.removeAllEventListener();\r\n // this.playBtn.removeAllEventListener();\r\n engine.globalEvent.dispatchEvent(\"cloud-game-fail\", { reason: 1 });\r\n }\r\n\r\n success() {\r\n this.cloud.succeed();\r\n engine.globalEvent.dispatchEvent(\"cloud-game-success\", {\r\n moist: this.moists.percent,\r\n });\r\n\r\n }\r\n}\r\n","\r\n\r\nexport let props: any = {};\r\n\r\nexport function prepareProps() {\r\n\tlet metaProps = getProps();\r\n\r\n\tengine.injectProp(props, metaProps);\r\n}\r\n\r\nexport function injectProps(p) {\r\n\tengine.injectProp(props, p);\r\n}\r\n","\r\nimport GameView from \"./GameView\";\r\nimport GameTest from \"./GameTest\";\r\n\r\nimport { injectProps } from \"../props\";\r\n\r\n\r\nexport class GameWrapper extends engine.Container {\r\n\t// private _status;\r\n\tprivate _gameView: GameView;\r\n\tprivate _gameTest: GameTest;\r\n\r\n\r\n\r\n\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tengine.globalEvent.addEventListener('pictures-start', this.start, this);\r\n\t\tengine.globalEvent.addEventListener('pictures-stop', this.stop, this);\r\n\r\n\t\t//创建实例\r\n\t\t// let gameView = this._gameView = new GameView();\r\n\t\tlet gameTest = this._gameTest = new GameTest();\r\n\t\tthis.addChild(gameTest);\r\n\r\n\t}\r\n\r\n\tstart(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\r\n\t\t// this._status = 1;\r\n\r\n\t\t// this._gameView.start();\r\n\t\tthis._gameTest.start();\r\n\t}\r\n\tstop(event: engine.Event) {\r\n\t\t\r\n\t\t// this._gameView.stop();\r\n\t\tthis._gameTest.stop();\r\n\t}\r\n}\r\n","\r\n\r\nimport {GameWrapper} from \"./game/GameWrapper\";\r\nimport {injectProps, prepareProps} from \"./props\";\r\n\r\nexport default function (props) {\r\n\tprepareProps();\r\n\tinjectProps(props);\r\n\r\n\tlet instance = new GameWrapper();\r\n\t\r\n\treturn instance;\r\n}\r\n"],"names":["__extends"],"mappings":";;;;;;UAIgB,UAAU,CAAC,IAAI;KAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACvD,CAAC;UASe,UAAU,CAAC,IAAI,EAAE,UAAW;KAC3C,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;KAC3B,IAAI,CAAC,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;KAC5D,OAAO,IAAI,CAAC;CACb,CAAC;;;CCjBD;KAAmCA,+BAAgB;KAW/C;SAAA,YACI,iBAAO,SAIV;SAbD,gBAAU,GAAG;aACT,sCAAsC;aACtC,sCAAsC;aACtC,sCAAsC;UACzC,CAAA;SAED,WAAK,GAAiB,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;SAInE,KAAI,CAAC,QAAQ,CAAC,KAAI,CAAC,KAAK,CAAC,CAAA;SACzB,KAAI,CAAC,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC;SAC9B,KAAI,CAAC,MAAM,GAAG,KAAI,CA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AS,CAAC,CAAC;CACrC,CAAC;AAED,UAAgB,WAAW,CAAC,CAAC;KAC5B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CAC7B,CAAC;;;CCLD;KAAiCA,qCAAgB;KAShD;SAAA,YACC,iBAAO,SAUP;SARA,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,KAAI,CAAC,KAAK,EAAE,KAAI,CAAC,CAAC;SACxE,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,eAAe,EAAE,KAAI,CAAC,IAAI,EAAE,KAAI,CAAC,CAAC;SAItE,IAAI,QAAQ,GAAG,KAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC;SAC/C,KAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;;MAExB;KAED,2BAAK,GAAL,UAAM,KAAmB;SACxB,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAKxB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;MACvB;KACD,0BAAI,GAAJ,UAAK,KAAmB;SAGvB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;MACtB;KACF,kBAAC;CAAD,CAAC,CAnCgC,MAAM,CAAC,SAAS,GAmChD;;;iBCrCwB,KAAK;KAC7B,YAAY,EAAE,CAAC;KACf,WAAW,CAAC,KAAK,CAAC,CAAC;KAEnB,IAAI,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;KAEjC,OAAO,QAAQ,CAAC;CACjB,CAAC;;;;;;;;;"}
\ No newline at end of file
src/custom/getAwayFromCloud/meta.json
View file @
77f8872c
...
...
@@ -2,16 +2,7 @@
"name"
:
"拼图"
,
"desc"
:
"拼图模块1.0"
,
"props"
:
{
"MAX_COL"
:
{
"alias"
:
"图片分成几列"
,
"type"
:
"number"
,
"default"
:
3
},
"MAX_ROW"
:
{
"alias"
:
"图片分成几行"
,
"type"
:
"number"
,
"default"
:
4
},
"OFFSET_X"
:
{
"alias"
:
"OFFSET_X"
,
"type"
:
"number"
,
...
...
@@ -27,8 +18,8 @@
"type"
:
"number"
,
"default"
:
30
},
"
GAP
"
:
{
"alias"
:
"
图片间隙
"
,
"
moistPercent
"
:
{
"alias"
:
"
湿润度
"
,
"type"
:
"number"
,
"default"
:
0
}
...
...
@@ -52,6 +43,12 @@
"uuid"
:
"ed0e8931-2557-4527-bcfc-9071f90d5737"
,
"ext"
:
".png"
},
{
"name"
:
"wind"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/15fc1dabf22baedd8bf5e5b418e57cfc81686072.svga"
,
"uuid"
:
"7f1ef018-79ab-42bf-ac85-0208e36e2928"
,
"ext"
:
".svga"
},
{
"name"
:
"背景"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/d0e22ae58b6e8519b969ed207197a31820790349.png"
,
...
...
@@ -64,6 +61,24 @@
"uuid"
:
"b7d2a60a-9e60-4eca-be80-a991abea47c9"
,
"ext"
:
".png"
},
{
"name"
:
"t1"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/6cc52715ce3bee15d10acbe90eac5828c21fdc7f.png"
,
"uuid"
:
"a163b74f-32bc-43d2-8015-7cf1eac71501"
,
"ext"
:
".png"
},
{
"name"
:
"t2"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/0d00d8639caf5d344028b01a1022762724164c92.png"
,
"uuid"
:
"22de82d1-97ec-4195-a32c-f4fc1656e2de"
,
"ext"
:
".png"
},
{
"name"
:
"t3"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/4b7c2f0d4c8248425ed335838ab5a5ce44256b90.png"
,
"uuid"
:
"cc952365-a990-4912-98af-50905559b9d5"
,
"ext"
:
".png"
},
{
"name"
:
"云1"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/429981638472e8f02ce2a780f3b05be72d13b943.png"
,
...
...
src/custom/getAwayFromCloud/src/game/GameTest.ts
View file @
77f8872c
import
{
getTexture
}
from
"./utils"
;
import
{
getTexture
,
createSvga
}
from
"./utils"
;
import
Human
from
"./Human"
;
import
Moist
from
"./Moist"
;
...
...
@@ -12,17 +12,17 @@ export default class GameTest extends engine.Container {
}
rightHand
:
engine
.
Sprite
;
ambrella
:
engine
.
Sprite
;
//
ambrella: engine.Sprite;
playBtn
:
engine
.
Sprite
;
human
:
engine
.
Sprite
;
humanbeing
:
Human
;
humanbeing
:
Human
;
winds
moists
:
Moist
;
contain
:
any
;
timeCounter
:
TimeCounter
;
cloudRain
:
CloudRain
;
cloud
:
CloudRain
;
winds
setup
()
{
let
playBg
=
new
engine
.
Sprite
(
getTexture
(
"5ab43bdc-a6ce-46fb-99c2-a806f57f7484"
)
...
...
@@ -79,6 +79,7 @@ export default class GameTest extends engine.Container {
// 云
this
.
cloud
=
new
CloudRain
();
this
.
addChild
(
this
.
cloud
);
//风
}
dripArray
:
any
[]
=
[];
...
...
@@ -89,11 +90,24 @@ export default class GameTest extends engine.Container {
con
:
engine
.
Sprite
=
new
engine
.
Sprite
();
// 游戏开始前倒计时三张图
t1
=
new
engine
.
Sprite
(
getTexture
(
'a163b74f-32bc-43d2-8015-7cf1eac71501'
));
t2
=
new
engine
.
Sprite
(
getTexture
(
'22de82d1-97ec-4195-a32c-f4fc1656e2de'
));
t3
=
new
engine
.
Sprite
(
getTexture
(
'cc952365-a990-4912-98af-50905559b9d5'
));
start
()
{
const
middleX
=
this
.
humanbeing
.
x
+
this
.
humanbeing
.
width
/
2
;
const
validX1
=
this
.
humanbeing
.
x
;
const
validX2
=
this
.
humanbeing
.
x
+
this
.
humanbeing
.
width
;
let
drip
=
new
engine
.
Sprite
(
getTexture
(
"07f74bf6-416f-445e-98d5-021efe4c9fdc"
)
);
drip
.
x
=
200
;
drip
.
y
=
0
;
this
.
dripArray
.
push
(
drip
);
this
.
addChild
(
drip
);
// 弧形参考线
for
(
let
i
=
0
;
i
<
1000
;
i
++
)
{
let
y
=
...
...
@@ -113,21 +127,11 @@ export default class GameTest extends engine.Container {
}
this
.
addChild
(
this
.
con
);
// 位移
// setInterval(()=>{
// for(let drip of this.dripArray){
// drip.worldMatrix.ty += 10;
// if(drip.y > this.stage.height){
// this.removeChild(drip);
// let index = this.dripArray.indexOf(drip)
// this.dripArray = this.dripArray.filter((ele,i)=>i != index)
// }
// }
// },100)
let
point1
=
new
engine
.
Graphics
();
point1
.
beginFill
(
0xff0000
);
point1
.
drawRect
(
0
,
0
,
10
,
10
);
point1
.
x
=
0
;
point1
.
y
=
100
;
point1
.
endFill
();
// this.addChild(point1)
...
...
@@ -137,6 +141,7 @@ export default class GameTest extends engine.Container {
point2
.
beginFill
(
0xff0000
);
point2
.
drawRect
(
0
,
0
,
10
,
10
);
point2
.
x
=
170
;
point2
.
y
=
0
;
point2
.
endFill
();
// this.addChild(point2)
this
.
rightHand
.
addChild
(
point2
);
...
...
@@ -153,215 +158,248 @@ export default class GameTest extends engine.Container {
//计时器
this
.
timeCounter
=
new
TimeCounter
();
this
.
addChild
(
this
.
timeCounter
);
// setInterval(()=>{
// this.timeCounter.time -= 1;
// this.timeCounter.updateTime(this.timeCounter.time);
// if(this.timeCounter.time <= 0){
// console.log('游戏结束!');
// }
// },1000)
let
ld
=
Date
.
now
();
let
a
=
0
;
let
b
=
0
;
let
drip
=
new
engine
.
Sprite
(
getTexture
(
"07f74bf6-416f-445e-98d5-021efe4c9fdc"
)
);
drip
.
x
=
Math
.
random
()
*
(
this
.
humanbeing
.
x
+
160
)
+
(
this
.
humanbeing
.
x
-
160
);
drip
.
worldMatrix
.
ty
=
Math
.
random
()
*
100
+
300
;
this
.
dripArray
.
push
(
drip
);
this
.
addChild
(
drip
);
// let drip = new engine.Sprite(
// getTexture("07f74bf6-416f-445e-98d5-021efe4c9fdc")
// );
// drip.x =
// Math.random() * (this.humanbeing.x + 160) +
// (this.humanbeing.x - 160);
// drip.worldMatrix.ty = Math.random() * 100 + 300;
// this.dripArray.push(drip);
// this.addChild(drip);
let
timer
=
0
;
// 风吹动效
this
.
winds
=
createSvga
(
"wind"
);
this
.
addChild
(
this
.
winds
);
this
.
winds
.
visible
=
true
;
this
.
winds
.
play
(
true
,
true
)
this
.
winds
.
once
(
engine
.
Event
.
END_FRAME
,()
=>
{
this
.
removeChild
(
this
.
winds
);
},
this
)
this
.
addEventListener
(
engine
.
Event
.
ENTER_FRAME
,
()
=>
{
let
dt
=
Date
.
now
()
-
ld
;
a
+=
dt
;
b
+=
dt
;
timer
+=
dt
;
// 添加倒数三秒
// if(timer >990 && timer <=1000){
// this.addChild(this.t3);
// }
// if(timer > 1990 && timer <= 2000){
// this.removeChild(this.t3);
// this.addChild(this.t2);
// }
// if(timer > 2990 && timer < 3000){
// this.removeChild(this.t2);
// this.addChild(this.t1);
// this.removeChild(this.t1);
// }
if
(
a
>
200
)
{
a
=
0
;
if
(
this
.
timeCounter
.
time
>
0
)
{
let
drip
=
new
engine
.
Sprite
(
getTexture
(
"07f74bf6-416f-445e-98d5-021efe4c9fdc"
)
);
drip
.
x
=
Math
.
random
()
*
(
this
.
humanbeing
.
x
+
160
)
+
(
this
.
humanbeing
.
x
-
160
);
drip
.
worldMatrix
.
ty
=
Math
.
random
()
*
100
+
300
;
this
.
dripArray
.
push
(
drip
);
this
.
addChild
(
drip
);
}
// this.cloudRain = new CloudRain();
// let x = Math.random() * (this.humanbeing.x + 160) + (this.humanbeing.x - 160);
// let y = Math.random() * (100) + 200;
// this.cloudRain.setPosition(x,y);
// this.dripArray.push(this.cloudRain);
}
// 位移
for
(
let
drip
of
this
.
dripArray
)
{
drip
.
y
+=
(
300
*
dt
)
/
1000
;
if
(
drip
.
y
>
this
.
stage
.
height
)
{
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
removeChild
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
}
}
//计时器
if
(
b
>=
1000
)
{
b
=
0
;
this
.
timeCounter
.
time
-=
1
;
if
(
this
.
timeCounter
.
time
<=
0
)
{
this
.
timeCounter
.
time
=
0
;
// 延迟三秒执行
// if(timer >= 3000){
if
(
a
>
200
)
{
a
=
0
;
if
(
this
.
moists
.
percent
<
1
&&
this
.
timeCounter
.
time
>
0
)
{
let
drip
=
new
engine
.
Sprite
(
getTexture
(
"07f74bf6-416f-445e-98d5-021efe4c9fdc"
)
);
drip
.
x
=
Math
.
random
()
*
(
this
.
humanbeing
.
x
+
160
)
+
(
this
.
humanbeing
.
x
-
160
);
drip
.
y
=
Math
.
random
()
*
100
+
300
;
this
.
dripArray
.
push
(
drip
);
this
.
addChild
(
drip
);
}
}
this
.
timeCounter
.
updateTime
(
this
.
timeCounter
.
time
);
if
(
this
.
timeCounter
.
time
<=
0
)
{
console
.
log
(
"游戏成功!"
);
// 云动画
// 雨水结束
// 太阳出来
this
.
success
();
// this.removeEventListener(engine.Event.END_FRAME,()=>{})
// 雨滴下落
for
(
let
drip
of
this
.
dripArray
)
{
drip
.
y
+=
(
300
*
dt
)
/
1000
;
if
(
drip
.
y
>
this
.
stage
.
height
)
{
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
removeChild
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
}
}
}
// for(let cloudrain of this.dripArray){
// cloudrain.drip.y += (300 * dt) / 1000;
// if (cloudrain.drip.y > this.stage.height) {
// this.removeChild(cloudrain);
// let index = this.dripArray.indexOf(cloudrain);
// this.dripArray = this.dripArray.filter(
// (ele, i) => i != index
// );
// }
// }
let
wind
=
-
40
;
this
.
rightHand
.
rotation
+=
wind
/
60
;
if
(
this
.
rightHand
.
rotation
<=
-
90
)
{
this
.
rightHand
.
rotation
=
-
90
;
}
else
if
(
this
.
rightHand
.
rotation
>=
90
)
{
this
.
rightHand
.
rotation
=
90
;
}
ld
=
Date
.
now
();
// return;
// 扇形的角度
this
.
angle
=
Math
.
asin
(
this
.
D
/
2
/
this
.
R
)
*
57.18
;
// 伞的偏移角度距离水平位置
let
validMaxX
;
let
validMinX
;
// 伞的圆函数
let
ambrellaFuncY
;
this
.
rightHand
.
name
=
"aaa"
;
// a.worldMatrix.tx
// point1,2线性方程斜率
let
aa
=
0
;
if
(
this
.
stage
.
height
>
1334
)
{
aa
=
290
;
}
let
k12
=
(
point1
.
worldMatrix
.
ty
-
point2
.
worldMatrix
.
ty
)
/
(
point1
.
worldMatrix
.
tx
-
point2
.
worldMatrix
.
tx
);
let
k23
=
(
point2
.
worldMatrix
.
ty
-
point3
.
worldMatrix
.
ty
)
/
(
point2
.
worldMatrix
.
tx
-
point3
.
worldMatrix
.
tx
);
let
px1
=
point1
.
worldMatrix
.
tx
;
let
px2
=
point2
.
worldMatrix
.
tx
;
let
px3
=
point3
.
worldMatrix
.
tx
;
let
maxX
=
px1
>=
px2
?
(
px1
>=
px3
?
px1
:
px3
)
:
px2
>=
px3
?
px2
:
px3
;
let
minX
=
px1
>=
px2
?
(
px2
>=
px3
?
px3
:
px2
)
:
px1
>=
px3
?
px3
:
px1
;
// let x2 = (middleX + this.R) < maxX ? (middleX+this.R):maxX;
for
(
let
drip
of
this
.
dripArray
)
{
// point1,2线性方程
let
b12
=
point1
.
worldMatrix
.
ty
-
point1
.
worldMatrix
.
tx
*
k12
-
50
;
let
b23
=
point2
.
worldMatrix
.
ty
-
point2
.
worldMatrix
.
tx
*
k23
-
50
;
let
y12
=
k12
*
drip
.
x
+
b12
;
let
y23
=
k23
*
drip
.
x
+
b23
;
if
(
drip
.
x
>
minX
&&
drip
.
x
<
maxX
)
{
// 伞碰撞12
if
(
drip
.
x
<
px2
)
{
// if (Math.abs(y12 -drip.worldMatrix.ty) <= 20) {
if
(
drip
.
worldMatrix
.
ty
>=
y12
)
{
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
removeChild
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
}
// }
//计时器
if
(
b
>=
1000
)
{
b
=
0
;
// if (this.timeCounter.time <= 0) {
// this.timeCounter.time = 0;
// }
if
(
this
.
moists
.
percent
<
1
){
this
.
timeCounter
.
time
-=
1
;
this
.
timeCounter
.
updateTime
(
this
.
timeCounter
.
time
);
}
// 23
if
(
drip
.
x
>=
px2
)
{
// if (Math.abs(y23 -drip.worldMatrix.ty) <= 20) {
if
(
drip
.
worldMatrix
.
ty
>=
y23
)
{
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
removeChild
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
}
// }
if
(
this
.
timeCounter
.
time
<=
0
)
{
this
.
timeCounter
.
time
=
0
;
console
.
log
(
"游戏成功!"
);
// 云动画
// 雨水结束
// 太阳出来
this
.
success
();
// this.removeEventListener(engine.Event.END_FRAME,()=>{})
}
}
// 伞的旋转
let
wind
=
-
40
;
this
.
rightHand
.
rotation
+=
wind
/
60
;
if
(
this
.
rightHand
.
rotation
<=
-
90
)
{
this
.
rightHand
.
rotation
=
-
90
;
}
else
if
(
this
.
rightHand
.
rotation
>=
90
)
{
this
.
rightHand
.
rotation
=
90
;
}
// 碰人
if
(
drip
.
x
>
this
.
humanbeing
.
x
&&
drip
.
x
<
this
.
humanbeing
.
x
+
this
.
humanbeing
.
width
)
{
if
(
drip
.
y
>=
this
.
humanbeing
.
y
)
{
this
.
moists
.
percent
+=
0.1
;
this
.
moists
.
cover
(
this
.
moists
.
percent
);
this
.
moists
.
updateText
(
this
.
moists
.
percent
);
if
(
this
.
moists
.
percent
>=
1
)
{
// 游戏结束
this
.
moists
.
stopScale
();
console
.
log
(
"游戏结束!"
);
// 清除事件
this
.
stop
();
// 吃力表情
// if(this.rightHand.rotation <= -60){
// let face = this.humanbeing.facialChange(1);
// face.x = 7;
// face.y = 22;
// setTimeout(() => {
// this.humanbeing.removeFace(face);
// }, 100);
// }
ld
=
Date
.
now
();
// return;
// 扇形的角度
this
.
angle
=
Math
.
asin
(
this
.
D
/
2
/
this
.
R
)
*
57.18
;
// 伞的偏移角度距离水平位置
let
validMaxX
;
let
validMinX
;
// 伞的圆函数
let
ambrellaFuncY
;
this
.
rightHand
.
name
=
"aaa"
;
// a.worldMatrix.tx
// point1,2线性方程斜率
// let aa = 0;
// if (this.stage.height > 1334) {
// aa = 290;
// }
let
k12
=
(
point1
.
worldMatrix
.
ty
-
point2
.
worldMatrix
.
ty
)
/
(
point1
.
worldMatrix
.
tx
-
point2
.
worldMatrix
.
tx
);
let
k23
=
(
point2
.
worldMatrix
.
ty
-
point3
.
worldMatrix
.
ty
)
/
(
point2
.
worldMatrix
.
tx
-
point3
.
worldMatrix
.
tx
);
// let px1 = point1.worldMatrix.tx;
// let px2 = point2.worldMatrix.tx;
// let px3 = point3.worldMatrix.tx;
let
px1
=
point1
.
worldMatrix
.
tx
;
let
px2
=
point2
.
worldMatrix
.
tx
;
let
px3
=
point3
.
worldMatrix
.
tx
;
let
maxX
=
px1
>=
px2
?
(
px1
>=
px3
?
px1
:
px3
)
:
px2
>=
px3
?
px2
:
px3
;
let
minX
=
px1
>=
px2
?
(
px2
>=
px3
?
px3
:
px2
)
:
px1
>=
px3
?
px3
:
px1
;
// let x2 = (middleX + this.R) < maxX ? (middleX+this.R):maxX;
for
(
let
drip
of
this
.
dripArray
)
{
// point1,2线性方程
let
b12
=
point1
.
worldMatrix
.
ty
-
point1
.
worldMatrix
.
tx
*
k12
-
50
;
let
b23
=
point2
.
worldMatrix
.
ty
-
point2
.
worldMatrix
.
tx
*
k23
-
50
;
let
y12
=
k12
*
drip
.
x
+
b12
;
let
y23
=
k23
*
drip
.
x
+
b23
;
if
(
drip
.
x
>=
minX
&&
drip
.
x
<
maxX
)
{
// 伞碰撞12
if
(
drip
.
x
<
px2
)
{
// if (Math.abs(y12 -drip.worldMatrix.ty) <= 20) {
if
(
drip
.
y
>=
y12
)
{
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
removeChild
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
}
// }
}
// 23
if
(
drip
.
x
>=
px2
)
{
// if (Math.abs(y23 -drip.worldMatrix.ty) <= 20) {
if
(
drip
.
y
>=
y23
)
{
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
removeChild
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
}
// }
}
}
// 碰人
if
(
drip
.
x
>
this
.
humanbeing
.
x
&&
drip
.
x
<
this
.
humanbeing
.
x
+
this
.
humanbeing
.
width
)
{
if
(
drip
.
y
>=
this
.
humanbeing
.
y
)
{
this
.
moists
.
percent
+=
0.1
;
this
.
moists
.
cover
(
this
.
moists
.
percent
);
this
.
moists
.
updateText
(
this
.
moists
.
percent
);
if
(
this
.
moists
.
percent
>=
1
)
{
// 游戏结束
this
.
moists
.
stopScale
();
console
.
log
(
"游戏结束!"
);
// 清除事件
this
.
stop
();
// this.timeCounter.updateTime(this.timeCounter.time);
}
this
.
removeChild
(
drip
);
let
face
=
this
.
humanbeing
.
facialChange
(
2
);
face
.
x
=
7
;
face
.
y
=
22
;
setTimeout
(()
=>
{
this
.
humanbeing
.
removeFace
(
face
);
},
500
);
console
.
log
(
"人"
);
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
// 动效
this
.
humanbeing
.
scaleEffect
();
}
this
.
removeChild
(
drip
);
let
face
=
this
.
humanbeing
.
facialChange
(
2
);
face
.
x
=
7
;
face
.
y
=
22
;
setTimeout
(()
=>
{
this
.
humanbeing
.
removeFace
(
face
);
},
1000
);
console
.
log
(
"人"
);
let
index
=
this
.
dripArray
.
indexOf
(
drip
);
this
.
dripArray
=
this
.
dripArray
.
filter
(
(
ele
,
i
)
=>
i
!=
index
);
}
}
}
// }
ld
=
Date
.
now
();
});
...
...
@@ -390,5 +428,6 @@ export default class GameTest extends engine.Container {
engine
.
globalEvent
.
dispatchEvent
(
"cloud-game-success"
,
{
moist
:
this
.
moists
.
percent
,
});
}
}
src/custom/getAwayFromCloud/src/game/GameView.ts
View file @
77f8872c
...
...
@@ -185,7 +185,7 @@ export default class GameView extends engine.Container {
ld
=
Date
.
now
();
return
;
//
return;
// 扇形的角度
this
.
angle
=
Math
.
asin
(
this
.
D
/
2
/
this
.
R
)
*
57.18
;
...
...
src/custom/getAwayFromCloud/src/game/Human.ts
View file @
77f8872c
...
...
@@ -27,4 +27,27 @@ export default class Human extends engine.Container{
removeFace
(
face
){
this
.
human
.
removeChild
(
face
);
}
scaleEffect
(){
let
aaa
=
0
;
let
pt
=
Date
.
now
();
this
.
addEventListener
(
engine
.
Event
.
ENTER_FRAME
,()
=>
{
let
dt
=
Date
.
now
()
-
pt
;
aaa
+=
dt
;
this
.
anchorX
=
this
.
width
this
.
anchorY
=
this
.
height
;
if
(
aaa
>
90
&&
aaa
<=
100
){
this
.
scaleY
=
0.99
;
this
.
scaleX
=
1.01
;
}
if
(
aaa
>
190
&&
aaa
<
200
){
this
.
scaleX
=
1
;
this
.
scaleY
=
1
;
aaa
=
0
;
}
pt
=
Date
.
now
();
})
}
}
\ No newline at end of file
src/custom/getAwayFromCloud/src/game/TimeCounter.ts
View file @
77f8872c
...
...
@@ -4,6 +4,8 @@ export default class TimeCounter extends engine.Container{
timeCounter
:
engine
.
Sprite
=
new
engine
.
Sprite
(
getTexture
(
'b7d2a60a-9e60-4eca-be80-a991abea47c9'
));
timeText
:
any
;
time
:
number
constructor
(){
super
()
this
.
time
=
20
...
...
@@ -19,6 +21,7 @@ export default class TimeCounter extends engine.Container{
this
.
timeCounter
.
addChild
(
this
.
timeText
);
this
.
timeText
.
x
=
100
;
this
.
timeText
.
y
=
15
;
}
updateTime
(
time
){
...
...
src/custom/getAwayFromCloud/src/game/utils.ts
View file @
77f8872c
...
...
@@ -19,6 +19,8 @@ export function createSvga(name, anchorName?) {
return
inst
;
}
export
function
getIndexFromRC
(
row
,
col
,
maxCol
){
let
index
;
index
=
row
*
maxCol
+
col
;
...
...
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