A Mexican prosecutor said the attacker at the Teotihuacan pyramids "planned his violent acts" after one person was killed and 13 were injured.