Exemplo n.º 1
0
    void OnTriggerStay(Collider col)
    {
        GameObject go  = col.gameObject;
        Battery    bat = null;

        if (go.CompareTag("Battery"))
        {
            bat = go.GetComponent <Battery> ();
        }
        if (bat != null)
        {
            bat.Charge(chargeRate);
        }
    }
Exemplo n.º 2
0
 private void Charge(ICharge charge)
 {
     Battery.Charge(charge);
 }
Exemplo n.º 3
0
 public void Charge(double energy)
 {
     Battery.Charge(energy);
 }
Exemplo n.º 4
0
 private void Charge(double energy)
 {
     Battery.Charge(energy);
 }