微件:ScenarioSimulator:修订间差异
跳到导航
跳到搜索
小无编辑摘要 |
无编辑摘要 |
||
第154行: | 第154行: | ||
var timer_id_wait = -1,timer_id_temp = -1; | var timer_id_wait = -1,timer_id_temp = -1; | ||
var timer_id_blocker = -1,blocker_now = 100,blocker_new = 100; | var timer_id_blocker = -1,blocker_now = 100,blocker_new = 100; | ||
var | var image_width = 0,image_height = 0,image_x = 0,image_y = 0; | ||
var timer_id_tween = -1,tween_width = 0,tween_height = 0,tween_x = 0,tween_y = 0; | |||
var timer_id_music = -1,music_stats = "",music_loop = "",music_volume = 0.8,flag_music = false; | var timer_id_music = -1,music_stats = "",music_loop = "",music_volume = 0.8,flag_music = false; | ||
var reset_enabled = false,auto_enabled = true,click_enabled = true,system_enabled = true; | var reset_enabled = false,auto_enabled = true,click_enabled = true,system_enabled = true; | ||
第313行: | 第314行: | ||
music_stop(); | music_stop(); | ||
} | } | ||
fun_timer_clear("tween"); | |||
document.getElementById("pic_back").style.display = "none"; | document.getElementById("pic_back").style.display = "none"; | ||
document.getElementById("pic_image").style.display = "none"; | document.getElementById("pic_image").style.display = "none"; | ||
第877行: | 第879行: | ||
fun_timer_clear("wait"); | fun_timer_clear("wait"); | ||
fun_timer_clear("blocker"); | fun_timer_clear("blocker"); | ||
fun_timer_clear("tween"); | |||
document.getElementById("pic_back").style.display = "none"; | document.getElementById("pic_back").style.display = "none"; | ||
document.getElementById("pic_image").style.display = "none"; | document.getElementById("pic_image").style.display = "none"; | ||
第1,058行: | 第1,061行: | ||
flag_music = true; | flag_music = true; | ||
} | } | ||
} | |||
function timer_tween(c_x,c_y,c_width,c_height) | |||
{ | |||
image_x += c_x;image_y += c_y; | |||
image_width += c_width;image_height += c_height; | |||
if(image_x < tween_x){return 0;} | |||
if(image_y < tween_y){return 0;} | |||
if(image_width < tween_width){return 0;} | |||
if(image_height < tween_height){return 0;} | |||
clearInterval(timer_id_tween); | |||
timer_id_tween = -1; | |||
image_x = tween_x;image_y = tween_y; | |||
image_width = tween_width;image_height = tween_height; | |||
} | } | ||
function fun_setting(mode) | function fun_setting(mode) | ||
第1,167行: | 第1,183行: | ||
clearInterval(timer_id_blocker); | clearInterval(timer_id_blocker); | ||
timer_id_blocker = -1; | timer_id_blocker = -1; | ||
} | |||
else if(key_id == "tween" && timer_id_tween != -1) | |||
{ | |||
clearInterval(timer_id_tween); | |||
timer_id_tween = -1; | |||
} | } | ||
} | } | ||
第1,437行: | 第1,458行: | ||
if(command_set.image == undefined) | if(command_set.image == undefined) | ||
{ | { | ||
fun_timer_clear("tween"); | |||
obj_image.style.display = "none"; | obj_image.style.display = "none"; | ||
break; | break; | ||
第1,473行: | 第1,495行: | ||
obj_image.style.backgroundSize = temp_d1 + "px " + temp_d2 + "px"; | obj_image.style.backgroundSize = temp_d1 + "px " + temp_d2 + "px"; | ||
} | } | ||
image_width = temp_d1;image_height = temp_d2; | |||
image_x = temp_d3;image_y = temp_d4; | |||
if(data_pic_back[command_set.image] == undefined) | if(data_pic_back[command_set.image] == undefined) | ||
{ | { | ||
第1,482行: | 第1,506行: | ||
break; | break; | ||
case 'imagetween': | case 'imagetween': | ||
var obj_image = document.getElementById("pic_image"); | |||
var temp_c1,temp_d1,temp_d2,temp_d3,temp_d4,temp_d5,temp_d6,temp_d7,temp_d8; | |||
temp_d1 = Number(command_set.xfrom);temp_d2 = Number(command_set.yfrom); | |||
temp_d3 = Number(command_set.xto);temp_d4 = Number(command_set.yto); | |||
temp_d5 = Number(command_set.xscalefrom);temp_d6 = Number(command_set.yscalefrom); | |||
temp_d7 = Number(command_set.xscaleto);temp_d8 = Number(command_set.yscaleto); | |||
temp_c1 = Number(command_set.duration); | |||
if(isNaN(temp_c1)) | |||
{ | |||
temp_c1 = 0.05; | |||
} | |||
if(isNaN(temp_d1)) | |||
{ | |||
temp_d1 = Number(command_set.x); | |||
if(isNaN(temp_d1)) | |||
{ | |||
temp_d1 = image_x; | |||
} | |||
} | |||
if(isNaN(temp_d2)) | |||
{ | |||
temp_d2 = Number(command_set.y); | |||
{ | |||
temp_d2 = image_y; | |||
} | |||
} | |||
if(isNaN(temp_d3)) | |||
{ | |||
temp_d3 = temp_d1; | |||
} | |||
if(isNaN(temp_d4)) | |||
{ | |||
temp_d4 = temp_d2; | |||
} | |||
if(isNaN(temp_d5)) | |||
{ | |||
temp_d5 = Number(command_set.xscale); | |||
if(isNaN(temp_d5)) | |||
{ | |||
temp_d5 = image_width; | |||
} | |||
} | |||
if(isNaN(temp_d6)) | |||
{ | |||
temp_d6 = Number(command_set.yscale); | |||
{ | |||
temp_d6 = image_height; | |||
} | |||
} | |||
if(isNaN(temp_d7)) | |||
{ | |||
temp_d7 = temp_d5; | |||
} | |||
if(isNaN(temp_d8)) | |||
{ | |||
temp_d8 = temp_d6; | |||
} | |||
image_x = temp_d1;image_y = temp_d2;tween_x = temp_d3;tween_y = temp_d4; | |||
image_width = temp_d5;image_height = temp_d6;tween_width = temp_d7;tween_height = temp_d8; | |||
temp_c1 *= 20; | |||
temp_d1 = (temp_d3 - temp_d1) / temp_c1;temp_d2 = (temp_d4 - temp_d2) / temp_c1; | |||
temp_d5 = (temp_d7 - temp_d5) / temp_c1;temp_d6 = (temp_d8 - temp_d6) / temp_c1; | |||
if(timer_id_tween == -1) | |||
{ | |||
timer_id_tween = setInterval("timer_tween(" + temp_d1 + "," + temp_d2 + "," + temp_d5 + "," + temp_d6 + ")",50) | |||
} | |||
return -1; | return -1; | ||
case 'camerashake': | case 'camerashake': | ||
第1,637行: | 第1,727行: | ||
break; | break; | ||
case 'image': | case 'image': | ||
fun_timer_clear("tween"); | |||
document.getElementById("pic_image").style.display = "none"; | document.getElementById("pic_image").style.display = "none"; | ||
break; | break; |