/// <summary> /// place new icons on the screen and make arrows /// </summary> /// <param name="items"> new icons collection </param> public void PlaceOpenedItems(List <AbstractObject> items) { foreach (var itm in items) { if (itm.m_isItOpen < 1) { continue; } FindEmptySpace(out var x, out var y); IconScript.PlaceNewGameobject(x, y, itm); } //make arrows. All the objects should be placed foreach (var aitm in items.Where(aitm => aitm.m_isItOpen > 0)) { aitm.OpenItem(); var itm = aitm as GameAbstractItem; if (itm?.m_dependencyCount == null) { continue; } foreach (var depList in itm.m_dependencyCount) { foreach (var dep in depList.m_dependency.Where( dep => dep.m_isItOpen > 0)) { ArrowScript.NewStoredArrowScript(dep.m_thisObject, itm.m_thisObject); } } } }