Archived
forked from RDTKEditor/RDTKEditor
添加对 Core 的直接引用
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
namespace RhythmBase.Components.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a custom condition with an expression.
|
||||
/// </summary>
|
||||
public class CustomCondition : BaseConditional
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CustomCondition"/> class.
|
||||
/// </summary>
|
||||
public CustomCondition()
|
||||
{
|
||||
Type = ConditionType.Custom;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the expression for the custom condition.
|
||||
/// </summary>
|
||||
/// <value>The expression as a string.</value>
|
||||
public string Expression { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the condition.
|
||||
/// </summary>
|
||||
/// <value>The type of the condition, which is <see cref="BaseConditional.ConditionType.Custom"/>.</value>
|
||||
public override ConditionType Type { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using Newtonsoft.Json;
|
||||
namespace RhythmBase.Components.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a condition based on the game language.
|
||||
/// </summary>
|
||||
public class LanguageCondition : BaseConditional
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LanguageCondition"/> class.
|
||||
/// </summary>
|
||||
public LanguageCondition()
|
||||
{
|
||||
Type = ConditionType.Language;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the game language.
|
||||
/// </summary>
|
||||
[JsonProperty(nameof(Language))]
|
||||
public Languages Language
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the condition.
|
||||
/// </summary>
|
||||
public override ConditionType Type { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents the supported game languages.
|
||||
/// </summary>
|
||||
public enum Languages
|
||||
{
|
||||
/// <summary>
|
||||
/// English language.
|
||||
/// </summary>
|
||||
English,
|
||||
|
||||
/// <summary>
|
||||
/// Spanish language.
|
||||
/// </summary>
|
||||
Spanish,
|
||||
|
||||
/// <summary>
|
||||
/// Portuguese language.
|
||||
/// </summary>
|
||||
Portuguese,
|
||||
|
||||
/// <summary>
|
||||
/// Simplified Chinese language.
|
||||
/// </summary>
|
||||
ChineseSimplified,
|
||||
|
||||
/// <summary>
|
||||
/// Traditional Chinese language.
|
||||
/// </summary>
|
||||
ChineseTraditional,
|
||||
|
||||
/// <summary>
|
||||
/// Korean language.
|
||||
/// </summary>
|
||||
Korean,
|
||||
|
||||
/// <summary>
|
||||
/// Polish language.
|
||||
/// </summary>
|
||||
Polish,
|
||||
|
||||
/// <summary>
|
||||
/// Japanese language.
|
||||
/// </summary>
|
||||
Japanese,
|
||||
|
||||
/// <summary>
|
||||
/// German language.
|
||||
/// </summary>
|
||||
German
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
namespace RhythmBase.Components.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a condition based on the last hit in a rhythm game.
|
||||
/// </summary>
|
||||
public class LastHitCondition : BaseConditional
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LastHitCondition"/> class.
|
||||
/// </summary>
|
||||
public LastHitCondition()
|
||||
{
|
||||
Type = ConditionType.LastHit;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the condition.
|
||||
/// </summary>
|
||||
public override ConditionType Type { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the row where the last hit occurred.
|
||||
/// </summary>
|
||||
public sbyte Row { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the result that determines under what condition the event will be executed.
|
||||
/// </summary>
|
||||
public HitResult Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Defines the possible results of a hit.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum HitResult
|
||||
{
|
||||
/// <summary>
|
||||
/// The hit was perfect.
|
||||
/// </summary>
|
||||
Perfect = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The hit was slightly early.
|
||||
/// </summary>
|
||||
SlightlyEarly = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The hit was slightly late.
|
||||
/// </summary>
|
||||
SlightlyLate = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The hit was very early.
|
||||
/// </summary>
|
||||
VeryEarly = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The hit was very late.
|
||||
/// </summary>
|
||||
VeryLate = 5,
|
||||
|
||||
/// <summary>
|
||||
/// The hit was either slightly early or slightly late.
|
||||
/// </summary>
|
||||
AnyEarlyOrLate = 7,
|
||||
|
||||
/// <summary>
|
||||
/// The hit was missed.
|
||||
/// </summary>
|
||||
Missed = 15
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
namespace RhythmBase.Components.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a condition based on the player mode.
|
||||
/// </summary>
|
||||
public class PlayerModeCondition : BaseConditional
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PlayerModeCondition"/> class.
|
||||
/// </summary>
|
||||
public PlayerModeCondition()
|
||||
{
|
||||
Type = ConditionType.PlayerMode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether two-player mode is enabled.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if two-player mode is enabled; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool TwoPlayerMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the condition.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The type of the condition.
|
||||
/// </value>
|
||||
public override ConditionType Type { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace RhythmBase.Components.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a condition based on the number of times it has been executed.
|
||||
/// </summary>
|
||||
public class TimesExecutedCondition : BaseConditional
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TimesExecutedCondition"/> class.
|
||||
/// </summary>
|
||||
public TimesExecutedCondition()
|
||||
{
|
||||
Type = ConditionType.TimesExecuted;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of executions allowed.
|
||||
/// </summary>
|
||||
public int MaxTimes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the condition.
|
||||
/// </summary>
|
||||
public override ConditionType Type { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user