scriptedentity.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. enum TriggerShape
  2. {
  3. BOX,
  4. SPHERE,
  5. CYLINDER,
  6. }
  7. class ScriptedEntity extends EntityAI
  8. {
  9. /**
  10. \brief Sets collision properties for object
  11. \param mins \p vector Min values of box
  12. \param maxs \p vector Max values of box
  13. \param radius \p float Radius of bounding sphere
  14. \note This function is obsolete, use rather SetCollisionBox()
  15. */
  16. proto native void SetClippingInfo(vector mins, vector maxs, float radius);
  17. /**
  18. \brief Sets collision box for object
  19. \param mins \p vector Min values of box
  20. \param maxs \p vector Max values of box
  21. \note Automatically sets TriggerShape.BOX
  22. \n usage :
  23. @code
  24. vector mins = "-1 -1 -1";
  25. vector maxs = "1 1 1";
  26. SetCollisionBox(mins, maxs);
  27. @endcode
  28. */
  29. proto native void SetCollisionBox(vector mins, vector maxs);
  30. /**
  31. \brief Sets collision sphere for object
  32. \param radius \p float Radius of cylinder
  33. \note Automatically sets TriggerShape.SPHERE
  34. \n usage :
  35. @code
  36. SetCollisionSphere(3);
  37. @endcode
  38. */
  39. proto native void SetCollisionSphere(float radius);
  40. /**
  41. \brief Sets collision cylinder for object
  42. \param radius \p float Radius of cylinder
  43. \param height \p float Height of cylinder
  44. \note Automatically sets TriggerShape.CYLINDER
  45. \n usage :
  46. @code
  47. SetCollisionCylinder(3, 6);
  48. @endcode
  49. */
  50. proto native void SetCollisionCylinder(float radius, float height);
  51. //! Set the TriggerShape to be used, default is TriggerShape.BOX
  52. proto native void SetTriggerShape(TriggerShape shape);
  53. //! Get the current TriggerShape
  54. proto native TriggerShape GetTriggerShape();
  55. override bool IsInventoryVisible()
  56. {
  57. return false;
  58. }
  59. };