public void ChangeScene(string name) { if (Scenes.TryGetValue(name, out QWorld s) && CurrentWorld != null) { CurrentWorld.OnUnload(); CurrentWorld = s; CurrentWorld.OnLoad(); } CallToChangeScene = false; CallToChangeSceneName = ""; }
/// <summary> /// Returns list that may contain one or more atlases depending on the texture sizes /// </summary> /// <param name="world">uses the current world to create the atlases</param> /// <returns></returns> public static List <QTextureAtlas> CreateAtlases(QWorld world) { var dict = new List <QTextureAtlas>(); var atlases = AtlasesNeeded(world.Content); for (int i = 0; i < atlases.Count; i++) { dict.Add(new QTextureAtlas(world.Engine, world.Content, atlases[i])); } return(dict); }
internal void AddScene(QWorld world) { Scenes[world.Name] = world; }
internal void Init() { CurrentWorld = Scenes.First().Value; CurrentWorld.OnLoad(); }