Skip to content
Snippets Groups Projects
Commit e558b655 authored by GHARBI SANIM's avatar GHARBI SANIM
Browse files

ajout d'un seuil pour déclencher les animations

parent a435a9d6
Branches
No related merge requests found
......@@ -13,51 +13,51 @@ public class AnimationHandler : MonoBehaviour
public void playAnimation(List<int> ponderations)
{
if (ponderations[0] < 0)
if (ponderations[0] <-5)
{
medecin.GetComponent<Animator>().Play("bad");
}
else if (ponderations[0] > 0)
else if (ponderations[0] >5)
{
medecin.GetComponent<Animator>().Play("clap");
}
if (ponderations[1] < 0)
if (ponderations[1] < -5)
{
designer.GetComponent<Animator>().Play("bad");
}
else if (ponderations[1] > 0)
else if (ponderations[1] > 5)
{
designer.GetComponent<Animator>().Play("clap");
}
if (ponderations[2] < 0)
if (ponderations[2] < -5)
{
quali.GetComponent<Animator>().Play("bad");
}
else if (ponderations[2] > 0)
else if (ponderations[2] > 5)
{
quali.GetComponent<Animator>().Play("clap");
}
if (ponderations[3] < 0)
if (ponderations[3] < -5)
{
journaliste.GetComponent<Animator>().Play("bad");
}
else if (ponderations[3] > 0)
else if (ponderations[3] > 5)
{
journaliste.GetComponent<Animator>().Play("clap");
}
if (ponderations[4] < 0)
if (ponderations[4] < -5)
{
maitre.GetComponent<Animator>().Play("bad");
}
else if (ponderations[4] > 0)
else if (ponderations[4] > 5)
{
maitre.GetComponent<Animator>().Play("clap");
}
if (ponderations[5] < 0)
if (ponderations[5] < -5)
{
auteur.GetComponent<Animator>().Play("bad");
}
else if (ponderations[5] > 0)
else if (ponderations[5] > 5)
{
auteur.GetComponent<Animator>().Play("clap");
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment