Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ● テクスチャ
- public enum Texture {
- // テクスチャ定数
- Player(R.drawable.actor5),
- Enemy01(R.drawable.enemy01),
- BG01(R.drawable.town01_a),
- MAP01(R.drawable.map02);
- // カスタムメソット・メンバー
- public int id_; // 識別ID (リソース番号)
- public int x_; // 巨大テクスチャ上でのX位置
- public int y_; // 巨大テクスチャ上でのY位置
- public int w_; // テクスチャ全体の幅
- public int h_; // テクスチャ全体の高さ
- public int w1_; // 1パターンの幅
- public int h1_; // 1パターンの高さ
- public int xnum_; // パターン数 (縦に並べる)
- public int ynum_; // アニメーション数(横に並べる)
- Texture(int id,int w1, int h1) {
- init(id,w1,h1);
- }
- Texture(int id) {
- init(id,0,0);
- }
- void init(int id,int w1, int h1) {
- id_ = id;
- x_ = 0;
- y_ = 0;
- w_ = w1_ =w1;
- h_ = h_ = h1;
- xnum_ = 1;
- ynum_ = 1;
- }
- public int getID() {
- return id_;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement