Files

32 lines
964 B
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.
# Test (2).js — renderLockedRings() (satır 527)
[← Test (2).js](index.md) · [← Master](../../wiki.md)
```javascript
function renderLockedRings(c, s) {
var w = c.getWorld();
var players = getPlayers(c);
var offsets = [
[0.46, 0, -0.46, 0],
[0.32, 0.32, -0.32, -0.32],
[0, 0.46, 0, -0.46],
[-0.32, 0.32, 0.32, -0.32],
[-0.46, 0, 0.46, 0],
[-0.32, -0.32, 0.32, 0.32],
[0, -0.46, 0, 0.46],
[0.32, -0.32, -0.32, 0.32]
];
var off = offsets[Math.max(0, Math.min(7, s.ring - 1))];
for (var i = 0; i < players.length; i++) {
var p = players[i];
if (!s.locked[uuidOf(p)]) continue;
var pos = p.getPosition();
var y = pos.y + 1.0;
fx(w, "fireworksSpark", pos.x + off[0], y, pos.z + off[1], 1, 0, 0, 0, 0);
fx(w, "fireworksSpark", pos.x + off[2], y, pos.z + off[3], 1, 0, 0, 0, 0);
}
}
```