private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(this); } else { Destroy(this); } debug = DebugUtil.DrawText(transform.position, "", Color.red); debug.transform.SetParent(transform); isGrounded = collisions.CheckGrounded(); }
private void Awake() { HP = maxHealth; debugHPLabel = DebugUtil.DrawText(GetComponent <AnimController>().sprite.position + Vector3.up, $"{HP}/{maxHealth}"); debugHPLabel.transform.SetParent(GetComponent <AnimController>().sprite); }