Beispiel #1
0
    public void PerformActivity(int activityNumber)
    {
        // check reqs
        IActivity activity = allActivities[activityNumber];

        if (activity.AreRequirementsFulfilled(TutorialSlotManager.instance.GetCurrentReelModels()))
        {
            ActivityButton activityButton = activityButtons[activityNumber];
            if (activityButton.isActivated)
            {
                if (!activityButton.isCompleted)
                {
                    if (!activityButton.isRepeatable)
                    {
                        activityButtons[activityNumber].SetToComplete();
                    }

                    activity.PerformActivity();
                }
            }
        }
        else
        {
            ActivityButton activityButton = activityButtons[activityNumber];
            if (!activityButton.isCompleted)
            {
                activity.FailActivity();
            }
        }
    }