understand more about andengine - andengine

guys i am new to andengine so i am sorry if what i am asking is straight forward.
so my question is i want to make a chicken lay a egg when i press a button.
an egg sprite should fall out of my main character when i press a button.
it would be really help full if you guys give the idea how do it it or show me thank you.
i tried making button with a sprite and connecting it to the hud so it works fine but i dont know how to impliment its fucntion to when ever i press it a sprite should fall from my character help.

First take a look at this: AndEngine Tutorials
Be sure you have the latest AndEngine, I'll advise you to use AnchorCenter branch, where by default all your sprites will have thier anchor center in the middle of "their body". After that just create 2 sprites, the Chicken (C) and the Egg (E) both with the same position but with different zIndex where the C will have a higher one, so that the E will be behind hidden. Then override the C sprite onClick method (the C could be a ButtonSprite instead of a simple Sprite). To move the E you could use an EntityYModifier with the desired offset.
This is the main idea ;)

Related

The tilemap covers the floating text UNITY 2D

So I want to display a floating text everytime the player opens a chest, that indicates how many coins you earned. I created the level using tilemaps. The problem arises when I created the floating text, basically it's covered by the tilemap, because if I move it out of the level I can see it, otherwise not. I tried fixing this problem by using layers, but I can't manage to make it work. Does anyone know how to help me?
As you can see by the foto the outline of the text is visible, but in play mode you can't see it.
You should probably use the order in layer in the tilemap renderer and set it to a negative value.Im sorry if it doesnt work I am new to unity.

How to make an object bend in the opposite direction as it moves into Unity

I need to move a 3D object like in the "Run sausage" game.
https://www.youtube.com/watch?v=CQa5PUlSfwk
There, as the character runs forward, its body kind of bends backwards, in the direction opposite to the movement.
In particular I do a simulation of a tornado in Unity, but when I want to go forward to the upper part of the tornado moved back, and after 1 second reaches the lower part ("legs")
Any suggestions would help me. Thank you
The movement like in the Sausage Run game can be achieved easily by using animator controller specifically Blend Tree. Watch this tutorial is you are not already familiar with these
https://www.youtube.com/watch?v=E-zQw4GabKw

Create animation from many animation clips

i am working on a Unity project where i want to show a car coming out from a garage and travel around the house.
so i created Animation Clips of the door opens, car driving around the house and some others.
lets call them animations a, b, c.
now i want to make this animation run in sequence,in this order a -> b -> c.
how can i managed this?
a method without writing scripts is preffered.
good reference will also be great! im kind a new to unity, know key framing aninations. wanted to beleive that there is an easy way to make it trough.
thanks!
You could add an animation event at the end of your animations playing the next animation. This would require a script, but a very simple one. Add the name of the animation in the event, so it's reusable.
I think without scripting you can't solve you problem so you can look this link or ask someone write your code
http://docs.unity3d.com/ScriptReference/Animation.html
https://unity3d.com/ru/learn/tutorials/modules/beginner/animation

animation with medal & ribbon at level finished

i am new to cocos2d and iphone. i have implemented one simple animation using particle system. it works fine. now i want some more animation like , when my star animation(using particles) completes , i want one medal with ribbon falling down from top to bottom in my screen, i want it's movement just same like we release medal from our hand & hold the ribbon. .can we achieve this kind of action or rather say animation using cocos2d ... any kind of help or idea would be appreciated a lot . .
i have implemented something like this :
I think rope physics would work, but it seems a little too much to add physics just for that.
I would say that the best strategy would be to make an CCSprite animated with CCAnimation.
There is a tutorial for that in this site: http://getsetgames.com/2010/04/18/how-to-animate-sprites-in-cocos2d/
[edit]
Cocos2d introduction to Rope Simulations: cocos2d-iphone.org/verlet-rope

Doodle Jump game over animation

Please excuse the stupid question, but I'm working on a game because I'm crazy like that and I really need some help. When you fall below the screen in doodle jump the game is over and it cuts to end of game animation. This animation gives the feel of the screen scrolling and him falling -- some how they animate him to the top -- from the top to his death. Do anybody know who to simulate this animation? BTW, I'm using Cocos2d for the game engine.
I did find the answer my self by using this tool called File Juicer. Check it out it very good.