void Start() { spawnDelay = spawnDelayStart; timeSinceLastSpawn = spawnDelayStart - 1f; gm = GameObject.Find("Dennis Game Manager").GetComponent <DennisGameManager> (); }
void Start() { rb = GetComponent <Rigidbody> (); meshRenderer = GetComponentInChildren <MeshRenderer> (); gm = GameObject.Find("Dennis Game Manager").GetComponent <DennisGameManager> (); // Target the player's position. targetPos = GameObject.FindGameObjectWithTag("Player").transform.position; targetDir = targetPos - transform.position; targetDir.Normalize(); transform.rotation = Quaternion.Euler(targetDir); }
void Start() { health = maxHealth; noiseOffset = Random.Range(-100f, 100f); nextShotTime = Random.Range(minShotTime, maxShotTime); timeSinceLastShot = 0.0f; gm = GameObject.Find("Dennis Game Manager").GetComponent <DennisGameManager> (); rb = GetComponent <Rigidbody> (); }
void Start() { gm = GameObject.Find("Dennis Game Manager").GetComponent <DennisGameManager> (); timeSinceLastShot = fireRate; rb = GetComponent <Rigidbody> (); animator = GetComponent <Animator> (); gunTip = GameObject.Find("Gun Tip").transform; audioOn = false; }