Phyzix
Loading...
Searching...
No Matches
src
app
engine
Graphics.h
1
//
2
// Created by shams on 8/7/24.
3
//
4
5
#ifndef PHYZIX_GRAPHICSOBJECT_H
6
#define PHYZIX_GRAPHICSOBJECT_H
7
8
9
#include <functional>
10
#include "Drawable.h"
11
12
class
Graphics
:
public
Drawable
{
13
public
:
14
// Constructor takes a callable to implement the draw method
15
Graphics
(
void
(*drawFunction)())
16
: drawFunction(drawFunction) {}
17
18
// Override the draw method from the base class
19
void
draw()
const override
{
20
drawFunction();
21
}
22
23
private
:
24
void (*drawFunction)();
25
};
26
27
28
#endif
//PHYZIX_GRAPHICSOBJECT_H
Drawable
Definition
Drawable.h:11
Graphics
Definition
Graphics.h:12
Generated by
1.10.0