Quantcast
Channel: Questions in topic: "post processing"
Viewing all articles
Browse latest Browse all 713

blood/red effect on screen when health is low

$
0
0
so I want to enable the vignette effect in Post Processing whenever my health is low. I have already edited the vignette effect to appear red, I just need it to be enabled whenever my health is below 20 for example. is there any way to do this? here is my health script: using UnityEngine; using System.Collections; public class PlayerHealth4 : MonoBehaviour { public int maxHealth = 100; public int curHealth = 100; //initialization void Start() { } // Update void Update() { if (curHealth < 1) { Application.LoadLevel("level4_hell"); } } void OnCollisionEnter(Collision col) { if (col.gameObject.tag == "EnemyBullet") { curHealth -= 20; Destroy(col.other); } } } thanks for any help.

Viewing all articles
Browse latest Browse all 713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>