sorry for the noob question but i get these errors with my script:
The type or namespace name "PostProcessingProfile" could not be found
The type or namespace name "PostProcessingBehaviour" could not be found
and here is my script:
using UnityEngine;
using System.Collections;
public class effecthealth : MonoBehaviour
{
public int maxHealth = 80;
public int curHealth = 80;
public int criticalHealth = 20;
public PostProcessingProfile normalProfile;
public PostProcessingProfile criticalProfile;
PostProcessingBehaviour postProcess;
void Awake()
{
postProcess = Camera.main.GetComponent();
}
void Update()
{
postProcess.profile = (curHealth <= criticalHealth) ? criticalProfile : normalProfile;
if (curHealth < 1)
{
Application.LoadLevel("1.7.1a");
}
}
void OnCollisionEnter(Collision col)
{
if (col.gameObject.tag == "enemybullet")
{
curHealth -= 20;
Destroy(col.other);
}
}
}
could someone tell me what i am doing wrong? much appreciated
↧