filmov
tv
How to create a simple coin counter in your Unity game? Easy Unity 2D tutorial.

Показать описание
#UnityTutorial #SimpleUnityGame #unitycoincounter #unitycoin
In this video I will show you how to create a coin counter for your Unity game.
You are very welcome :-)
First we add a player represented by funny smile facew hich will picking up golden coins. This player moves with help of C# script where we get directions to move in Update method by pressing arrow keys and pass this data in FixedUpdate method to RigidBody2D component as a horizontal and vertical velocity. Coins player picks up have circle collider with isTrigger option checked and a C# script so if player collides with the coin the number of coins value is increased by one and coin is destroyed. Also we create a coin counted UI text game object with C# script attached that controls the number of picked up coins by storing it in coinAmount public static int variable.
What this video is about and what it can be used for also: unity 2d tutorial,
unity tutorial, coin counter unity, How to create a simple coin counter in your Unity game, how to create coin counter unity, coin counter UI unity, add coin unity, pickup coin unity, pick up coin unity, pick up coin game, pick up coin tutorial, unity coin, how to pick up coin unity, coin UI unity, ontriggerenter2d, coins counter text unity, unity coin collecting, learn unity fast, unity tutorial, how to make games with unity, unity how to make game, unity how to make 2d game, not as good as brackeys but good as well.
In this video I will show you how to create a coin counter for your Unity game.
You are very welcome :-)
First we add a player represented by funny smile facew hich will picking up golden coins. This player moves with help of C# script where we get directions to move in Update method by pressing arrow keys and pass this data in FixedUpdate method to RigidBody2D component as a horizontal and vertical velocity. Coins player picks up have circle collider with isTrigger option checked and a C# script so if player collides with the coin the number of coins value is increased by one and coin is destroyed. Also we create a coin counted UI text game object with C# script attached that controls the number of picked up coins by storing it in coinAmount public static int variable.
What this video is about and what it can be used for also: unity 2d tutorial,
unity tutorial, coin counter unity, How to create a simple coin counter in your Unity game, how to create coin counter unity, coin counter UI unity, add coin unity, pickup coin unity, pick up coin unity, pick up coin game, pick up coin tutorial, unity coin, how to pick up coin unity, coin UI unity, ontriggerenter2d, coins counter text unity, unity coin collecting, learn unity fast, unity tutorial, how to make games with unity, unity how to make game, unity how to make 2d game, not as good as brackeys but good as well.
Комментарии