Esempio n. 1
0
        public void SaveStarTypeForLevel(int level, StarTypes type, bool completed)
        {
            int complete = 0;

            if (completed)
            {
                complete = 1;
            }

            PlayerPrefs.SetInt("Level" + level + "Star" + type, complete);
        }
    protected override float GetStarProbabilityModifier(StarTypes starType)
    {
        switch (starType)
        {
        case StarTypes.White:
            return(3.0f);

        default:
            return(0);
        }
    }
Esempio n. 3
0
        public bool CheckForStar(StarTypes starType)
        {
            bool result = false;

            switch (starType)
            {
            case StarTypes.COMPLETED: result = completed; Debug.Log("compled this level"); break;

            case StarTypes.ALLKILL: result = (killCount == totalEnemyInLevel); break;

            case StarTypes.NOKILL: result = noKill; break;

            case StarTypes.PICKBRIEFCASE: result = briefCase; break;

            case StarTypes.PLAYERMOVES: result = playerMoves < maxPlayerMoves; break;

            case StarTypes.KILLDOGS: result = killalldogs; break;

            case StarTypes.NOKILLDOGS: result = killnodogs; break;
            }
            return(result);
        }
Esempio n. 4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="starType"></param>
 /// <param name="value"></param>
 public void SetStar(StarTypes starType, int value)
 {
     if (starType == StarTypes.Collection)
         mCollectableStars = value;
     else if (starType == StarTypes.Death)
         mDeathStars = value;
     else
         mTimeStars = value;
 }
Esempio n. 5
0
        /// <summary>
        /// Gets the star.
        /// </summary>
        /// <param name="starType">Type of the star.</param>
        /// <returns></returns>
        public int GetStar(StarTypes starType)
        {
            int starCount = 0;

            if (starType == StarTypes.Collection)
                starCount = mCollectableStars = Math.Max(mCollectableStars, Level.CollectionStar);
            else if (starType == StarTypes.Death)
                starCount = mDeathStars = Math.Max(mDeathStars, Level.DeathStar);
            else
                starCount = mTimeStars = Math.Max(mTimeStars, Level.TimerStar);

            return starCount;
        }
Esempio n. 6
0
 /// <summary>
 /// Gets the goal.
 /// </summary>
 /// <param name="starType">Type of the star.</param>
 /// <returns></returns>
 public int GetGoal(StarTypes starType)
 {
     if (starType == StarTypes.Collection)
         return mGoalCollectable;
     else if (starType == StarTypes.Death)
         return 0;
     else
         return mGoalTime;
 }
Esempio n. 7
0
 public bool ReadStarTypeForLevel(int level, StarTypes type)
 {
     return(saveController.ReadStarTypeForLevel(level, type));
 }
Esempio n. 8
0
 public void SaveStarTypeForLevel(int level, StarTypes type, bool completed)
 {
     saveController.SaveStarTypeForLevel(level, type, completed);
 }
Esempio n. 9
0
 public bool ReadStarTypeForLevel(int level, StarTypes type)
 {
     return(PlayerPrefs.GetInt("Level" + level + "Star" + type, 0) == 1);
 }
Esempio n. 10
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="starType"></param>
 /// <param name="value"></param>
 public void SetStar(StarTypes starType, int value)
 {
     if (starType == StarTypes.Collection)
         CollectStar = value;
     else if (starType == StarTypes.Death)
         DeathStar = value;
     else
         TimerStar = value;
 }
Esempio n. 11
0
        /// <summary>
        /// Gets the star.
        /// </summary>
        /// <param name="starType">Type of the star.</param>
        /// <returns></returns>
        public int GetStar(StarTypes starType)
        {
            var starCount = 0;

            if (starType == StarTypes.Collection)
                starCount = CollectStar = Math.Max(CollectStar, Level.CollectionStar);
            else if (starType == StarTypes.Death)
                starCount = DeathStar = Math.Max(DeathStar, Level.DeathStar);
            else
                starCount = TimerStar = Math.Max(TimerStar, Level.TimerStar);

            return starCount;
        }
Esempio n. 12
0
 public Star(string name, int radius = 20, StarTypes type = StarTypes.Yellow)
     : base(name, radius)
 {
     Type = type;
 }
 protected abstract float GetStarProbabilityModifier(StarTypes starType);
 public float GetStarProbability(StarTypes starType)
 {
     return(_baseProbabilities[starType] + GetStarProbabilityModifier(starType));
 }