Files

42 lines
1.8 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.
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.
# starr2.js — main() (satır 1)
[← starr2.js](index.md) · [← Master](../../wiki.md)
Parça 2/7 · [önceki](main.md) · [sonraki](main-3.md)
```javascript
                }
            }
        }
    }
    if (absorbed === 0) absorbed = 5; // Çevrede ışık yoksa bile büyü çalışsın
    // --- 2. AŞAMA: SİNEMATİK ŞARJ VE ÇİFT SARMAL ANİMASYONU ---
    world.playSound("minecraft:block.beacon.activate", startX, startY, startZ, 3.0, 0.5);
    world.playSound("minecraft:entity.illusion_illager.prepare_mirror", startX, startY, startZ, 2.5, 1.2);
    for (var t = 0; t < cfg.chargeTicks; t++) {
        (function(tick) {
            c.scheduleScript(tick, function(ctx) {
                var p = ctx.getPlayer();
                if (!p) return;
                var pos = p.getPosition();
                
                // Baş üstünde biriken enerji küresi
                spawnFx(ctx, "endRod", pos.x, pos.y + eyeH + 0.5, pos.z, 3, 0.2, 0.2, 0.2, 0.05);
                
                // Merkeze doğru emilen parçacıklar
                var ox = (Math.random() - 0.5) * 6;
                var oy = (Math.random() - 0.5) * 6;
                var oz = (Math.random() - 0.5) * 6;
                spawnFx(ctx, "portal", pos.x + ox, pos.y + 1 + oy, pos.z + oz, 0, -ox*0.2, -oy*0.2, -oz*0.2, 0.6);
                // Gövdeyi saran kusursuz çift sarmal (Double-Helix)
                for (var k = 0; k < 4; k++) {
                    var f = tick + k/4;
                    var angle = f * 0.4;
                    var r = 0.6 + 0.4 * Math.sin(f * 0.1);
                    var height = ((f % 15) / 15) * 2.2;
```