22 lines
485 B
Markdown
22 lines
485 B
Markdown
# testo.js — main() (satır 1)
|
||
|
||
[← testo.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function main(c)
|
||
{
|
||
var source = c.getSubject();
|
||
var result = source.rayTrace(64);
|
||
|
||
if (!result || !result.isEntity()) return;
|
||
var target = result.getEntity();
|
||
if (!target || !target.isPlayer()) return;
|
||
if (target.isSame(source)) return;
|
||
|
||
var morph = target.getMorph();
|
||
if (!morph) return;
|
||
|
||
source.setMorph(morph);
|
||
}
|
||
```
|