// Use this for initialization void Start() { currencySys = GetComponent<CurrencySystem>(); clockSys = GetComponent<ClockSystem>(); updateSys = GetComponent<UpdateSytem>(); calendarSys = GetComponent<CalendarSystem>(); }
public void TakeDamage(int amount, int Penetration = 0) { if (immune) { return; } if (amount <= 0) { return; } if (Penetration >= Endurance) { anim.SetTrigger("Hurt"); } health -= amount; if (health <= 0) { if (Penetration < Endurance) { anim.SetTrigger("Hurt"); } anim.SetBool("Dead", true); coll.enabled = false; rb.velocity = Vector2.zero; GetComponent <PathMaker>().stopped = true; if (TargetSystem.currentTarget == gameObject) { TargetSystem.DumpTarget(true); } ClockSystem.ChangeScale(0.1f, 0.1f); Camera.main.DOShakePosition(0.25f, 0.75f); //SimpleCameraShakeInCinemachine.instance.SetShake(0.25f, 0.75f, 1f); Destroy(gameObject, 2f); dead = true; } }
public void UnPause() { ClockSystem.Resume(); }
public void Pause() { ClockSystem.Stop(); }