// Use this for initialization
 void Start()
 {
     GM = GameObject.Find("Game Manager").GetComponent <GameManagerTS>();
     SM = GameObject.Find("Game Manager").GetComponent <ScoreManager>();
     NM = GameObject.Find("NetworkManager").GetComponent <NetworkManager>();
     if (isLocalPlayer)
     {
         GameObject.FindGameObjectWithTag("ScoreText").GetComponent <Text>().enabled = true;
         setCamera();
         NM.GetComponent <NetworkManagerHUD>().enabled = false;
     }
     _dest = transform.position;
 }
示例#2
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else
     {
         if (this != _instance)
         {
             Destroy(this.gameObject);
         }
     }
 }