Unity code does not compile [closed]

-3
using UnityEngine;
using System.Collections;

public class Player : MovingObject {

    public int pointsPerFood = 10; // Numero de pontos cada vez que pegar comida.
    public int pointsPerSoda = 20; // "" pegar Soda.
    public int wallDamage = 1; //Quanto o player causa de dano no muro.
    public float restartLevelDelay = 1f; //Tempo em segundos para reiniciar o level.

    private Animator animator;// usado para armazenar o animator do player.
    private int food; //Armazena a comida do player no level atual.

    //Override do start MovingObject
    protected override void Start ()
    {
        animator = GetComponent <Animator>();

        //pega a quantidade de vida total
        food = GameManager.instance.playerFoodPoints;


        base.Start ();

    }

    //e chamado qunado o player fica inativo ou desabilitado.
    private void OnDisable()
    {
        //Quando o player for desabilitado armazenar a quantidade de comida no GameManager.
        GameManager.instance.playerFoodPoints = food;

    }

    // Update is called once per frame
    private void Update () 
    {
        //so vamos fazr alguma coisa se for o turno do player
        if (!GameManager.instance.playerTurn)
            return;

        int horizontal = 0;
        int vertical = 0;

        //pega o input do input manager horizontal e arredonda para inteiro
        horizontal = (int) (Input.GetAxisRaw ("horizontal"));

        //pega o input do input manager vertical e arredonda para inteiro
        vertical = (int) (Input.GetAxisRaw ("vertical"));


        //verificar se o personagem se move somente em uma direçao
        if (horizontal != 0) 
        {
            vertical = 0;

        }

        //verificar que existe um valor nao zero em alguma direçao
        if (horizontal != 0 || vertical != 0) 
        {
            //chama a fuçao AttempMove passando o parametro generico wall
            AttemptMove<Wall> (horizontal, vertical);

        }



    }

    //Override do MoveObject
    protected override void AttemptMove <T> (int xDir, int yDir)
    {
        //toda vez que ele se mover ele consome comida
        //food = food -1;
        food--;

        base.AttemptMove <T> ( xDir, yDir);

        RaycastHit2D hit;

        CheckIfGameOver ();

        GameManager.instance.playerTurn = false;

    }

    //override do MovingObjects
    protected override void OnCantMove <T> (T component)
    {
        Wall hitWall = component as Wall;

        //quando se tenta mover contra um muro vc ataca ele
        hitWall.DamageWall (wallDamage);

        //dispara gatilho para trocar a animaçao do player atacando 'playerchop'
        animator.SetTrigger ("playerChop");

    }

    private void OnTriggerEnter2D (Collider2D other);
    {
        //checa se e a saida.
        if (other.tag == "exit");
        {
            invoke ("Restart" , restartLevelDelay);

            enabled = false;

        }
        else if(other.tag == "Food")
        {
            //adicionar a quantidade de comida
            food += pointsPerFood;

            Other.GameObject.SetActive(false);

        }
        else if(other.tag == "Soda")
        {
            //adicionar a quantidade de comida
            food += pointsPerSoda;

            Other.GameObject.SetActive(false);

        }
    }



    private void Restart ()
    {

        Application.LoadLevel (Application.loadedLevel);

    }

    //perder comida quando player apanhar do zumbi
    public boid LoseFood (int loss)
    {
        animator.SetTrigger ("playerHit");

        food -= loss;

        CheckIfGameOver ();

    }




    //verificar se o player esta sem comida, se sim gameover.
    private void CheckIfGameOver ()
    {
        //verificar comida do player
        if (food == 0)
        {
            //chama o game over do GameManeger
            GameManager.instance.GameOver ();

        }

    }










}

    
asked by anonymous 06.09.2015 / 19:51

1 answer

1

If you take the ; on these two lines you should solve all problems:

private void OnTriggerEnter2D (Collider2D other)
{
    //checa se e a saida.
    if (other.tag == "exit")

If you have other problems, please let me update the answer.

    
06.09.2015 / 20:49