This commit is contained in:
libccy 2016-06-18 10:39:56 +08:00
parent d876f5dbf5
commit 72dad2229c
7 changed files with 134 additions and 41 deletions

View File

@ -1,13 +1,13 @@
'use strict';
play.coin={
init:function(){
if(lib.config.mode!='chess'||get.config('chess_mode')!='leader'){
if(lib.config.mode!='story'&&(lib.config.mode!='chess'||get.config('chess_mode')!='leader')){
_status.coin=0;
}
},
arenaReady:function(){
if(_status.video||_status.connectMode) return;
if(lib.config.mode!='chess'||get.config('chess_mode')!='leader'){
if(lib.config.mode!='story'&&(lib.config.mode!='chess'||get.config('chess_mode')!='leader')){
var str;
if(lib.config.coin_display_playpackconfig=='text'){
str='<span>'+lib.config.coin+'</span><span>金</span>'

View File

@ -23410,6 +23410,14 @@
ui.auto.hide();
ui.pause.hide();
}
if(lib.forcehide){
if(lib.forcehide.contains('replay')) ui.replay.classList.add('forcehide');
if(lib.forcehide.contains('auto')) ui.auto.classList.add('forcehide');
if(lib.forcehide.contains('pause')) ui.pause.classList.add('forcehide');
if(lib.forcehide.contains('wuxie')) ui.wuxie.classList.add('forcehide');
if(lib.forcehide.contains('cardPileButton')) ui.cardPileButton.classList.add('forcehide');
}
ui.volumn=ui.create.system('♫');
lib.setPopped(ui.volumn,ui.click.volumn,200);
// if(lib.config.show_pause) ui.auto.style.marginLeft='10px';

View File

@ -1,18 +1,13 @@
window.noname_update={
version:'1.8.15.4',
version:'1.8.15.5',
changeLog:[
'修bug',
],
files:{
global:[
'character/sp.js',
'character/yxs.js',
'character/ow.js',
'character/hearth.js',
'character/yijiang.js',
'mode/chess.js',
'game/game.js',
'layout/default/layout.css',
],
'1.8.15.2':[]
'1.8.15.4':[]
}
}

View File

@ -445,6 +445,7 @@ body>.background.paused{
body>.background{z-index:-5}
body>.background.upper{z-index:-4}
.popup{padding: 5px;}
.forcehide{display: none !important;}
.removing,.hidden{opacity: 0 !important;}
#system>div>div.hidden{opacity:0.5 !important;}
.transparent{opacity: 0.3 !important;}
@ -1767,6 +1768,9 @@ div:hover>.wunature{
/*-webkit-animation:control_glow 4s infinite;*/
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;
}
.glow3{
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 10px, rgba(0, 133, 255, 0) 0 0 40px, rgba(0, 133, 255, 0.8) 0 0 60px !important
}
.player:not(.glow_phase)>.avatar.glow2,
.button.glow2:not(.selected){
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 10px, rgba(10, 155, 67, 1) 0 0 10px !important

View File

@ -16,7 +16,7 @@
.storyscene.lockscroll{
overflow-x: hidden;
}
.storyscene>.player.scene{
.storyscene>.scene{
width: 350px;
height: 420px;
position: relative;
@ -27,33 +27,82 @@
z-index: 1;
border-radius: 16px !important;
overflow: hidden;
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
}
.storyscene>.player.scene.flipped{
.storyscene>.scene>.background.player{
border-radius: 0 !important;
box-shadow: none !important;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 1;
}
.storyscene>.scene.unselectable{
opacity: 1 !important;
box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.225) 0 3px 10px;
}
.storyscene>.scene.unselectable>.background{
opacity: 0.3;
}
.storyscene>.scene.unselectable>.name{
opacity: 0.6;
}
.storyscene>.scene.unselectable>div:not(.mask).background{
/*opacity: 0.25;*/
}
.storyscene>.scene>.mask{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 3;
}
.storyscene>.scene>.mask>div{
width: 100%;
height: 240px;
top:calc(50% - 120px);
position: absolute;
left: 0;
text-align: center;
font-size: 80px;
line-height: 80px;
font-family: 'xinwei';
opacity: 0.8;
}
.storyscene>.scene:not(.unselectable)>.mask{
display: none;
}.storyscene>.scene.unselectable>.name{
/*display: none;*/
}
.storyscene>.scene.flipped{
z-index: 2;
border-radius: 12px !important;
}
.storyscene>.player.scene.flipped>div:not(.menu){
.storyscene>.scene.flipped>div:not(.menu){
display: none !important;
}
.storyscene>.scene:not(.flipped)>.menu{
display: none;
}
.storyscene>.player.scene:not(.flipped)>.menu{
display: none;
}
.storyscene>.player.scene:first-child{
.storyscene>.scene:first-child{
margin-left: 50px;
}
.storyscene>.player.scene:last-child{
.storyscene>.scene:last-child{
margin-right: 50px;
}
.storyscene>.player.scene>.name{
.storyscene>.scene>.name{
font-size: 48px;
right: 25px;
left: auto;
left: 25px;
top: auto;
bottom: 28px;
transform: rotateY(-180deg);
/*transform: rotateY(-180deg);*/
border-radius: 16px !important;
z-index: 2;
font-family: 'xinwei'
}
.storyscene>.player.scene>.menu{
.storyscene>.scene>.menu{
width: 100%;
height: 100%;
position: absolute;
@ -61,17 +110,20 @@
top: 0;
box-shadow: none;
}
.storyscene>.player.scene>.avatar{
.storyscene>.scene>.background>.avatar{
width: calc(100% - 26px);
height: calc(100% - 26px);
left: 13px;
top: 13px;
z-index: 2;
}
.storyscene>.scene>.menu{
transform: rotateY(-180deg);
}
.storyscene>.player.scene.startscene{
.storyscene>.scene.startscene{
-webkit-animation: scene_start 0.5s;
}
.player.scene>.menu>.menubutton.enter{
.scene>.menu>.menubutton.enter{
position: absolute;
top:auto;
bottom: 10px;

View File

@ -1260,6 +1260,12 @@ mode.chess={
ang*=Math.PI/180;
var tx=lengthi*Math.cos(ang);
var ty=-lengthi*Math.sin(ang);
if(Math.abs(tx)<0.1){
tx=0;
}
if(Math.abs(ty)<0.1){
ty=0;
}
thrown[i].style.transform='translate('+tx+'px,'+ty+'px)';
}
},

View File

@ -1,5 +1,6 @@
'use strict';
mode.story={
forcehide:['wuxie','cardPileButton','pause','auto','replay'],
start:function(){
'step 0'
game.loadChess();
@ -400,13 +401,18 @@ mode.story={
var next=game.createEvent('loadScene');
next.content=function(){
'step 0'
ui.auto.hide();
var save=get.config('save');
if(!save){
save='save1';
}
if(!lib.storage[save]){
lib.storage[save]={
area:'middle'
scene:{
area:'middle',
enabled:['taoyuanxiang'],
new:['taoyuanxiang']
}
};
game.data=lib.storage[save];
game.saveData();
@ -414,25 +420,34 @@ mode.story={
else{
game.data=lib.storage[save];
}
lib.init.css('layout/mode','story');
lib.init.css(lib.assetURL+'layout/mode','story');
game.delay();
'step 1'
var scenes={};
for(var i in lib.story.scene){
if(i!='connect'){
scenes[i]=ui.create.div('.storyscene')
scenes[i]=ui.create.div('.storyscene');
if(!lib.config.touchscreen&&lib.config.mousewheel){
scenes[i]._scrollspeed=30;
scenes[i]._scrollnum=10;
scenes[i].onmousewheel=ui.click.mousewheel;
}
lib.setScroll(scenes[i]);
}
}
game.data.area=game.data.area||'middle';
ui.window.appendChild(scenes[game.data.area].animate('start'));
ui.window.appendChild(scenes[game.data.scene.area].animate('start'));
var clickScene=function(e){
if(this.classList.contains('unselectable')) return;
if(this._clicking) return;
if(this.classList.contains('flipped')){
e.stopPropagation();
return;
}
game.data.scene.new.remove(this.name);
this.classList.remove('glow3');
game.saveData();
var sceneNode=this.parentNode;
var current=document.querySelector('.player.flipped.scene');
var current=document.querySelector('.flipped.scene');
if(current){
restoreScene(current,true);
}
@ -470,17 +485,18 @@ mode.story={
},16);
}
node.style.transition='all ease-in 0.2s';
node.style.transform='perspective(1600px) rotateY(-90deg) scale(0.75)';
node.style.transform='perspective(1600px) rotateY(90deg) scale(0.75)';
var onEnd=function(){
node.removeEventListener('webkitTransitionEnd',onEnd);
node.classList.add('flipped');
sceneNode.classList.add('lockscroll');
node.style.transition='all ease-out 0.4s';
node.style.transform='perspective(1600px) rotateY(0) scale(1)'
node.style.transform='perspective(1600px) rotateY(180deg) scale(1)'
};
node.addEventListener('webkitTransitionEnd',onEnd);
}
var restoreScene=function(node,forced){
if(_status.lockScene) return;
if(node._clicking&&!forced) return;
if(node.transformInterval){
clearInterval(node.transformInterval);
@ -492,7 +508,7 @@ mode.story={
node._clicking=false;
},700);
node.style.transition='all ease-in 0.2s';
node.style.transform='perspective(1600px) rotateY(-90deg) scale(0.75)';
node.style.transform='perspective(1600px) rotateY(90deg) scale(0.75)';
var onEnd=function(){
node.removeEventListener('webkitTransitionEnd',onEnd);
node.classList.remove('flipped');
@ -500,7 +516,7 @@ mode.story={
sceneNode.classList.remove('lockscroll');
}
node.style.transition='all ease-out 0.4s';
node.style.transform='perspective(1600px) rotateY(-180deg) scale(0.7)'
node.style.transform='perspective(1600px) rotateY(0deg) scale(0.7)'
};
node.addEventListener('webkitTransitionEnd',onEnd);
}
@ -519,11 +535,23 @@ mode.story={
else{
scene=lib.story.scene[position][name];
}
var node=ui.create.div('.player.scene',clickScene);
node.style.transform='perspective(1600px) rotateY(-180deg) scale(0.7)';
var node=ui.create.div('.scene',clickScene);
node.style.transform='perspective(1600px) rotateY(0deg) scale(0.7)';
node.name=name;
ui.create.div('.avatar',node).setBackground('mode/story/scene/'+name);
ui.create.div('.name',node,get.verticalStr(scene.name)).dataset.nature='soilm';
node.bgnode=ui.create.div('.background.player',node);
ui.create.div('.avatar',node.bgnode).setBackground('mode/story/scene/'+name);
node.namenode=ui.create.div('.name',node,get.verticalStr(scene.name));
// ui.create.div('',get.verticalStr('未开启'),ui.create.div('.mask',node));
if(game.data.scene.enabled.contains(name)){
if(game.data.scene.new.contains(name)){
node.classList.add('glow3');
}
node.namenode.dataset.nature='soilm';
}
else{
node.classList.add('unselectable');
node.namenode.innerHTML=get.verticalStr('未开启');
}
var content=ui.create.div('.menu',node);
node.content=content;
if(connect){
@ -540,7 +568,7 @@ mode.story={
return node;
}
event.custom.add.window=function(){
var current=document.querySelector('.player.flipped.scene');
var current=document.querySelector('.flipped.scene');
if(current){
restoreScene(current);
}