// private AudioSource aud; private void Start() { enemyHurt = GetComponentInParent <EnemyHurt>(); enemyLife = GetComponentInParent <EnemyLife>(); enemiIA = GetComponentInParent <EnemiIA>(); // aud = GetComponent<AudioSource>(); }
private void Start() { enemyHurt = GetComponentInParent <EnemyHurt>(); enemyType = GetComponentInParent <EnemieType>(); uiController = FindObjectOfType <UIController>(); groundCheck = GetComponentInChildren <GroundCheck>(); ballTrue = true; // Carlos Mod enemiIA = GetComponentInParent <EnemiIA>(); aud = GetComponent <AudioSource>(); }
void CreateEnemy() { Transform spawnPoint = spawnPoints[Random.Range(0, spawnPoints.Count)]; // Debug.Log("spawning enemy : " + enemyID); GameObject enemyObj = Instantiate(EnemyPrefab, spawnPoint); enemyObj.transform.localPosition = Vector3.zero; EnemyHurt enemyHurt = enemyObj.GetComponent <EnemyHurt>(); enemyHurt.master = master; EnemyMotor motor = enemyObj.GetComponent <EnemyMotor>(); motor.master = master; motor.bulletSpeedMulti += levelData.bulletSpeedIncrease.Evaluate(Time.time); motor.bulletIntervalMulti = levelData.bulletIntervalMulti.Evaluate(Time.time); enemyID++; }
// Use this for initialization void Start () { plScript = FindObjectOfType (typeof(Player)) as Player; enScript = FindObjectOfType (typeof(EnemyHurt)) as EnemyHurt; wpScript = FindObjectOfType (typeof(WeaponPower)) as WeaponPower; }
// Use this for initialization void Start () { enScript = FindObjectOfType (typeof(EnemyHurt)) as EnemyHurt; ps = FindObjectOfType (typeof(Player)) as Player; enmHealth = 6 - enScript.enemyHealth; weaponPow.text = "Weapon Power: " + enmHealth; }