// Start is called before the first frame update void Start() { scale = Random.Range(minScale, maxScale); transform.localScale = new Vector3(scale, scale, scale); baseBehaviour = gameObject.GetComponent <EnemyBaseBehaviour>(); gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>(); }
// Start is called before the first frame update void Start() { visibleRenderer = transform.Find("Mesh").GetComponent <Renderer>(); invisibleRenderer = transform.Find("InvisibleMesh").GetComponent <Renderer>(); visibleRenderer.enabled = true; invisibleRenderer.enabled = false; nextTime = Time.time + visibilityInterval; baseBehaviour = gameObject.GetComponent <EnemyBaseBehaviour>(); }
// Use this for initialization void Start() { player = GameObject.FindWithTag("Player").GetComponent <PlayerController>(); baseBehaviour = gameObject.GetComponent <EnemyBaseBehaviour>(); gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>(); }