Files

25 lines
738 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.
# Darklord.js — spawnTozOrbs() (satır 2889)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function spawnTozOrbs(world, player, tick)
{
if (!world || !player) return;
var pos = player.getPosition();
var yaw = 0;
try { yaw = player.getYaw() * Math.PI / 180; } catch (e1) {}
var fwdX = -Math.sin(yaw);
var fwdZ = Math.cos(yaw);
var rightX = Math.cos(yaw);
var rightZ = Math.sin(yaw);
var phase = tick * TOZ_ORB_SPEED;
spawnTozSideOrb(world, pos, fwdX, fwdZ, rightX, rightZ, -1, phase);
spawnTozSideOrb(world, pos, fwdX, fwdZ, rightX, rightZ, 1, phase + Math.PI);
spawnTozTrail(world, pos, fwdX, fwdZ, rightX, rightZ, phase);
}
```