コード例 #1
0
        /// <summary>
        /// Lädt einen Player.
        /// </summary>
        /// <param name="playername">Der Name des Players.</param>
        /// <returns></returns>
        public Player LoadPlayer(string playername)
        {
            if (universe == null)
            {
                throw new Exception("No Universe loaded");
            }

            Player player = persistenceManager.LoadPlayer(universe.Id, playername);

            if (player == null)
            {
                player = new Player();
            }
            return(player);
        }