Commit a7b8c4c0 authored by 汪欢's avatar 汪欢

aaa

parent ede8aa48
...@@ -35,8 +35,10 @@ ...@@ -35,8 +35,10 @@
<body> <body>
<div id="game-container" class="game-container"></div> <div id="game-container" class="game-container"></div>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/editor/zeroing/libs/engine.1de84ff79dba19e949088de63aa75af51a515e5c.js"></script> <!-- <script crossorigin="anonymous" src="//yun.duiba.com.cn/editor/zeroing/libs/engine.1de84ff79dba19e949088de63aa75af51a515e5c.js"></script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/editor/zeroing/libs/svga.fd3923ae6e664251ca7981801a65809cc5f36bc3.js"></script> <script crossorigin="anonymous" src="//yun.duiba.com.cn/editor/zeroing/libs/svga.fd3923ae6e664251ca7981801a65809cc5f36bc3.js"></script> -->
<script crossorigin="anonymous" src="//yun.duiba.com.cn/editor/zeroing/libs/engine.cba09e24bd26909e1a67685a889d4799f4c2597a.js"></script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/editor/zeroing/libs/svga.bbb584f45f3ee647d0611653cb854c5d5bb8fb47.js"></script>
<!-- <script src="//yun.duiba.com.cn/editor/zeroing/libs/engine.ebc906f6b50b8da0a669f77027981d5f3cb560ce.js"></script> --> <!-- <script src="//yun.duiba.com.cn/editor/zeroing/libs/engine.ebc906f6b50b8da0a669f77027981d5f3cb560ce.js"></script> -->
<!-- <script src="http://localhost:4002/debug/engine.js"></script> <!-- <script src="http://localhost:4002/debug/engine.js"></script>
<script src="http://localhost:4003/debug/engine-svga.js"></script> --> <script src="http://localhost:4003/debug/engine-svga.js"></script> -->
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
this.addEventListener(engine.Event.ENTER_FRAME, function () { this.addEventListener(engine.Event.ENTER_FRAME, function () {
var dt = Date.now() - pt; var dt = Date.now() - pt;
aaa += dt; aaa += dt;
_this.anchorX = _this.width; _this.anchorX = _this.width + _this.width / 2;
_this.anchorY = _this.height; _this.anchorY = _this.height;
if (aaa > 90 && aaa <= 100) { if (aaa > 90 && aaa <= 100) {
_this.scaleY = 0.99; _this.scaleY = 0.99;
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
this.moistCover.anchorY = 416; this.moistCover.anchorY = 416;
this.moistBg.addChild(this.moistCover); this.moistBg.addChild(this.moistCover);
this.moistCover.scaleY = percent; this.moistCover.scaleY = percent;
var t = engine.Tween.get(this.moistCover);
}; };
Moist.prototype.stopScale = function () { Moist.prototype.stopScale = function () {
this.moistCover.scaleY = 1; this.moistCover.scaleY = 1;
...@@ -104,9 +105,11 @@ ...@@ -104,9 +105,11 @@
this.txt.text = a.toPrecision(3) + '%'; this.txt.text = a.toPrecision(3) + '%';
} }
}; };
Moist.prototype.updatePercent = function (percent) {
this.percent = percent;
};
return Moist; return Moist;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=Moist.js.map
var TimeCounter = (function (_super) { var TimeCounter = (function (_super) {
tslib.__extends(TimeCounter, _super); tslib.__extends(TimeCounter, _super);
...@@ -184,6 +187,8 @@ ...@@ -184,6 +187,8 @@
tslib.__extends(GameTest, _super); tslib.__extends(GameTest, _super);
function GameTest() { function GameTest() {
var _this = _super.call(this) || this; var _this = _super.call(this) || this;
_this.timeArray = [];
_this.container = new engine.Container();
_this.dripArray = []; _this.dripArray = [];
_this.clicknum = 0; _this.clicknum = 0;
_this.R = 250; _this.R = 250;
...@@ -212,6 +217,8 @@ ...@@ -212,6 +217,8 @@
this.playBtn = new engine.Sprite(getTexture("9e347bef-6e91-4c92-ba5f-f9a52e656207")); this.playBtn = new engine.Sprite(getTexture("9e347bef-6e91-4c92-ba5f-f9a52e656207"));
this.playBtn.x = 138; this.playBtn.x = 138;
this.playBtn.y = 1150; this.playBtn.y = 1150;
this.playBtn.anchorX = this.playBtn.x + this.playBtn.width / 2;
this.playBtn.anchorY = this.playBtn.y + this.playBtn.height / 2;
this.addChild(this.playBtn); this.addChild(this.playBtn);
this.moists = new Moist(); this.moists = new Moist();
this.moists.x = 20; this.moists.x = 20;
...@@ -219,28 +226,13 @@ ...@@ -219,28 +226,13 @@
this.addChild(this.moists); this.addChild(this.moists);
this.cloud = new CloudRain(); this.cloud = new CloudRain();
this.addChild(this.cloud); this.addChild(this.cloud);
this.timeArray.push(this.t3, this.t2, this.t1);
}; };
GameTest.prototype.start = function () { GameTest.prototype.start = function () {
var _this = this; var _this = this;
var middleX = this.humanbeing.x + this.humanbeing.width / 2; var middleX = this.humanbeing.x + this.humanbeing.width / 2;
var validX1 = this.humanbeing.x; var validX1 = this.humanbeing.x;
var validX2 = this.humanbeing.x + this.humanbeing.width; 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);
var img = new engine.Sprite(getTexture("e4a82aee-4472-4b06-bd75-02fb64f1c8c8"));
img.width = 2;
img.height = 2;
img.x = i;
img.y = y;
this.con.addChild(img);
}
this.addChild(this.con);
var point1 = new engine.Graphics(); var point1 = new engine.Graphics();
point1.beginFill(0xff0000); point1.beginFill(0xff0000);
point1.drawRect(0, 0, 10, 10); point1.drawRect(0, 0, 10, 10);
...@@ -267,64 +259,109 @@ ...@@ -267,64 +259,109 @@
var ld = Date.now(); var ld = Date.now();
var a = 0; var a = 0;
var b = 0; var b = 0;
this.winds = createSvga("wind"); var timer = 0;
this.addChild(this.winds); var succeedFlag = false;
this.winds.visible = true; var failFlag = false;
this.winds.play(true, true); for (var i = 0; i < this.timeArray.length; i++) {
this.winds.once(engine.Event.END_FRAME, function () { var t = this.timeArray[i];
t.anchorTexture.set(0.5, 0.5);
t.x = 750 / 2;
t.y = 1624 / 2;
t.alpha = 0;
this.container.addChild(t);
this.addChild(this.container);
}
for (var i = 0; i < this.timeArray.length; i++) {
var img = this.timeArray[i];
var delta = i * 1000;
var t = engine.Tween.get(img);
t.wait(delta).set({ alpha: 0.2, scaleX: 2, scaleY: 2 })
.to({ alpha: 1, scaleX: 1, scaleY: 1 }, 300)
.to({ alpha: 0 }, 200)
.wait(500);
if (i === this.timeArray.length - 1) {
t.call(function () {
engine.Tween.get(_this.container).to({ alpha: 0 }, 200).call(function () {
_this.removeChild(_this.container);
});
_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.removeChild(_this.winds);
}, this); }, _this);
this.addEventListener(engine.Event.ENTER_FRAME, function () { });
}
}
this.rainEffect = createSvga("雨滴动效");
this.addEventListener(engine.Event.ENTER_FRAME, function addFrame() {
var _this = this;
var dt = Date.now() - ld; var dt = Date.now() - ld;
a += dt; a += dt;
b += dt; b += dt;
timer += dt;
if (timer >= 3000) {
if (a > 200) { if (a > 200) {
a = 0; a = 0;
if (_this.moists.percent < 1 && _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")); var drip = new engine.Sprite(getTexture("07f74bf6-416f-445e-98d5-021efe4c9fdc"));
drip_1.x = drip.x =
Math.random() * (_this.humanbeing.x + 160) + Math.random() * (this.humanbeing.x + 160) +
(_this.humanbeing.x - 160); (this.humanbeing.x - 160);
drip_1.y = Math.random() * 100 + 300; drip.y = Math.random() * 100 + 300;
_this.dripArray.push(drip_1); this.dripArray.push(drip);
_this.addChild(drip_1); this.addChild(drip);
} }
} }
var _loop_1 = function (drip_2) { var _loop_1 = function (drip) {
drip_2.y += (300 * dt) / 1000; drip.y += (300 * dt) / 1000;
if (drip_2.y > _this.stage.height) { if (drip.y > this_1.stage.height) {
var index_1 = _this.dripArray.indexOf(drip_2); var index_1 = this_1.dripArray.indexOf(drip);
_this.removeChild(drip_2); this_1.removeChild(drip);
_this.dripArray = _this.dripArray.filter(function (ele, i) { return i != index_1; }); this_1.dripArray = this_1.dripArray.filter(function (ele, i) { return i != index_1; });
} }
}; };
for (var _i = 0, _a = _this.dripArray; _i < _a.length; _i++) { var this_1 = this;
var drip_2 = _a[_i]; for (var _i = 0, _a = this.dripArray; _i < _a.length; _i++) {
_loop_1(drip_2); var drip = _a[_i];
_loop_1(drip);
} }
if (b >= 1000) { if (b >= 1000) {
b = 0; b = 0;
if (_this.moists.percent < 1) { if (this.moists.percent < 1) {
_this.timeCounter.time -= 1; this.timeCounter.time -= 1;
_this.timeCounter.updateTime(_this.timeCounter.time); if (this.timeCounter.time <= 0) {
this.timeCounter.time = 0;
}
this.timeCounter.updateTime(this.timeCounter.time);
} }
if (_this.timeCounter.time <= 0) { if (this.timeCounter.time <= 0 && !succeedFlag) {
_this.timeCounter.time = 0; this.timeCounter.time = 0;
succeedFlag = true;
console.log("游戏成功!"); console.log("游戏成功!");
_this.success(); this.success();
} }
} }
var wind = -40; var wind = -40;
_this.rightHand.rotation += wind / 60; this.rightHand.rotation += wind / 60;
if (_this.rightHand.rotation <= -90) { if (this.rightHand.rotation <= -90) {
_this.rightHand.rotation = -90; this.rightHand.rotation = -90;
} }
else if (_this.rightHand.rotation >= 90) { else if (this.rightHand.rotation >= 90) {
_this.rightHand.rotation = 90; this.rightHand.rotation = 90;
} }
ld = Date.now(); if (this.rightHand.rotation <= -60) {
_this.angle = Math.asin(_this.D / 2 / _this.R) * 57.18; var face_1 = this.humanbeing.facialChange(1);
_this.rightHand.name = "aaa"; face_1.x = 7;
face_1.y = 22;
setTimeout(function () {
_this.humanbeing.removeFace(face_1);
}, 100);
}
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) / var k12 = (point1.worldMatrix.ty - point2.worldMatrix.ty) /
(point1.worldMatrix.tx - point2.worldMatrix.tx); (point1.worldMatrix.tx - point2.worldMatrix.tx);
var k23 = (point2.worldMatrix.ty - point3.worldMatrix.ty) / var k23 = (point2.worldMatrix.ty - point3.worldMatrix.ty) /
...@@ -334,61 +371,74 @@ ...@@ -334,61 +371,74 @@
var px3 = point3.worldMatrix.tx; var px3 = point3.worldMatrix.tx;
var maxX = px1 >= px2 ? (px1 >= px3 ? px1 : px3) : px2 >= px3 ? px2 : px3; var maxX = px1 >= px2 ? (px1 >= px3 ? px1 : px3) : px2 >= px3 ? px2 : px3;
var minX = px1 >= px2 ? (px2 >= px3 ? px3 : px2) : px1 >= px3 ? px3 : px1; var minX = px1 >= px2 ? (px2 >= px3 ? px3 : px2) : px1 >= px3 ? px3 : px1;
var _loop_2 = function (drip_3) { var x2 = (middleX + this.R) < maxX ? (middleX + this.R) : maxX;
var _loop_2 = function (drip) {
var b12 = point1.worldMatrix.ty - var b12 = point1.worldMatrix.ty -
point1.worldMatrix.tx * k12 - 50; point1.worldMatrix.tx * k12 - 50;
var b23 = point2.worldMatrix.ty - var b23 = point2.worldMatrix.ty -
point2.worldMatrix.tx * k23 - 50; point2.worldMatrix.tx * k23 - 50;
var y12 = k12 * drip_3.x + b12; var y12 = k12 * drip.x + b12;
var y23 = k23 * drip_3.x + b23; var y23 = k23 * drip.x + b23;
if (drip_3.x >= minX && drip_3.x < maxX) { if (drip.x >= minX && drip.x < maxX) {
if (drip_3.x < px2) { if (drip.x < px2) {
if (drip_3.y >= y12) { if (drip.y >= y12) {
var index_2 = _this.dripArray.indexOf(drip_3); var index_2 = this_2.dripArray.indexOf(drip);
_this.removeChild(drip_3); this_2.removeChild(drip);
_this.dripArray = _this.dripArray.filter(function (ele, i) { return i != index_2; }); this_2.dripArray = this_2.dripArray.filter(function (ele, i) { return i != index_2; });
} }
} }
if (drip_3.x >= px2) { if (drip.x >= px2) {
if (drip_3.y >= y23) { if (drip.y >= y23) {
var index_3 = _this.dripArray.indexOf(drip_3); var index_3 = this_2.dripArray.indexOf(drip);
_this.removeChild(drip_3); this_2.removeChild(drip);
_this.dripArray = _this.dripArray.filter(function (ele, i) { return i != index_3; }); this_2.dripArray = this_2.dripArray.filter(function (ele, i) { return i != index_3; });
} }
} }
} }
if (drip_3.x > _this.humanbeing.x && if (drip.x > this_2.humanbeing.x &&
drip_3.x < _this.humanbeing.x + _this.humanbeing.width) { drip.x < this_2.humanbeing.x + this_2.humanbeing.width) {
if (drip_3.y >= _this.humanbeing.y) { if (drip.y >= this_2.humanbeing.y) {
_this.moists.percent += 0.1; this_2.moists.percent += 0.1;
_this.moists.cover(_this.moists.percent); this_2.moists.cover(this_2.moists.percent);
_this.moists.updateText(_this.moists.percent); this_2.moists.updateText(this_2.moists.percent);
if (_this.moists.percent >= 1) { this_2.addChild(this_2.rainEffect);
_this.moists.stopScale(); this_2.rainEffect.visible = true;
this_2.rainEffect.play(true, true);
this_2.rainEffect.x = drip.x - drip.width * 2;
this_2.rainEffect.y = drip.y;
this_2.rainEffect.once(engine.Event.END_FRAME, function () {
_this.rainEffect.visible = false;
});
if (this_2.moists.percent >= 1 && !failFlag) {
this_2.moists.stopScale();
failFlag = true;
console.log("游戏结束!"); console.log("游戏结束!");
_this.stop(); this_2.stop();
} }
_this.removeChild(drip_3); this_2.removeChild(drip);
var face_1 = _this.humanbeing.facialChange(2); var face_2 = this_2.humanbeing.facialChange(2);
face_1.x = 7; face_2.x = 7;
face_1.y = 22; face_2.y = 22;
setTimeout(function () { setTimeout(function () {
_this.humanbeing.removeFace(face_1); _this.humanbeing.removeFace(face_2);
}, 500); }, 500);
console.log("人"); console.log("人");
var index_4 = _this.dripArray.indexOf(drip_3); var index_4 = this_2.dripArray.indexOf(drip);
_this.dripArray = _this.dripArray.filter(function (ele, i) { return i != index_4; }); this_2.dripArray = this_2.dripArray.filter(function (ele, i) { return i != index_4; });
_this.humanbeing.scaleEffect(); this_2.humanbeing.scaleEffect();
} }
} }
}; };
for (var _b = 0, _c = _this.dripArray; _b < _c.length; _b++) { var this_2 = this;
var drip_3 = _c[_b]; for (var _b = 0, _c = this.dripArray; _b < _c.length; _b++) {
_loop_2(drip_3); var drip = _c[_b];
_loop_2(drip);
}
} }
ld = Date.now(); ld = Date.now();
}); });
this.playBtn.addEventListener(engine.MouseEvent.CLICK, this.onClick, this); this.playBtn.addEventListener(engine.MouseEvent.CLICK, this.onClick, this);
this.rightHand.rotation = 0;
}; };
GameTest.prototype.onClick = function () { GameTest.prototype.onClick = function () {
this.clicknum += 1; this.clicknum += 1;
......
{"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,CAAC,KAAK,CAAC,MAAM,CAAC;;MACnC;KAED,4BAAY,GAAZ,UAAa,GAAG;SACZ,IAAI,IAAI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,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;;;;;;;;;"} {"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 + this.width / 2\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\r\n addPercent:number\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 let ld = Date.now();\r\n // let time\r\n // this.addEventListener(engine.Event.ENTER_FRAME,()=>{\r\n // let dt = Date.now() - ld;\r\n // time += dt;\r\n // if(time >= 100){\r\n // // this.moistCover.scaleY =\r\n // }\r\n // })\r\n let t = engine.Tween.get(this.moistCover);\r\n // t.set({alpha:1,scaleY:this.percent})\r\n // .to({alpha:1,scaleY:percent - 0.08},100)\r\n // .to({alpha:1,scaleY:percent - 0.06},100)\r\n // .to({alpha:1,scaleY:percent - 0.04},100)\r\n // .to({alpha:1,scaleY:percent - 0.02},100)\r\n // .to({alpha:1,scaleY:percent},100)\r\n\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 updatePercent(percent){\r\n this.percent = percent;\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;\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 rainEffect\r\n timeArray:any[] = []\r\n container:engine.Container = new engine.Container()\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.playBtn.anchorX = this.playBtn.x + this.playBtn.width / 2;\r\n this.playBtn.anchorY = this.playBtn.y + this.playBtn.height / 2;\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 this.timeArray.push(this.t3,this.t2,this.t1);\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\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 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 timer = 0;\r\n\r\n let succeedFlag = false;\r\n let failFlag = false;\r\n\r\n\r\n // 倒计时\r\n for(let i=0;i<this.timeArray.length;i++){\r\n let t = this.timeArray[i]\r\n t.anchorTexture.set(0.5,0.5);\r\n t.x = 750 / 2;\r\n t.y = 1624 / 2;\r\n t.alpha = 0;\r\n this.container.addChild(t);\r\n this.addChild(this.container)\r\n }\r\n for(let i=0;i<this.timeArray.length;i++){\r\n let img = this.timeArray[i];\r\n let delta = i * 1000;\r\n let t = engine.Tween.get(img);\r\n t.wait(delta).set({alpha:0.2, scaleX:2, scaleY:2})\r\n .to({alpha:1,scaleX:1,scaleY:1},300)\r\n .to({alpha:0},200)\r\n .wait(500);\r\n if(i === this.timeArray.length - 1){\r\n t.call(()=>{\r\n engine.Tween.get(this.container).to({alpha:0},200).call(()=>{\r\n this.removeChild(this.container)\r\n })\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\r\n }\r\n }\r\n\r\n // 雨滴动效\r\n this.rainEffect = createSvga(\"雨滴动效\");\r\n\r\n this.addEventListener(engine.Event.ENTER_FRAME, function addFrame(){\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 // 延迟三秒执行\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.moists.percent < 1){\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 \r\n if (this.timeCounter.time <= 0 && !succeedFlag) {\r\n this.timeCounter.time = 0;\r\n succeedFlag = true;\r\n console.log(\"游戏成功!\");\r\n // 云动画\r\n // 雨水结束\r\n // 太阳出来\r\n this.success();\r\n // this.removeEventListener(engine.Event.END_FRAME,()=>{})\r\n // if(succeedFlag){\r\n // }\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 // 湿润度增加\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 // this.moists.updatePercent(this.moists.percent);\r\n\r\n\r\n\r\n // 雨滴动效\r\n this.addChild(this.rainEffect);\r\n this.rainEffect.visible = true;\r\n this.rainEffect.play(true,true);\r\n this.rainEffect.x = drip.x - drip.width * 2;\r\n this.rainEffect.y = drip.y;\r\n this.rainEffect.once(engine.Event.END_FRAME,()=>{\r\n this.rainEffect.visible = false;\r\n })\r\n \r\n if (this.moists.percent >= 1 && !failFlag) {\r\n // 游戏结束\r\n this.moists.stopScale();\r\n failFlag = true;\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 // 表情改变\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 // engine.Tween.get(this.playBtn)\r\n // .set({scaleX:1,scaleY:1})\r\n // .to({scaleX:1.1,scaleY:1.1},100)\r\n // .to({scaleX:1,scaleY:1},100)\r\n\r\n\r\n\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\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\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,KA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ef018-79ab-42bf-ac85-0208e36e2928", "uuid":"7f1ef018-79ab-42bf-ac85-0208e36e2928",
"ext":".svga" "ext":".svga"
}, },
{
"name":"雨滴动效",
"url":"//yun.duiba.com.cn/aurora/assets/85feef80df5c2c7728da817e488987d09ba0aab3.svga",
"uuid":"973ed8a7-bfeb-42dd-84fb-e062d150073e",
"ext":".svga"
},
{ {
"name":"背景", "name":"背景",
"url":"//yun.duiba.com.cn/aurora/assets/d0e22ae58b6e8519b969ed207197a31820790349.png", "url":"//yun.duiba.com.cn/aurora/assets/d0e22ae58b6e8519b969ed207197a31820790349.png",
......
...@@ -16,13 +16,16 @@ export default class GameTest extends engine.Container { ...@@ -16,13 +16,16 @@ export default class GameTest extends engine.Container {
playBtn: engine.Sprite; playBtn: engine.Sprite;
human: engine.Sprite; human: engine.Sprite;
humanbeing: Human;winds humanbeing: Human;
moists: Moist; moists: Moist;
contain: any; contain: any;
timeCounter: TimeCounter; timeCounter: TimeCounter;
cloudRain: CloudRain; cloudRain: CloudRain;
cloud: CloudRain; cloud: CloudRain;
winds winds
rainEffect
timeArray:any[] = []
container:engine.Container = new engine.Container()
setup() { setup() {
let playBg = new engine.Sprite( let playBg = new engine.Sprite(
getTexture("5ab43bdc-a6ce-46fb-99c2-a806f57f7484") getTexture("5ab43bdc-a6ce-46fb-99c2-a806f57f7484")
...@@ -69,6 +72,8 @@ export default class GameTest extends engine.Container { ...@@ -69,6 +72,8 @@ export default class GameTest extends engine.Container {
); );
this.playBtn.x = 138; this.playBtn.x = 138;
this.playBtn.y = 1150; this.playBtn.y = 1150;
this.playBtn.anchorX = this.playBtn.x + this.playBtn.width / 2;
this.playBtn.anchorY = this.playBtn.y + this.playBtn.height / 2;
this.addChild(this.playBtn); this.addChild(this.playBtn);
// 湿润度 // 湿润度
this.moists = new Moist(); this.moists = new Moist();
...@@ -79,7 +84,8 @@ export default class GameTest extends engine.Container { ...@@ -79,7 +84,8 @@ export default class GameTest extends engine.Container {
// 云 // 云
this.cloud = new CloudRain(); this.cloud = new CloudRain();
this.addChild(this.cloud); this.addChild(this.cloud);
//风
this.timeArray.push(this.t3,this.t2,this.t1);
} }
dripArray: any[] = []; dripArray: any[] = [];
...@@ -95,39 +101,12 @@ export default class GameTest extends engine.Container { ...@@ -95,39 +101,12 @@ export default class GameTest extends engine.Container {
t2 = new engine.Sprite(getTexture('22de82d1-97ec-4195-a32c-f4fc1656e2de')); t2 = new engine.Sprite(getTexture('22de82d1-97ec-4195-a32c-f4fc1656e2de'));
t3 = new engine.Sprite(getTexture('cc952365-a990-4912-98af-50905559b9d5')); t3 = new engine.Sprite(getTexture('cc952365-a990-4912-98af-50905559b9d5'));
start() { start() {
const middleX = this.humanbeing.x + this.humanbeing.width / 2; const middleX = this.humanbeing.x + this.humanbeing.width / 2;
const validX1 = this.humanbeing.x; const validX1 = this.humanbeing.x;
const validX2 = this.humanbeing.x + this.humanbeing.width; 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 =
-Math.sqrt(
this.R * this.R - (i - middleX - 50) * (i - middleX - 50)
) +
(this.humanbeing.y + 180);
let img = new engine.Sprite(
getTexture("e4a82aee-4472-4b06-bd75-02fb64f1c8c8")
);
img.width = 2;
img.height = 2;
img.x = i;
img.y = y;
this.con.addChild(img);
}
this.addChild(this.con);
let point1 = new engine.Graphics(); let point1 = new engine.Graphics();
point1.beginFill(0xff0000); point1.beginFill(0xff0000);
point1.drawRect(0, 0, 10, 10); point1.drawRect(0, 0, 10, 10);
...@@ -164,17 +143,36 @@ export default class GameTest extends engine.Container { ...@@ -164,17 +143,36 @@ export default class GameTest extends engine.Container {
let a = 0; let a = 0;
let b = 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 timer = 0; let timer = 0;
let succeedFlag = false;
let failFlag = false;
// 倒计时
for(let i=0;i<this.timeArray.length;i++){
let t = this.timeArray[i]
t.anchorTexture.set(0.5,0.5);
t.x = 750 / 2;
t.y = 1624 / 2;
t.alpha = 0;
this.container.addChild(t);
this.addChild(this.container)
}
for(let i=0;i<this.timeArray.length;i++){
let img = this.timeArray[i];
let delta = i * 1000;
let t = engine.Tween.get(img);
t.wait(delta).set({alpha:0.2, scaleX:2, scaleY:2})
.to({alpha:1,scaleX:1,scaleY:1},300)
.to({alpha:0},200)
.wait(500);
if(i === this.timeArray.length - 1){
t.call(()=>{
engine.Tween.get(this.container).to({alpha:0},200).call(()=>{
this.removeChild(this.container)
})
// 风吹动效 // 风吹动效
this.winds = createSvga("wind"); this.winds = createSvga("wind");
this.addChild(this.winds); this.addChild(this.winds);
...@@ -183,30 +181,23 @@ export default class GameTest extends engine.Container { ...@@ -183,30 +181,23 @@ export default class GameTest extends engine.Container {
this.winds.once(engine.Event.END_FRAME,()=>{ this.winds.once(engine.Event.END_FRAME,()=>{
this.removeChild(this.winds); this.removeChild(this.winds);
},this) },this)
})
}
}
// 雨滴动效
this.rainEffect = createSvga("雨滴动效");
this.addEventListener(engine.Event.ENTER_FRAME, () => { this.addEventListener(engine.Event.ENTER_FRAME, function addFrame(){
let dt = Date.now() - ld; let dt = Date.now() - ld;
a += dt; a += dt;
b += dt; b += dt;
timer += 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(timer >= 3000){ if(timer >= 3000){
if (a > 200) { if (a > 200) {
a = 0; a = 0;
if (this.moists.percent < 1 && this.timeCounter.time > 0) { if (this.moists.percent < 1 && this.timeCounter.time > 0) {
...@@ -240,22 +231,25 @@ export default class GameTest extends engine.Container { ...@@ -240,22 +231,25 @@ export default class GameTest extends engine.Container {
//计时器 //计时器
if (b >= 1000) { if (b >= 1000) {
b = 0; b = 0;
// if (this.timeCounter.time <= 0) {
// this.timeCounter.time = 0;
// }
if(this.moists.percent < 1){ if(this.moists.percent < 1){
this.timeCounter.time -= 1; this.timeCounter.time -= 1;
if (this.timeCounter.time <= 0) {
this.timeCounter.time = 0;
}
this.timeCounter.updateTime(this.timeCounter.time); this.timeCounter.updateTime(this.timeCounter.time);
} }
if (this.timeCounter.time <= 0 ) { if (this.timeCounter.time <= 0 && !succeedFlag) {
this.timeCounter.time = 0; this.timeCounter.time = 0;
succeedFlag = true;
console.log("游戏成功!"); console.log("游戏成功!");
// 云动画 // 云动画
// 雨水结束 // 雨水结束
// 太阳出来 // 太阳出来
this.success(); this.success();
// this.removeEventListener(engine.Event.END_FRAME,()=>{}) // this.removeEventListener(engine.Event.END_FRAME,()=>{})
// if(succeedFlag){
// }
} }
} }
...@@ -270,16 +264,16 @@ export default class GameTest extends engine.Container { ...@@ -270,16 +264,16 @@ export default class GameTest extends engine.Container {
} }
// 吃力表情 // 吃力表情
// if(this.rightHand.rotation <= -60){ if(this.rightHand.rotation <= -60){
// let face = this.humanbeing.facialChange(1); let face = this.humanbeing.facialChange(1);
// face.x = 7; face.x = 7;
// face.y = 22; face.y = 22;
// setTimeout(() => { setTimeout(() => {
// this.humanbeing.removeFace(face); this.humanbeing.removeFace(face);
// }, 100); }, 100);
// } }
ld = Date.now(); // ld = Date.now();
// return; // return;
// 扇形的角度 // 扇形的角度
...@@ -296,10 +290,10 @@ export default class GameTest extends engine.Container { ...@@ -296,10 +290,10 @@ export default class GameTest extends engine.Container {
// a.worldMatrix.tx // a.worldMatrix.tx
// point1,2线性方程斜率 // point1,2线性方程斜率
// let aa = 0; let aa = 0;
// if (this.stage.height > 1334) { if (this.stage.height > 1334) {
// aa = 290; aa = 290;
// } }
let k12 = let k12 =
(point1.worldMatrix.ty - point2.worldMatrix.ty) / (point1.worldMatrix.ty - point2.worldMatrix.ty) /
(point1.worldMatrix.tx - point2.worldMatrix.tx); (point1.worldMatrix.tx - point2.worldMatrix.tx);
...@@ -307,20 +301,20 @@ export default class GameTest extends engine.Container { ...@@ -307,20 +301,20 @@ export default class GameTest extends engine.Container {
(point2.worldMatrix.ty - point3.worldMatrix.ty) / (point2.worldMatrix.ty - point3.worldMatrix.ty) /
(point2.worldMatrix.tx - point3.worldMatrix.tx); (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 px1 = point1.worldMatrix.tx;
let px2 = point2.worldMatrix.tx; let px2 = point2.worldMatrix.tx;
let px3 = point3.worldMatrix.tx; let px3 = point3.worldMatrix.tx;
// let px1 = point1.worldMatrix.tx;
// let px2 = point2.worldMatrix.tx;
// let px3 = point3.worldMatrix.tx;
let maxX = let maxX =
px1 >= px2 ? (px1 >= px3 ? px1 : px3) : px2 >= px3 ? px2 : px3; px1 >= px2 ? (px1 >= px3 ? px1 : px3) : px2 >= px3 ? px2 : px3;
let minX = let minX =
px1 >= px2 ? (px2 >= px3 ? px3 : px2) : px1 >= px3 ? px3 : px1; px1 >= px2 ? (px2 >= px3 ? px3 : px2) : px1 >= px3 ? px3 : px1;
// let x2 = (middleX + this.R) < maxX ? (middleX+this.R):maxX; let x2 = (middleX + this.R) < maxX ? (middleX+this.R):maxX;
for (let drip of this.dripArray) { for (let drip of this.dripArray) {
// point1,2线性方程 // point1,2线性方程
let b12 = let b12 =
...@@ -364,15 +358,28 @@ export default class GameTest extends engine.Container { ...@@ -364,15 +358,28 @@ export default class GameTest extends engine.Container {
drip.x < this.humanbeing.x + this.humanbeing.width drip.x < this.humanbeing.x + this.humanbeing.width
) { ) {
if (drip.y >= this.humanbeing.y) { if (drip.y >= this.humanbeing.y) {
// 湿润度增加
this.moists.percent += 0.1; this.moists.percent += 0.1;
this.moists.cover(this.moists.percent); this.moists.cover(this.moists.percent);
this.moists.updateText(this.moists.percent); this.moists.updateText(this.moists.percent);
// this.moists.updatePercent(this.moists.percent);
if (this.moists.percent >= 1) { // 雨滴动效
this.addChild(this.rainEffect);
this.rainEffect.visible = true;
this.rainEffect.play(true,true);
this.rainEffect.x = drip.x - drip.width * 2;
this.rainEffect.y = drip.y;
this.rainEffect.once(engine.Event.END_FRAME,()=>{
this.rainEffect.visible = false;
})
if (this.moists.percent >= 1 && !failFlag) {
// 游戏结束 // 游戏结束
this.moists.stopScale(); this.moists.stopScale();
failFlag = true;
console.log("游戏结束!"); console.log("游戏结束!");
// 清除事件 // 清除事件
this.stop(); this.stop();
...@@ -380,6 +387,7 @@ export default class GameTest extends engine.Container { ...@@ -380,6 +387,7 @@ export default class GameTest extends engine.Container {
} }
this.removeChild(drip); this.removeChild(drip);
// 表情改变
let face = this.humanbeing.facialChange(2); let face = this.humanbeing.facialChange(2);
face.x = 7; face.x = 7;
face.y = 22; face.y = 22;
...@@ -398,7 +406,7 @@ export default class GameTest extends engine.Container { ...@@ -398,7 +406,7 @@ export default class GameTest extends engine.Container {
} }
} }
} }
// } }
ld = Date.now(); ld = Date.now();
...@@ -409,18 +417,26 @@ export default class GameTest extends engine.Container { ...@@ -409,18 +417,26 @@ export default class GameTest extends engine.Container {
this.onClick, this.onClick,
this this
); );
// this.rightHand.rotation = 0; this.rightHand.rotation = 0;
} }
onClick() { onClick() {
this.clicknum += 1; this.clicknum += 1;
this.rightHand.rotation += 10 * this.clicknum; this.rightHand.rotation += 10 * this.clicknum;
this.clicknum = 0; this.clicknum = 0;
// engine.Tween.get(this.playBtn)
// .set({scaleX:1,scaleY:1})
// .to({scaleX:1.1,scaleY:1.1},100)
// .to({scaleX:1,scaleY:1},100)
} }
stop() { stop() {
// this.removeAllEventListener(); // this.removeAllEventListener();
// this.playBtn.removeAllEventListener(); // this.playBtn.removeAllEventListener();
engine.globalEvent.dispatchEvent("cloud-game-fail", { reason: 1 }); engine.globalEvent.dispatchEvent("cloud-game-fail", { reason: 1 });
} }
success() { success() {
...@@ -428,6 +444,7 @@ export default class GameTest extends engine.Container { ...@@ -428,6 +444,7 @@ export default class GameTest extends engine.Container {
engine.globalEvent.dispatchEvent("cloud-game-success", { engine.globalEvent.dispatchEvent("cloud-game-success", {
moist: this.moists.percent, moist: this.moists.percent,
}); });
} }
} }
// }
...@@ -34,7 +34,7 @@ export default class Human extends engine.Container{ ...@@ -34,7 +34,7 @@ export default class Human extends engine.Container{
this.addEventListener(engine.Event.ENTER_FRAME,()=>{ this.addEventListener(engine.Event.ENTER_FRAME,()=>{
let dt = Date.now() -pt; let dt = Date.now() -pt;
aaa += dt; aaa += dt;
this.anchorX = this.width this.anchorX = this.width + this.width / 2
this.anchorY = this.height; this.anchorY = this.height;
if(aaa > 90 && aaa<=100 ){ if(aaa > 90 && aaa<=100 ){
this.scaleY = 0.99; this.scaleY = 0.99;
......
...@@ -8,6 +8,8 @@ export default class Moist extends engine.Container{ ...@@ -8,6 +8,8 @@ export default class Moist extends engine.Container{
moistCover:any = new engine.Sprite(getTexture('024d67e9-ed7f-4481-94ca-a15bd5226cad')) moistCover:any = new engine.Sprite(getTexture('024d67e9-ed7f-4481-94ca-a15bd5226cad'))
txt = new engine.TextInput(); txt = new engine.TextInput();
hintpic:engine.Sprite = new engine.Sprite(getTexture('ed0e8931-2557-4527-bcfc-9071f90d5737')) hintpic:engine.Sprite = new engine.Sprite(getTexture('ed0e8931-2557-4527-bcfc-9071f90d5737'))
addPercent:number
constructor(){ constructor(){
super(); super();
this.percent = 0; this.percent = 0;
...@@ -32,6 +34,23 @@ export default class Moist extends engine.Container{ ...@@ -32,6 +34,23 @@ export default class Moist extends engine.Container{
this.moistCover.anchorY = 416; this.moistCover.anchorY = 416;
this.moistBg.addChild(this.moistCover) this.moistBg.addChild(this.moistCover)
this.moistCover.scaleY = percent; this.moistCover.scaleY = percent;
let ld = Date.now();
// let time
// this.addEventListener(engine.Event.ENTER_FRAME,()=>{
// let dt = Date.now() - ld;
// time += dt;
// if(time >= 100){
// // this.moistCover.scaleY =
// }
// })
let t = engine.Tween.get(this.moistCover);
// t.set({alpha:1,scaleY:this.percent})
// .to({alpha:1,scaleY:percent - 0.08},100)
// .to({alpha:1,scaleY:percent - 0.06},100)
// .to({alpha:1,scaleY:percent - 0.04},100)
// .to({alpha:1,scaleY:percent - 0.02},100)
// .to({alpha:1,scaleY:percent},100)
} }
stopScale(){ stopScale(){
...@@ -48,4 +67,7 @@ export default class Moist extends engine.Container{ ...@@ -48,4 +67,7 @@ export default class Moist extends engine.Container{
} }
} }
updatePercent(percent){
this.percent = percent;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment