private void Update() { if (!MinigameManager.IsPaused) { Vector3 vector = new Vector3((0f - Time.deltaTime) * m_scrollingData.CurrentSpeedFor(ScrollingLayer), 0f, 0f); base.transform.position += vector; } }
public virtual void MinigameUpdate(float _deltaTime) { if (m_speedData.ScrollingEnabled) { float num = m_speedData.CurrentSpeedFor(mg_jr_SpriteDrawingLayers.DrawingLayers.BOTTOM_BORDER); float units = num * _deltaTime; float num2 = m_balance.UnitsToMeters(units); DistanceTravelledThisRun += num2; DistanceTravelledThisRunAfterPenalties += num2; m_distanceTravelledSession += num2; DistanceTravelledInEnvironment += num2; m_goalManager.AddToProgress(mg_jr_Goal.GoalType.DISTANCE_TRAVELLED, num2); } }
public virtual void MinigameUpdate(float _deltaTime) { float num = m_scrollingSpeed.CurrentSpeedFor(DrawingLayer); float num2 = num * _deltaTime; for (int i = 0; i < m_activeSprites.Count; i++) { m_activeSprites[i].transform.Translate(Vector3.left * num2); } SpriteRenderer spriteRenderer = m_activeSprites[0]; float x = spriteRenderer.bounds.max.x; if (x < m_leftScreenEdgeInWorld) { m_activeSprites.RemoveAt(0); Object.Destroy(spriteRenderer.gameObject); AddRandomSpriteToQueue(); } }