protected virtual void Awake() { hitInvulnTimer = new CooldownTimer(hitInvuln, 0); healthRegenTimer = new ExpirationTimer(healthRegenDelay); ResetHealth(); }
protected override void Start() { base.Start(); shields = maxShields; shieldRegenTimer = new ExpirationTimer(shieldRegenDelay); }
// Use this for initialization protected virtual void Start() { health = maxHealth; healthRegenTimer = new ExpirationTimer(healthRegenDelay); if (healthbarPrefab) { healthbar = Instantiate(healthbarPrefab).GetComponent <Healthbar>(); healthbar.target = this; healthbar.transform.SetParent(FindObjectOfType <Canvas>().transform, false); } }
/// <summary> /// Construct a new Magazine with given size and reload time. /// </summary> /// <param name="size">Number of uses before reload.</param> /// <param name="reloadTime">Time it takes to reload.</param> public Magazine(int size, float reloadTime) { reloadTimer = new ExpirationTimer(reloadTime); remainingShots = size; clipSize = size; }
private void Awake() { displayTimer = new ExpirationTimer(displayDuration); }