Dear all i am working on a small 2d android game.I want if i apply soap to my object then there should create bubbles on other object which disappear automatically after a certain time.Please help me how can i create such kind of effects?
Thanks.
Might be possible simpler with a particle emitter? Can search for that maybe? Otherwise the below is how I would do it offhand:
Look into the following topics:
Prefabs
Instantiate
Destroy
Time.Time
You will want to create a prefab of a bubble sprite, attach a script that it that counts down every Update() using Time.Time. When your timer reaches 0 Destroy the gameobject. From your object that will spawn the bubbles, instantiate the bubble prefabs at the appropriate time.
Hope this helps!
1 Like