minimap question

It is possible to play two animations with the same key? I have a minimap and two animations. One animations gives a “stylish zoom” to the minimap, and the other make it go back to the normal position, but i want to make a single keyboard key to play those two animations.

Example: The player press “M”, the map zoom in. The player press “M” again, and the map zoom out. It is simple, but i sincerely don’t know how to do this. Is it possible? Do i need to use a animator to do this? Because i don’t like to use animator components.

That’s so, so basic. You can simply use a bool to know if you are zoomed in or not, for example:

//use DetectZoom() when pressing a key
public bool IsMapZoomed;
void DetectZoom()
{
if (IsMapZoomed == true)
{
//zoom out map
}

else
{
//zoom in map
}
}