触屏操作
This commit is contained in:
parent
cdfc53fdd7
commit
d8fa5c6544
13
CHANGELOG.MD
13
CHANGELOG.MD
|
@ -1,11 +1,2 @@
|
|||
1.6.1
|
||||
bug修复
|
||||
本轮不无懈按钮
|
||||
编辑牌堆功能、牌堆按钮
|
||||
皮肤菜单(右键)
|
||||
珠联璧合提示
|
||||
选将人数、高亮颜色选项
|
||||
收藏录像
|
||||
boss武将包
|
||||
标记数量显示
|
||||
精简版
|
||||
1.6.1.1
|
||||
改进触屏操作
|
||||
|
|
|
@ -375,6 +375,7 @@ card.extra={
|
|||
audio:true,
|
||||
trigger:{source:'damageBegin'},
|
||||
filter:function(event){
|
||||
if(event.parent.name=='_lianhuan'||event.parent.name=='_lianhuan2') return false;
|
||||
if(event.card&&event.card.name=='sha'){
|
||||
if(event.player.get('h').length==0) return true;
|
||||
}
|
||||
|
|
|
@ -219,8 +219,9 @@ card.standard={
|
|||
if(target.hp>2) return 0;
|
||||
if(target.hp==2){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(target!=game.players[i]&&ai.get.attitude(target,game.players[i])>=3&&game.players[i].hp<=1){
|
||||
return 0;
|
||||
if(target!=game.players[i]&&ai.get.attitude(target,game.players[i])>=3){
|
||||
if(game.players[i].hp<=1) return 0;
|
||||
if(lib.config.mode=='identity'&&game.players[i].isZhu&&game.players[i].hp<=2) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -646,7 +646,7 @@ character.standard={
|
|||
position:'he',
|
||||
viewAs:{name:'sha'},
|
||||
viewAsFilter:function(player){
|
||||
if(!player.num('h',{color:'red'})) return false;
|
||||
if(!player.num('he',{color:'red'})) return false;
|
||||
},
|
||||
prompt:'将一张红色牌当杀使用或打出',
|
||||
check:function(card){return 4-ai.get.value(card)},
|
||||
|
@ -1520,7 +1520,7 @@ character.standard={
|
|||
qicai_info:'锁定技,你使用的锦囊牌无距离限制',
|
||||
zhiheng_info:'出牌阶段,你可以弃置任意张牌并摸等量的牌,每阶段限1次',
|
||||
jiuyuan_info:'锁定技,濒死阶段,吴势力角色对你使用的[桃]额外回复一点体力',
|
||||
qixi_info:'你可以将一张黑色手牌当[过河拆桥]使用',
|
||||
qixi_info:'你可以将一张黑色牌当[过河拆桥]使用',
|
||||
keji_info:'若你在出牌阶段没有使用[杀],则可跳过弃牌阶段',
|
||||
kurou_info:'出牌阶段,你可以流失一点体力并摸两张牌',
|
||||
yingzi_info:'摸牌阶段,你可以额外摸一张牌',
|
||||
|
|
|
@ -613,7 +613,10 @@ character.yijiang={
|
|||
trigger:{player:'phaseBegin'},
|
||||
forced:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.phaseUse();
|
||||
'step 1'
|
||||
player.getStat().card={};
|
||||
}
|
||||
},
|
||||
longyin:{
|
||||
|
@ -681,9 +684,11 @@ character.yijiang={
|
|||
jigong:{
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
check:function(event,player){
|
||||
var nh=player.num('h');
|
||||
if(nh<=2) return true;
|
||||
if(nh==3&&!player.num('h','tao')) return Math.random()<0.5;
|
||||
var nh=player.num('h')-player.num('h',{type:'equip'});
|
||||
if(nh<=1) return true;
|
||||
if(player.num('h','tao')) return false;
|
||||
if(nh<=2) return Math.random()<0.7;
|
||||
if(nh<=3) return Math.random()<0.4;
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
|
@ -1671,8 +1676,10 @@ character.yijiang={
|
|||
return false;
|
||||
},
|
||||
init:function(player){
|
||||
if(player.isZhu) player.markSkill('xingshuai');
|
||||
player.storage.xingshuai=false;
|
||||
if(player.isZhu){
|
||||
player.markSkill('xingshuai');
|
||||
player.storage.xingshuai=false;
|
||||
}
|
||||
},
|
||||
intro:{
|
||||
content:'limited'
|
||||
|
@ -2542,7 +2549,7 @@ character.yijiang={
|
|||
"step 0"
|
||||
player.draw(2);
|
||||
"step 1"
|
||||
player.chooseCard(2,true,'交给'+get.translation(trigger.player)+'两张牌').ai=function(card){
|
||||
player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').ai=function(card){
|
||||
if(ui.selected.cards.length&&card.name==ui.selected.cards[0].name) return -1;
|
||||
if(get.tag(card,'damage')) return 1;
|
||||
if(get.type(card)=='equip') return 1;
|
||||
|
@ -4076,6 +4083,7 @@ character.yijiang={
|
|||
return 1;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
if(player==target) return false;
|
||||
var num=player.getStat().skill.danshou;
|
||||
if(num){
|
||||
num++;
|
||||
|
@ -5579,7 +5587,7 @@ character.yijiang={
|
|||
xinzhan_info:'出牌阶段限一次,你可以观看牌堆顶的3张牌,然后展示其中任意数量♥的牌并获得之',
|
||||
huilei_info:'锁定技,杀死你的角色立即弃置所有的牌。',
|
||||
enyuan_info:'锁定技,其他角色每令你回复一点体力,该角色摸一张牌;其他角色每对你造成一次伤害,须给你一张♥手牌,否则该角色失去1点体力。',
|
||||
xuanhuo_info:'你每次获得一名其他角色两张或更多的牌时,可以令其摸一张牌;每当你受到1点伤害后,你可以令伤害来源选择一项:交给你一张手牌,或失去1点体力。',
|
||||
xuanhuo_info:'出牌阶段限一次,你可以将一张红桃手牌交给一名其他角色,获得该角色的一张牌,然后交给除该角色外的一名其他角色',
|
||||
ganlu_info:'出牌阶段,你可以选择两名角色,交换他们装备区里的所有牌。以此法交换的装备数差不能超过X(X为你已损失体力值)。每回合限一次。',
|
||||
buyi_info:'当有角色进入濒死状态时,你可以展示该角色的一张手牌:若此牌不为基本牌,则该角色弃掉这张牌并回复1点体力。',
|
||||
mingce_info:'出牌阶段,你可以交给任一其他角色一张装备牌或【杀】,该角色进行二选一:1. 视为对其攻击范围内的另一名由你指定的角色使用一张【杀】。2. 摸一张牌。每回合限一次。',
|
||||
|
|
570
game/game.js
570
game/game.js
|
@ -125,6 +125,31 @@
|
|||
name:'双击换肤',
|
||||
init:true
|
||||
},
|
||||
swipe:{
|
||||
name:'滑动手势',
|
||||
init:true,
|
||||
unfrequent:true,
|
||||
},
|
||||
swipe_down:{
|
||||
name:'下划操作',
|
||||
init:'system',
|
||||
unfrequent:true,
|
||||
item:{
|
||||
system:'显示按钮',
|
||||
menu:'打开菜单',
|
||||
}
|
||||
},
|
||||
swipe_up:{
|
||||
name:'上划操作',
|
||||
init:'auto',
|
||||
unfrequent:true,
|
||||
item:{
|
||||
system:'显示按钮',
|
||||
menu:'打开菜单',
|
||||
pause:'切换暂停',
|
||||
auto:'切换托管'
|
||||
}
|
||||
},
|
||||
game_speed:{
|
||||
name:'游戏速度',
|
||||
init:'mid',
|
||||
|
@ -214,6 +239,7 @@
|
|||
map.hoveration.hide();
|
||||
map.right_info.hide();
|
||||
map.right_click.hide();
|
||||
map.swipe.show();
|
||||
}
|
||||
else{
|
||||
map.mousewheel.show();
|
||||
|
@ -228,6 +254,7 @@
|
|||
map.hover_handcard.show();
|
||||
map.hoveration.show();
|
||||
}
|
||||
map.swipe.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -535,6 +562,31 @@
|
|||
// },
|
||||
// unfrequent:true,
|
||||
// },
|
||||
show_roundmenu:{
|
||||
name:'显示触屏按钮',
|
||||
init:true,
|
||||
unfrequent:true,
|
||||
onclick:function(bool){
|
||||
game.saveConfig('show_roundmenu',bool);
|
||||
if(bool&&lib.config.touchscreen){
|
||||
ui.roundmenu.style.display='';
|
||||
}
|
||||
else{
|
||||
ui.roundmenu.style.display='none';
|
||||
}
|
||||
}
|
||||
},
|
||||
round_menu_func:{
|
||||
name:'触屏按钮功能',
|
||||
init:'system',
|
||||
unfrequent:true,
|
||||
item:{
|
||||
system:'显示按钮',
|
||||
menu:'打开菜单',
|
||||
pause:'切换暂停',
|
||||
auto:'切换托管'
|
||||
}
|
||||
},
|
||||
show_replay:{
|
||||
name:'显示重来按钮',
|
||||
init:false,
|
||||
|
@ -706,6 +758,14 @@
|
|||
else{
|
||||
map.image_background_filter.show();
|
||||
}
|
||||
if(lib.config.layout!='phone'){
|
||||
map.round_menu_func.hide();
|
||||
map.show_roundmenu.hide();
|
||||
}
|
||||
else{
|
||||
map.round_menu_func.show();
|
||||
map.show_roundmenu.show();
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -1860,7 +1920,7 @@
|
|||
'游戏选项':'<ul><li>控制台命令<br>开启后可用浏览器控制台控制游戏<li>自动确认<br>开启后当候选目标仅有1个时点击目标无需再点击确定<li>'+
|
||||
'触屏模式<br>可消除iOS等设备上300ms的点击延迟,但开启后无法使用鼠标<li>滚轮控制手牌<br>开启后滚轮可控制手牌的左右滚动,建议Mac等具备横向滚动功能的设备关闭此选项'+
|
||||
'<li>隐藏非全身皮肤<br>在新版布局中,若角色没有全身皮肤将被隐藏<li>游戏玩法<br>为游戏增加不同玩法,开启后可在帮助中查看介绍',
|
||||
'游戏操作':'<ul><li>长按/鼠标悬停/右键单击(需在设置中开启)显示信息<li>触屏模式中双指点击切换暂停<li>移动布局中,点击顶部的左半边或右半边可显示按钮,双击顶部可令界面下移(方便标身份)<li>键盘快捷键<br>'+
|
||||
'游戏操作':'<ul><li>长按/鼠标悬停/右键单击(需在设置中开启)显示信息<li>触屏模式中,双指点击切换暂停;下划显示菜单,上划切换托管<li>移动布局中,点击顶部的左半边或右半边可显示按钮,双击顶部可令界面下移(方便标身份)<li>键盘快捷键<br>'+
|
||||
'<table><tr><td>a<td>切换托管<tr><td>c<td>打开设置<tr><td>w<td>切换不询问无懈<tr><td>▭<td>暂停</ul>',
|
||||
'游戏命令':'<div style="margin:10px">变量名</div><ul style="margin-top:0"><li>场上角色<br>game.players<li>阵亡角色<br>game.dead'+
|
||||
'<li>玩家<br>game.me<li>玩家的上/下家<br>game.me.previous/next'+
|
||||
|
@ -2222,6 +2282,12 @@
|
|||
else{
|
||||
ui.arena.classList.remove('hpimage');
|
||||
}
|
||||
if(lib.config.layout=='phone'){
|
||||
ui.roundmenu.style.display='';
|
||||
}
|
||||
else{
|
||||
ui.roundmenu.style.display='none';
|
||||
}
|
||||
setTimeout(function(){
|
||||
layout.remove();
|
||||
ui.arena.show();
|
||||
|
@ -3800,11 +3866,11 @@
|
|||
else if(event.nature=='thunder'){
|
||||
player.$thunder();
|
||||
}
|
||||
player.$damagepop(-num,event.nature);
|
||||
}
|
||||
else{
|
||||
player.popup(-num,event.nature);
|
||||
}
|
||||
player.$damagepop(-num,event.nature);
|
||||
// else{
|
||||
// player.popup(-num,event.nature);
|
||||
// }
|
||||
}
|
||||
// if(source){
|
||||
// if(player._damagetimeout!=source){
|
||||
|
@ -3846,12 +3912,9 @@
|
|||
if(num>0){
|
||||
player.changeHp(num,false);
|
||||
if(lib.config.animation&&!lib.config.low_performance){
|
||||
player.$damagepop(num,'wood');
|
||||
player.$recover();
|
||||
}
|
||||
else{
|
||||
player.popup(num);
|
||||
}
|
||||
player.$damagepop(num,'wood');
|
||||
game.log(get.translation(player)+'回复了'+get.cnNumber(num)+'点体力')
|
||||
}
|
||||
},
|
||||
|
@ -7088,9 +7151,14 @@
|
|||
this.appendChild(node);
|
||||
ui.refresh(node);
|
||||
node.classList.add('damageadded');
|
||||
setTimeout(function(){
|
||||
node.delete();
|
||||
},500);
|
||||
node.addEventListener('webkitTransitionEnd',function(){
|
||||
setTimeout(function(){
|
||||
node.delete();
|
||||
},200);
|
||||
});
|
||||
// setTimeout(function(){
|
||||
// node.delete();
|
||||
// },500);
|
||||
var that=this;
|
||||
setTimeout(function(){
|
||||
that.damagepopups.shift();
|
||||
|
@ -8335,6 +8403,7 @@
|
|||
if(nodes[i]==ui.control) continue;
|
||||
if(nodes[i]==ui.mebg) continue;
|
||||
if(nodes[i]==ui.me) continue;
|
||||
if(nodes[i]==ui.roundmenu) continue;
|
||||
nodes[i].remove();
|
||||
}
|
||||
// ui.me.f.innerHTML='';
|
||||
|
@ -10309,8 +10378,10 @@
|
|||
var custom=event.custom||{};
|
||||
var ok=true,auto=true;
|
||||
var player=event.player;
|
||||
// ui.roundmenu.show();
|
||||
if(!event.filterButton&&!event.filterCard&&!event.filterTarget&&!event.skill) return;
|
||||
if(event.filterButton){
|
||||
// ui.roundmenu.hide();
|
||||
var dialog=event.dialog;
|
||||
range=get.select(event.selectButton);
|
||||
if(range[0]!=range[1]||range[0]>1) auto=false;
|
||||
|
@ -10566,6 +10637,7 @@
|
|||
return ok;
|
||||
},
|
||||
uncheck:function(){
|
||||
// ui.roundmenu.show();
|
||||
var i,j;
|
||||
if(false){
|
||||
if(lib.config.mode=='chess'){
|
||||
|
@ -11796,7 +11868,59 @@
|
|||
ui.backgroundMusic.addEventListener('ended',game.playBackgroundMusic);
|
||||
ui.window.appendChild(ui.backgroundMusic);
|
||||
|
||||
|
||||
ui.roundmenu=ui.create.div('#roundmenu.roundarenabutton.menubutton.round',ui.arena);
|
||||
ui.roundmenu._position=[180,210];
|
||||
ui.create.div(ui.roundmenu);
|
||||
ui.create.div(ui.roundmenu);
|
||||
ui.create.div(ui.roundmenu);
|
||||
ui.create.div(ui.roundmenu);
|
||||
ui.create.div(ui.roundmenu);
|
||||
ui.create.div(ui.roundmenu);
|
||||
var resetround=function(e){
|
||||
_status.draggingroundmenu=false;
|
||||
ui.roundmenu.style.transform='';
|
||||
ui.roundmenu._dragtransform=[0,0];
|
||||
ui.roundmenu.style.transition='all 0.3s';
|
||||
delete ui.roundmenu._dragtouches;
|
||||
delete ui.roundmenu._dragorigin;
|
||||
delete ui.roundmenu._dragorigintransform;
|
||||
setTimeout(function(){
|
||||
ui.roundmenu.style.transition='';
|
||||
},500);
|
||||
game.saveConfig('roundmenu_transform',[0,0]);
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
};
|
||||
if(lib.config.touchscreen){
|
||||
ui.roundmenu.addEventListener('touchstart',function(e){
|
||||
_status.draggingroundmenu=true;
|
||||
ui.roundmenu._dragorigin={
|
||||
clientX:e.touches[0].clientX,
|
||||
clientY:e.touches[0].clientY,
|
||||
};
|
||||
if(!ui.roundmenu._dragtransform){
|
||||
ui.roundmenu._dragtransform=[0,0];
|
||||
}
|
||||
ui.roundmenu._dragorigintransform=ui.roundmenu._dragtransform.slice(0);
|
||||
ui.roundmenu._resetTimeout=setTimeout(function(){
|
||||
resetround();
|
||||
delete ui.roundmenu._resetTimeout;
|
||||
},1000);
|
||||
});
|
||||
// lib.setLongPress(ui.roundmenu,resetround);
|
||||
}
|
||||
else{
|
||||
ui.roundmenu.oncontextmenu=resetround;
|
||||
}
|
||||
if(lib.config.roundmenu_transform){
|
||||
var translate=lib.config.roundmenu_transform;
|
||||
ui.roundmenu._dragtransform=translate;
|
||||
ui.roundmenu.style.transform='translate('+translate[0]+'px,'+translate[1]+'px)';
|
||||
ui.click.checkroundtranslate();
|
||||
}
|
||||
if(lib.config.layout!='phone'){
|
||||
ui.roundmenu.style.display='none';
|
||||
}
|
||||
|
||||
ui.sidebar=ui.create.div('#sidebar');
|
||||
ui.sidebar3=ui.create.div('#sidebar3');
|
||||
|
@ -12613,18 +12737,18 @@
|
|||
|
||||
ui.system1=ui.create.div('#system1',ui.system);
|
||||
ui.system2=ui.create.div('#system2',ui.system);
|
||||
if(lib.config.touchscreen){
|
||||
ui.system1.addEventListener('touchstart',ui.click.system);
|
||||
// if(lib.config.touchscreen){
|
||||
// ui.system1.addEventListener('touchstart',ui.click.system);
|
||||
// ui.system1.addEventListener('touchend',ui.click.system);
|
||||
// ui.system1.addEventListener('touchmove',ui.click.system);
|
||||
ui.system2.addEventListener('touchstart',ui.click.system);
|
||||
// ui.system2.addEventListener('touchstart',ui.click.system);
|
||||
// ui.system2.addEventListener('touchend',ui.click.system);
|
||||
// ui.system2.addEventListener('touchmove',ui.click.system);
|
||||
}
|
||||
else{
|
||||
ui.system1.listen(ui.click.system);
|
||||
ui.system2.listen(ui.click.system);
|
||||
}
|
||||
// }
|
||||
// else{
|
||||
// ui.system1.listen(ui.click.system);
|
||||
// ui.system2.listen(ui.click.system);
|
||||
// }
|
||||
|
||||
ui.replay=ui.create.system('重来',game.reload,true);
|
||||
ui.config2=ui.create.system('选项',ui.click.config);
|
||||
|
@ -14506,6 +14630,40 @@
|
|||
if(this.nextSibling) this.nextSibling.classList.remove('shown');
|
||||
if(this.previousSibling) this.previousSibling.classList.remove('shown');
|
||||
},
|
||||
roundmenu:function(){
|
||||
switch(lib.config.round_menu_func){
|
||||
case 'system':
|
||||
if((_status.removinground&&lib.config.touchscreen)||
|
||||
ui.system2.classList.contains('shown')){
|
||||
// _status.removinground=false;
|
||||
// game.pause2();
|
||||
// ui.click.configMenu();
|
||||
ui.system1.classList.remove('shown');
|
||||
ui.system2.classList.remove('shown');
|
||||
}
|
||||
else{
|
||||
ui.system1.classList.add('shown');
|
||||
ui.system2.classList.add('shown');
|
||||
}
|
||||
break;
|
||||
case 'menu':
|
||||
game.pause2();
|
||||
ui.click.configMenu();
|
||||
ui.system1.classList.remove('shown');
|
||||
ui.system2.classList.remove('shown');
|
||||
break;
|
||||
case 'pause':
|
||||
ui.click.pause();
|
||||
break;
|
||||
case 'auto':
|
||||
ui.click.auto();
|
||||
if(!ui.system1.classList.contains('shown')){
|
||||
ui.system1.classList.add('shown');
|
||||
}
|
||||
break;
|
||||
}
|
||||
_status.clicked=true;
|
||||
},
|
||||
pausehistory:function(){
|
||||
if(!lib.config.auto_popped_history) return;
|
||||
if(!ui.sidebar.childNodes.length) return;
|
||||
|
@ -14796,193 +14954,141 @@
|
|||
game.swapPlayer(this.link);
|
||||
},
|
||||
windowtouchstart:function(e){
|
||||
_status.mousedown=true;
|
||||
if(e.path){
|
||||
for(var i=0;i<e.path.length;i++){
|
||||
var itemtype=get.itemtype(e.path[i]);
|
||||
if(itemtype=='button') break;
|
||||
if(itemtype=='dialog'&&
|
||||
!e.path[i].classList.contains('popped')&&
|
||||
!e.path[i].classList.contains('fixed')){
|
||||
var ddialog=e.path[i];
|
||||
_status.draggingdialog=ddialog;
|
||||
ddialog._dragorigin=e;
|
||||
if(!ddialog._dragtransform){
|
||||
ddialog._dragtransform=[0,0];
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
var evt=_status.event;
|
||||
if(!lib.config.enable_drag) return;
|
||||
if(!ui.arena.classList.contains('selecting')) return;
|
||||
if(!evt.isMine()) return;
|
||||
if(!Array.isArray(e.path)) return;
|
||||
for(var i=0;i<e.path.length;i++){
|
||||
var itemtype=get.itemtype(e.path[i]);
|
||||
if(itemtype=='card'||itemtype=='button'||itemtype=='player'){
|
||||
if(e.path[i].classList.contains('selectable')&&
|
||||
!e.path[i].classList.contains('selected')&&
|
||||
!e.path[i].classList.contains('noclick')){
|
||||
_status.clicked=false;
|
||||
ui.click[itemtype].call(e.path[i]);
|
||||
if(e.path[i].classList.contains('selected')){
|
||||
_status.mousedragging=e.touches[0];
|
||||
_status.mousedragorigin=e.path[i];
|
||||
_status.mouseleft=false;
|
||||
_status.selectionfull=false;
|
||||
_status.multitarget=false;
|
||||
// if(ui.confirm&&ui.confirm.str=='c') ui.confirm.close();
|
||||
}
|
||||
}
|
||||
return;
|
||||
if(e.touches[0]&&lib.config.swipe){
|
||||
_status._swipeorigin={
|
||||
clientX:e.touches[0].clientX,
|
||||
clientY:e.touches[0].clientY,
|
||||
time:get.currentTime()
|
||||
}
|
||||
}
|
||||
},
|
||||
windowtouchmove:function(e){
|
||||
if(!Array.isArray(e.path)) return;
|
||||
var dialogs=document.querySelectorAll('#window>.dialog.popped:not(.static)');
|
||||
for(var i=0;i<dialogs.length;i++){
|
||||
dialogs[i].delete();
|
||||
}
|
||||
var node=_status.currentmouseenter;
|
||||
if(_status.mousedragging){
|
||||
e.preventDefault();
|
||||
ui.canvas.width=ui.arena.offsetWidth;
|
||||
ui.canvas.height=ui.arena.offsetHeight;
|
||||
var ctx=ui.ctx;
|
||||
ctx.shadowBlur=5;
|
||||
ctx.shadowColor='rgba(0,0,0,0.3)';
|
||||
ctx.strokeStyle='white';
|
||||
ctx.lineWidth=3;
|
||||
ctx.setLineDash([8,2]);
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(_status.mousedragging.clientX-ui.arena.offsetLeft,_status.mousedragging.clientY-ui.arena.offsetTop);
|
||||
if(_status.multitarget){
|
||||
for(var i=0;i<_status.lastdragchange.length;i++){
|
||||
var exy=_status.lastdragchange[i]._lastdragchange;
|
||||
ctx.lineTo(exy[0],exy[1]);
|
||||
}
|
||||
}
|
||||
if(!_status.selectionfull){
|
||||
ctx.lineTo(e.touches[0].clientX-ui.arena.offsetLeft,e.touches[0].clientY-ui.arena.offsetTop);
|
||||
}
|
||||
ctx.stroke();
|
||||
if(!_status.multitarget){
|
||||
for(var i=0;i<_status.lastdragchange.length;i++){
|
||||
ctx.moveTo(_status.mousedragging.clientX-ui.arena.offsetLeft,_status.mousedragging.clientY-ui.arena.offsetTop);
|
||||
var exy=_status.lastdragchange[i]._lastdragchange;
|
||||
ctx.lineTo(exy[0],exy[1]);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
for(var i=0;i<e.path.length;i++){
|
||||
// e.path.contains(_status.mousedragorigin)===true
|
||||
if(e.path[i]==_status.mousedragorigin){
|
||||
if(_status.mouseleft){
|
||||
_status.mousedragging=null;
|
||||
_status.mousedragorigin=null;
|
||||
_status.clicked=false;
|
||||
game.uncheck();
|
||||
game.check();
|
||||
ui.canvas.width=ui.arena.offsetWidth;
|
||||
ui.canvas.height=ui.arena.offsetHeight;
|
||||
_status.clicked=true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
game.print(2);
|
||||
var itemtype=get.itemtype(e.path[i]);
|
||||
if(itemtype=='card'||itemtype=='button'||itemtype=='player'){
|
||||
_status.mouseleft=true;
|
||||
var item=e.path[i];
|
||||
var ex=e.touches[0].clientX-ui.arena.offsetLeft;
|
||||
var ey=e.touches[0].clientY-ui.arena.offsetTop;
|
||||
var exx=ex,eyy=ey;
|
||||
if(lib.config.mode=='chess'){
|
||||
ex-=-ui.chessContainer.scrollLeft+ui.chess.offsetLeft;
|
||||
ey-=-ui.chessContainer.scrollTop+ui.chess.offsetTop;
|
||||
}
|
||||
if(itemtype!='player'||(ex>item.offsetLeft&&ex<item.offsetLeft+item.offsetWidth&&
|
||||
ey>item.offsetTop&&ey<item.offsetTop+item.offsetHeight)){
|
||||
var targetfixed=false;
|
||||
if(itemtype=='player'){
|
||||
if(get.select(_status.event.selectTarget)[1]==-1){
|
||||
targetfixed=true;
|
||||
}
|
||||
}
|
||||
if(!targetfixed&&item.classList.contains('selectable')&&_status.dragstatuschanged!=item){
|
||||
_status.mouseleft=true;
|
||||
_status.dragstatuschanged=item;
|
||||
_status.clicked=false;
|
||||
var notbefore=itemtype=='player'&&!item.classList.contains('selected');
|
||||
ui.click[itemtype].call(item);
|
||||
if(item.classList.contains('selected')){
|
||||
if(notbefore){
|
||||
_status.lastdragchange.push(item);
|
||||
e.path[i]._lastdragchange=[exx,eyy];
|
||||
}
|
||||
}
|
||||
else{
|
||||
_status.lastdragchange.remove(item);
|
||||
}
|
||||
_status.selectionfull=true;
|
||||
if(_status.event.filterButton&&ui.selected.buttons.length<get.select(_status.event.selectButton)[1]){
|
||||
_status.selectionfull=false;
|
||||
}
|
||||
else if(_status.event.filterCard&&ui.selected.cards.length<get.select(_status.event.selectCard)[1]){
|
||||
_status.selectionfull=false;
|
||||
}
|
||||
else if(_status.event.filterTarget&&ui.selected.targets.length<get.select(_status.event.selectTarget)[1]){
|
||||
_status.selectionfull=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
_status.mouseleft=true;
|
||||
_status.dragstatuschanged=null;
|
||||
}
|
||||
e.preventDefault();
|
||||
if(_status.draggingroundmenu){
|
||||
delete _status._swipeorigin;
|
||||
if(ui.roundmenu._dragorigin&&ui.roundmenu._dragtransform&&e.touches.length){
|
||||
var translate=ui.roundmenu._dragtransform.slice(0);
|
||||
var dx=e.touches[0].clientX-ui.roundmenu._dragorigin.clientX;
|
||||
var dy=e.touches[0].clientY-ui.roundmenu._dragorigin.clientY;
|
||||
translate[0]+=dx;
|
||||
translate[1]+=dy;
|
||||
if(dx*dx+dy*dy>100){
|
||||
if(ui.roundmenu._resetTimeout){
|
||||
clearTimeout(ui.roundmenu._resetTimeout);
|
||||
delete ui.roundmenu._resetTimeout;
|
||||
}
|
||||
}
|
||||
ui.roundmenu._dragtouches=e.touches[0];
|
||||
ui.click.checkroundtranslate(translate);
|
||||
}
|
||||
_status.clicked=true;
|
||||
}
|
||||
else if(_status._swipeorigin&&e.touches[0]){
|
||||
_status._swipeorigin.touches=e.touches[0];
|
||||
}
|
||||
},
|
||||
windowtouchend:function(e){
|
||||
if(e.touches.length==1&&!_status.dragged){
|
||||
ui.click.pause();
|
||||
}
|
||||
else{
|
||||
var tmpflag=false;
|
||||
_status.mousedown=false;
|
||||
if(_status.mousedragging&&_status.mouseleft){
|
||||
if(game.check()){
|
||||
if(ui.confirm){
|
||||
ui.confirm.close();
|
||||
}
|
||||
ui.click.ok();
|
||||
if(_status.draggingroundmenu){
|
||||
delete _status._swipeorigin;
|
||||
if(ui.roundmenu._resetTimeout){
|
||||
clearTimeout(ui.roundmenu._resetTimeout);
|
||||
delete ui.roundmenu._resetTimeout;
|
||||
}
|
||||
if(ui.roundmenu._dragorigin&&ui.roundmenu._dragtransform&&ui.roundmenu._dragtouches){
|
||||
var dx=ui.roundmenu._dragtouches.clientX-ui.roundmenu._dragorigin.clientX;
|
||||
var dy=ui.roundmenu._dragtouches.clientY-ui.roundmenu._dragorigin.clientY;
|
||||
if(dx*dx+dy*dy<1000){
|
||||
ui.click.roundmenu();
|
||||
ui.roundmenu._dragtransform=ui.roundmenu._dragorigintransform;
|
||||
var translate=ui.roundmenu._dragtransform;
|
||||
ui.roundmenu.style.transform='translate('+translate[0]+'px,'+translate[1]+'px)';
|
||||
}
|
||||
else{
|
||||
game.uncheck();
|
||||
game.check();
|
||||
var translate=ui.roundmenu._dragtransform;
|
||||
translate[0]+=dx;
|
||||
translate[1]+=dy;
|
||||
ui.click.checkroundtranslate();
|
||||
}
|
||||
delete ui.roundmenu._dragorigin;
|
||||
}
|
||||
else if(_status.mousedragging&&_status.mousedragorigin){
|
||||
tmpflag=_status.mousedragorigin;
|
||||
}
|
||||
_status.lastdragchange.length=0;
|
||||
_status.mousedragging=null;
|
||||
_status.mouseleft=false;
|
||||
_status.mousedragorigin=null;
|
||||
_status.dragstatuschanged=false;
|
||||
ui.canvas.width=ui.arena.offsetWidth;
|
||||
ui.canvas.height=ui.arena.offsetHeight;
|
||||
if(tmpflag){
|
||||
ui.click[get.itemtype(tmpflag)].call(tmpflag);
|
||||
game.check();
|
||||
else{
|
||||
ui.click.roundmenu();
|
||||
}
|
||||
_status.clicked=false;
|
||||
game.saveConfig('roundmenu_transform',translate);
|
||||
delete _status.draggingroundmenu;
|
||||
}
|
||||
else if(_status._swipeorigin&&!_status.paused2){
|
||||
if(get.currentTime()-_status._swipeorigin.time<500){
|
||||
var dx=_status._swipeorigin.touches.clientX-_status._swipeorigin.clientX;
|
||||
var dy=_status._swipeorigin.touches.clientY-_status._swipeorigin.clientY;
|
||||
if(Math.abs(dx)<100){
|
||||
if(dy<-200){
|
||||
switch(lib.config.swipe_up){
|
||||
case 'system':
|
||||
if(ui.system2.classList.contains('shown')){
|
||||
ui.system1.classList.remove('shown');
|
||||
ui.system2.classList.remove('shown');
|
||||
}
|
||||
else{
|
||||
ui.system1.classList.add('shown');
|
||||
ui.system2.classList.add('shown');
|
||||
}
|
||||
break;
|
||||
case 'menu':
|
||||
game.pause2();
|
||||
ui.click.configMenu();
|
||||
ui.system1.classList.remove('shown');
|
||||
ui.system2.classList.remove('shown');
|
||||
break;
|
||||
case 'pause':
|
||||
ui.click.pause();
|
||||
break;
|
||||
case 'auto':
|
||||
ui.click.auto();
|
||||
if(!ui.system1.classList.contains('shown')){
|
||||
ui.system1.classList.add('shown');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(dy>200){
|
||||
if(lib.config.swipe_down=='menu'||
|
||||
ui.system2.classList.contains('shown')||
|
||||
lib.config.layout!='phone'){
|
||||
game.pause2();
|
||||
ui.click.configMenu();
|
||||
ui.system1.classList.remove('shown');
|
||||
ui.system2.classList.remove('shown');
|
||||
}
|
||||
else{
|
||||
ui.system1.classList.add('shown');
|
||||
ui.system2.classList.add('shown');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
checkroundtranslate:function(translate){
|
||||
var translate=translate||ui.roundmenu._dragtransform;
|
||||
if(translate[1]+ui.roundmenu._position[1]+50+ui.arena.offsetTop>ui.window.offsetHeight){
|
||||
translate[1]=ui.window.offsetHeight-(ui.roundmenu._position[1]+50)-ui.arena.offsetTop;
|
||||
}
|
||||
else if(translate[1]+ui.roundmenu._position[1]+ui.arena.offsetTop<0){
|
||||
translate[1]=-ui.roundmenu._position[1]-ui.arena.offsetTop;
|
||||
}
|
||||
if(translate[0]+ui.roundmenu._position[0]+50+ui.arena.offsetLeft>ui.window.offsetWidth){
|
||||
translate[0]=ui.window.offsetWidth-(ui.roundmenu._position[0]+50)-ui.arena.offsetLeft;
|
||||
}
|
||||
else if(translate[0]+ui.roundmenu._position[0]+ui.arena.offsetLeft<0){
|
||||
translate[0]=-ui.roundmenu._position[0]-ui.arena.offsetLeft;
|
||||
}
|
||||
ui.roundmenu.style.transform='translate('+translate[0]+'px,'+translate[1]+'px)';
|
||||
},
|
||||
windowmousewheel:function(e){
|
||||
_status.tempunpopup=e;
|
||||
|
@ -15143,6 +15249,15 @@
|
|||
}
|
||||
_status.clicked=true;
|
||||
}
|
||||
if(_status.draggingroundmenu){
|
||||
if(ui.roundmenu._dragorigin&&ui.roundmenu._dragtransform){
|
||||
var translate=ui.roundmenu._dragtransform.slice(0);
|
||||
translate[0]+=e.x-ui.roundmenu._dragorigin.x;
|
||||
translate[1]+=e.y-ui.roundmenu._dragorigin.y;
|
||||
ui.click.checkroundtranslate(translate);
|
||||
}
|
||||
_status.clicked=true;
|
||||
}
|
||||
}
|
||||
},
|
||||
windowmousedown:function(e){
|
||||
|
@ -15167,6 +15282,13 @@
|
|||
}
|
||||
return;
|
||||
}
|
||||
if(e.path[i]==ui.roundmenu){
|
||||
_status.draggingroundmenu=true;
|
||||
ui.roundmenu._dragorigin=e;
|
||||
if(!ui.roundmenu._dragtransform){
|
||||
ui.roundmenu._dragtransform=[0,0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15209,6 +15331,23 @@
|
|||
}
|
||||
delete _status.draggingdialog;
|
||||
}
|
||||
if(_status.draggingroundmenu){
|
||||
if(ui.roundmenu._dragorigin&&ui.roundmenu._dragtransform){
|
||||
var dx=e.x-ui.roundmenu._dragorigin.x;
|
||||
var dy=e.y-ui.roundmenu._dragorigin.y;
|
||||
if(dx*dx+dy*dy<25){
|
||||
ui.click.roundmenu();
|
||||
}
|
||||
var translate=ui.roundmenu._dragtransform;
|
||||
translate[0]+=dx;
|
||||
translate[1]+=dy;
|
||||
ui.click.checkroundtranslate();
|
||||
delete ui.roundmenu._dragorigin;
|
||||
}
|
||||
|
||||
game.saveConfig('roundmenu_transform',translate);
|
||||
delete _status.draggingroundmenu;
|
||||
}
|
||||
if(e.button==2){
|
||||
if(_status.mousedragging){
|
||||
_status.mousedragging=null;
|
||||
|
@ -15360,6 +15499,12 @@
|
|||
}
|
||||
}
|
||||
if(lib.config.layout=='phone'&&ui.menuContainer.classList.contains('hidden')){
|
||||
if(ui.system2.classList.contains('shown')){
|
||||
_status.removinground=true;
|
||||
setTimeout(function(){
|
||||
_status.removinground=false;
|
||||
},200);
|
||||
}
|
||||
ui.arena.classList.remove('phonetop');
|
||||
ui.system1.classList.remove('shown');
|
||||
ui.system2.classList.remove('shown');
|
||||
|
@ -15918,6 +16063,8 @@
|
|||
|
||||
if(lib.config.config_menu){
|
||||
ui.click.configMenu();
|
||||
ui.system1.classList.remove('shown');
|
||||
ui.system2.classList.remove('shown');
|
||||
}
|
||||
else{
|
||||
ui.system.hide();
|
||||
|
@ -16007,11 +16154,12 @@
|
|||
_status.dragged=true;
|
||||
}
|
||||
}
|
||||
if(this.scrollWidth<=this.offsetWidth&&
|
||||
this.scrollHeight<=this.offsetHeight){
|
||||
if(this.scrollWidth<=this.offsetWidth+5&&
|
||||
this.scrollHeight<=this.offsetHeight+5){
|
||||
e.preventDefault();
|
||||
}
|
||||
else{
|
||||
delete _status._swipeorigin;
|
||||
e.stopPropagation();
|
||||
}
|
||||
},
|
||||
|
@ -16493,7 +16641,20 @@
|
|||
if(_status.clickedplayer){
|
||||
return false;
|
||||
}
|
||||
ui.click.intro.call(this,e);
|
||||
// if(this._mouseentercreated){
|
||||
// this._mouseentercreated=false;
|
||||
// ui.click.window();
|
||||
// }
|
||||
// else{
|
||||
// ui.click.intro.call(this,e);
|
||||
// }
|
||||
|
||||
if(this._mouseenterdialog&&this._mouseenterdialog.parentNode){
|
||||
this._mouseenterdialog.delete();
|
||||
}
|
||||
else{
|
||||
ui.click.intro.call(this,e);
|
||||
}
|
||||
_status.clickedplayer=true;
|
||||
_status.clicked=false;
|
||||
ui.click.longpresscancel.call(this);
|
||||
|
@ -16749,6 +16910,9 @@
|
|||
return lib.getUTC(new Date())-lib.getUTC(lib.status.date)-lib.status.dateDelayed;
|
||||
}
|
||||
},
|
||||
currentTime:function(){
|
||||
return lib.getUTC(new Date());
|
||||
},
|
||||
evtDistance:function(e1,e2){
|
||||
return Math.sqrt((e1.x-e2.x)*(e1.x-e2.x)+(e1.y-e2.y)*(e1.y-e2.y));
|
||||
},
|
||||
|
@ -17606,7 +17770,7 @@
|
|||
if(num){
|
||||
if(!introadded){
|
||||
introadded=true;
|
||||
uiintro.add('更改皮肤');
|
||||
uiintro.add('<div class="text center">更改皮肤</div>');
|
||||
}
|
||||
var buttons=ui.create.div('.buttons.smallzoom');
|
||||
for(var i=0;i<=num;i++){
|
||||
|
@ -19028,17 +19192,9 @@
|
|||
document.oncontextmenu=ui.click.right;
|
||||
}
|
||||
else{
|
||||
// document.ontouchstart=ui.click.windowtouchstart;
|
||||
// document.ontouchend=ui.click.windowtouchend;
|
||||
// document.ontouchmove=ui.click.windowtouchmove;
|
||||
document.ontouchend=function(e){
|
||||
if(e.touches.length==1&&!_status.dragged){
|
||||
ui.click.pause();
|
||||
}
|
||||
}
|
||||
document.ontouchmove = function(e) {
|
||||
e.preventDefault();
|
||||
};
|
||||
document.ontouchstart=ui.click.windowtouchstart;
|
||||
document.ontouchend=ui.click.windowtouchend;
|
||||
document.ontouchmove=ui.click.windowtouchmove;
|
||||
}
|
||||
window.onbeforeunload=function(){
|
||||
if(lib.config.confirm_exit&&!_status.reloading){
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -55,6 +55,49 @@ table{table-layout: fixed;}
|
|||
position: absolute;
|
||||
left:8px;
|
||||
}
|
||||
|
||||
.roundarenabutton{
|
||||
/*width: 50px;
|
||||
height: 50px;*/
|
||||
left:180px;
|
||||
top:210px;
|
||||
position: absolute;
|
||||
/*background: rgba(0,0,0,0.2);
|
||||
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px;
|
||||
border-radius:100%;*/
|
||||
z-index: 7;
|
||||
transition-property: opacity;
|
||||
}
|
||||
#roundmenu>div{
|
||||
width: 26px;
|
||||
height: 4px;
|
||||
background: white;
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
border-radius: 2px;
|
||||
box-shadow: black 0 0 2px;
|
||||
}
|
||||
#roundmenu>div:nth-of-type(even){
|
||||
width: 20px;
|
||||
left:18px;
|
||||
}
|
||||
#roundmenu>div:nth-of-type(odd){
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
#roundmenu>div:nth-of-type(1),
|
||||
#roundmenu>div:nth-of-type(2){
|
||||
top:14px;
|
||||
}
|
||||
#roundmenu>div:nth-of-type(3),
|
||||
#roundmenu>div:nth-of-type(4){
|
||||
top:23px;
|
||||
}
|
||||
#roundmenu>div:nth-of-type(5),
|
||||
#roundmenu>div:nth-of-type(6){
|
||||
top:32px;
|
||||
}
|
||||
|
||||
.linexy{
|
||||
transition-property: transform,opacity;
|
||||
width: 3px;
|
||||
|
@ -88,7 +131,8 @@ table{table-layout: fixed;}
|
|||
#arena.single-handcard #handcards1{width: 100%;}
|
||||
#arena.single-handcard #handcards2{display: none;}
|
||||
#system{padding: 6px;width: calc(100% - 12px);white-space: nowrap;z-index: 3;pointer-events: none}
|
||||
#system>div{height: 100%;position: relative;margin: 0;padding: 0;pointer-events: auto}
|
||||
#system>div{height: 100%;position: relative;margin: 0;padding: 0;}
|
||||
#system>div>div{pointer-events: auto}
|
||||
#system>div:last-child{text-align: right;float:right}
|
||||
#system>div>div{position: relative;padding-top: 6px;padding-bottom: 6px;padding-left: 8px;padding-right: 8px;text-align: center;margin:4px;transition: all 0.1s}
|
||||
#paused,#click{left: 0;top:0;width: 100%;height: 100%;z-index: 5;}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.menu-container{
|
||||
z-index:5;
|
||||
z-index:8;
|
||||
}
|
||||
.menu-container div{
|
||||
position: relative;
|
||||
|
|
|
@ -46,9 +46,15 @@
|
|||
#system>div:not(.shown)>div{
|
||||
pointer-events: none;
|
||||
}
|
||||
/*#system1>div:first-child{
|
||||
display: none !important;
|
||||
}
|
||||
#system1>div:last-child{
|
||||
display: none !important;
|
||||
}*/
|
||||
|
||||
.menu-container>.menu.main {
|
||||
top: 55px !important;
|
||||
top: 12px !important;
|
||||
left: 10px !important;
|
||||
zoom:1.3;
|
||||
}
|
||||
|
|
|
@ -1563,6 +1563,7 @@ mode.chess={
|
|||
ui.create.cards();
|
||||
game.finishCards();
|
||||
ui.chessContainer=ui.create.div('#chess-container',ui.arena);
|
||||
ui.chessContainer.ontouchstart = ui.click.touchStart;
|
||||
ui.chessContainer.ontouchmove = ui.click.touchScroll;
|
||||
ui.chessContainer.style.WebkitOverflowScrolling='touch';
|
||||
ui.chess=ui.create.div('#chess',ui.chessContainer);
|
||||
|
|
150
mode/identity.js
150
mode/identity.js
|
@ -93,81 +93,83 @@ mode.identity={
|
|||
}
|
||||
};
|
||||
var step3=function(){
|
||||
if(lib.config.layout=='phone'){
|
||||
if(lib.config.touchscreen){
|
||||
clear();
|
||||
ui.create.dialog('在移动布局后,点击顶部的左半边或右半边可以显示按钮');
|
||||
var node=ui.create.div('.tutorial_tap',ui.window);
|
||||
var nodefunc=function(){
|
||||
setTimeout(function(){
|
||||
node.style.top='20px';
|
||||
node.style.left='10%';
|
||||
setTimeout(function(){
|
||||
node.style.transition='all 0.2s';
|
||||
node.style.opacity=0;
|
||||
setTimeout(function(){
|
||||
node.style.opacity='';
|
||||
setTimeout(function(){
|
||||
node.style.transition='';
|
||||
},300);
|
||||
},300);
|
||||
},1200);
|
||||
setTimeout(function(){
|
||||
node.style.left='calc(90% - 30px)';
|
||||
setTimeout(function(){
|
||||
node.style.transition='all 0.2s';
|
||||
node.style.opacity=0;
|
||||
setTimeout(function(){
|
||||
node.style.opacity='';
|
||||
setTimeout(function(){
|
||||
node.style.transition='';
|
||||
},300);
|
||||
},300);
|
||||
},1200);
|
||||
setTimeout(function(){
|
||||
node.style.top='';
|
||||
node.style.left='';
|
||||
},2000);
|
||||
},2000);
|
||||
},1000);
|
||||
};
|
||||
nodefunc();
|
||||
var interval=setInterval(nodefunc,7000);
|
||||
var interval2,node2;
|
||||
var double=true;
|
||||
ui.create.control('继续',function(){
|
||||
if(double){
|
||||
node2=ui.create.div('.tutorial_tap',ui.window);
|
||||
ui.refresh(node2);
|
||||
node2.style.top='20px';
|
||||
node2.style.left='calc(50% - 15px)';
|
||||
interval2=setInterval(function(){
|
||||
node2.style.transition='all 0.2s';
|
||||
node2.style.opacity=0;
|
||||
setTimeout(function(){
|
||||
node2.style.opacity='';
|
||||
setTimeout(function(){
|
||||
node2.style.opacity=0;
|
||||
setTimeout(function(){
|
||||
node2.style.opacity='';
|
||||
setTimeout(function(){
|
||||
node2.style.transition='';
|
||||
},300);
|
||||
},300);
|
||||
},300);
|
||||
},300);
|
||||
},3000);
|
||||
clearInterval(interval);
|
||||
node.delete();
|
||||
double=false;
|
||||
ui.dialog.close();
|
||||
ui.create.dialog('双击顶部可令界面下移,方便进行标身份等操作');
|
||||
}
|
||||
else{
|
||||
clearInterval(interval2);
|
||||
node2.delete();
|
||||
step4();
|
||||
}
|
||||
});
|
||||
ui.create.dialog('触屏模式中,下划可以显示菜单,上划可以切换托管,双指单击可以暂停');
|
||||
ui.dialog.add('<div class="text center">你可以在选项-通用-中更改手势设置');
|
||||
ui.create.control('继续',step4);
|
||||
// var node=ui.create.div('.tutorial_tap',ui.window);
|
||||
// var nodefunc=function(){
|
||||
// setTimeout(function(){
|
||||
// node.style.top='20px';
|
||||
// node.style.left='10%';
|
||||
// setTimeout(function(){
|
||||
// node.style.transition='all 0.2s';
|
||||
// node.style.opacity=0;
|
||||
// setTimeout(function(){
|
||||
// node.style.opacity='';
|
||||
// setTimeout(function(){
|
||||
// node.style.transition='';
|
||||
// },300);
|
||||
// },300);
|
||||
// },1200);
|
||||
// setTimeout(function(){
|
||||
// node.style.left='calc(90% - 30px)';
|
||||
// setTimeout(function(){
|
||||
// node.style.transition='all 0.2s';
|
||||
// node.style.opacity=0;
|
||||
// setTimeout(function(){
|
||||
// node.style.opacity='';
|
||||
// setTimeout(function(){
|
||||
// node.style.transition='';
|
||||
// },300);
|
||||
// },300);
|
||||
// },1200);
|
||||
// setTimeout(function(){
|
||||
// node.style.top='';
|
||||
// node.style.left='';
|
||||
// },2000);
|
||||
// },2000);
|
||||
// },1000);
|
||||
// };
|
||||
// nodefunc();
|
||||
// var interval=setInterval(nodefunc,7000);
|
||||
// var interval2,node2;
|
||||
// var double=true;
|
||||
// ui.create.control('继续',function(){
|
||||
// if(double){
|
||||
// node2=ui.create.div('.tutorial_tap',ui.window);
|
||||
// ui.refresh(node2);
|
||||
// node2.style.top='20px';
|
||||
// node2.style.left='calc(50% - 15px)';
|
||||
// interval2=setInterval(function(){
|
||||
// node2.style.transition='all 0.2s';
|
||||
// node2.style.opacity=0;
|
||||
// setTimeout(function(){
|
||||
// node2.style.opacity='';
|
||||
// setTimeout(function(){
|
||||
// node2.style.opacity=0;
|
||||
// setTimeout(function(){
|
||||
// node2.style.opacity='';
|
||||
// setTimeout(function(){
|
||||
// node2.style.transition='';
|
||||
// },300);
|
||||
// },300);
|
||||
// },300);
|
||||
// },300);
|
||||
// },3000);
|
||||
// clearInterval(interval);
|
||||
// node.delete();
|
||||
// double=false;
|
||||
// ui.dialog.close();
|
||||
// ui.create.dialog('双击顶部可令界面下移,方便进行标身份等操作');
|
||||
// }
|
||||
// else{
|
||||
// clearInterval(interval2);
|
||||
// node2.delete();
|
||||
// step4();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
else{
|
||||
step4();
|
||||
|
|
|
@ -86,8 +86,11 @@ mode.versus={
|
|||
lib.setPopped(ui.versushs,game.versusHoverHandcards);
|
||||
}
|
||||
}
|
||||
_status.friendCount=ui.create.system('我方阵亡:'+get.cnNumber(0),null,true);
|
||||
_status.enemyCount=ui.create.system('敌方阵亡:'+get.cnNumber(0),null,true);
|
||||
_status.friendCount=ui.create.system('友军: '+get.cnNumber(_status.friend.length,true),null,true);
|
||||
_status.enemyCount=ui.create.system('敌军: '+get.cnNumber(_status.friend.length,true),null,true);
|
||||
// _status.friendCount=ui.create.system('友方',null,true);
|
||||
// _status.enemyCount=ui.create.system('敌方',null,true);
|
||||
|
||||
lib.setPopped(_status.friendCount,game.versusHoverFriend);
|
||||
lib.setPopped(_status.enemyCount,game.versusHoverEnemy);
|
||||
|
||||
|
@ -1100,12 +1103,12 @@ mode.versus={
|
|||
this.dieSpeak();
|
||||
if(this.side==game.me.side){
|
||||
_status.friendDied.push(this.name);
|
||||
_status.friendCount.innerHTML='友军: '+get.cnNumber(Math.max(0,_status.friend.length-1),true);
|
||||
}
|
||||
else{
|
||||
_status.enemyDied.push(this.name);
|
||||
_status.enemyCount.innerHTML='敌军: '+get.cnNumber(Math.max(0,_status.enemy.length-1),true);
|
||||
}
|
||||
_status.friendCount.innerHTML='我方阵亡:'+get.cnNumber(_status.friendDied.length,true);
|
||||
_status.enemyCount.innerHTML='敌方阵亡:'+get.cnNumber(_status.enemyDied.length,true);
|
||||
|
||||
var list=(this.side==game.me.side)?_status.friend:_status.enemy;
|
||||
if((list.length==0&&lib.storage.noreplace_end)||
|
||||
|
|
|
@ -48,6 +48,12 @@ body{
|
|||
background: url('card.png');
|
||||
background-size:cover;
|
||||
}
|
||||
.card .markcount{
|
||||
box-shadow: rgba(0, 0, 0, 0.8) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px;
|
||||
background: url('card.png');
|
||||
background-size: cover;
|
||||
/*color: white;*/
|
||||
}
|
||||
#me>div>div>.card,#arena>.card:not(*:empty){
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,10 @@ html{
|
|||
text-shadow:none;
|
||||
border-radius:4px;
|
||||
}
|
||||
#roundmenu>div{
|
||||
background:rgba(77, 60, 51,0.8);
|
||||
box-shadow:none;
|
||||
}
|
||||
#system>div>.pressdown2{
|
||||
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 0 2px, rgba(0, 133, 255, 1) 0 0 5px !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue