Adding Input Example.
This commit is contained in:
parent
1332921174
commit
b0d14b91e0
5 changed files with 119 additions and 1 deletions
34
examples/input/InputExample.h
Normal file
34
examples/input/InputExample.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
#ifndef INPUT_EXAMPLE_H
|
||||
#define INPUT_EXAMPLE_H
|
||||
|
||||
#include <Spectre/Scene/Camera2D.h>
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
#include <Spectre/Graphics/Sprite.h>
|
||||
#include <Spectre/Game.h>
|
||||
|
||||
namespace sp {
|
||||
class Renderer2D;
|
||||
}
|
||||
|
||||
class InputExample : public sp::Game
|
||||
{
|
||||
protected :
|
||||
|
||||
void init();
|
||||
|
||||
void update(double dt);
|
||||
|
||||
void render();
|
||||
|
||||
private :
|
||||
sp::Camera2D m_camera;
|
||||
sp::Renderer2D *m_renderer;
|
||||
|
||||
sp::Sprite m_kb_sprite;
|
||||
sp::Sprite m_mouse_sprite;
|
||||
|
||||
sp::Texture m_tux_texture;
|
||||
};
|
||||
|
||||
#endif /* INPUT_EXAMPLE_H*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue