// Update is called once per frame void Update() { string name = song.GetSongName(); if (string.IsNullOrEmpty(name)) { infoText.text = "NULL SONG NAME"; } else { infoText.text = name; } }
private bool isFinished = false; // any balls left to update /*+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= * INITIALIZE *+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=*/ public void Initialize(Game game, SongController song, Track track) { // REFERENCES this.game = game; this.song = song; this.track = track; // SONG ballMapName = song.GetSongName(); // PREFABS simpleBall = Resources.Load("Prefabs/SimpleBall") as GameObject; bounceBall = Resources.Load("Prefabs/BounceBall") as GameObject; // EVENTS song.onSongFastForward += FastForwardBalls; song.onSongRewind += RewindBalls; game.onGameRestart += Restart; // POINTERS currentBallIndex = 0; // ATTRIBUTES ballAxis = Vector3.forward; size = track.columnWidth; fallAxisBounds = track.GetBoundsFallAxis(); SetSpawnLocation(); // LAG ADJUSTMENT if (lagAmount != 0.0f) { Debug.LogWarning("BallDropper initialized with " + lagAmount + "sec. of lag"); } LoadBalls(); if (debugBalls) { DebugLoadedBalls(); } // balls not instantiated yet CalcMoveTimes(); }