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); } }
private void OnTriggerEnter2D(Collider2D other) { if (!base.enabled) { return; } mg_jr_Obstacle component = other.GetComponent <mg_jr_Obstacle>(); if (component != null) { component.Explode(); m_goalManager.AddToProgress(mg_jr_Goal.GoalType.DESTROY_OBSTACLES, 1f); if (this.ObstacleDestroyed != null) { this.ObstacleDestroyed(component.CoinValue); } } }