📦 Asset Cleanup: Consolidating new clean assets into 'NOVE_SLIKE', removing weird folder names, and setting up clean Start scene.
This commit is contained in:
39
src/scenes/GrassScene.js
Normal file
39
src/scenes/GrassScene.js
Normal file
@@ -0,0 +1,39 @@
|
||||
export default class GrassScene extends Phaser.Scene {
|
||||
constructor() {
|
||||
super({ key: 'GrassScene' });
|
||||
}
|
||||
|
||||
preload() {
|
||||
console.log("🌱 Loading Clean Assets...");
|
||||
|
||||
// 1. TERRAIN (From new 'assets/slike/environment' folder)
|
||||
this.load.image('ground', 'assets/slike/environment/plot_watered.png');
|
||||
|
||||
// 2. UI (From new 'assets/slike/ui' folder)
|
||||
this.load.image('buy_btn', 'assets/slike/ui/shop_11_buy_button.png');
|
||||
}
|
||||
|
||||
create() {
|
||||
console.log("✅ Scene Created. Placing Clean Assets...");
|
||||
const { width, height } = this.cameras.main;
|
||||
|
||||
// A. BACKGROUND (Tiled Ground)
|
||||
// Using tileSprite to repeat the texture across the screen
|
||||
this.add.tileSprite(0, 0, width, height, 'ground')
|
||||
.setOrigin(0, 0)
|
||||
.setTileScale(4); // Scale up for retro look
|
||||
|
||||
// B. UI ELEMENT (Corner Test)
|
||||
// Placing button in top-left corner
|
||||
const btn = this.add.image(100, 100, 'buy_btn');
|
||||
btn.setScale(2); // Make check visible
|
||||
|
||||
// C. LABEL
|
||||
this.add.text(width / 2, height - 50, 'SOURCE: assets/slike/ (NEW)', {
|
||||
fontFamily: 'monospace',
|
||||
fontSize: '24px',
|
||||
color: '#ffffff',
|
||||
backgroundColor: '#000000'
|
||||
}).setOrigin(0.5);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user