// Use this for initialization public void Awake() { currentSkillFlags = new Dictionary <string, float>(); unitRenderer = GetComponentsInChildren <Renderer>(); if (gameObject.tag.Contains(vars.enemy_tag)) { //setRenderer(false); } uiManager = GameObject.Find(vars.ui_manager_name).GetComponent <ui_manager>(); unitNavMeshAgent = GetComponent <NavMeshAgent>(); unitAnimator = GetComponent <Animator>(); if (unitGroup != null) { setAttributesFromGroup(); } isUnitDisabled = false; unitCombatTarget = null; if (unitRange.myCollider != null) { unitRange.myCollider.radius = unitCurrentVisionrange; } unitTransform = this.transform; unitRadius = unitNavMeshAgent.radius + 1; }
// Start is called before the first frame update void Start() { transform.position = new Vector3(0, -2.5f, 0); _spawnManager = GameObject.Find("Spawn Enemy").GetComponent <SpawnManager>(); UIManager = GameObject.Find("Canvas").GetComponent <ui_manager>(); _gameManager = GameObject.Find("Game Manager").GetComponent <Game_Manager>(); _audioSource = GetComponent <AudioSource>(); if (_spawnManager == null) { Debug.LogError("The _spawnManager is null"); } if (UIManager == null) { Debug.LogError("UI Manager is NULL"); } }
// is tripleshot enabled // Start is called before the first frame update void Start() { //take the current position=new position(0,0,0) transform.position = new Vector3(2, -1, 0); _SpawnManager = GameObject.Find("SpawnManager").GetComponent <SpawnManager>(); if (_SpawnManager == null) { Debug.Log("did not grab properly"); } _ui_Manager = GameObject.Find("Canvas").GetComponent <ui_manager>(); _audioSource = GetComponent <AudioSource>(); if (_ui_Manager == null) { Debug.LogError("the ui manager is null"); } if (_audioSource == null) { Debug.LogError("the audio source is null"); } else { _audioSource.clip = _laserSound; } }
// Use this for initialization public void Awake() { currentSkillFlags = new Dictionary<string, float>(); unitRenderer = GetComponentsInChildren<Renderer>(); if(gameObject.tag.Contains(vars.enemy_tag)) { //setRenderer(false); } uiManager = GameObject.Find(vars.ui_manager_name).GetComponent<ui_manager>(); unitNavMeshAgent = GetComponent<NavMeshAgent>(); unitAnimator = GetComponent<Animator>(); if(unitGroup != null) { setAttributesFromGroup(); } isUnitDisabled = false; unitCombatTarget = null; if(unitRange.myCollider != null) { unitRange.myCollider.radius = unitCurrentVisionrange; } unitTransform = this.transform; unitRadius = unitNavMeshAgent.radius + 1; }
private void Awake() { instance = this; }
public void Start() { selectTier(1); if(!baseManager) { baseManager = GameObject.Find (vars.base_name).GetComponent<base_manager>(); } if(!uiManager) { uiManager = GameObject.Find (vars.ui_manager_name).GetComponent<ui_manager>(); } }