File: KeyBehavior.h

package info (click to toggle)
pinball 0.3.20230219-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,572 kB
  • sloc: cpp: 15,776; makefile: 1,037; sh: 588; xml: 24
file content (27 lines) | stat: -rw-r--r-- 902 bytes parent folder | download | duplicates (9)
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
/***************************************************************************
                          KeyBehavior.h  -  description
                             -------------------
    begin                : Wed Jan 26 2000
    copyright            : (C) 2000 by Henrik Enqvist
    email                : henqvist@excite.com
 ***************************************************************************/

#ifndef KEYBEHAVIOR_H
#define KEYBEHAVIOR_H

#include "Behavior.h"

/** A Behavior that lets the users move the group with A, S, D, Q, W, E keys.
 * Simply add a KeyBehavior object to a group to be able to move it.  */
class KeyBehavior : public Behavior {
	public:
		KeyBehavior();
		~KeyBehavior();
		void onTick();
		virtual void onCollision(const Vertex3D &, const Vertex3D &, Group *) {};
		virtual void onSignal(int, Group *) {};
	private:
		float m_x, m_y, m_z;
};

#endif // KEYBEHAVIOR_H