public SceneInfo RegisterSceneInfo(Int64 id, string name) { var result = default(SceneInfo); if (id != 0 && SceneInfos.ContainsKey(id)) { result = SceneInfos [id]; if (!string.IsNullOrEmpty(name)) { result.Name = name; } } else { if (id == 0) { id = Isaac.Long; } result = new SceneInfo { Id = id, Name = name }; result.State.Hollow = true; SceneInfos [id] = result; SceneInfoRegistered?.Invoke(result); } return(result); }
public bool Contains(long id) { return(SceneInfos.ContainsKey(id)); }