45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Shared._EstacaoPirata.Cards.Card;
|
|
|
|
/// <summary>
|
|
/// This is used for...
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class CardComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The back of the card
|
|
/// </summary>
|
|
[DataField(readOnly: true)]
|
|
public List<SpriteSpecifier> BackSprite = [];
|
|
|
|
/// <summary>
|
|
/// The front of the card
|
|
/// </summary>
|
|
[DataField(readOnly: true)]
|
|
public List<SpriteSpecifier> FrontSprite = [];
|
|
|
|
/// <summary>
|
|
/// If it is currently flipped. This is used to update sprite and name.
|
|
/// </summary>
|
|
[DataField(readOnly: true), AutoNetworkedField]
|
|
public bool Flipped = false;
|
|
|
|
|
|
/// <summary>
|
|
/// The name of the card.
|
|
/// </summary>
|
|
[DataField(readOnly: true), AutoNetworkedField]
|
|
public string Name = "";
|
|
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CardFlipUpdatedEvent(NetEntity card) : EntityEventArgs
|
|
{
|
|
public NetEntity Card = card;
|
|
}
|