summaryrefslogtreecommitdiff
path: root/noncore/games/kbill/Cable.h
blob: bb6c31c6e211b4e1dfb584ac03d173bab6c91a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef CABLE_H
#define CABLE_H

class Cable {
public:
	int c1, c2;		/*computers connected */
	int x1,y1,x2,y2;	/*endpoints of line representing cable */
	int x, y;		/*current location of spark*/
	float fx, fy;		/*needed for line drawing*/
	int delay;		/*how much time until spark leaves*/
	int active;		/*is spark moving and from which end*/
	int index;
	void setup();
	void draw();
	void update();
	int onspark (int locx, int locy);

};

#endif