Saturday, 22 March 2014

Enabling flare (not currently in use but does work)

//public class FlareEnable : MonoBehaviour {
//
// public static float lightFlareLife = 49;
// public AudioClip soundEffect;
// public Light lightFlare;
// public float flareReductionSpeed = 3.0f;
// public AudioClip soundEffect2;
//
// void Awake()
// {
// lightFlare.enabled = false;
// }
//
// void Update()
// {
// if (HUD.FlareCount > 0)
// {
// lightFlareLife = lightFlareLife - (flareReductionSpeed * Time.deltaTime);
//
// }
//
// if (Input.GetButtonDown ("LeftBumper") && HUD.FlareCount > 0 && !lightFlare.enabled)
// {
// audio.PlayOneShot(soundEffect, 1.0f);
// audio.PlayOneShot(soundEffect2, 1.0f);
//
// if (lightFlareLife <= 0 && HUD.FlareCount > 0)
// {
// lightFlareLife = 0;
// HUD.FlareCount--;
// lightFlareLife = 49;
// }
// lightFlare.enabled = true;
//
// }
//
//
// if (lightFlareLife <= 0)
// {
// lightFlareLife = 0;
// lightFlare.enabled = false;
// }
// }
//}


No comments:

Post a Comment