mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-01 20:27:54 +08:00
Added irrKlang.dll and ikpMP2.dll to dlls folder. Added irrKlang as a sub-folder under includes. Added irrKlang.lib to lib folder. At this point running cmake gave an error it couldn't find source files under 2d_game. Moved 2d_game source up one folder level, then cmake found the files.
41 lines
1.3 KiB
C++
41 lines
1.3 KiB
C++
/*******************************************************************
|
|
** This code is part of Breakout.
|
|
**
|
|
** Breakout is free software: you can redistribute it and/or modify
|
|
** it under the terms of the CC BY 4.0 license as published by
|
|
** Creative Commons, either version 4 of the License, or (at your
|
|
** option) any later version.
|
|
******************************************************************/
|
|
#ifndef POWER_UP_H
|
|
#define POWER_UP_H
|
|
#include <string>
|
|
|
|
#include <glad/glad.h>
|
|
#include <glm/glm.hpp>
|
|
|
|
#include "game_object.h"
|
|
|
|
|
|
// The size of a PowerUp block
|
|
const glm::vec2 POWERUP_SIZE(60.0f, 20.0f);
|
|
// Velocity a PowerUp block has when spawned
|
|
const glm::vec2 VELOCITY(0.0f, 150.0f);
|
|
|
|
|
|
// PowerUp inherits its state and rendering functions from
|
|
// GameObject but also holds extra information to state its
|
|
// active duration and whether it is activated or not.
|
|
// The type of PowerUp is stored as a string.
|
|
class PowerUp : public GameObject
|
|
{
|
|
public:
|
|
// powerup state
|
|
std::string Type;
|
|
float Duration;
|
|
bool Activated;
|
|
// constructor
|
|
PowerUp(std::string type, glm::vec3 color, float duration, glm::vec2 position, Texture2D texture)
|
|
: GameObject(position, POWERUP_SIZE, texture, color, VELOCITY), Type(type), Duration(duration), Activated() { }
|
|
};
|
|
|
|
#endif |