equal
deleted
inserted
replaced
17 explicit GameView(QQuickItem* parent = nullptr); |
17 explicit GameView(QQuickItem* parent = nullptr); |
18 |
18 |
19 Q_INVOKABLE void tick(quint32 delta); |
19 Q_INVOKABLE void tick(quint32 delta); |
20 |
20 |
21 EngineInstance* engineInstance() const; |
21 EngineInstance* engineInstance() const; |
22 |
|
23 Renderer* createRenderer() const override; |
22 Renderer* createRenderer() const override; |
|
23 void executeActions(); |
24 |
24 |
25 Q_SIGNALS: |
25 Q_SIGNALS: |
26 void engineInstanceChanged(EngineInstance* engineInstance); |
26 void engineInstanceChanged(EngineInstance* engineInstance); |
27 |
27 |
28 public Q_SLOTS: |
28 public Q_SLOTS: |
29 void setEngineInstance(EngineInstance* engineInstance); |
29 void setEngineInstance(EngineInstance* engineInstance); |
30 |
30 |
31 private: |
31 private: |
32 quint32 m_delta; |
|
33 QPointer<EngineInstance> m_engineInstance; |
32 QPointer<EngineInstance> m_engineInstance; |
34 QSize m_viewportSize; |
33 QSize m_viewportSize; |
35 QPoint m_centerPoint; |
34 QPoint m_centerPoint; |
|
35 QList<std::function<void(EngineInstance*)>> m_actions; |
|
36 |
|
37 void addAction(std::function<void(EngineInstance*)>&& action); |
36 }; |
38 }; |
37 |
39 |
38 #endif // GAMEVIEW_H |
40 #endif // GAMEVIEW_H |