Escolar Documentos
Profissional Documentos
Cultura Documentos
-----------------------------x-----------------------x--------------------------
-----------------------------x-----------------------x--------------------------
-----------------------------x-----------------------x--------------------------
Carregar cena.
-----------------------------x-----------------------x--------------------------
ROTATE.
Colliders
On the first physics update where the collision is detected, the
OnCollisionEnter function is called. During updates where contact is maintained,
OnCollisionStay is called and finally, OnCollisionExit indicates that contact
has been broken. Trigger colliders call the analogous OnTriggerEnter,
OnTriggerStay and OnTriggerExit functions. Note that for 2D physics, there are
equivalent functions with 2D appended to the name, eg, OnCollisionEnter2D.
-----------------------------x-----------------------x--------------------------
void Start()
{
Transform mudar = GetComponent<Transform>();
-----------------------------x-----------------------x--------------------------
print(velocidade);
-----------------------------x-----------------------x--------------------------
TIMER
//Colocar aqui o que vc quer que aconteça quando o cronômetro chegar a zero.
}
-----------------------------x-----------------------x--------------------------
Return a random float number between min [inclusive] and max [inclusive].
-----------------------------x-----------------------x---------------------------x--------
void Start()
{
primeira = new familia();
primeira.nome = "familia pereira";
print(primeira.nome);
}
-----------------------------x-----------------------x--------------------------
Como dazer uma imagem deslizar dentro dela mesma nos 360 graus.
-----------------------------x-----------------------x--------------------------
CÓDIGO PARA O RAISE
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
void Start()
{
void Update()
{
if (libera_raise == true)
{
cabo = cabo - 15.0f * Time.deltaTime;
}
cabo_barra.fillAmount = cabo / 1750;
cabo_info_txt.text = cabo.ToString("0000");
}
-----------------------------x-----------------------x--------------------------
Alinhar Main Camera ou scene view um com o outro.
Com a camera em questão sececionada, clique na aba GameObject e clique em “align whit view”
para alinhar a camera com o que está mostrando na cena ou em “aligh view with selected” para
alinhar a cena com o que esta mostrando na camera.
-----------------------------x-----------------------x--------------------------
Rigidbody.drag
Drag can be used to slow down an object. The higher the drag the more the object slows down.
Rigidbody.angularDrag
Angular drag can be used to slow down the rotation of an object. The higher the drag the
more the rotation slows down.
-----------------------------x-----------------------x--------------------------
Transform.parent
Changing the parent will modify the parent-relative position, scale and rotation
but keep the world space position, rotation and scale the same.
-----------------------------x-----------------------x--------------------------
-----------------------------x-----------------------x--------------------------
InputField input;
int integer_Value_we_Want;
integer_Value_we_Want = int.Parse(input.text); //for integer
integer_Value_we_Want = float.Parse(input.text); //for float
integer_Value_we_Want = double.Parse(input.text); //for double
-----------------------------x-----------------------x--------------------------
-----------------------------x-----------------------x--------------------------
variávelINT = (int)variávelFloat;
-----------------------------x-----------------------x--------------------------
-----------------------------x-----------------------x--------------------------
if (objeto_a_ser_verificado.activeSelf == true)
{
// Oque deve ser feito
}