|
@@ -4665,7 +4665,7 @@ function o(a, s, l) {
|
|
|
,
|
|
|
t.prototype.goToDestination = function(e, t, i, n) {
|
|
|
//音频
|
|
|
- var musicInfo = this.model.heroLocations[this.destinationItem[0]].musicInfo
|
|
|
+ var musicInfo = this.model.heroLocations[this.destinationItem[0]].musicInfo //只有外层有音乐
|
|
|
if(musicInfo && musicInfo.music){
|
|
|
let src = musicInfo.music.includes(g_Prefix.slice(-10)) ? musicInfo.music : g_Prefix + musicInfo.music;
|
|
|
let audioObj = SoundManager.list.find(e=>e.name == 'tour')
|
|
@@ -22379,15 +22379,17 @@ function o(a, s, l) {
|
|
|
var defaultRotTime = DATA.tourRotTime * 1000
|
|
|
var timeEachItem = 2e3 / (DATA.tourWalkSpeed + DATA.tourBlackSpeed) * 200 //预估时间假设每个item飞的时间(如果距离远就少了)
|
|
|
|
|
|
+
|
|
|
var currentLocation = this.model.getHeroDescriptorByIndex(this.director.currentItem)
|
|
|
+ var currentLocation0 = this.model.heroLocations[this.director.currentItem[0]]
|
|
|
var rotTime
|
|
|
if(currentLocation.rotTime == void 0 || currentLocation.rotTime == ''){
|
|
|
- var restChildCount = currentLocation.heroLocations ? (currentLocation.heroLocations.length-this.director.currentItem[1]-1) : 0
|
|
|
- var hasMusic = currentLocation.musicInfo && currentLocation.musicInfo.music
|
|
|
+ var restChildCount = currentLocation0.heroLocations ? (currentLocation0.heroLocations.length-this.director.currentItem[1]-1) : 0
|
|
|
+ var hasMusic = currentLocation0.musicInfo && currentLocation0.musicInfo.music
|
|
|
if(hasMusic){
|
|
|
var audioObj = SoundManager.list.find(e=>e.name == 'tour')
|
|
|
var current = audioObj.audio.currentTime * 1e3 // || 0 //g_tourAudio ? 1e3 * g_tourAudio.currentTime : 0
|
|
|
- rotTime = currentLocation.musicInfo.time - current
|
|
|
+ rotTime = currentLocation0.musicInfo.time - current
|
|
|
if(restChildCount){//如果当前folder中还有剩下的item,平分一下时间
|
|
|
rotTime = (rotTime-timeEachItem*restChildCount) / (restChildCount+1);
|
|
|
}
|
|
@@ -22395,7 +22397,7 @@ function o(a, s, l) {
|
|
|
rotTime = defaultRotTime
|
|
|
}
|
|
|
rotTime = Math.max(0, rotTime)
|
|
|
- console.log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation.musicInfo.time) : ''))
|
|
|
+ console.log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation0.musicInfo.time) : ''))
|
|
|
}else{
|
|
|
rotTime = currentLocation.rotTime * 1000
|
|
|
console.log("rotTime "+rotTime +" at item "+this.director.currentItem)
|