diff --git a/data/gfx/item/item_clock.ani b/data/gfx/item/item_clock.ani index 2757bbc..f739286 100644 --- a/data/gfx/item/item_clock.ani +++ b/data/gfx/item/item_clock.ani @@ -2,8 +2,15 @@ frame_width=20 frame_height=20 [animation] -name=default -speed=0.1333 +name=blink +speed=0.2 loop=0 -frames=0,0,1 +frames=0,1 +[/animation] + +[animation] +name=no-blink +speed=0 +loop=-1 +frames=1 [/animation] \ No newline at end of file diff --git a/data/gfx/item/item_coffee.ani b/data/gfx/item/item_coffee.ani index 2757bbc..f739286 100644 --- a/data/gfx/item/item_coffee.ani +++ b/data/gfx/item/item_coffee.ani @@ -2,8 +2,15 @@ frame_width=20 frame_height=20 [animation] -name=default -speed=0.1333 +name=blink +speed=0.2 loop=0 -frames=0,0,1 +frames=0,1 +[/animation] + +[animation] +name=no-blink +speed=0 +loop=-1 +frames=1 [/animation] \ No newline at end of file diff --git a/data/gfx/item/item_debian.ani b/data/gfx/item/item_debian.ani index 2757bbc..f739286 100644 --- a/data/gfx/item/item_debian.ani +++ b/data/gfx/item/item_debian.ani @@ -2,8 +2,15 @@ frame_width=20 frame_height=20 [animation] -name=default -speed=0.1333 +name=blink +speed=0.2 loop=0 -frames=0,0,1 +frames=0,1 +[/animation] + +[animation] +name=no-blink +speed=0 +loop=-1 +frames=1 [/animation] \ No newline at end of file diff --git a/data/gfx/item/item_points1_disk.ani b/data/gfx/item/item_points1_disk.ani index 2757bbc..f739286 100644 --- a/data/gfx/item/item_points1_disk.ani +++ b/data/gfx/item/item_points1_disk.ani @@ -2,8 +2,15 @@ frame_width=20 frame_height=20 [animation] -name=default -speed=0.1333 +name=blink +speed=0.2 loop=0 -frames=0,0,1 +frames=0,1 +[/animation] + +[animation] +name=no-blink +speed=0 +loop=-1 +frames=1 [/animation] \ No newline at end of file diff --git a/data/gfx/item/item_points2_gavina.ani b/data/gfx/item/item_points2_gavina.ani index 2757bbc..f739286 100644 --- a/data/gfx/item/item_points2_gavina.ani +++ b/data/gfx/item/item_points2_gavina.ani @@ -2,8 +2,15 @@ frame_width=20 frame_height=20 [animation] -name=default -speed=0.1333 +name=blink +speed=0.2 loop=0 -frames=0,0,1 +frames=0,1 +[/animation] + +[animation] +name=no-blink +speed=0 +loop=-1 +frames=1 [/animation] \ No newline at end of file diff --git a/data/gfx/item/item_points3_pacmar.ani b/data/gfx/item/item_points3_pacmar.ani index 2757bbc..f739286 100644 --- a/data/gfx/item/item_points3_pacmar.ani +++ b/data/gfx/item/item_points3_pacmar.ani @@ -2,8 +2,15 @@ frame_width=20 frame_height=20 [animation] -name=default -speed=0.1333 +name=blink +speed=0.2 loop=0 -frames=0,0,1 +frames=0,1 +[/animation] + +[animation] +name=no-blink +speed=0 +loop=-1 +frames=1 [/animation] \ No newline at end of file diff --git a/source/director.cpp b/source/director.cpp index 976505b..e455b44 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -43,7 +43,7 @@ Director::Director(int argc, std::span argv) { Section::name = Section::Name::GAME; Section::options = Section::Options::GAME_PLAY_1P; #elif _DEBUG - Section::name = Section::Name::LOGO; + Section::name = Section::Name::GAME; Section::options = Section::Options::GAME_PLAY_1P; #else // NORMAL GAME Section::name = Section::Name::LOGO; diff --git a/source/item.cpp b/source/item.cpp index 69da192..fc951e0 100644 --- a/source/item.cpp +++ b/source/item.cpp @@ -44,6 +44,7 @@ Item::Item(ItemType type, float x, float y, SDL_FRect& play_area, const std::sha collider_.r = width_ / 2; sprite_->startRotate(); sprite_->setRotateAmount(rotate_speed_); + sprite_->setCurrentAnimation("no-blink"); break; } } @@ -142,6 +143,7 @@ void Item::move(float deltaTime) { if (std::abs(vel_y_) < BOUNCE_VEL_THRESHOLD) { // Si la velocidad vertical es baja, detiene el objeto vel_y_ = vel_x_ = accel_x_ = accel_y_ = 0; + sprite_->setCurrentAnimation("blink"); } else { // Si la velocidad vertical es alta, el objeto rebota y pierde velocidad vel_y_ *= ITEM_BOUNCE_DAMPING;