2022-02-05 18:06:25 -08:00

310 lines
7.2 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Achievements
{
/// <summary>
/// Contains information about a single achievement definition with localized text.
/// </summary>
public class Definition : ISettable
{
/// <summary>
/// Achievement ID that can be used to uniquely identify the achievement.
/// </summary>
public string AchievementId { get; set; }
/// <summary>
/// Text representing the Name to display in-game when achievement has been unlocked.
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// Text representing the description to display in-game when achievement has been unlocked.
/// </summary>
public string Description { get; set; }
/// <summary>
/// Text representing the name to display in-game when achievement is locked.
/// </summary>
public string LockedDisplayName { get; set; }
/// <summary>
/// Text representing the description of what needs to be done to trigger the unlock of this achievement.
/// </summary>
public string LockedDescription { get; set; }
/// <summary>
/// Text representing the description to display in-game when achievement is hidden.
/// </summary>
public string HiddenDescription { get; set; }
/// <summary>
/// Text representing the description of what happens when the achievement is unlocked.
/// </summary>
public string CompletionDescription { get; set; }
/// <summary>
/// Text representing the icon to display in-game when achievement is unlocked.
/// </summary>
public string UnlockedIconId { get; set; }
/// <summary>
/// Text representing the icon to display in-game when achievement is locked.
/// </summary>
public string LockedIconId { get; set; }
/// <summary>
/// True if achievement is hidden, false otherwise.
/// </summary>
public bool IsHidden { get; set; }
/// <summary>
/// Array of stat thresholds that need to be satisfied to unlock the achievement.
/// </summary>
public StatThresholds[] StatThresholds { get; set; }
internal void Set(DefinitionInternal? other)
{
if (other != null)
{
AchievementId = other.Value.AchievementId;
DisplayName = other.Value.DisplayName;
Description = other.Value.Description;
LockedDisplayName = other.Value.LockedDisplayName;
LockedDescription = other.Value.LockedDescription;
HiddenDescription = other.Value.HiddenDescription;
CompletionDescription = other.Value.CompletionDescription;
UnlockedIconId = other.Value.UnlockedIconId;
LockedIconId = other.Value.LockedIconId;
IsHidden = other.Value.IsHidden;
StatThresholds = other.Value.StatThresholds;
}
}
public void Set(object other)
{
Set(other as DefinitionInternal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct DefinitionInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_AchievementId;
private System.IntPtr m_DisplayName;
private System.IntPtr m_Description;
private System.IntPtr m_LockedDisplayName;
private System.IntPtr m_LockedDescription;
private System.IntPtr m_HiddenDescription;
private System.IntPtr m_CompletionDescription;
private System.IntPtr m_UnlockedIconId;
private System.IntPtr m_LockedIconId;
private int m_IsHidden;
private int m_StatThresholdsCount;
private System.IntPtr m_StatThresholds;
public string AchievementId
{
get
{
string value;
Helper.TryMarshalGet(m_AchievementId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_AchievementId, value);
}
}
public string DisplayName
{
get
{
string value;
Helper.TryMarshalGet(m_DisplayName, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_DisplayName, value);
}
}
public string Description
{
get
{
string value;
Helper.TryMarshalGet(m_Description, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_Description, value);
}
}
public string LockedDisplayName
{
get
{
string value;
Helper.TryMarshalGet(m_LockedDisplayName, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedDisplayName, value);
}
}
public string LockedDescription
{
get
{
string value;
Helper.TryMarshalGet(m_LockedDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedDescription, value);
}
}
public string HiddenDescription
{
get
{
string value;
Helper.TryMarshalGet(m_HiddenDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_HiddenDescription, value);
}
}
public string CompletionDescription
{
get
{
string value;
Helper.TryMarshalGet(m_CompletionDescription, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_CompletionDescription, value);
}
}
public string UnlockedIconId
{
get
{
string value;
Helper.TryMarshalGet(m_UnlockedIconId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_UnlockedIconId, value);
}
}
public string LockedIconId
{
get
{
string value;
Helper.TryMarshalGet(m_LockedIconId, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_LockedIconId, value);
}
}
public bool IsHidden
{
get
{
bool value;
Helper.TryMarshalGet(m_IsHidden, out value);
return value;
}
set
{
Helper.TryMarshalSet(ref m_IsHidden, value);
}
}
public StatThresholds[] StatThresholds
{
get
{
StatThresholds[] value;
Helper.TryMarshalGet<StatThresholdsInternal, StatThresholds>(m_StatThresholds, out value, m_StatThresholdsCount);
return value;
}
set
{
Helper.TryMarshalSet<StatThresholdsInternal, StatThresholds>(ref m_StatThresholds, value, out m_StatThresholdsCount);
}
}
public void Set(Definition other)
{
if (other != null)
{
m_ApiVersion = AchievementsInterface.DefinitionApiLatest;
AchievementId = other.AchievementId;
DisplayName = other.DisplayName;
Description = other.Description;
LockedDisplayName = other.LockedDisplayName;
LockedDescription = other.LockedDescription;
HiddenDescription = other.HiddenDescription;
CompletionDescription = other.CompletionDescription;
UnlockedIconId = other.UnlockedIconId;
LockedIconId = other.LockedIconId;
IsHidden = other.IsHidden;
StatThresholds = other.StatThresholds;
}
}
public void Set(object other)
{
Set(other as Definition);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_AchievementId);
Helper.TryMarshalDispose(ref m_DisplayName);
Helper.TryMarshalDispose(ref m_Description);
Helper.TryMarshalDispose(ref m_LockedDisplayName);
Helper.TryMarshalDispose(ref m_LockedDescription);
Helper.TryMarshalDispose(ref m_HiddenDescription);
Helper.TryMarshalDispose(ref m_CompletionDescription);
Helper.TryMarshalDispose(ref m_UnlockedIconId);
Helper.TryMarshalDispose(ref m_LockedIconId);
Helper.TryMarshalDispose(ref m_StatThresholds);
}
}
}