Files

53 lines
1.9 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.
# spectator_timer.js — beginEffect() (satır 151)
[← spectator_timer.js](index.md) · [← Master](../../wiki.md)
Parça 2/3 · [önceki](beginEffect.md) · [sonraki](beginEffect-3.md)
```javascript
cx + Math.cos(ua) * ur, cy, cz + Math.sin(ua) * ur,
2, 0.15, 0.15, 0.15, 0.08);
}
spawnFx(w, "dragonbreath", cx, cy, cz, 20, 0.5, 0.5, 0.5, 0.08);
spawnFx(w, "largesmoke", cx, cy + 0.5, cz, 10, 0.4, 0.4, 0.4, 0.05);
// Geri sayim loop
var remaining = dur;
function tick(ctx) {
var pp = ctx.getPlayer();
if (!pp) return;
if (remaining <= 0) {
// SURVIVAL'A DON
var pe = pp.getPosition();
var pex = pe.x, pey = pe.y + 1, pez = pe.z;
var ww = ctx.getWorld();
pp.setGameMode(0);
pp.sendTitleDurations(5, 55, 10);
pp.sendTitle("§7§l⬡ §f§lGERI DONDUN §7§l⬡");
pp.playStaticSound("minecraft:entity.lightning.thunder", 2.5, 0.6);
pp.playStaticSound("minecraft:entity.endermen.teleport", 2.0, 1.2);
// EXIT effect
for (var ei = 0; ei < 25; ei++) {
var ea = Math.random() * Math.PI * 2;
var er = Math.random() * 4.0;
var eex = pex + Math.cos(ea) * er;
var eez = pez + Math.sin(ea) * er;
var eey = pey + Math.random() * 3;
spawnFx(ww, "largesmoke", eex, eey, eez, 3, 0.3, 0.4, 0.3, 0.12);
spawnFx(ww, "dragonbreath", eex, eey, eez, 2, 0.2, 0.2, 0.2, 0.10);
}
spawnFx(ww, "largesmoke", pex, pey, pez, 20, 0.5, 0.5, 0.5, 0.1);
pp.getStates().setNumber("spec_timer_active", 0);
return;
}
// ACTIONBAR — birkac yontem dene
var barText = (remaining <= 5)
```