public void OnTriggerEnter(Collider col)
    {
        StealthPlayerController player = StealthPlayerController.getInstance();

        if (col.gameObject == player.gameObject)
        {
            ConsoleText.getInstance().ShowMessage("Battery acquired");
            player.AddEnergy(val);
            GameObject.Instantiate(EffectsManager.getInstance().itemEffect, transform.position, Quaternion.identity);
            gameObject.SetActive(false);
        }
    }
 public IEnumerator DrainRoutine()
 {
     while (character.energyLeft > 0)
     {
         character.energyLeft -= Time.deltaTime * player.drainSpeed;
         player.AddEnergy(Time.deltaTime * player.drainSpeed);
         SetEnergyFraction(character.energyLeft / character.maxDrainEnergy);
         yield return(null);
     }
     Debug.Log("Fully drained");
     stunParticles.Stop();
     player.DrainOver();
 }