diff --git a/data/images/powerups/egg/egg.png b/data/images/powerups/egg/egg-0.png similarity index 100% rename from data/images/powerups/egg/egg.png rename to data/images/powerups/egg/egg-0.png diff --git a/data/images/powerups/egg/egg-1.png b/data/images/powerups/egg/egg-1.png new file mode 100644 index 00000000000..863b78b8108 Binary files /dev/null and b/data/images/powerups/egg/egg-1.png differ diff --git a/data/images/powerups/egg/egg-10.png b/data/images/powerups/egg/egg-10.png new file mode 100644 index 00000000000..cb804d733ee Binary files /dev/null and b/data/images/powerups/egg/egg-10.png differ diff --git a/data/images/powerups/egg/egg-11.png b/data/images/powerups/egg/egg-11.png new file mode 100644 index 00000000000..9e326b2d002 Binary files /dev/null and b/data/images/powerups/egg/egg-11.png differ diff --git a/data/images/powerups/egg/egg-12.png b/data/images/powerups/egg/egg-12.png new file mode 100644 index 00000000000..1ee1f18ddac Binary files /dev/null and b/data/images/powerups/egg/egg-12.png differ diff --git a/data/images/powerups/egg/egg-13.png b/data/images/powerups/egg/egg-13.png new file mode 100644 index 00000000000..2b5e0a53b6b Binary files /dev/null and b/data/images/powerups/egg/egg-13.png differ diff --git a/data/images/powerups/egg/egg-14.png b/data/images/powerups/egg/egg-14.png new file mode 100644 index 00000000000..707fc97d0be Binary files /dev/null and b/data/images/powerups/egg/egg-14.png differ diff --git a/data/images/powerups/egg/egg-15.png b/data/images/powerups/egg/egg-15.png new file mode 100644 index 00000000000..37266c8b0aa Binary files /dev/null and b/data/images/powerups/egg/egg-15.png differ diff --git a/data/images/powerups/egg/egg-16.png b/data/images/powerups/egg/egg-16.png new file mode 100644 index 00000000000..9e24d1c10a4 Binary files /dev/null and b/data/images/powerups/egg/egg-16.png differ diff --git a/data/images/powerups/egg/egg-17.png b/data/images/powerups/egg/egg-17.png new file mode 100644 index 00000000000..a6193d40a34 Binary files /dev/null and b/data/images/powerups/egg/egg-17.png differ diff --git a/data/images/powerups/egg/egg-18.png b/data/images/powerups/egg/egg-18.png new file mode 100644 index 00000000000..e0641398b94 Binary files /dev/null and b/data/images/powerups/egg/egg-18.png differ diff --git a/data/images/powerups/egg/egg-19.png b/data/images/powerups/egg/egg-19.png new file mode 100644 index 00000000000..cd2e385a3a3 Binary files /dev/null and b/data/images/powerups/egg/egg-19.png differ diff --git a/data/images/powerups/egg/egg-2.png b/data/images/powerups/egg/egg-2.png new file mode 100644 index 00000000000..ed6b220cf9f Binary files /dev/null and b/data/images/powerups/egg/egg-2.png differ diff --git a/data/images/powerups/egg/egg-3.png b/data/images/powerups/egg/egg-3.png new file mode 100644 index 00000000000..e0f4bbb02da Binary files /dev/null and b/data/images/powerups/egg/egg-3.png differ diff --git a/data/images/powerups/egg/egg-4.png b/data/images/powerups/egg/egg-4.png new file mode 100644 index 00000000000..e041ad7cd72 Binary files /dev/null and b/data/images/powerups/egg/egg-4.png differ diff --git a/data/images/powerups/egg/egg-5.png b/data/images/powerups/egg/egg-5.png new file mode 100644 index 00000000000..0fc79ce6edc Binary files /dev/null and b/data/images/powerups/egg/egg-5.png differ diff --git a/data/images/powerups/egg/egg-6.png b/data/images/powerups/egg/egg-6.png new file mode 100644 index 00000000000..fd2bfb3492e Binary files /dev/null and b/data/images/powerups/egg/egg-6.png differ diff --git a/data/images/powerups/egg/egg-7.png b/data/images/powerups/egg/egg-7.png new file mode 100644 index 00000000000..d9426abcf44 Binary files /dev/null and b/data/images/powerups/egg/egg-7.png differ diff --git a/data/images/powerups/egg/egg-8.png b/data/images/powerups/egg/egg-8.png new file mode 100644 index 00000000000..9a7fc19cf2c Binary files /dev/null and b/data/images/powerups/egg/egg-8.png differ diff --git a/data/images/powerups/egg/egg-9.png b/data/images/powerups/egg/egg-9.png new file mode 100644 index 00000000000..ff38eafd193 Binary files /dev/null and b/data/images/powerups/egg/egg-9.png differ diff --git a/data/images/powerups/egg/egg.sprite b/data/images/powerups/egg/egg.sprite index 899b94899ac..7e337a8d105 100644 --- a/data/images/powerups/egg/egg.sprite +++ b/data/images/powerups/egg/egg.sprite @@ -1,4 +1,31 @@ (supertux-sprite (action - (name "default") - (images "egg.png"))) + (name "right") + (images "egg-0.png" + "egg-1.png" + "egg-2.png" + "egg-3.png" + "egg-4.png" + "egg-5.png" + "egg-6.png" + "egg-7.png" + "egg-8.png" + "egg-9.png" + "egg-10.png" + "egg-11.png" + "egg-12.png" + "egg-13.png" + "egg-14.png" + "egg-16.png" + "egg-17.png" + "egg-18.png" + ) + (fps 25) + ) + (action + (name "left") + (mirror-action "right") + (fps 25) + ) +) + diff --git a/src/object/growup.cpp b/src/object/growup.cpp index 19be5350b07..1bc7fcc3bd9 100644 --- a/src/object/growup.cpp +++ b/src/object/growup.cpp @@ -32,6 +32,8 @@ GrowUp::GrowUp(Direction direction) : //set light for glow effect lightsprite->set_blend(Blend(GL_SRC_ALPHA, GL_ONE)); lightsprite->set_color(Color(0.2f, 0.2f, 0.0f)); + + sprite->set_action((direction == LEFT) ? "left" : "right"); } void @@ -61,8 +63,15 @@ GrowUp::collision_solid(const CollisionHit& hit) physic.set_velocity_y(0); if(hit.bottom && physic.get_velocity_y() > 0) physic.set_velocity_y(0); - if(hit.left || hit.right) + if(hit.left || hit.right) { physic.set_velocity_x(-physic.get_velocity_x()); + if(hit.left) + sprite->set_action("right"); + else { + sprite->set_action("left"); + } + + } } HitResponse