Aplicativos para Comprar Imóveis (Brasil)

  VPS DE ALTA PERFOMANCE APARTAMENTO EM GUARAPARI TEMPORADA ES  CRÉDITO PESSOAL SEGUROS ENTRE OUTROS CONFIRA DRA LARISSA SAIB MÉDICA DE CABELO 1. ZAP Imóveis Um dos mais populares do Brasil. Filtragem por preço, localização, tipo de imóvel, metragem, etc. App para Android e iOS. Site: zapimoveis.com.br 2. VivaReal Interface amigável, milhares de ofertas de imóveis. Permite salvar buscas e receber alertas. Android e iOS. Site: vivareal.com.br 3. OLX Imóveis Grande volume de imóveis diretamente com proprietários. Pode encontrar boas oportunidades sem intermediários. Android e iOS. Site: olx.com.br/imoveis 4. QuintoAndar Focado inicialmente em aluguel, mas tem compra também. Processo 100% digital, com tour virtual em muitos imóveis. Android e iOS. Site: quintoandar.com.br 5. Loft Especializado em apartamentos prontos e reformados. Ajuda com financiamento e documentação. Android e iOS. Site: loft.com.br 6. ...

como criar um jogo de luta na UNITY C#/


CONFIRA ESSA OPORTUNIDADE  NÃO PERCA!

CSeguros e produos financeiros com atendimento via WhatsApp

1. CRIAR O PLAYER

No Unity:

  1. Crie um GameObject > 2D Object > Sprite (Square) e nomeie de Player1.

  2. Adicione um BoxCollider2D e um Rigidbody2D.

  3. Faça o mesmo para o Player2.

  4. Crie uma tag "Player1" e "Player2".


2. SCRIPT DE MOVIMENTAÇÃO E ATAQUE

Crie um script chamado Fighter.cs e cole o seguinte código:

csharp
using UnityEngine; public class Fighter : MonoBehaviour { public float speed = 5f; public float jumpForce = 7f; public int maxHealth = 100; public Transform attackPoint; public float attackRange = 0.5f; public LayerMask enemyLayers; public int attackDamage = 10; public string horizontalAxis = "Horizontal"; public KeyCode jumpKey = KeyCode.W; public KeyCode attackKey = KeyCode.Space; private Rigidbody2D rb; private int currentHealth; private void Start() { rb = GetComponent<Rigidbody2D>(); currentHealth = maxHealth; } private void Update() { // Movimento float move = Input.GetAxis(horizontalAxis); rb.velocity = new Vector2(move * speed, rb.velocity.y); // Pulo if (Input.GetKeyDown(jumpKey) && Mathf.Abs(rb.velocity.y) < 0.01f) { rb.AddForce(Vector2.up * jumpForce, ForceMode2D.Impulse); } // Ataque if (Input.GetKeyDown(attackKey)) { Attack(); } } void Attack() { // Detectar inimigos na área de ataque Collider2D[] hitEnemies = Physics2D.OverlapCircleAll(attackPoint.position, attackRange, enemyLayers); foreach (Collider2D enemy in hitEnemies) { enemy.GetComponent<Fighter>().TakeDamage(attackDamage); } } public void TakeDamage(int damage) { currentHealth -= damage; Debug.Log(gameObject.name + " levou dano! Vida: " + currentHealth); if (currentHealth <= 0) { Die(); } } void Die() { Debug.Log(gameObject.name + " morreu!"); gameObject.SetActive(false); } private void OnDrawGizmosSelected() { if (attackPoint == null) return; Gizmos.color = Color.red; Gizmos.DrawWireSphere(attackPoint.position, attackRange); } }

3. CONFIGURAÇÃO DO PLAYER NO UNITY

Para cada player:

  • Adicione esse script Fighter.cs.

  • Crie um Empty GameObject como filho chamado AttackPoint (posicione onde for o "soco").

  • No Inspector, arraste o AttackPoint para o campo do script.

  • Configure:

    • Player 1:

      • horizontalAxis: "Horizontal" (padrão: A/D)

      • jumpKey: W

      • attackKey: Space

    • Player 2:

      • horizontalAxis: "Horizontal2" (você precisará criar no InputManager)

      • jumpKey: por exemplo UpArrow

      • attackKey: RightControl ou outro


4. CONFIGURAR ENTRADAS (InputManager)

Para adicionar eixos personalizados:

  • Vá em Edit > Project Settings > Input Manager

  • Duplique o eixo "Horizontal"

  • Renomeie para "Horizontal2"

  • Configure para usar teclas diferentes (Ex: LeftArrow, RightArrow)


5. LAYER E TAGS

  • Crie uma Layer chamada Player1 e Player2

  • Atribua os jogadores a essas layers

  • No campo enemyLayers do script, atribua o layer do inimigo correspondente


6. UI DE VIDA (Opcional)

Se quiser, você pode adicionar uma barra de vida com Slider UI para mostrar a saúde dos jogadores visualmente.

Comentários