Inheritance: IDisposable
        public IActionResult Results(string username)
        {
            username = username.Replace("@", string.Empty);
            ThemeSong theme = new ThemeSong(username);
            Track     track = theme.GetThemeSong();

            if (track != null)
            {
                ResultsModel results = new ResultsModel()
                {
                    Username  = username,
                    Track     = track,
                    ListenUrl = "https://open.spotify.com/embed?uri=spotify:album:" + track.album.id + "&theme=white&view=coverart",
                    Sentiment = theme.GetSentiment()
                };
                return(View(results));
            }
            else
            {
                ResultsModel results = new ResultsModel()
                {
                    Username = username
                };
                return(View("Error", results));
            }
        }
    IEnumerator WaitAndLoad()
    {
        yield return(new WaitForSeconds(delayInSeconds));

        // Play song when out of game
        themeSong = FindObjectOfType <ThemeSong>();
        themeSong.PlayStartMenuSong();

        SceneManager.LoadScene(2);
    }
    public void LoadGame()
    {
        // Pause song when in game
        themeSong = FindObjectOfType <ThemeSong>();
        themeSong.PauseStartMenuSong();

        Debug.Log("Load Game Scene");
        SceneManager.LoadScene(1);
        try
        {
            FindObjectOfType <GameSession>().ResetGame();
        }
        catch (Exception e)
        {
            Debug.Log("Just started, no need to reset game");
        }
    }
Beispiel #4
0
    static public void Main()
    {
        var song = new ThemeSong(5);

        Console.WriteLine("{0}", song);
    }
Beispiel #5
0
 public static void Main()
 {
     var song = new ThemeSong(5);
       Console.WriteLine("{0}", song);
 }