0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 07:53:43 +00:00

Updated textures

This commit is contained in:
Nimac0 2024-01-24 09:34:42 +01:00
parent f09a89b9cd
commit d649a650a3
7 changed files with 8 additions and 8 deletions

BIN
assets/egg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

BIN
assets/heart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

BIN
assets/title_screen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

View File

@ -28,7 +28,7 @@ public:
if(player) {
x = 10;
} else {
x = 750;
x = 730;
}
for(int i = 0; i < health; i++) {
@ -48,8 +48,8 @@ public:
void createHeartComponents(int x) {
auto& heart(manager->addEntity());
heart.addComponent<TransformComponent>(x,5,1);
heart.addComponent<SpriteComponent>("assets/chicken_neutral_knight.png");
heart.addComponent<TransformComponent>(x,5,2);
heart.addComponent<SpriteComponent>("assets/heart.png");
heart.addGroup((size_t)GroupLabel::HEARTS);
}

View File

@ -108,9 +108,9 @@ void Game::init(const char* title, int xpos, int ypos, int width, int height, bo
//adding textures to the library in AssetManager
assets->addTexture("player1", "assets/chicken_neutral_knight.png");
assets->addTexture("player2", "assets/chicken_neutral.png");
//assets->addTexture("bigEgg", "assets/bigger_egg.png"); // commented out cause png wasn't in assets
assets->addTexture("player1", "assets/chicken_neutral_knight.png");
assets->addTexture("player2", "assets/chicken_neutral.png");
assets->addTexture("egg", "assets/egg.png");
//ecs implementation

View File

@ -55,11 +55,11 @@ void KeyboardController::update()
//TODO: adding actual projectile textures
if(fireVelocity.x > 0) {
Game::assets->createProjectile(Vector2D(player->position.x, player->position.y), fireVelocity,
false,1, 180, 1, "assets/chicken_neutral_knight.png");
false,1, 180, 1, "assets/egg.png");
}
else {
Game::assets->createProjectile(Vector2D(player->position.x, player->position.y), fireVelocity,
true,1, 180, 1, "assets/chicken_neutral_knight.png");
true,1, 180, 1, "assets/egg.png");
}
lastFireTime = currentTicks;