The player is now receiving a score by a random multiple of 100 for each zombie killed. I think that would be related to the bug where the damage dealt to the zombies is also inconsistent.
In ScoreManager, a function has been added:
public void AddScore()
{
Debug.Log("Player's Score is " + scoreCount);
scoreCount += scoreCount + 100;
}
}
In NormalZombieHealth, I’m calling the AddScore function on death like so:
if (health <= 0)
{
Debug.Log(“Zombie health is i be dead” + health);
Die();
GameObject score = GameObject.FindGameObjectWithTag(tag: “ScoreManager”);
ScoreManager scoreManager = score.GetComponent();
scoreManager.AddScore();
But I am getting these bugs with the damage the enemy is taking:
As well as a bug concerning the score:
The damage bug and score bug were documented in two separate play sessions, but the three damage messages came from three bullets being fired in the same session, and the scores also came from three zombies being killed in a session.
This is the damage being dealt to the zombies and the inconsistency I was talking about:
These were two bullets fired at the same zombie.