2025-05-18 01:04:31 +08:00

65 lines
1.4 KiB
C#

// ***********************************************************************
// Assembly : Unity
// Author : Kimch
// Created :
//
// Last Modified By : Kimch
// Last Modified On :
// ***********************************************************************
// <copyright file= "TutorialCondition" company=""></copyright>
// <summary></summary>
// ***********************************************************************
namespace G
{
using System.Collections.Generic;
public sealed class TutorialCondition
{
private readonly ItemTutorialCondition _item;
#region Property
public ItemTutorialCondition item => _item;
public int id => _item.id;
public int type => _item.type;
public int target => _item.target;
#endregion
public TutorialCondition(ItemTutorialCondition item)
{
_item = item;
}
#region Method
/// <summary>
/// 获取结果
/// </summary>
/// <returns></returns>
public bool GetResult(int value)
{
if (this.type == 10)
{
var mission = MissionProxy.Instance.GetMission(this.target);
if (mission == null || mission.isCompleted)
return true;
else return false;
}
else if (this.type == 9)
{
var mission = MissionProxy.Instance.GetMission(this.target);
if (mission == null || mission.isCompleted)
return false;
else return true;
}
else
return this.target == value;
}
#endregion
}
}