Example #1
0
 /* called when this takes damage */
 void OnDamage(AttackInfo ai)
 {
     // be aware of player
     playerAwareness.alwaysAware = true;
     // die
     if (receivesDamage.health <= 0)
     {
         flippedHoriz = ai.impactToRight();
         idle(9999); // go to idle state to retract vines
         animator.Play("damage");
     }
 }