-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbullet.h
More file actions
64 lines (44 loc) · 1.26 KB
/
bullet.h
File metadata and controls
64 lines (44 loc) · 1.26 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// bullet.h
// StarTroupial
//
// Created by Jenny Valdez on 31/10/12.
// Copyright (c) 2012 Jenny Valdez. All rights reserved.
//
#ifndef __StarTroupial__bullet__
#define __StarTroupial__bullet__
#define BULLET_SPEED 0.1f
#include <iostream>
#include "interactiveObject.h"
using namespace std;
// Lights
static unsigned int BLIGHTS[3] = {GL_LIGHT1, GL_LIGHT2, GL_LIGHT3};
// Available lights
static bool BUSING[3] = {false, false, false};
class bullet : public interactiveObject {
protected:
// Initial point
float xi;
float yi;
float zi;
// Target
float xf;
float yf;
float zf;
// Light ID
int n;
// Initializes the bullet
void init();
public:
// Given-position constructor
bullet(float a, float b, float ta = 0, float tb = 0, float tc = 30, bool kill = false);
// Activated when hits something
void action(int factor = 0);
// Disable lights
static void disable(bullet &b);
// Updates the bullet's position
void update(float dx = 0, float dy = 0, float dz = 0);
// Draws the ring
void draw(GLenum mode = GL_RENDER, int ident = 0, vector<float> shadowPlane = vector<float>());
};
#endif /* defined(__StarTroupial__bullet__) */