mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 13:43:41 +00:00
Updated textures
This commit is contained in:
parent
f09a89b9cd
commit
d649a650a3
BIN
assets/egg.png
Normal file
BIN
assets/egg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 271 B |
BIN
assets/heart.png
Normal file
BIN
assets/heart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 279 B |
BIN
assets/title_screen.png
Normal file
BIN
assets/title_screen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
assets/title_screen_backup.aseprite
Normal file
BIN
assets/title_screen_backup.aseprite
Normal file
Binary file not shown.
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user