Commit 5e38c55b authored by RaptorTwitch's avatar RaptorTwitch

Added HP for Turtles!!;

parent d1da16a3
......@@ -5,9 +5,11 @@ using UnityEngine;
public class ToidHeart : MonoBehaviour
{
public GameObject explosion;
public GameObject spark;
public AudioSource shotSFX;
public int dropChance;
public PickupLogic pickup;
public int hp = 1;
private bool dead;
private GameMaster gm; // Start is called before the first frame update
......@@ -24,7 +26,14 @@ public class ToidHeart : MonoBehaviour
public void killToid()
{
dead = true;
hp--;
if(hp > 0 && spark != null)
Instantiate(spark, this.transform.position, Quaternion.Euler(90, transform.rotation.y, transform.rotation.z));
if(hp <= 0)
dead = true;
}
void initDeath()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment