修改了$throwEmotion及与其相关的一系列函数
This commit is contained in:
parent
c923e846db
commit
3576e46fb0
10
game/game.js
10
game/game.js
|
@ -21624,6 +21624,16 @@
|
||||||
emotion.style.top=top+'px';
|
emotion.style.top=top+'px';
|
||||||
var left2=getLeft(target)-width;
|
var left2=getLeft(target)-width;
|
||||||
var top2=target.getTop()+target.offsetHeight/3-height;
|
var top2=target.getTop()+target.offsetHeight/3-height;
|
||||||
|
if(['egg','flower','shoe'].contains(name)||rotate){
|
||||||
|
var num1=0.95+Math.random()*(1.1-0.95);
|
||||||
|
var num2=1+Math.random()*(3-1);
|
||||||
|
var left2=getLeft(target)/num1-width;
|
||||||
|
var top2=target.getTop()+target.offsetHeight/num2-height;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var left2=getLeft(target)-width;
|
||||||
|
var top2=target.getTop()+target.offsetHeight/3-height;
|
||||||
|
}
|
||||||
emotion.style['z-index']=10;
|
emotion.style['z-index']=10;
|
||||||
emotion.style.transform='translateY('+(top2-top)+'px) translateX('+(left2-left)+'px)';
|
emotion.style.transform='translateY('+(top2-top)+'px) translateX('+(left2-left)+'px)';
|
||||||
if(['egg','flower','shoe'].contains(name)||rotate) emotion.firstElementChild.style.transform='rotate(1440deg)';
|
if(['egg','flower','shoe'].contains(name)||rotate) emotion.firstElementChild.style.transform='rotate(1440deg)';
|
||||||
|
|
Loading…
Reference in New Issue