Guest User

Untitled

a guest
Dec 16th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. public class _MicToneme : MonoBehaviour
  2. {
  3.     // - - -
  4.     // Explosion event
  5.     public delegate  void ExplodeDelegate( int index, float power );
  6.    
  7.     public static event ExplodeDelegate explodeEvent;
  8.    
  9.     // Explosion gets triggered internally from the murky depths of this object-tree; it will call the following function
  10.     // it isn't actually possible to trigger the event from outside the class, arguable whether this way round is conceptually tidier.
  11.     public static void EmitExplosionEvent( int index, float power )
  12.     {
  13.         if( explodeEvent != null )
  14.             explodeEvent( index, power );
  15.     }
Add Comment
Please, Sign In to add comment