Esempio n. 1
0
        /**
         * <summary>Finds the appropriate PlayerStart to refer to, based on the last scene's conditions, and sets the Player there</summary>
         * <param name = "onlySetCamera">If True, then the Player will not be moved - and only the camera will be switched to, if one was assigned</param>
         **/
        public void AssignPlayerStart()
        {
            PlayerStart playerStart = GetPlayerStart(KickStarter.saveSystem.CurrentPlayerID);

            if (playerStart != null)
            {
                playerStart.PlacePlayerAt();
            }
            else if (KickStarter.player != null)
            {
                ACDebug.LogWarning("No default PlayerStart was found.  The Player and camera may not be set up correctly until one is defined in the Scene Manager.");
            }
        }