I
assume that this will do what you want. If not, please tell, and I'll try to change it accordingly.
using UnityEngine;
using System.Collections;
public class Anim : MonoBehaviour
{
private int cpt = 0;
void Start ()
{
}
void Update ()
{
if (Input.GetKey ("b"))
{
cpt++;
var anim = GameObject.Find("Presse-1").animation;
float speed;
if ((cpt % 2) == 0)
speed = 0.0f;
else
speed = 1.0f;
foreach(var state in anim)
state.speed = speed;
}
}
}