Beispiel #1
0
 //Outputs
 void OnTriggerEnter2D(Collider2D collider2D)
 {
     if (collider2D.tag != "" && collider2D.tag != triggerTag)
     {
         return;
     }
     volumeCounter++;
     if (allIn)
     {
         Collider2D[] colliders = Physics2D.OverlapAreaAll(CONSTANTS.VEC_NULL, -CONSTANTS.VEC_NULL, gameObject.layer);
         int          count     = 0;
         if (triggerTag != "")
         {
             for (int i = 0; i < colliders.Length; i++)
             {
                 if (colliders[i].tag == triggerTag)
                 {
                     count++;
                 }
             }
         }
         else
         {
             count = colliders.Length;
         }
         if (volumeCounter < count)//If not all entities inside volume, dont trigger
         {
             return;
         }
     }
     //Action
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnStartTouch, I_O);
 }
Beispiel #2
0
 private void OnTriggerExit2D(Collider2D collider2D)
 {
     if ((collider2D.tag != "" && collider2D.tag != triggerTag))
     {
         return;
     }
     volumeCounter--;
     //Action
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnEndTouch, I_O);
 }
Beispiel #3
0
 public void OnTrigger()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnTrigger, I_O);
 }
Beispiel #4
0
 //Outputs
 public void OnSpawn()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnSpawn, I_O);
 }
 //Outputs
 public void OnEntitySpawned()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnEntitySpawned, I_O);
 }
Beispiel #6
0
 public void OnExtinguished()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnExtinguished, I_O);
 }
Beispiel #7
0
 public void OnIgnited()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnIgnited, I_O);
 }
Beispiel #8
0
 //Outputs
 public void OnPass()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnPass, I_O);
 }
Beispiel #9
0
 public void OutValue()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OutValue, I_O);
 }
Beispiel #10
0
 public void OnHitMin()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnHitMin, I_O);
 }
 /// <summary>
 /// Cancelling event wont fire this
 /// </summary>
 public void OnEndSequence()
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnEndSequence, I_O);
 }
 //Outputs
 void OnAE(CONSTANTS.AE_NAME evnt)
 {
     CONSTANTS.invokeOutput(CONSTANTS.OUTPUT_NAME.OnAE, I_O, (int)evnt);
 }