Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        //Inicializar o Unity Ads
        UnityAdController.InitializeAd();

        //Seta a posição do jogador nas coordenadas do GameObject com tag "Spawn"
        gameObject.transform.position = GameObject.FindGameObjectWithTag("Spawn").transform.position;

        //Obter acesso ao componente Rigidbody associado a esse GO (Game Object)
        rb = GetComponent <Rigidbody2D>();

        //Obter acesso ao componente BoxCollider2D associado a esse GO (Game Object)
        boxC = GetComponent <BoxCollider2D>();

        //Obter acesso ao componente Animator associado a esse GO (Game Object)
        anim = GetComponent <Animator>();
    }
Пример #2
0
 void Start()
 {
     //Inicializador para o Unity Ads
     UnityAdController.InitializeAd();
 }