@erray01

Ошибка «функция не является именем класса», хотя #include прописан?

Итак, у меня есть класс SpriteComponent
#pragma once
#include "TextureManager.h"

class SpriteComponent : public Component {
private:
	SDL_Texture* texture;

public:
	SpriteComponent(const char* path) {

		texture = TextureManager::LoadTexture(path);
	}
	SpriteComponent(const char* path, int nFrames, int mSpeed) {
		animated = true;
		frames = nFrames;
		speed = mSpeed;
		texture = TextureManager::LoadTexture(path);
	}

	void Draw() override {
		TextureManager::Draw(texture, srcRect, destRect, transform->angle, transform->center, SDL_FLIP_NONE);
	}
	void ChangeTex(const char* path) {
		texture = TextureManager::LoadTexture(path);
	}
};

И класс TextureManager:
#pragma once
class TextureManager
{
public:
	static SDL_Texture* LoadTexture(const char* fileName);
	static void Draw(SDL_Texture* texture, SDL_Rect src, SDL_Rect dest, double angle, SDL_Point* center, SDL_RendererFlip flip);
};

Реализацию не стал писать, а то много материала

И по итогу получается ошибки:
643ed4e423d87070656944.png
Не понимаю, что я сделал не так
  • Вопрос задан
  • 97 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы