Ejemplo n.º 1
0
        protected void Update()
        {
            MovementService.TranslateObjectVertically(this.gameObject, verticalDirection, minSpeed);
            MovementService.TranslateObjectHorizontally(this.gameObject, horizontalDirection, minSpeed);

            SetSpriteDirection();
        }
Ejemplo n.º 2
0
        private void Update()
        {
            if (Vector2.Distance(this.transform.position, player.position) <= 1.3f)
            {
                GetPrize();
            }

            MovementService.TranslateObjectVertically(this.gameObject, 1, speed);

            if (this.transform.position.y > topCollider.transform.position.y)
            {
                DeactivatePrize();
            }
        }