I want to make a game that has the same mechanics as a basketball shootout game but has different graphics. I have the graphics done now I all I need to know is how I could make the mechanics. Did I mention this is a 2d game? and also how could I add Mobile Support so I could play on my iPhone?
Try watching these:
https://unity3d.com/learn/tutorials/modules/beginner/2d/physics2d
For a basketball game you’d have a ball object that you’d do Rigidbody2D.AddForce to make it fly in the direction you want. Probably variable based on how hard and at what angle the player releases the ball. You’d need to set up on-screen controls for this using Unity UI. Then you’d have some sort of basket setup made of colliders in a funnel shape. Above the rim you’d have a trigger collider (1) that always gets hit if the ball goes above the basket, then below the rim you’d have another trigger (2) that gets hit if the ball has gone through the basket and cleared it. You’d have logic to only count a score if the ball passes through trigger 1 then trigger 2.