card_car.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef _card_car_h_
  2. #define _card_car_h_
  3. #include <string>
  4. #include <memory>
  5. #include "point.h"
  6. #include "card_base.h"
  7. #include "card_area.h"
  8. struct area_hover;
  9. struct mine_tool;
  10. struct site;
  11. struct site_area_hover;
  12. struct loc_point;
  13. struct car:card_location_base,card_area
  14. {
  15. int m_vehicle_category_id=0;
  16. int m_vehicle_type_id=0;
  17. public:
  18. car(const std::string&type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,
  19. int32_t categoryid, int type_id,int32_t level_id,uint32_t cid);
  20. ~car();
  21. virtual std::shared_ptr<mine_tool> get_mine_tool();
  22. virtual void do_business(const std::shared_ptr<site>&site,const point &pt);
  23. virtual int get_area();
  24. int get_vehicle_type_id();
  25. virtual std::shared_ptr<area_tool> get_area_tool()
  26. {
  27. return m_area_tool;
  28. }
  29. virtual int get_vehicle_category_id()
  30. {
  31. return m_vehicle_category_id;
  32. }
  33. virtual void set_area_info(int mapid,double scale,int areaid,uint64_t t,int type);
  34. virtual void get_card(bool);
  35. private:
  36. void handle_traffic_light(const point& pt, const int& sid);
  37. void handle_anti_coll(const point& pt, const int& sid);
  38. void on_timer();
  39. void make_package();
  40. loc_point getSmoothPoint();
  41. };
  42. #endif