parent
845835caa0
commit
12ac980057
11 changed files with 41 additions and 12 deletions
@ -0,0 +1 @@ |
||||
#include "Entity.h" |
@ -0,0 +1,5 @@ |
||||
#pragma once |
||||
|
||||
class Entity { |
||||
|
||||
}; |
@ -0,0 +1,2 @@ |
||||
#include "Game.h" |
||||
|
@ -0,0 +1,5 @@ |
||||
#pragma once |
||||
|
||||
class Game { |
||||
|
||||
}; |
@ -1,14 +1,6 @@ |
||||
#include "Player.h" |
||||
#include <iostream> |
||||
|
||||
void Player::OnCoinCollect(CoinCollectEvent *event) { |
||||
std::cout << event->value << std::endl; |
||||
} |
||||
|
||||
void Player::OnDamage(DamageEvent *event) { |
||||
std::cout << event->amount << std::endl; |
||||
} |
||||
|
||||
void Player::OnMouseClicked() { |
||||
std::cout << "Mouse clicked\n"; |
||||
} |
||||
|
@ -0,0 +1,7 @@ |
||||
#include "Spectator.h" |
||||
|
||||
#include <iostream> |
||||
|
||||
void Spectator::OnCoinCollect(CoinCollectEvent *event) { |
||||
std::cout << "Someone collected a coin\n"; |
||||
} |
@ -0,0 +1,9 @@ |
||||
#pragma once |
||||
|
||||
#include "Entity.h" |
||||
#include "Listener.h" |
||||
|
||||
class Spectator : public Entity, public GameListener { |
||||
protected: |
||||
void OnCoinCollect(CoinCollectEvent *event) override; |
||||
}; |
@ -0,0 +1 @@ |
||||
#include "Window.h" |
@ -0,0 +1,7 @@ |
||||
#pragma once |
||||
|
||||
#include <QWidget> |
||||
|
||||
class Window : public QWidget { |
||||
|
||||
}; |
Loading…
Reference in new issue