コード例 #1
0
 public override void Init()
 {
     _popText = EquestriEngine.AssetManager.CreateTextureObjectFromFile("{pop_text}",@"Graphics\UI\pop_text") as TextureAtlas;
     TextureObjectFactory.GenerateTextureObjectFromPopText(out _number, _num, Color.Transparent);
     Show();
 }
コード例 #2
0
 public TextureCollection LoadFromLoadList(Objects.Graphics.Misc.TextureLoadList list)
 {
     if (!_systemReady)
         throw new EngineException("System not ready for creation", true);
     TextureCollection collection = new TextureCollection();
     foreach (var kvp in list.Entries)
     {
         switch(kvp.Value[1].ToString())
         {
             case"Atlas":
                 var atlas = new TextureAtlas(kvp.Key, kvp.Value[0].ToString(),kvp.Value[2]);
                 _textures[atlas.Name] = atlas;
                 collection.Add(atlas.Name, atlas);
                 break;
             case"Texture":
                 var texture = new TextureObject(kvp.Key, kvp.Value[0].ToString());
                 _textures[texture.Name] = texture;
                 collection.Add(texture.Name, texture);
                 break;
             case "Target":
                 var target = CreateTargetObject(kvp.Key, (int)((int[])kvp.Value[2])[0], (int)((int[])kvp.Value[2])[1]);
                 _textures[target.Name] = target;
                 collection.Add(target.Name, target);
                 break;
         }
     }
     LoadTextures();
     return collection;
 }