Skip to main content

Posts

Showing posts with the label scripts

Unity 2d Camera Follow Script

Today i am gibing you very simple yet cool Unity 2d Camera Follow Script with smooth follow and other useful options. Very easy to setup just add this script to your camera and then drag your character or anything you cant to follow into the script's target field, Like i added character in this field, finish :) Script is here or get it from github.

Health Scripts unity You should see!

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;