示例#1
0
    private void UpdateInfoWord()
    {
        WordLeo word = coreWorkout.GetCurrentWord();

        LevelText.text = word.progress.license.ToString();

        TimeSpan time = word.GetLicenseValidityTime();

        TimeReduceText.text = Utilities.FormatTime(time);

        TimeSpan timeUnlock = word.GetLicenseUnlockForRepeat();

        TimeRepeatText.text = Utilities.FormatTime(timeUnlock);
    }
示例#2
0
        public void GetLicenseValidityTime()
        {
            LicenseLevels level         = LicenseLevels.Level_3;
            int           levelTime     = LicenseTimeout.Level_3;
            int           timeExpiries  = levelTime - 20;
            double        expectedValue = levelTime - timeExpiries;

            WordLeo word = CreateWordLeo(level);

            word.progress.lastRepeat = DateTime.Now - TimeSpan.FromMinutes(timeExpiries);

            double resultValue = RoundTofloat(word.GetLicenseValidityTime().TotalMinutes);

            Assert.AreEqual(expectedValue, resultValue);
        }
示例#3
0
    public void Init(WordLeo word)
    {
        wordImage.sprite         = Utilities.GetSprite(word.pictureURL);
        wordImage.preserveAspect = true;

        levelText.text = word.progress.license.ToString();
        wordText.text  = word.wordValue + " - " + word.translations;
        word.LicenseExpirationCheck();

        TimeSpan time = word.GetLicenseValidityTime();

        TimeReduceText.text = Utilities.FormatTime(time);

        TimeSpan timeUnlock = word.GetLicenseUnlockForRepeat();

        TimeUnlockText.text = Utilities.FormatTime(timeUnlock);

        GetComponent <Transform>().localScale    = Vector3.one;
        GetComponent <Transform>().localPosition = Vector3.zero;
    }