手册:ProjectileHitEntityHook

来自Minecraft基岩版开发Wiki

语法[编辑]

function projectileHitEntityHook(projectile, targetEntity){};

参数[编辑]

参数一

projectile: 实体

参数二

targetEntity: 被砸中的实体

效果[编辑]

当某个抛物线实体(如雪球,鸡蛋)砸中实体时触发

参考[编辑]

function projectileHitEntityHook(projectile, target)
{
 Entity.setVelY(target, 9); 
 } // snowballs send entities flying up
 


Template:ModPE