Most of FPS,RPG and other games must needs player health and enemy damage scripts. Here we are giving Some Health Scripts You should see!. Health Scripts unity You should see! Unity official health scripts: This is the unity official tutorial script using UnityEngine; using System.Collections; public class PlayerHealth : MonoBehaviour { public float health = 100f; // How much health the player has left. public float resetAfterDeathTime = 5f; // How much time from the player dying to the level reseting. public AudioClip deathClip; // The sound effect of the player dying. private Animator anim; // Reference to the animator component. private PlayerMovement playerMovement; // Reference to the player movement script. private HashIDs hash; // Reference to the HashIDs. private SceneFadeInOut sceneFadeInOut;...
Unity3diy is a blog for unity game developers. We publish latest from unity asset store, unity game engine, unity software, unity technologies, unity games. Also unity packages and assetstore like uni tabs unity, paint 3d, qooapp, unity performance tool and an object reference is required for the non-static field.