public void FullCharge(IEnumerable <RedLightPlayerController> bindings) { for (int i = 0; i < times.Length; i++) { if (times[i].value != 0) { times[i].value = 0; times[i].ApplyBind(); } else { break; } } int index = 0; foreach (var binding in bindings) { times[index] = new BindingFloat(); times[index].value = 1; times[index].redLight = binding; times[index].ApplyBind(); index++; } }
public void Init(PlayerController player) { this.player = player; for (int i = 0; i < times.Length; i++) { times[i] = new BindingFloat(); times[i].redLight = null; } player.StartCoroutine(CoroutineUtils.FixedUpdateAction(update)); }