예제 #1
0
 public Texture GetOrCreateTexture(string Name2Search, string fileName = "")
 {
     Texture text2Return = GetTexture(Name2Search, fileName);
     if (text2Return == null)
     {
         text2Return = new Texture(Name2Search, fileName);
         createdTextures.Add(text2Return);
     }
     return text2Return;
 }
예제 #2
0
 public Texture GetOrCreateTexture(string Name2Search, GBFont font, string text, SizeF size, bool autoText)
 {
     Texture text2Return = GetTexture(Name2Search, "");
     if (text2Return == null)
     {
         text2Return = new Texture(Name2Search, font, text, size, autoText);
         createdTextures.Add(text2Return);
     }
     return text2Return;
 }
예제 #3
0
파일: Image.cs 프로젝트: remy22/GameBox
 public virtual void setActiveTexture(int index = 0)
 {
     if (textures.Count < index)
     {
         activeTexture = ProcessManager.ActiveProcess.rManager.GetTexture("DummyTexture");
     }
     else
     {
         activeTexture = textures[index];
         size.Width = activeTexture.Width;
         size.Height = activeTexture.Height;
     }
 }