private void OnMouseDown() { int sparkPrice = economyManager.BuySpark(); if (sparkPrice != 0) { SparkController spark = Instantiate(sparkPrefab, spawnPoint.position, Quaternion.identity); spark.SetEnergy(sparkPrice); spark.track = track; spark.transform.tag = "PlayerSpark"; } }