sequence_trigger.hpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // SuperTux
  2. // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. #ifndef HEADER_SUPERTUX_TRIGGER_SEQUENCE_TRIGGER_HPP
  17. #define HEADER_SUPERTUX_TRIGGER_SEQUENCE_TRIGGER_HPP
  18. #include "trigger/trigger_base.hpp"
  19. #include "supertux/sequence.hpp"
  20. class SequenceTrigger final : public Trigger
  21. {
  22. public:
  23. SequenceTrigger(const ReaderMapping& reader);
  24. static std::string class_name() { return "sequencetrigger"; }
  25. virtual std::string get_class_name() const override { return class_name(); }
  26. static std::string display_name() { return _("Sequence Trigger"); }
  27. virtual std::string get_display_name() const override { return display_name(); }
  28. virtual bool has_variable_size() const override { return true; }
  29. virtual ObjectSettings get_settings() override;
  30. virtual void event(Player& player, EventType type) override;
  31. virtual void draw(DrawingContext& context) override;
  32. std::string get_sequence_name() const;
  33. private:
  34. EventType triggerevent;
  35. Sequence sequence;
  36. std::string new_spawnpoint;
  37. std::string fade_tilemap;
  38. TilemapFadeType fade;
  39. private:
  40. SequenceTrigger(const SequenceTrigger&) = delete;
  41. SequenceTrigger& operator=(const SequenceTrigger&) = delete;
  42. };
  43. #endif
  44. /* EOF */