File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ namespace gdjs {
5353
5454    readonly  spineResourceName : string ; 
5555
56+     static  isHitBoxesUpdateDisabled  =  false ; 
57+ 
5658    /** 
5759     * @param  instanceContainer The container the object belongs to. 
5860     * @param  objectData The object data used to initialize the object 
@@ -74,6 +76,10 @@ namespace gdjs {
7476      this . setAnimationIndex ( 0 ) ; 
7577      this . _renderer . updateAnimation ( 0 ) ; 
7678
79+       if  ( SpineRuntimeObject . isHitBoxesUpdateDisabled )  { 
80+           this . hitBoxes . length  =  0 ; 
81+       } 
82+ 
7783      // *ALWAYS* call `this.onCreated()` at the very end of your object constructor. 
7884      this . onCreated ( ) ; 
7985    } 
@@ -188,6 +194,14 @@ namespace gdjs {
188194      } 
189195    } 
190196
197+     updateHitBoxes ( ) : void   { 
198+         if  ( SpineRuntimeObject . isHitBoxesUpdateDisabled )  { 
199+             return ; 
200+         } 
201+ 
202+         super . updateHitBoxes ( ) ; 
203+     } 
204+ 
191205    extraInitializationFromInitialInstance ( 
192206      initialInstanceData : InstanceData 
193207    ) : void   { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments