|
@@ -24060,7 +24060,7 @@ window.Modernizr = function(n, e, t) {
|
|
this.path.setWarpDestinationByHeroIndex(e) && this.path.brushToWarpPano(x.STD, x.BLACK)
|
|
this.path.setWarpDestinationByHeroIndex(e) && this.path.brushToWarpPano(x.STD, x.BLACK)
|
|
}
|
|
}
|
|
,
|
|
,
|
|
- n.prototype.tourInterlude = function(e, t) {
|
|
|
|
|
|
+ /* n.prototype.tourInterlude = function(e, t) {
|
|
this.history.invalidate();
|
|
this.history.invalidate();
|
|
this.path.discardSlow();
|
|
this.path.discardSlow();
|
|
//xzw:
|
|
//xzw:
|
|
@@ -24093,6 +24093,46 @@ window.Modernizr = function(n, e, t) {
|
|
this.path.waitNextStep(e, function() {
|
|
this.path.waitNextStep(e, function() {
|
|
t && t()
|
|
t && t()
|
|
}.bind(this), rotTime)
|
|
}.bind(this), rotTime)
|
|
|
|
+ } */
|
|
|
|
+
|
|
|
|
+ n.prototype.tourInterlude = function(e, t) {
|
|
|
|
+ this.history.invalidate();
|
|
|
|
+ this.path.discardSlow();
|
|
|
|
+ //xzw:
|
|
|
|
+ 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]]
|
|
|
|
+ //zeg 标注一下
|
|
|
|
+ //var currentLocation = this.model.heroLocations[this.director.currentItem[0]]
|
|
|
|
+
|
|
|
|
+ var rotTime
|
|
|
|
+ if(currentLocation.rotTime == void 0 || currentLocation.rotTime == ''){
|
|
|
|
+ var restChildCount = currentLocation0.heroLocations ? (currentLocation0.heroLocations.length-this.director.currentItem[1]-1) : 0
|
|
|
|
+ var hasMusic = currentLocation0 && 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 = currentLocation0.musicInfo.time - current
|
|
|
|
+ if(restChildCount){//如果当前folder中还有剩下的item,平分一下时间
|
|
|
|
+ rotTime = (rotTime-timeEachItem*restChildCount) / (restChildCount+1);
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ rotTime = defaultRotTime
|
|
|
|
+ }
|
|
|
|
+ rotTime = Math.max(0, rotTime)
|
|
|
|
+ Log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation0.musicInfo.time) : ''),"#E8E")
|
|
|
|
+ }else{
|
|
|
|
+ rotTime = currentLocation.rotTime * 1000
|
|
|
|
+ Log("rotTime "+rotTime +" at item "+this.director.currentItem,"#E8E")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.path.waitNextStep(e, function() {
|
|
|
|
+ t && t()
|
|
|
|
+ }.bind(this), rotTime)
|
|
}
|
|
}
|
|
,
|
|
,
|
|
n.prototype.stopInterlude = function() {
|
|
n.prototype.stopInterlude = function() {
|