void moveAi() { ai.FindLeaf(); string str = ai.entityName(); str = str.Substring(0, str.Length - 8); foreach (GameObject e in enemies) { if (e.name == str) { e.transform.position = new Vector2(40 * ai.entityPos().x, 40 * ai.entityPos().y); setLastMoved(e); update(); } } }