コード例 #1
0
 // Start is called before the first frame update
 void Start()
 {
     _gameControle   = FindObjectOfType(typeof(GameControle)) as GameControle;
     bolaRb          = GetComponent <Rigidbody2D>();
     bolaRb.velocity = new Vector2(VelocidadeInicial, 0);
     isBateu         = false;
 }
コード例 #2
0
    void Start()
    {
        _GameControle = FindObjectOfType(typeof(GameControle)) as GameControle;
        barrilRb      = GetComponent <Rigidbody2D>();

        barrilRb.velocity = new Vector2(_GameControle.velocidadeObjeto, 0);
    }
コード例 #3
0
    void Start()
    {
        QualitySettings.vSyncCount  = 1;
        Application.targetFrameRate = 120;
        playerRb = GetComponent <Rigidbody2D>();

        _GameControle = FindObjectOfType(typeof(GameControle)) as GameControle;
    }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     inventario = FindObjectOfType(typeof(Inventario)) as Inventario;
     controle   = FindObjectOfType(typeof(GameControle)) as GameControle;
     for (int i = 0; i < 4; i++)
     {
         if (acoes.Count < 4)
         {
             acoes.Add(new Acao());
         }
     }
 }
コード例 #5
0
    void Start()
    {
        _GameControle = FindObjectOfType(typeof(GameControle)) as GameControle;

        ponteRb = GetComponent <Rigidbody2D>();
    }
コード例 #6
0
 // Use this for initialization
 void Start()
 {
     controle = FindObjectOfType(typeof(GameControle)) as GameControle;
     fade     = GameObject.Find("FadeEffect").GetComponent <CanvasGroup>();
 }
コード例 #7
0
 // Start is called before the first frame update
 void Start()
 {
     RbObjeto = GetComponent <Rigidbody2D>();
     RbObjeto.AddForce(new Vector2(0, forca));
     _gameControle = FindObjectOfType(typeof(GameControle)) as GameControle;
 }