Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1f2722
commit ca8437f
Showing
7 changed files
with
74 additions
and
23 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.ks2002br.graficos; | ||
|
||
import java.awt.image.BufferedImage; | ||
|
||
public class Texturas { | ||
|
||
private FolhaSprites blockSheet; | ||
|
||
private BufferedImage bloco_tex; | ||
|
||
public BufferedImage[] block = new BufferedImage[2]; // posicao 0 grama ,1 terra | ||
|
||
public Texturas() { | ||
CarregarImagem loader = new CarregarImagem(); | ||
try { | ||
bloco_tex = loader.pegarImagem("/bloco_tex.png "); | ||
System.out.println("[DEBUG TEXTURA] TEXTURAS CARREGADAS COM SUCESSO!"); | ||
} catch (Exception e) { | ||
System.err.println("[DEBUG TEXTURA] DEU RUIM AO CARREGAR AS TEXTURAS...!"); | ||
} | ||
|
||
blockSheet = new FolhaSprites(bloco_tex); | ||
|
||
|
||
getTextures(); | ||
|
||
|
||
} | ||
|
||
private void getTextures() { | ||
|
||
block[0] = blockSheet.pegarSpriteColRow(1, 1, 32,32); //Grama 1 | ||
block[1] = blockSheet.pegarSpriteColRow(4, 1, 32,32); // terra 1 | ||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters