This commit is contained in:
libccy 2016-08-12 10:54:16 +08:00
parent eb122649ff
commit 8099f0d5cc
2 changed files with 28 additions and 30 deletions

View File

@ -3220,7 +3220,7 @@
else if(ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1){ else if(ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1){
lib.device='ios'; lib.device='ios';
if(ua.indexOf('ipad')!=-1){ if(ua.indexOf('ipad')!=-1){
window.isIpad=true; lib.ipad=true;
} }
} }
lib.assetURL=noname_inited; lib.assetURL=noname_inited;
@ -3367,10 +3367,11 @@
game.saveConfig('confirmtouch',true); game.saveConfig('confirmtouch',true);
game.saveConfig('low_performance',true); game.saveConfig('low_performance',true);
game.saveConfig('confirm_exit',true); game.saveConfig('confirm_exit',true);
if(!window.isIpad){ if(lib.ipad){
game.saveConfig('layout','phone'); game.saveConfig('layout','phone');
} }
} }
delete lib.ipad;
if(lib.config.extensions.length){ if(lib.config.extensions.length){
window.resetExtension=function(){ window.resetExtension=function(){
for(var i=0;i<lib.config.extensions.length;i++){ for(var i=0;i<lib.config.extensions.length;i++){
@ -6607,14 +6608,14 @@
ui.clear(); ui.clear();
}, },
draw:function(){ draw:function(){
if(lib.config.background_audio){ // if(lib.config.background_audio){
game.playAudio('effect','draw'); // game.playAudio('effect','draw');
} // }
game.broadcast(function(){ // game.broadcast(function(){
if(lib.config.background_audio){ // if(lib.config.background_audio){
game.playAudio('effect','draw'); // game.playAudio('effect','draw');
} // }
}); // });
if(event.drawDeck){ if(event.drawDeck){
if(event.drawDeck>num){ if(event.drawDeck>num){
event.drawDeck=num; event.drawDeck=num;
@ -6649,14 +6650,14 @@
}, },
discard:function(){ discard:function(){
"step 0" "step 0"
if(lib.config.background_audio){ // if(lib.config.background_audio){
game.playAudio('effect','discard'); // game.playAudio('effect','discard');
} // }
game.broadcast(function(){ // game.broadcast(function(){
if(lib.config.background_audio){ // if(lib.config.background_audio){
game.playAudio('effect','discard'); // game.playAudio('effect','discard');
} // }
}); // });
game.log(player,'弃置了',cards); game.log(player,'弃置了',cards);
player.lose(cards); player.lose(cards);
if(event.animate!=false){ if(event.animate!=false){
@ -7326,14 +7327,14 @@
"step 0" "step 0"
if(cards&&get.owner(cards[0])) get.owner(cards[0]).lose(cards); if(cards&&get.owner(cards[0])) get.owner(cards[0]).lose(cards);
"step 1" "step 1"
if(lib.config.background_audio){ // if(lib.config.background_audio){
game.playAudio('effect','judge'); // game.playAudio('effect','judge');
} // }
game.broadcast(function(){ // game.broadcast(function(){
if(lib.config.background_audio){ // if(lib.config.background_audio){
game.playAudio('effect','judge'); // game.playAudio('effect','judge');
} // }
}); // });
cards[0].fix(); cards[0].fix();
cards[0].style.transform=''; cards[0].style.transform='';
cards[0].classList.remove('drawinghidden'); cards[0].classList.remove('drawinghidden');
@ -26128,10 +26129,6 @@
arena:function(){ arena:function(){
var i,j; var i,j;
ui.window=ui.create.div('#window.hidden',document.body); ui.window=ui.create.div('#window.hidden',document.body);
if(window.isIpad){
ui.window.classList.add('ipad');
delete window.isIpad;
}
ui.refresh(ui.window); ui.refresh(ui.window);
if(!localStorage.getItem(lib.configprefix+'playback')){ if(!localStorage.getItem(lib.configprefix+'playback')){
ui.window.show(); ui.window.show();

View File

@ -1312,6 +1312,7 @@ div:hover>.intro{opacity: 1;}
/*.player.target{-webkit-filter:brightness(1.2)}*/ /*.player.target{-webkit-filter:brightness(1.2)}*/
.target{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgba(255, 0, 0, 0.4) 0 0 5px, rgba(255, 0, 0, 0.5) 0 0 12px, rgba(255, 0, 0, 0.8) 0 0 15px !important} .target{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgba(255, 0, 0, 0.4) 0 0 5px, rgba(255, 0, 0, 0.5) 0 0 12px, rgba(255, 0, 0, 0.8) 0 0 15px !important}
#mebg.target{transform: none !important;}
#arena[data-target_shake='shake'] .target{transform: rotate(-3deg);} #arena[data-target_shake='shake'] .target{transform: rotate(-3deg);}
#arena[data-target_shake='shake'] .target2{transform: rotate(3deg);} #arena[data-target_shake='shake'] .target2{transform: rotate(3deg);}