title: Problems When Shooting Multiple Enemies round about 4 times in Unity
body: <p>When I have Multiple Enemies they have a float number for health round about <code>250.0f</code>. So when I shoot at one of them that number should decrease by 50 each time I shoot at the enemy. But here's my problem: The first enemy dies round about 4/5 shots to it, but when I start to shoot at the other (after the first enemy), it takes 1 shot and dies. </p>
  
  <p>So here's the Bullet script for the players Bullet, called Bullet.cs:</p>
  
  <pre><code>public class Bullet : MonoBehaviour {
  
  public GameObject BulletObject;
  public GameObject GlobelObjectExplosion;
  public GameObject GlobelBulletExplosion;
  public float life = 3.0f;
  private EnemyAI enemy;
  
  
  private Transform bulletTransform;
  // Use this for initialization
  void Start () {
  
  }
  
  void OnTriggerEnter(Collider other)
  {
      if(other.gameObject.tag == "Enemy")
      {
  
          EnemyAI.currEnemyLife -= 50;
          Player.score += 50;
  
          //Creates an explosion on collision
          GameObject objBullet = Instantiate(GlobelBulletExplosion, transform.position, Quaternion.identity) as GameObject;
          Destroy(objBullet, 2.0f);
  
          Debug.Log("ColliderWorking");
  
          if(EnemyAI.currEnemyLife &lt;= 0.0f)
          {
              Destroy(other.gameObject);
  
              //creates an explosion when enemy is destoryed
              GameObject obj = Instantiate(GlobelObjectExplosion, other.gameObject.transform.position, Quaternion.identity) as GameObject;
  
              Destroy(obj, 2.0f);
              Player.score += 250;
          }
          Destroy(gameObject);
      }
  }
  
  // Update is called once per frame
  void Update () {
  
      life -= Time.deltaTime;
  
      transform.Translate(0, 0, Player.bulletSpeed * Time.deltaTime);
  
      if(life &lt;= 0.0)
      {
  
          Destroy(gameObject);
  
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And heres the EnemyAI Script, called EnemyAI.cs:</p>
  
  <pre><code>public class EnemyAI: MonoBehaviour {
  
  public Transform target;
  public int moveSpeed;
  public int rotationSpeed;
  public GameObject explosion;
  
  public static float maxEnemyLife = 250.0f;
  public static float currEnemyLife;
  public static float maxEnemyBullets = 60.0f;
  public static float currEnemyBullets;
  public static float maxEnemyFuel = 1260.0f;
  public static float currEnemyFuel;
  
  private Transform myTranform;
  public static Transform LocalTransform;
  
  void Awake(){
  
      myTranform = transform;
      LocalTransform = myTranform;
  
  }
  
  // Use this for initialization
  void Start () {
      if(GameObject.FindGameObjectWithTag("Player") != null){
          GameObject go = GameObject.FindGameObjectWithTag("Player");
  
          currEnemyFuel = maxEnemyFuel;
          currEnemyLife = maxEnemyLife;
          currEnemyBullets = maxEnemyBullets;
  
          target = go.transform;
      }
  
  
  
  }
  
  // Update is called once per frame
  void Update () {
      if (currEnemyFuel &gt; maxEnemyFuel)
      {
          currEnemyFuel = maxEnemyFuel;   
      }
  
          //Debug.DrawLine(target.position, myTranform.position, Color.cyan);
      if(currEnemyFuel &lt;= 0.0)
      {
              currEnemyFuel = 0.0f;
              //myTranform.rotation = Vector3.zero;
              //myTranform.position = Vector3.zero;
          moveSpeed = 0;
      }
      else if (currEnemyFuel &gt; 0.0)
      {
          //Look at target
          if(GameObject.FindGameObjectWithTag("Player") != null){
              myTranform.rotation = Quaternion.Slerp(myTranform.rotation, Quaternion.LookRotation(target.position - myTranform.position), rotationSpeed * Time.deltaTime);
  
              //Move towards Target
              myTranform.position += myTranform.forward * moveSpeed * Time.deltaTime;
              currEnemyFuel -= 0.2f;
          }
  
      }
  
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I've tried to find if someone had the some problem or if theres a workaround, but I can't find a solution on here or google. So can someone tell me if im doing something wrong or is there a tutorial or something.</p>