Beispiel #1
0
    public Type GetNextActivityType(MissionScore score, Percentage newScore, ActivityResult newActivityResult, P p)
    {
        if (newActivityResult == null)
        {
            return(score.GetCurrentActivity());
        }

        var previousActivity = newActivityResult.ActivityType;


        var scoreBasedActivity = previousActivity;

        if (newScore >= Percentage.OneHundred)
        {
            var nextNode = _activityOrder.Find(previousActivity).Next;
            if (nextNode == null)
            {
                //nextNode = _activityOrder.Last;
                return(HackToShowActivityTransitionAtTheEnd());
            }

            scoreBasedActivity = nextNode.Value;
        }
        else if (newScore <= Percentage.Zero)
        {
            var previousNode = _activityOrder.Find(previousActivity).Previous;
            if (previousNode == null)
            {
                previousNode = _activityOrder.First;
            }

            scoreBasedActivity = previousNode.Value;
        }

        return(scoreBasedActivity);
    }
Beispiel #2
0
    Activity CreateStartActivity(MissionScore score)
    {
        var type = score.GetCurrentActivity();

        return(Instantiate(type, _groupFactory.GetGroup1(), ActivityDifficulty.Normal));
    }