Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (bodymenager == null)
     {
         return;
     }
     bodies = bodymenager.GetData();
     if (bodies == null)
     {
         return;
     }
     foreach (var body in bodies)
     {
         if (body == null)
         {
             continue;
         }
         if (body.IsTracked)
         {
             gmenager.shand = body.HandRightState;
             Debug.Log(gmenager.shand);
             hand.stateofhand.text = state.GetRPSSTATE(body.HandRightState);
             // Debug.Log("done");
         }
     }
 }
Exemplo n.º 2
0
 public void Game()
 {
     Clean();
     hand = statehand.GetRPSSTATE(shand);
     playerhand.playerstate.text = hand;
     pc = r.Pcroll();
     pcstate.pcshandtate.text = pc;
     score = win.CheckWinner(hand, pc);
     if (score == "Player")
     {
         scoreplayer++;
     }
     if (score == "PC")
     {
         scorepc++;
     }
     plscore.playerpoints.text = "Your score : " + scoreplayer;
     pcscr.pcpoints.text       = "PC score : " + scorepc;
 }