void Awake() { if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
// Use this for initialization void Start() { stopper = HitStopper.Instance; axeHealth = maxHealth; swordHealth = maxHealth; emptyDotColor = new Color(0.7f, 0.3f, 0.3f, 0.75f); UpdateHealthText(); PopulateHealthDots(); defaultSpriteColor = Color.white; transparentSpriteColor = Color.white; transparentSpriteColor.a = 0; isSword = true; Checkpoint.InitializeCheckpoints(transform.position); }
void Start() { stopper = HitStopper.Instance; groundMask = LayerMask.GetMask("Foreground"); }