예제 #1
0
    //Check shop based mission status
    void CheckShopBased(MissionTemplate mission, int i)
    {
        mission.ModifyStoredValue(true, 1);
        GUIManager.Instance.UpdateMissionStatus(i, mission.StoredValue(), mission.valueA);

        if (mission.valueA == mission.StoredValue())
        {
            MissionCompleted(mission, i);
            Save();
        }
    }
예제 #2
0
    //Checks Obstalce based mission status
    void CheckObstacleBased(MissionTemplate mission, int i)
    {
        if (mission.goalType == MissionTemplate.GoalType.InOneRun || mission.goalType == MissionTemplate.GoalType.InMultipleRun)
        {
            mission.ModifyStoredValue(true, 1);
            GUIManager.Instance.UpdateMissionStatus(i, mission.StoredValue(), mission.valueA);

            if (mission.valueA == mission.StoredValue())
            {
                MissionCompleted(mission, i);
            }
        }
    }
예제 #3
0
    //Checks Coin based mission status
    void CheckCoinIn(MissionTemplate mission, int number, int i)
    {
        if (mission.goalType == MissionTemplate.GoalType.InOneRun)
        {
            GUIManager.Instance.UpdateMissionStatus(i, number, mission.valueA);

            if (mission.valueA <= number)
            {
                MissionCompleted(mission, i);
            }
        }
        else if (mission.goalType == MissionTemplate.GoalType.InMultipleRun)
        {
            mission.ModifyStoredValue(false, number);
            GUIManager.Instance.UpdateMissionStatus(i, mission.StoredValue(), mission.valueA);

            if (mission.valueA <= mission.StoredValue())
            {
                MissionCompleted(mission, i);
            }
        }
    }
	//Check shop based mission status
	void CheckShopBased(MissionTemplate mission, int i)
	{
		mission.ModifyStoredValue(true, 1);
        GUIManager.Instance.UpdateMissionStatus(i, mission.StoredValue(), mission.valueA);
		
		if (mission.valueA == mission.StoredValue())
		{
			MissionCompleted(mission, i);
			Save();
		}
	}
	//Checks Obstalce based mission status
	void CheckObstacleBased(MissionTemplate mission, int i)
	{
		if (mission.goalType == MissionTemplate.GoalType.InOneRun || mission.goalType == MissionTemplate.GoalType.InMultipleRun)
		{
			mission.ModifyStoredValue(true, 1);
            GUIManager.Instance.UpdateMissionStatus(i, mission.StoredValue(), mission.valueA);
			
			if (mission.valueA == mission.StoredValue())
				MissionCompleted(mission, i);
		}
	}
	//Checks Coin based mission status
	void CheckCoinIn(MissionTemplate mission, int number, int i)
	{
		if (mission.goalType == MissionTemplate.GoalType.InOneRun)
		{
            GUIManager.Instance.UpdateMissionStatus(i, number, mission.valueA);
			
			if (mission.valueA <= number)
				MissionCompleted(mission, i);
		}
		else if (mission.goalType == MissionTemplate.GoalType.InMultipleRun)
		{
			mission.ModifyStoredValue(false, number);
            GUIManager.Instance.UpdateMissionStatus(i, mission.StoredValue(), mission.valueA);
			
			if (mission.valueA <= mission.StoredValue())
				MissionCompleted(mission, i);
		}
	}