void Update()
{
//Vaisseau.avancer();
this.gameObject.transform.Translate(Vector3.back * speed * Time.deltaTime);
j++;
if (manager != null && KinectManager.IsKinectInitialized() && manager.GetPlayer1ID() > 0)
{
uint userId = manager.GetPlayer1ID();
Vector3 screenNormalPos = Vector3.zero;
if (manager.GetGestureProgress(userId, KinectWrapper.Gestures.TournerADroite) >= 0.1f)
{
this.gameObject.transform.Rotate(Vector3.up * 1.5f, Space.World);
}
if (manager.GetGestureProgress(userId, KinectWrapper.Gestures.TournerAGauche) >= 0.1f)
{
this.gameObject.transform.Rotate(Vector3.down * 1.5f, Space.World);
} //*/
if (manager.GetGestureProgress(userId, KinectWrapper.Gestures.Accelerer) >= 0.1f)
{
if (!fast)
{
fast = true;
speed *= 5;
}
} //*/
else if (manager.GetGestureProgress(userId, KinectWrapper.Gestures.Ralentir) <= 0.1f)
{
if (fast)
{
fast = false;
speed /= 5;
}
} //*/
if (manager.GetGestureProgress(userId, KinectWrapper.Gestures.TirDroite) >= 0.1f)
{
if ((j % 10) == 0)
{
canonDroite.GetComponent <CanonJoueur>().shoot = true;
}
} //*/
if (manager.GetGestureProgress(userId, KinectWrapper.Gestures.TirGauche) >= 0.1f)
{
if ((j % 10) == 0)
{
canonGauche.GetComponent <CanonJoueur>().shoot = true;
}
} //*/
}
}