Ejemplo n.º 1
0
 public void ChangeScene(string name)
 {
     if (Scenes.TryGetValue(name, out QWorld s) && CurrentWorld != null)
     {
         CurrentWorld.OnUnload();
         CurrentWorld = s;
         CurrentWorld.OnLoad();
     }
     CallToChangeScene     = false;
     CallToChangeSceneName = "";
 }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
 internal void AddScene(QWorld world)
 {
     Scenes[world.Name] = world;
 }
Ejemplo n.º 4
0
 internal void Init()
 {
     CurrentWorld = Scenes.First().Value;
     CurrentWorld.OnLoad();
 }