Example #1
0
 public bool RPCCreateBombTag(Vector3 bombPosition, Quaternion bombRotation, ZF.Flag flag)
 {
     Debug.Log("RPCCreateBombTag Called");
     if (flag == radar.GetComponent <TankControl>().flag)
     {
         GameObject bombTag = Instantiate(bombPoint, bombPosition + new Vector3(0, 30, 0), bombRotation);
         bombTag.GetComponentInChildren <SpriteRenderer>().color = (flag == ZF.Flag.Blue) ? Color.blue : Color.red;
         return(true);
     }
     return(false);
 }
Example #2
0
 //Check if the explosion is within sensor range, if so, then create a tag on the minimap
 public bool CreateBombTag(Vector3 bombPosition, Quaternion bombRotation, ZF.Flag flag)
 {
     if ((bombPosition - radar.position).magnitude < maxBombSensorRange)
     {
         //GameObject bombTag = Instantiate(bombPoint, bombPosition + new Vector3(0, 30, 0), bombRotation);
         //bombTag.GetComponentInChildren<SpriteRenderer>().color = (flag == ZF.Flag.Blue) ? Color.blue : Color.red;
         photonView.RPC("RPCCreateBombTag", PhotonTargets.All, bombPosition, bombRotation, flag);
         return(true);
     }
     return(false);
 }