summaryrefslogtreecommitdiffstats
path: root/debian/fireflies/fireflies-2.08/src/bait.h
blob: 8ffdd6c501214ee76f33d9690e0dc8e449f2303a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _Bait_H
#define _Bait_H

#include "utils.h"
#include "arrow.h"

class Bait : public Arrow
{
public:
    double age;		// timer with random initial value
    double fuzz;	// my little bit of randomness
    double turn_delay;	// max delay before turning (higher = slower changing)
    double turn_when;	// when to change acceleration (referenced from timer)
    int mode_next;	// the next mode to activate
    double mode_when;	// next time to activate a mode (ref timer)
    Timer stop_timer;	// timer for stopping events

    // options
    double bspeed;	// my speed
    double baccel;	// my accel
    double fspeed;	// speed of the fireflies chasing me
    double faccel;	// acceleration of the fireflies chasing me
    double hue_rate;	// my color-cycling rate
    bool glow;		// should tails glow

    Vec3f *attractor;

    Bait();

    // draw me
    virtual void draw();
    // let t seconds elapse
    virtual void elapse(double t);
    // calculate acceleration
    virtual void calc_accel();
    // change colors based on parameters
    void set_color();
};

#endif // Bait.h