Missiles.h 552 B

1234567891011121314151617181920212223242526272829
  1. # ifndef MISSILES_H
  2. # define MISSILES_H
  3. // Basiques
  4. # include <iostream>
  5. # include <vector>
  6. // bBox2D
  7. # include <box2d/box2d.h>
  8. // Identification
  9. enum Identity { LAND = 0, PLANE = 1, INERT = 2, ANG = 3, ARROW = 4, CHARGE = 5 };
  10. // Entité
  11. struct Entity
  12. {
  13. float rayon ;
  14. Identity id ;
  15. };
  16. // Fonctions
  17. void updateMissiles( b2World &world, b2Body* target, bool foresee = false );
  18. void createInert( b2Vec2 from, b2Body* target, b2World &world, Identity missile );
  19. b2Vec2 anticipate( b2Body* missile, b2Body* target );
  20. # endif // MISSILES_H