Ejemplo n.º 1
0
        public void RequirementUpdated()
        {
            if (!ACHIEVEMENT_PROGRESS_ENABLED)
            {
                return;
            }
            //Don't bother checking if the achievement is already finished
            if (State == State.Completed)
            {
                return;
            }
            var nState = Req.EvalState();

            if (nState <= State)
            {
                return;
            }
            Log.Unity($"Achievement {Key} progressed from {State} to {nState}");
            State = nState;
            SendCallbacks();
            AchievementStateUpdated.Publish(this);
        }