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"); }
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); }
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; }
void Start() { clientServer = GameObject.FindGameObjectWithTag("ClientServer").GetComponent<ClientServer>(); }