New content api method

This commit is contained in:
ceikry
2021-08-12 10:11:05 -05:00
parent cee6de084f
commit 36260209bd
+16
View File
@@ -436,6 +436,22 @@ object ContentAPI {
Projectile.create(source, dest, projectileId).send() Projectile.create(source, dest, projectileId).send()
} }
/**
* Spawns a projectile with more advanced parameters
* @param source the initial Location of the projectile
* @param dest the final Location of the projectile
* @param projectile the ID of the gfx used for the projectile
* @param startHeight the height the projectile spawns at
* @param endHeight the height the projectile ends at
* @param delay the delay before the projectile spawns
* @param speed the speed the projectile travels at
* @param angle the angle the projectile travels at
*/
@JvmStatic
fun spawnProjectile(source: Location, dest: Location, projectile: Int, startHeight: Int, endHeight: Int, delay: Int, speed: Int, angle: Int){
Projectile.create(source, dest, projectile, startHeight, endHeight, delay, speed, angle, source.getDistance(dest).toInt()).send()
}
/** /**
* Causes the given entity to face the given toFace * Causes the given entity to face the given toFace
* @param entity the entity you wish to face something * @param entity the entity you wish to face something