void Start() { intrigue = GameObject.FindWithTag("Scripts").GetComponent <Intrigue>(); network = GameObject.FindWithTag("Scripts").GetComponent <Network>(); player = GameObject.Find("Player").GetComponent <Player>(); photonView = PhotonView.Get(this); if (photonView.isMine) { Debug.Log("Guard"); localHandle = player.Handle; remoteScore = player.Score; photonView.RPC("giveHandle", PhotonTargets.OthersBuffered, player.Handle); photonView.RPC("giveScore", PhotonTargets.OthersBuffered, player.Score); } else { Debug.Log("Guard Deactivated"); GetComponentInChildren <Camera>().enabled = false; GetComponentInChildren <AudioListener>().enabled = false; GetComponentInChildren <MovementController>().enabled = false; GetComponentInChildren <MouseLook>().enabled = false; GetComponentInChildren <GuardCrosshair>().enabled = false; GetComponent <MouseLook>().enabled = false; enabled = false; } }
void Start() { network = GameObject.FindWithTag("Scripts").GetComponent <Network>(); intrigue = GameObject.FindWithTag("Scripts").GetComponent <Intrigue>(); player = GameObject.Find("Player").GetComponent <Player>(); timeLeft = completionTime; anim = GetComponent <Animator>(); anim.SetBool("Complete", false); }
// Look up how to disconnect void Start() { PhotonNetwork.isMessageQueueRunning = true; // Get photonView component photonView = PhotonView.Get(this); player = GameObject.Find("Player").GetComponent <Player>(); intrigue = GameObject.FindWithTag("Scripts").GetComponent <Intrigue>(); this.styleChat.fontSize = 12; this.styleChat.normal.textColor = Color.white; this.styleScore.fontSize = 40; this.styleScore.normal.textColor = Color.red; }