// Start is called before the first frame update void Start() { if (ui is null) { ui = GameObject.Find("UIMaster").GetComponent <UIMiddleman>(); } }
private bool killZed = false; // has already been killed due to Z val // Start is called before the first frame update void Start() { health = maxHealth; speed = maxSpeed; if (ui is null) { ui = GameObject.Find("UIMaster").GetComponent <UIMiddleman>(); } if (lvl == null || lvl.Equals(default(ILevelScript))) { Component[] temp = GameObject.Find("LevelMaster").GetComponents(typeof(Component)); foreach (Component c in temp) { if (c is ILevelScript) { lvl = c as ILevelScript; break; } } } // Instantiate health bar UI Slider healthBar = Instantiate(healthBarPrefab).GetComponent <EnemyHPUI>(); healthBar.transform.SetParent(GameObject.Find("UIPanel").transform, false); hbTransform = healthBar.GetComponent <RectTransform>(); UpdateHealthBarLocation(); // Set up RB and player rb = GetComponent <Rigidbody>(); if (!player) { player = GameObject.Find("PlayerMaster").transform; } }
// Start is called before the first frame update void Start() { if (uiMiddleMan is null) { uiMiddleMan = GameObject.Find("UIMaster").GetComponent <UIMiddleman>(); } parent = GameObject.Find("PlayerMaster"); pCollider = GameObject.Find("PCollider"); grappleFinder = GetComponentInChildren <GrappleFinder>(); }
// Start is called before the first frame update void Start() { if (ui is null) { ui = GameObject.Find("UIMaster").GetComponent <UIMiddleman>(); } pc = GetComponent <PlayerController>(); health = maxHealth; StartCoroutine("CoolDownHeatRepeating", 0.1f); }
// Start is called before the first frame update void Start() { if (ui is null) { ui = GameObject.Find("UIMaster").GetComponent <UIMiddleman>(); } player = playerMaster.GetComponent <Player>(); m_Rigidbody = GetComponent <Rigidbody>(); //attackTrigger.SetActive(false); }
// Start is called before the first frame update void Start() { if (ui is null) { ui = GameObject.Find("UIMaster").GetComponent <UIMiddleman>(); } player = playerMaster.GetComponent <Player>(); m_Rigidbody = GetComponent <Rigidbody>(); bladeDefaultPos = blade.transform.localPosition; //attackTrigger.SetActive(false); }
// Start is called before the first frame update void Start() { if (ui is null) { ui = GameObject.Find("UIMaster").GetComponent <UIMiddleman>(); } if (mainAudio is null || mainAudio == null) { mainAudio = GameObject.Find("MainAudio").GetComponent <AudioSource>(); } if (spawners.Length == 0) { spawners = FindObjectsOfType <Spawner>(); } }