public void SetUI(CharacterSnapshot snapshot, RewindUI context) { this.context = context; this.snapshot = snapshot; turnText.text = $"Turn {snapshot.Turn}"; damageText.text = $"+{snapshot.Damage}"; armourText.text = $"+{snapshot.Armour}"; healthSlider.maxValue = snapshot.MaxHealth; healthSlider.value = snapshot.Health; healthFill.color = healthGradient.Evaluate(healthSlider.normalizedValue); }
void Awake() { equipment = GetComponent <EquipmentSystem>(); inventory = GetComponent <Inventory>(); lifeSystem = GetComponent <LifeSystem>(); rewindUI = FindObjectOfType <RewindUI>(); turnSystem = FindObjectOfType <TurnSystem>(); turnSystem.PlayerTurnStarted += TakeSnapshot; turnSystem.PlayerTurnStarted += ReduceCooldown; currentCooldown = 4; }