/// <summary> /// Triggered if this unit attacks /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void onAttack(Object sender, UnitAttackedEnemyArgs e) { if (Unit.Type.Equals("soldier")) { AudioManager.play("attack", "soldier"); } else if (Unit.Type.Equals("worker")) { AudioManager.play("attack", "worker"); } else if (Unit.Type.Equals("zombie")) { AudioManager.play("attack", "zombie"); } }
/// <summary> /// Event handler for when a Unit in a Cell is attacking an enemy. /// </summary> /// <param name="obj"></param> /// <param name="e"></param> private void handleUnitInCellAttackingEnemy(Object obj, UnitAttackedEnemyArgs e) { //Console.WriteLine("Unit in cell attacked enemy"); }