18#ifndef HEADER_CHECK_TRIGGER_HPP
19#define HEADER_CHECK_TRIGGER_HPP
21#include "tracks/check_structure.hpp"
22#include "utils/cpp2011.hpp"
49 std::function<
void(
int)> triggering_function);
54 int kart_id) OVERRIDE;
56 virtual void trigger(
unsigned int kart_index) OVERRIDE
Virtual base class for a check structure.
Definition: check_structure.hpp:52
virtual void trigger(unsigned int kart_index)
Is called when this check structure is triggered.
Definition: check_structure.cpp:220
This class implements a check point like item, but used only for scripting or sound trigger.
Definition: check_trigger.hpp:32
std::function< void(int)> m_triggering_function
Function to call when triggered.
Definition: check_trigger.hpp:41
virtual CheckStructure * clone() OVERRIDE
Clone to child process for server usage (atm no sound or scripting).
Definition: check_trigger.hpp:63
virtual void trigger(unsigned int kart_index) OVERRIDE
Is called when this check structure is triggered.
Definition: check_trigger.hpp:56
const Vec3 m_center
Center of the trigger.
Definition: check_trigger.hpp:35
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int kart_id) OVERRIDE
Copied from item state.
Definition: check_trigger.cpp:40
uint64_t m_last_triggered_time
Time since last trigger, if any triggering between 2 seconds ignored (like items).
Definition: check_trigger.hpp:45
const float m_distance2
Squared of the triggering distance.
Definition: check_trigger.hpp:38
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35
Declares the general types that are used by the network.