24 lines
601 B
C
24 lines
601 B
C
|
#pragma once
|
||
|
#include "Constants.h"
|
||
|
#include "KSolid.h"
|
||
|
#include "KRect.h"
|
||
|
|
||
|
namespace KapitanGame
|
||
|
{
|
||
|
class KSolidTile final :
|
||
|
public KSolid
|
||
|
{
|
||
|
public:
|
||
|
KSolidTile(const KVector2D& position, const KTexture& texture, SDL_Rect* tileClip, const SDL_RendererFlip flip = SDL_FLIP_NONE)
|
||
|
: KSolid(position, texture, tileClip, flip),
|
||
|
Collider(this, tileClip != nullptr ? Constants::TILE_WIDTH * 1.f : texture.GetWidth() * 1.f, tileClip != nullptr ? Constants::TILE_HEIGHT * 1.f : texture.GetHeight() * 1.f)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
const KCollider* GetCollider() const override;
|
||
|
private:
|
||
|
KRect Collider;
|
||
|
};
|
||
|
}
|
||
|
|