private void Update() { moveSpeed = SpriteShop.enemySpeed / 100f; if (location.x >= endPoint) { FindPlayArea.setLaser1Bounds(); } location.x += moveSpeed; base.transform.position = location; }
private void Start() { rb2d = GetComponent <Rigidbody2D>(); laser1 = GetComponent <RectTransform>(); scoreBehaviour = GetComponent <ScoreBehaviour>(); spShop = GetComponent <SpriteShop>(); findPlayArea = GetComponent <FindPlayArea>(); location = base.transform.position; FindPlayArea.setLaser1Bounds(); }