Exemplo n.º 1
0
    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++;
        }
    }
Exemplo n.º 2
0
 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));
 }