Inheritance: UnityEngine.MonoBehaviour
示例#1
0
 void Start()
 {
     Host = GameObject.FindGameObjectWithTag ("MultiplayerManager").GetComponent<MultiplayerManager> ().IsHost;
     if (Host == 1)
     {
         Destroy (this);
     }
     clientServer = GameObject.FindGameObjectWithTag("ClientServer").GetComponent<ClientServer>();
 }
 void Start()
 {
     nick = PlayerPrefs.GetString ("MyNickname");
     IsHost = PlayerPrefs.GetInt ("IsHost");
     Debug.LogError (IsHost);
     clientServer = GameObject.FindGameObjectWithTag("ClientServer").GetComponent<ClientServer>();
     clientServer.Init (nick);
     player = GameObject.FindGameObjectWithTag ("Player");
 }
示例#3
0
 void Start()
 {
     player = GameObject.FindGameObjectWithTag ("Player");
     nav = GetComponent <NavMeshAgent> ();
     clientServer = GameObject.FindGameObjectWithTag("ClientServer").GetComponent<ClientServer>();
     myName = GameObject.FindGameObjectWithTag ("MultiplayerManager").GetComponent<MultiplayerManager>().nick;
     PreviousTarget = "";
     target = "";
     clientServer.multiplayerHandler.SendEnemyInitData (myName, ID, (double)gameObject.transform.position.x, (double)gameObject.transform.position.x, (double)gameObject.transform.position.x, (double)gameObject.transform.rotation.eulerAngles.y);
 }
示例#4
0
 void Awake()
 {
     anim = GetComponent<Animator>();
     enemyAudio = GetComponent<AudioSource>();
     hitParticles = GetComponentInChildren<ParticleSystem>();
     capsuleCollider = GetComponent<CapsuleCollider>();
     player = GameObject.FindGameObjectWithTag("Player");
     questManager = player.GetComponent<QuestManager>();
     levelUI = GameObject.FindGameObjectWithTag("Level");
     levelManager = levelUI.GetComponent<LevelManager>();
     gold = GameObject.FindGameObjectWithTag("Gold");
     //  goldManager = gold.GetComponent<GoldManager>();
     currentHealth = startingHealth;
     clientServer = GameObject.FindGameObjectWithTag("ClientServer").GetComponent<ClientServer>();
     myName = GameObject.FindGameObjectWithTag ("MultiplayerManager").GetComponent<MultiplayerManager>().nick;
 }
示例#5
0
 void Start()
 {
     clientServer = GameObject.FindGameObjectWithTag("ClientServer").GetComponent<ClientServer>();
 }