void Update()
    {
        //if (Input.GetKeyDown(KeyCode.A))
        //{
        //    playerWaveHands = true;
        //}
        //if (Input.GetKeyUp(KeyCode.A))
        //{
        //    playerWaveHands = false;
        //}
        //if (Input.GetKeyDown(KeyCode.S))
        //{
        //    playerShakeHands = true;
        //}
        //if (Input.GetKeyUp(KeyCode.S))
        //{
        //    playerShakeHands = false;
        //}
        //if (Input.GetKeyDown(KeyCode.D))
        //{
        //    playerSalute = true;
        //}
        //if (Input.GetKeyUp(KeyCode.D))
        //{
        //    playerSalute = false;
        //}
        //if (Input.GetKeyDown(KeyCode.F))
        //{
        //    playerClapHands = true;
        //}
        //if (Input.GetKeyUp(KeyCode.F))
        //{
        //    playerClapHands = false;
        //}


        timer += Time.deltaTime;
        if (timer > 4.0f)
        {
            kinectMessage = gameObject.GetComponent <KinectWrapper2>().massage;


            if (kinectMessage == Massage_Enum.NONE && lastKinectMessage != Massage_Enum.NONE)
            {
                playerEnterIn = true;
            }
            else
            {
                playerEnterIn = false;
            }


            if (kinectMessage == Massage_Enum.OUTCAMERA && lastKinectMessage != Massage_Enum.OUTCAMERA)
            {
                playerEnterWrong = true;
            }
            else
            {
                playerEnterWrong = false;
            }
            if (kinectMessage == Massage_Enum.NOPLAYER && lastKinectMessage != Massage_Enum.NOPLAYER)
            {
                playerExit = true;
            }
            else
            {
                playerExit = false;
            }

            if (kinectMessage == Massage_Enum.FORWARD && lastKinectMessage != Massage_Enum.FORWARD)
            {
                playerWalk = true;
            }
            else
            {
                playerWalk = false;
            }


            if (kinectMessage == Massage_Enum.WAVE)
            {
                playerWaveHands = true;
            }
            else
            {
                playerWaveHands = false;
            }


            if (kinectMessage == Massage_Enum.SALUTE)
            {
                playerSalute = true;
            }
            else
            {
                playerSalute = false;
            }


            if (kinectMessage == Massage_Enum.SHAKE)
            {
                playerShakeHands = true;
            }
            else
            {
                playerShakeHands = false;
            }


            if (kinectMessage == Massage_Enum.CLAP)
            {
                playerClapHands = true;
            }
            else
            {
                playerClapHands = false;
            }



            lastKinectMessage = kinectMessage;
        }
    }
 void Start()
 {
     kinectMessage     = gameObject.GetComponent <KinectWrapper2>().massage;
     lastKinectMessage = Massage_Enum.NOPLAYER;
     kinectMessage     = Massage_Enum.NOPLAYER;
 }