Files

46 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# denem.js — runChargeField() (satır 83)
[← denem.js](index.md) · [← Master](../../wiki.md)
Parça 2/2 · [önceki](runChargeField.md)
```javascript
// 2. İÇ DAİRE (Saat Yönünün Tersine Dönen Mor Büyü Çemberi)
var innerRadius = currentRadius * 0.65;
var innerCount = Math.floor(innerRadius * 10.0);
if (innerCount < 16) innerCount = 16;
for (var j = 0; j < innerCount; j++) {
// Dönüş açısı (Zıt yönde dönüş: - tick * 0.25)
var angleInner = (j / innerCount) * 2.0 * Math.PI - (tick * 0.25) - (h * 0.2);
var ix = cx + innerRadius * Math.cos(angleInner);
var iz = cz + innerRadius * Math.sin(angleInner);
// İç çemberde mor kıvılcımlar ve hafif ince siyah tozlar
spawnAreaParticle(world, AREA_CONFIG.PARTICLE_INNER, ix, py, iz, 1, 0.01, 0.03, 0.01, 0);
if (Math.random() < 0.15) {
spawnAreaParticle(world, AREA_CONFIG.PARTICLE_OUTER, ix, py, iz, 1, 0.01, 0.01, 0.01, 0);
}
}
}
// Periyodik ses tonu yükselmesi (Uğultu sesi şiddetlenir)
if (tick % 5 === 0) {
world.playSound("minecraft:block.portal.ambient", cx, cy + 1.0, cz, 0.85, 0.5 + t * 0.8);
world.playSound("minecraft:entity.wither.ambient", cx, cy + 1.0, cz, 0.65, 0.4 + t * 0.45);
}
tick++;
c.setValue("tick", tick);
if (tick <= chargeTicks) {
c.scheduleScript("runChargeField", 1);
} else {
// Alan büyümesi tamamlandı, patlat! (Zararsız, sadece partikül ve hasar)
detonateArea(c);
}
}
```