Beispiel #1
0
 private void UpdateWinnigDistance()
 {
     if (!hasArrivedHiperspace)
     {
         distance = ENDGAMEPOINT - (int)gameObject.transform.position.x;
         if (!shipCollisionStatus.isDead)
         {
             TextEnable.UpdateDistanceText(distance.ToString());
         }
     }
     else
     {
         TextEnable.SetHiperspaceText("Pressione espaço");
     }
 }
Beispiel #2
0
 void Start()
 {
     flagAuxBugFixGambiarra = true;
     TextEnable.Init();
     player = GameObject.FindGameObjectWithTag("Player");
     shipCollisionStatus = player.GetComponent <ShipCollision>();
     if (DataCenter.instance.numberOfLevelDeaths == 0)
     {
         DataCenter.instance.velMinInicial = DDAAply.instance.asteroidSpeed; //grava a velocidade inicial do nivel
         DataCenter.instance.SetTempoInicial();                              //grava o tempo inicial do nível
         if (DDAAply.instance.IsAfetivo)
         {
             EDAStart.instance.LerEDACalculaExcitacao(false); //Descarta os sinais eda lidos no questionario (calcularExcitacao=false)
         }
     }
 }
Beispiel #3
0
    private void HandleMovement()
    {
        var ship = GameObject.FindGameObjectWithTag("Player");

        if (ship.transform.position.x > ENDGAMEPOSITION)
        {
            if (!hasWin)
            {
                TextEnable.EnableFaseCompleta();
                hasWin = true;
            }
        }

        if (Input.GetKey(KeyCode.LeftArrow))
        {
            shipMovement.RotateLeft();
        }
        else if (Input.GetKey(KeyCode.RightArrow))
        {
            shipMovement.RotateRight();
        }
        if (Input.GetKey(KeyCode.UpArrow) && (ship.transform.position.x > ENDGAMEPOSITION) && (shipMovement.HasWarp))
        {
            shipMovement.Warp();
        }
        else if (Input.GetKey(KeyCode.UpArrow))
        {
            shipMovement.MoveForward();
        }
        else if (Input.GetKey(KeyCode.DownArrow))
        {
            shipMovement.MoveBackward();
        }
        else
        {
            shipMovement.Decelerate();
        }
        if (!Input.GetKey(KeyCode.UpArrow) || !(ship.transform.position.x > ENDGAMEPOSITION))
        {
            shipMovement.DeWarp();
        }
    }
Beispiel #4
0
 void Awake()
 {
     TextEnable.Init();
     TextEnable.EnableDistance();
 }
Beispiel #5
0
    private void SetTextDesExtZon()
    {
        DDAAply inst = DDAAply.instance;
        string  desempenho, excitacao, zona;


        if (inst.desempenho == State.PlayerState.HIGH)
        {
            desempenho = "h";
        }
        else if (inst.desempenho == State.PlayerState.NORMAL)
        {
            desempenho = "n";
        }
        else if (inst.desempenho == State.PlayerState.LOW)
        {
            desempenho = "l";
        }
        else
        {
            desempenho = "-";
        }

        if (inst.excitacao == State.PlayerState.HIGH)
        {
            excitacao = "h";
        }
        else if (inst.excitacao == State.PlayerState.NORMAL)
        {
            excitacao = "n";
        }
        else if (inst.excitacao == State.PlayerState.LOW)
        {
            excitacao = "l";
        }
        else
        {
            excitacao = "-";
        }

        if (inst.zona == State.PlayerState.HIGH)
        {
            zona = "h";
        }
        else if (inst.zona == State.PlayerState.NORMAL)
        {
            zona = "n";
        }
        else if (inst.zona == State.PlayerState.LOW)
        {
            zona = "l";
        }
        else
        {
            zona = "-";
        }

        if (inst.IsDesempenho)
        {
            if (DataCenter.instance.numberOfLevelDeaths == 1)
            {
                NGUIDebug.Clear(); //o afetivo ja faz o clear antes
                NGUIDebug.Log("d" + desempenho + "z" + zona);
            }
        }
        else if (inst.IsAfetivo)
        {
            if (DataCenter.instance.numberOfLevelDeaths == 1)
            {
                NGUIDebug.Log("e" + excitacao + "z" + zona);
            }
        }
        else if (inst.IsZona)
        {
            if (DataCenter.instance.numberOfLevelDeaths == 1)
            {
                NGUIDebug.Clear(); //o afetivo ja faz o clear antes
                NGUIDebug.Log("z" + zona);
            }
        }

        TextEnable.SetHiperspaceText("Pressione Espaço");
        flagAuxBugFixGambiarra = false;
    }
Beispiel #6
0
 public void SetGameOver()
 {
     TextEnable.EnableGameLose();
 }
Beispiel #7
0
 public void SetGameWin()
 {
     TextEnable.EnableFaseCompleta();
 }