Beispiel #1
0
    private void RodarCamera()
    {
        AnguloAtual   = Mathf.RoundToInt(Cam.transform.eulerAngles.z);
        AnguloDestino = ArredondaAngulo(AnguloAtual + 180.0f);
        GirandoCam    = true;

        foreach (GameObject herois in CasaOcupada)
        {
            if (herois != null)
            {
                IHerois Script = (IHerois)herois.GetComponent(typeof(IHerois));
                Script.AlteraSprite();
            }
        }
    }
Beispiel #2
0
 private void MoverPersonagens() //Função que move os personagens dependendo do turno
 {
     if (Turno == 1)
     {
         GameObject[] HeroisP1 = GameObject.FindGameObjectsWithTag("Player1");
         foreach (GameObject herois in HeroisP1)
         {
             IHerois Script = (IHerois)herois.GetComponent(typeof(IHerois));
             Script.Movimento();
         }
     }
     else
     {
         GameObject[] HeroisP2 = GameObject.FindGameObjectsWithTag("Player2");
         foreach (GameObject herois in HeroisP2)
         {
             IHerois Script = (IHerois)herois.GetComponent(typeof(IHerois));
             Script.Movimento();
         }
     }
 }