Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Gentle Introduction to Unity 2D Game Programming

Similar presentations


Presentation on theme: "A Gentle Introduction to Unity 2D Game Programming"— Presentation transcript:

1 A Gentle Introduction to Unity 2D Game Programming

2 Create a New Unity 2D Project

3 Play/Edit Toggle Game Scene Area

4 Click here to create a new Object

5 Make it a 2D Object of type Sprite

6 Move it to position x=3, y=3
Rename it "Ball" Move it to position x=3, y=3

7 Click here to create a new Sprite
Name it CircleSprite

8 You can apply this CircleSprite to the Ball object by
clicking and dragging it to here

9 Click Add Component and add a Physics 2D component
called a Circle Collider to the Ball object

10

11 Next add a Physics 2D Component called Rigitbody 2D to the Ball object

12 Now create a square (actually rectanglar) object
called the Floor Give the floor the Physics 2D properties of Box Collider and RigidBody 2D Make the Body Type Static

13 Run the "Game" to test the properties of you Ball object
It should fall and come to rest on the Floor object

14 Now create a Plank object associate a sprite with it
and give it Box Collider and RigidBody 2D properties Make it static and place it under the Ball at an angle, say 30 deg

15 Run the Game to Test the Ball's Behavior

16 Create a Physics Material 2D and call it BallMaterial
Next, click and drag BallMaterial directly onto the Ball object

17 Run the Game again to Test the change in the Ball's behavior


Download ppt "A Gentle Introduction to Unity 2D Game Programming"

Similar presentations


Ads by Google