// Use this for initialization void Start () { playercurrenthealth = playermaxhealth; sfxMan = FindObjectOfType<Sfx_manager> (); playersprite = GetComponent<SpriteRenderer> (); }
void Start() { anim = GetComponent <Animator>(); myribod = GetComponent <Rigidbody2D>(); sfxMan = FindObjectOfType <Sfx_manager> (); //if (!playerExists) //{ // playerExists = true; // DontDestroyOnLoad (transform.gameObject); //} else { // Destroy (gameObject); //} }
// Use this for initialization void Start() { sfxMan = FindObjectOfType <Sfx_manager> (); }