Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpProjectileManager.h
Show All 32 Lines | |||||
public: | public: | ||||
/** | /** | ||||
* Launch a projectile from entity @p source to point @p target. | * Launch a projectile from entity @p source to point @p target. | ||||
* @param source source entity; the projectile will determined from the "projectile" prop in its actor | * @param source source entity; the projectile will determined from the "projectile" prop in its actor | ||||
* @param target target point | * @param target target point | ||||
* @param speed horizontal speed in m/s | * @param speed horizontal speed in m/s | ||||
* @param gravity gravitational acceleration in m/s^2 (determines the height of the ballistic curve) | * @param gravity gravitational acceleration in m/s^2 (determines the height of the ballistic curve) | ||||
* @param actorName name of the flying projectile actor | |||||
* @param hitActorName name of the animation actor played when the projectile hits the target or the ground | |||||
* @param hitAnimationTime animation lenth | |||||
* @return id of the created projectile | * @return id of the created projectile | ||||
*/ | */ | ||||
virtual uint32_t LaunchProjectileAtPoint(entity_id_t source, const CFixedVector3D& target, fixed speed, fixed gravity) = 0; | virtual uint32_t LaunchProjectileAtPoint(entity_id_t source, const CFixedVector3D& target, fixed speed, fixed gravity, | ||||
const std::wstring& actorName, const std::wstring& hitActorName, fixed hitAnimationTime) = 0; | |||||
/** | /** | ||||
* Removes a projectile, used when the projectile has hit a target | * Removes a projectile, used when the projectile has hit a target | ||||
* @param id of the projectile to remove | * @param id of the projectile to remove | ||||
*/ | */ | ||||
virtual void RemoveProjectile(uint32_t id) = 0; | virtual void RemoveProjectile(uint32_t id) = 0; | ||||
DECLARE_INTERFACE_TYPE(ProjectileManager) | DECLARE_INTERFACE_TYPE(ProjectileManager) | ||||
}; | }; | ||||
#endif // INCLUDED_ICMPPROJECTILEMANAGER | #endif // INCLUDED_ICMPPROJECTILEMANAGER |
Wildfire Games · Phabricator