//Hello. i work in C# script!
using UnityEngine;
using System.Collections;
public class Torchelighte : MonoBehaviour {
public float IntensityLight;
//if i press 1 time click the torch light up
if (Input.GetButtonDown ("Fire1")) {
IntensityLight = 2;
}
//if i press 1 more time click the torch must don't light
if (Input.GetButtonDown ("Fire1") && IntensityLight == 2) {
IntensityLight = 0;
}
}
what i can do to make this work perfectly. if i press 1 time click the torch don’t
light up…If i put first command the torch light up but when i put the second command the torch don’t light up… I need help fast. Thx.