-
Notifications
You must be signed in to change notification settings - Fork 1
/
MyGame.h
48 lines (39 loc) · 880 Bytes
/
MyGame.h
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
//
// MyGame.h
// Ballz
//
// Created by C0deH4cker on 12/8/13.
// Copyright (c) 2013 C0deH4cker. All rights reserved.
//
#ifndef _BALLZ_MYGAME_H_
#define _BALLZ_MYGAME_H_
#include <vector>
#include <random>
#include <Game.h>
#include <Vector2.h>
#include <Content.h>
#include <Texture2D.h>
#include <Rectangle.h>
#include "Ball.h"
using namespace sge;
class MyGame : public virtual Game {
public:
MyGame();
~MyGame();
void initialize();
void update(double deltaTime);
void draw(double deltaTime);
/* Delegate methods */
void mouseDown(int button, int mods);
void mouseMoved(const Vector2& pos);
void scrolled(const Vector2& offset);
void keyDown(int key, int scancode, int mods);
private:
Content content;
Texture2D* cursorImg;
Texture2D* ballImg;
Rectangle cursorRect;
std::vector<Ball*> balls;
std::mt19937 rng;
};
#endif /* _BALLZ_MYGAME_H_ */