/// <summary>
        /// Get a tip to show on screen for entering/exiting.
        /// </summary>
        /// <param name="transitionType">Transition in action.</param>
        /// <returns>Tip</returns>
        private string GetTip(PlayerEnterExit.TransitionType transitionType)
        {
            SetSeed();
            const int maxValue = 5;

            switch (Random.Range(0, maxValue))
            {
            case 0:
                // Generic tips
                return(RandomTip(tips.generic));

            case 1:
                // Based on player informations
                return(RandomTip(PlayerTips()));

            case 2:
                // Scaled on level
                int playerLevel = GameManager.Instance.PlayerEntity.Level;
                return(RandomTip(ScaledTips(playerLevel)));

            default:
                // Location
                bool inDungeon = (transitionType == PlayerEnterExit.TransitionType.ToDungeonInterior);
                return(RandomTip(LocationTips(inDungeon)));
            }
        }
Exemple #2
0
        IEnumerator Loading(PlayerEnterExit.TransitionType transitionType)
        {
            yield return(new WaitUntil(() => loading == false));

            Reset();

            if (transitionType == PlayerEnterExit.TransitionType.ToBuildingInterior ||
                transitionType == PlayerEnterExit.TransitionType.ToDungeonInterior)
            {
                CheckInterior();
            }
            else
            {
                inPlayerHome         = false;
                inPlayerShip         = false;
                inPlayerShipExterior = false;
            }
        }