@@ -106,10 +106,10 @@ public enum DamageTextType
106106
107107 /* Setter & Getter */
108108
109- private JCS_DamageTextPool GetCriticalDamageTextPool ( ) { return this . mCritDamageTextPool ; }
110- private JCS_DamageTextPool GetNormralDamageTextPool ( ) { return this . mNormalDamageTextPool ; }
111- private JCS_DamageTextPool GetGetDamageDamageTextPool ( ) { return this . mGetDamageDamageTextPool ; }
112- private JCS_DamageTextPool GetHealDamageTextPoll ( ) { return this . mHealDamageTextPool ; }
109+ public JCS_DamageTextPool CriticalDamageTextPool { get { return this . mCritDamageTextPool ; } }
110+ public JCS_DamageTextPool NormralDamageTextPool { get { return this . mNormalDamageTextPool ; } }
111+ public JCS_DamageTextPool GetDamageDamageTextPool { get { return this . mGetDamageDamageTextPool ; } }
112+ public JCS_DamageTextPool HealDamageTextPoll { get { return this . mHealDamageTextPool ; } }
113113
114114 /* Functions */
115115
@@ -375,14 +375,27 @@ public int[] DamageTextSpawnerSimple(
375375 public void SpawnDamageTextFromPoolByType (
376376 int damage ,
377377 Vector3 pos ,
378- AudioClip hitSound ,
379- DamageTextType type = DamageTextType . NORMAL )
378+ DamageTextType type = DamageTextType . NORMAL ,
379+ AudioClip hitSound = null )
380380 {
381381 JCS_DamageTextPool dtp = GetDamageTextPoolByType ( type ) ;
382382
383383 if ( dtp != null )
384384 dtp . SpawnDamageTextFromPool ( damage , pos , hitSound ) ;
385385 }
386+ public void SpawnDamageTextsFromPoolByType (
387+ int [ ] damage ,
388+ Vector3 pos ,
389+ DamageTextType type ,
390+ AudioClip hitSound = null )
391+ {
392+ DamageTextType [ ] types = new DamageTextType [ damage . Length ] ;
393+
394+ for ( int index = 0 ; index < types . Length ; ++ index )
395+ types [ index ] = type ;
396+
397+ SpawnDamageTextsFromPoolByType ( damage , pos , types , hitSound ) ;
398+ }
386399 public void SpawnDamageTextsFromPoolByType (
387400 int [ ] damage ,
388401 Vector3 pos ,
@@ -447,13 +460,13 @@ private JCS_DamageTextPool GetDamageTextPoolByType(DamageTextType type)
447460 switch ( type )
448461 {
449462 case DamageTextType . NORMAL :
450- return this . GetNormralDamageTextPool ( ) ;
463+ return this . NormralDamageTextPool ;
451464 case DamageTextType . CRITICAL :
452- return this . GetCriticalDamageTextPool ( ) ;
465+ return this . CriticalDamageTextPool ;
453466 case DamageTextType . GET_DAMAGE :
454- return this . GetGetDamageDamageTextPool ( ) ;
467+ return this . GetDamageDamageTextPool ;
455468 case DamageTextType . HEAL :
456- return this . GetHealDamageTextPoll ( ) ;
469+ return this . HealDamageTextPoll ;
457470 }
458471 return null ;
459472 }
@@ -488,7 +501,7 @@ private void Sequence(
488501 }
489502
490503 // spawn that specific damage text!
491- SpawnDamageTextFromPoolByType ( damage [ count ] , pos [ count ] , hitSound , types [ count ] ) ;
504+ SpawnDamageTextFromPoolByType ( damage [ count ] , pos [ count ] , types [ count ] , hitSound ) ;
492505
493506 ++ count ;
494507 // Update new count, in order to spawn next damage text.
0 commit comments