Files
novafarma/docs/FENCE_QUICK_START.md
2025-12-12 02:41:00 +01:00

71 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🏗️ HITRI VODNIK - Postavitev Ograj
## Kako Uporabiti (3 Koraki)
### 1⃣ Odpri `src/scenes/GameScene.js`
### 2⃣ Najdi `create()` metodo in dodaj kodo za postavitev ograj
```javascript
create() {
// ... ostala koda ...
this.buildSystem = new BuildSystem(this);
// 🎯 DODAJ TUKAJ:
// Primer: Postavi eno ograjo
this.buildSystem.placeSingleFence(50, 30);
// Primer: Postavi linijo ograj (5 ograj vodoravno)
for (let i = 0; i < 5; i++) {
this.buildSystem.placeSingleFence(50 + i, 32, 'fence_horizontal');
}
// Primer: Postavi pravokotnik ograj (10x8)
this.buildSystem.placeFenceRectangle(40, 40, 10, 8, 'fence_horizontal');
// ... ostala koda ...
}
```
### 3⃣ Shrani in osveži igro (F5 ali ponovno zaženi)
---
## 📖 Celotna Dokumentacija
Za podrobno dokumentacijo glej: **[docs/FENCE_PLACEMENT_GUIDE.md](./FENCE_PLACEMENT_GUIDE.md)**
---
## 🎨 Tipi Ograj
- `'fence'` - Stara ograja
- `'fence_post'` - Steber
- `'fence_horizontal'` - Vodoravna →
- `'fence_vertical'` - Navpična ↓
- `'fence_corner'` - Vogal ⌞
---
## 💡 Hitre Metode
```javascript
// Ena ograja
this.buildSystem.placeSingleFence(x, y, 'fence_horizontal', false);
// Linija ograj
this.buildSystem.placeFenceLine(startX, startY, endX, endY, 'fence_post', false);
// Pravokotnik ograj
this.buildSystem.placeFenceRectangle(x, y, width, height, 'fence_horizontal', false);
```
**Zadnji parameter (`false`)** = Ne porabi virov (za testiranje)
**Spremeni v `true`** = Porabi vire (les)
---
**Pripravljeno za uporabo!**