Tuesday, 11 April 2023

Basic components for an object, physics

 Lets see how to make an animated object on our game.

We need an IMAGE that we will drag and drop to our EDITOR...


Now we select the added IMAGE

- We add two components (in the Inspector ADD COMPONENT)

1- Box collider 2D

2- Rigibody 2D

Variables between scripts

 If we want to access one variable (int data) from an external script, we must do: 1-ORIGINAL ONE.cs     public static int data = 0 ;  2-...