// Update is called once per frame void Update() { transform.position += new Vector3(speed, 0, 0); if (transform.position.x >= FinishX) { sriteset.NextSprite(); SetStartPositionAndScale(); } }
// Update is called once per frame void Update() { sriteset.sr.sortingOrder = 0; { transform.position += new Vector3(0, -speed, 0); if (transform.position.y <= 0) { sriteset.NextSprite(); SetStartPositionAndScale(); } } }
private void RestartNext() { sriteset.NextSprite(); SetStartPositionAndScale(); game.EarnCoins(); }