canvas位置
This commit is contained in:
parent
c1f026180a
commit
e70e9c1830
|
@ -1080,7 +1080,7 @@ character.hearth={
|
||||||
dunji:'盾击',
|
dunji:'盾击',
|
||||||
dunji_info:'出牌阶段限,你可以失去你的所有护甲,并对等量的其他角色各造成一点伤害',
|
dunji_info:'出牌阶段限,你可以失去你的所有护甲,并对等量的其他角色各造成一点伤害',
|
||||||
qiaodong:'巧动',
|
qiaodong:'巧动',
|
||||||
qiaodong_info:'你可以将一张装备牌当作当使用或打出',
|
qiaodong_info:'你可以将一张装备牌当作闪使用或打出',
|
||||||
fengxian:'奉献',
|
fengxian:'奉献',
|
||||||
fengxian_info:'出牌阶段限一次,你可以令场上所有角色各弃置一张手牌',
|
fengxian_info:'出牌阶段限一次,你可以令场上所有角色各弃置一张手牌',
|
||||||
zhanhou:'战吼',
|
zhanhou:'战吼',
|
||||||
|
|
16
game/game.js
16
game/game.js
|
@ -89,8 +89,8 @@
|
||||||
var ctx=ui.ctx;
|
var ctx=ui.ctx;
|
||||||
ctx.shadowBlur=5;
|
ctx.shadowBlur=5;
|
||||||
ctx.shadowColor='rgba(0,0,0,0.3)';
|
ctx.shadowColor='rgba(0,0,0,0.3)';
|
||||||
ctx.fillStyle='white';
|
|
||||||
ctx.strokeStyle='white';
|
ctx.strokeStyle='white';
|
||||||
|
ctx.lineCap='round';
|
||||||
ctx.lineWidth=3;
|
ctx.lineWidth=3;
|
||||||
ctx.save();
|
ctx.save();
|
||||||
for(var i=0;i<lib.canvasUpdates.length;i++){
|
for(var i=0;i<lib.canvasUpdates.length;i++){
|
||||||
|
@ -5331,6 +5331,7 @@
|
||||||
}
|
}
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
if(dashed){
|
if(dashed){
|
||||||
|
ctx.lineCap='butt';
|
||||||
ctx.setLineDash([8,2]);
|
ctx.setLineDash([8,2]);
|
||||||
}
|
}
|
||||||
ctx.moveTo(from[0],from[1]);
|
ctx.moveTo(from[0],from[1]);
|
||||||
|
@ -5994,11 +5995,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(arguments[0]!='target'&&arguments[0]!='card'&&arguments[0]!='button'){
|
||||||
ui.arena.classList.remove('selecting');
|
ui.arena.classList.remove('selecting');
|
||||||
_status.imchoosing=false;
|
_status.imchoosing=false;
|
||||||
_status.lastdragchange.length=0;
|
_status.lastdragchange.length=0;
|
||||||
_status.mousedragging=null;
|
_status.mousedragging=null;
|
||||||
_status.mousedragorigin=null;
|
_status.mousedragorigin=null;
|
||||||
|
}
|
||||||
ui.canvas.width=ui.arena.offsetWidth;
|
ui.canvas.width=ui.arena.offsetWidth;
|
||||||
ui.canvas.height=ui.arena.offsetHeight;
|
ui.canvas.height=ui.arena.offsetHeight;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
@ -8445,7 +8448,6 @@
|
||||||
dialogs[i].delete();
|
dialogs[i].delete();
|
||||||
}
|
}
|
||||||
var node=_status.currentmouseenter;
|
var node=_status.currentmouseenter;
|
||||||
|
|
||||||
if(_status.mousedragging){
|
if(_status.mousedragging){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
ui.canvas.width=ui.arena.offsetWidth;
|
ui.canvas.width=ui.arena.offsetWidth;
|
||||||
|
@ -8453,7 +8455,6 @@
|
||||||
var ctx=ui.ctx;
|
var ctx=ui.ctx;
|
||||||
ctx.shadowBlur=5;
|
ctx.shadowBlur=5;
|
||||||
ctx.shadowColor='rgba(0,0,0,0.3)';
|
ctx.shadowColor='rgba(0,0,0,0.3)';
|
||||||
ctx.fillStyle='white';
|
|
||||||
ctx.strokeStyle='white';
|
ctx.strokeStyle='white';
|
||||||
ctx.lineWidth=3;
|
ctx.lineWidth=3;
|
||||||
ctx.setLineDash([8,2]);
|
ctx.setLineDash([8,2]);
|
||||||
|
@ -8508,7 +8509,13 @@
|
||||||
}
|
}
|
||||||
if(itemtype!='player'||(ex>item.offsetLeft&&ex<item.offsetLeft+item.offsetWidth&&
|
if(itemtype!='player'||(ex>item.offsetLeft&&ex<item.offsetLeft+item.offsetWidth&&
|
||||||
ey>item.offsetTop&&ey<item.offsetTop+item.offsetHeight)){
|
ey>item.offsetTop&&ey<item.offsetTop+item.offsetHeight)){
|
||||||
if(item.classList.contains('selectable')&&_status.dragstatuschanged!=item){
|
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.mouseleft=true;
|
||||||
_status.dragstatuschanged=item;
|
_status.dragstatuschanged=item;
|
||||||
_status.clicked=false;
|
_status.clicked=false;
|
||||||
|
@ -10635,6 +10642,7 @@
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:{
|
default:{
|
||||||
if(typeof type=='string'){
|
if(typeof type=='string'){
|
||||||
|
|
|
@ -19,6 +19,11 @@ table{table-layout: fixed;}
|
||||||
top:0;
|
top:0;
|
||||||
z-index:20
|
z-index:20
|
||||||
}
|
}
|
||||||
|
#arena>canvas{
|
||||||
|
z-index: 10;
|
||||||
|
pointer-events: none;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
#me,#mebg{width: 100%;height: 140px;top:calc(100% - 140px);left:0;}
|
#me,#mebg{width: 100%;height: 140px;top:calc(100% - 140px);left:0;}
|
||||||
#mebg{z-index:-1}
|
#mebg{z-index:-1}
|
||||||
#handcards1,#handcards2{width: calc(50% - 140px);height: 127px;padding: 10px;}
|
#handcards1,#handcards2{width: calc(50% - 140px);height: 127px;padding: 10px;}
|
||||||
|
|
|
@ -580,7 +580,7 @@ mode.identity={
|
||||||
case 'zhong':
|
case 'zhong':
|
||||||
switch(identity2){
|
switch(identity2){
|
||||||
case 'zhu': return 10;
|
case 'zhu': return 10;
|
||||||
case 'zhong': return get.population('fan')>0?4:-1;
|
case 'zhong': return get.population('fan')>0?4:0;
|
||||||
case 'nei':
|
case 'nei':
|
||||||
if(get.population('fan')==0) return -2;
|
if(get.population('fan')==0) return -2;
|
||||||
return Math.min(3,-situation);
|
return Math.min(3,-situation);
|
||||||
|
|
Loading…
Reference in New Issue