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