Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class EnemyLineMovement : MonoBehaviour
- {
- [SerializeField] private float _enemySpeed;
- [SerializeField] private SpawnOnWayPoints _spawnOnWayPoints;
- // Start is called before the first frame update
- void Start()
- {
- _spawnOnWayPoints = GameObject.Find("SpawnOnWayPoints").GetComponent<SpawnOnWayPoints>();
- }
- // Update is called once per frame
- void Update()
- {
- transform.Translate(Vector3.down * _enemySpeed * Time.deltaTime);
- if (transform.position.y <= -9.01)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement