limboai/bt/actions/bt_wait.h

32 lines
527 B
C
Raw Normal View History

2022-08-29 12:06:48 +00:00
/* bt_wait.h */
#ifndef BT_WAIT_H
#define BT_WAIT_H
#include "bt_action.h"
#include "core/object.h"
class BTWait : public BTAction {
GDCLASS(BTWait, BTAction);
private:
float duration = 1.0;
float _time_passed = 0.0;
protected:
static void _bind_methods();
virtual String _generate_name() const;
virtual void _enter();
virtual int _tick(float p_delta);
public:
void set_duration(float p_value) {
duration = p_value;
emit_changed();
}
float get_duration() const { return duration; }
};
#endif // BT_WAIT_H