Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     //fixStealScript ();
     //if we have the bomb and we are who we are, disable our "unattach" script
     if (bombState.redHasBomb() && transform.tag == "Player1")
     {
         //Debug.Log(transform.tag + " is holding the bomb");
         this.enabled = false;
     }
     else if (bombState.blueHasBomb() && transform.tag == "Player3")
     {
         this.enabled = false;
         //Debug.Log(transform.tag + " is holding the bomb");
     }
     else if (bombState.greenHasBomb() && transform.tag == "Player4")
     {
         this.enabled = false;
         //Debug.Log(transform.tag + " is holding the bomb");
     }
     else if (bombState.yellowHasBomb() && transform.tag == "Player2")
     {
         this.enabled = false;
         //Debug.Log(transform.tag + " is holding the bomb");
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     //we have to continuosly track who has the bomb and update its position
     //accordingly to the right player's back
     if (checkBombState.redHasBomb())
     {
         updateBombPosition(redBack);
     }
     else if (checkBombState.blueHasBomb())
     {
         updateBombPosition(blueBack);
     }
     else if (checkBombState.greenHasBomb())
     {
         updateBombPosition(greenBack);
     }
     else if (checkBombState.yellowHasBomb())
     {
         updateBombPosition(yellowBack);
     }
 }