private void Start() { red = GetComponent <FlashRed>(); if (red != null) { OnDamageReceived += red.TintRed; } }
private void Awake() { try { red = GetComponent <FlashRed>(); if (red == null) { throw new System.Exception($"GameObject: { gameObject.name} has no component FlashRed"); } } catch (System.Exception e) { Debug.Log(e.Message); } }