Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Popping balloons"

Discussion in '2D' started by toolip, Jun 8, 2018.

  1. toolip

    toolip

    Joined:
    Jun 8, 2018
    Posts:
    1
    Hello,

    I'm trying to get my scene/game to have multiple balloons appear/spawn on the screen, and when the player clicks on them they disappear and the spawning of the balloons gets quicker. Right now, I can't even get them to appear/fade in on the screen, nor can I get them to disappear when clicked on.

    Can someone please point me in the right direction? Or maybe even help me themselves?

    Thanks in advance!
     
  2. bakir-omarov

    bakir-omarov

    Joined:
    Aug 1, 2015
    Posts:
    48
    Hi,

    Firstly it looks like you are in the beginning of your Unity3D journey, so i highly recommend you to start with tutorials, articles and books. You can find all necessary information in the official Unity Learn section : https://unity3d.com/learn

    For the logic of your game.

    1) Firstly you need to create random balloons. In Unity you can create GameObjects with Instantiate method. You can find a bunch of video tutorials about it on youtube. For example:



    Unity Docs: https://docs.unity3d.com/ScriptReference/Object.Instantiate.html

    2) After you need to detect mouse clicks on objects, so you can destroy them, and make some "popping" effects, and add some points to UI text. You can use Raycast in Unity. For example:



    Unity Docs: https://docs.unity3d.com/ScriptReference/Physics.Raycast.html


    As i said before, highly recommend you to learn basics of Unity before starting making your own games. Have a nice Unity3D journey! ;)
     
    toolip likes this.