Class CharacterType
Namespace: DiceRolling.Characters
Assembly: dice-rolling.dll
Representa um tipo de personagem no jogo e inclui suas informações, atributos, ações, recursos visuais, localização e papel. Esta classe também fornece métodos para inicializar e gerenciar esses aspectos.
[Tool]
[GlobalClass]
[ScriptPath("res://features/Character/CharacterType.cs")]
public class CharacterType : IdentifiableResource, IDisposable, ICharacter, IIdentifiable, ICharacterInformationSheet, ICharacterAssetSheet, ICharacterActionSheet, ICharacterAttributeSheet, ICharacterPlacementSheet
Inheritance
object ← GodotObject ← RefCounted ← Resource ← IdentifiableResource ← CharacterType
Implements
IDisposable,
ICharacter,
IIdentifiable,
ICharacterInformationSheet,
ICharacterAssetSheet,
ICharacterActionSheet,
ICharacterAttributeSheet,
ICharacterPlacementSheet
Inherited Members
Show/Hide Inherited Members
IdentifiableResource.Id,
IdentifiableResource.GenerateNewIdButton,
IdentifiableResource.GenerateNewId(),
IdentifiableResource._ValidateProperty(Dictionary),
Resource._GetRid(),
Resource._ResetState(),
Resource._SetPathCache(string),
Resource._SetupLocalToScene(),
Resource.TakeOverPath(string),
Resource.SetPathCache(string),
Resource.GetRid(),
Resource.GetLocalScene(),
Resource.SetupLocalToScene(),
Resource.ResetState(),
Resource.SetIdForPath(string, string),
Resource.GetIdForPath(string),
Resource.IsBuiltIn(),
Resource.GenerateSceneUniqueId(),
Resource.EmitChanged(),
Resource.Duplicate(bool),
Resource.EmitSignalChanged(),
Resource.EmitSignalSetupLocalToSceneRequested(),
Resource.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant),
Resource.HasGodotClassMethod(in godot_string_name),
Resource.HasGodotClassSignal(in godot_string_name),
Resource.ResourceLocalToScene,
Resource.ResourcePath,
Resource.ResourceName,
Resource.ResourceSceneUniqueId,
Resource.Changed,
Resource.SetupLocalToSceneRequested,
RefCounted.InitRef(),
RefCounted.Reference(),
RefCounted.Unreference(),
RefCounted.GetReferenceCount(),
RefCounted.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant),
RefCounted.HasGodotClassMethod(in godot_string_name),
RefCounted.HasGodotClassSignal(in godot_string_name),
GodotObject.NotificationPostinitialize,
GodotObject.NotificationPredelete,
GodotObject.NotificationExtensionReloaded,
GodotObject.InstanceFromId(ulong),
GodotObject.IsInstanceIdValid(ulong),
GodotObject.IsInstanceValid(GodotObject?),
GodotObject.WeakRef(GodotObject?),
GodotObject.Dispose(),
GodotObject.Dispose(bool),
GodotObject.ToString(),
GodotObject.ToSignal(GodotObject, StringName),
GodotObject._Get(StringName),
GodotObject._GetPropertyList(),
GodotObject._IterGet(Variant),
GodotObject._IterInit(Array),
GodotObject._IterNext(Array),
GodotObject._Notification(int),
GodotObject._PropertyCanRevert(StringName),
GodotObject._PropertyGetRevert(StringName),
GodotObject._Set(StringName, Variant),
GodotObject._ValidateProperty(Dictionary),
GodotObject.Free(),
GodotObject.GetClass(),
GodotObject.IsClass(string),
GodotObject.Set(StringName, Variant),
GodotObject.Get(StringName),
GodotObject.SetIndexed(NodePath, Variant),
GodotObject.GetIndexed(NodePath),
GodotObject.GetPropertyList(),
GodotObject.GetMethodList(),
GodotObject.PropertyCanRevert(StringName),
GodotObject.PropertyGetRevert(StringName),
GodotObject.Notification(int, bool),
GodotObject.GetInstanceId(),
GodotObject.SetScript(Variant),
GodotObject.GetScript(),
GodotObject.SetMeta(StringName, Variant),
GodotObject.RemoveMeta(StringName),
GodotObject.GetMeta(StringName, Variant),
GodotObject.HasMeta(StringName),
GodotObject.GetMetaList(),
GodotObject.AddUserSignal(string, Array),
GodotObject.HasUserSignal(StringName),
GodotObject.RemoveUserSignal(StringName),
GodotObject.EmitSignal(StringName, params Variant[]),
GodotObject.EmitSignal(StringName, ReadOnlySpan<Variant>),
GodotObject.Call(StringName, params Variant[]),
GodotObject.Call(StringName, ReadOnlySpan<Variant>),
GodotObject.CallDeferred(StringName, params Variant[]),
GodotObject.CallDeferred(StringName, ReadOnlySpan<Variant>),
GodotObject.SetDeferred(StringName, Variant),
GodotObject.Callv(StringName, Array),
GodotObject.HasMethod(StringName),
GodotObject.GetMethodArgumentCount(StringName),
GodotObject.HasSignal(StringName),
GodotObject.GetSignalList(),
GodotObject.GetSignalConnectionList(StringName),
GodotObject.GetIncomingConnections(),
GodotObject.Connect(StringName, Callable, uint),
GodotObject.Disconnect(StringName, Callable),
GodotObject.IsConnected(StringName, Callable),
GodotObject.HasConnections(StringName),
GodotObject.SetBlockSignals(bool),
GodotObject.IsBlockingSignals(),
GodotObject.NotifyPropertyListChanged(),
GodotObject.SetMessageTranslation(bool),
GodotObject.CanTranslateMessages(),
GodotObject.Tr(StringName, StringName),
GodotObject.TrN(StringName, StringName, int, StringName),
GodotObject.GetTranslationDomain(),
GodotObject.SetTranslationDomain(StringName),
GodotObject.IsQueuedForDeletion(),
GodotObject.CancelFree(),
GodotObject.EmitSignalScriptChanged(),
GodotObject.EmitSignalPropertyListChanged(),
GodotObject.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant),
GodotObject.HasGodotClassMethod(in godot_string_name),
GodotObject.HasGodotClassSignal(in godot_string_name),
GodotObject.NativeInstance,
GodotObject.ScriptChanged,
GodotObject.PropertyListChanged,
object.Equals(object?),
object.Equals(object?, object?),
object.GetHashCode(),
object.GetType(),
object.MemberwiseClone(),
object.ReferenceEquals(object?, object?),
object.ToString()
Constructors
CharacterType()
public CharacterType()
CharacterType(string, RoleType)
public CharacterType(string name, RoleType role)
Parameters
name
string
role
RoleType
Properties
Actions
[ExportGroup("🔥 Actions", "")]
[Export(PropertyHint.None, "")]
public Array<CharacterAction> Actions { get; }
Property Value
Array<CharacterAction>
Attributes
[ExportGroup("📊 Attributes", "")]
[Export(PropertyHint.None, "")]
public Array<CharacterAttribute> Attributes { get; }
Property Value
Array<CharacterAttribute>
Category
[Export(PropertyHint.None, "")]
public Category? Category { get; set; }
Property Value
CharacterSprite
[Export(PropertyHint.None, "")]
public SpriteFrames? CharacterSprite { get; set; }
Property Value
SpriteFrames?
Location
[ExportGroup("📍 Placement", "")]
[Export(PropertyHint.None, "")]
public LocationType? Location { get; set; }
Property Value
Name
[ExportGroup("📝 Information", "")]
[Export(PropertyHint.None, "")]
public string Name { get; set; }
Property Value
Portrait
[ExportGroup("🪵 Assets", "")]
[Export(PropertyHint.None, "")]
public Texture2D? Portrait { get; set; }
Property Value
Texture2D?
Role
[ExportGroup("🦸♂ Role", "")]
[Export(PropertyHint.None, "")]
public RoleType? Role { get; set; }
Property Value
ShadowSprite
[Export(PropertyHint.None, "")]
public SpriteFrames? ShadowSprite { get; set; }
Property Value
SpriteFrames?
ShowShadow
[Export(PropertyHint.None, "")]
public bool ShowShadow { get; set; }
Property Value
SlotIndex
[Export(PropertyHint.None, "")]
public int SlotIndex { get; set; }
Property Value
SpritePositionX
[Export(PropertyHint.None, "")]
public float SpritePositionX { get; set; }
Property Value
SpritePositionY
[Export(PropertyHint.None, "")]
public float SpritePositionY { get; set; }
Property Value
Methods
AddAction(CharacterAction)
public void AddAction(CharacterAction action)
Parameters
action
CharacterAction
EmitSignalAttributeChanged(CharacterType, AttributeType)
protected void EmitSignalAttributeChanged(CharacterType character, AttributeType attributeType)
Parameters
character
CharacterType
attributeType
AttributeType
GetAttributeBaseValue(AttributeType)
public int GetAttributeBaseValue(AttributeType type)
Parameters
type
AttributeType
Returns
GetAttributeCurrentValue(AttributeType)
public int GetAttributeCurrentValue(AttributeType type)
Parameters
type
AttributeType
Returns
GetAttributeMaxValue(AttributeType)
public int GetAttributeMaxValue(AttributeType type)
Parameters
type
AttributeType
Returns
InitializeActions()
public void InitializeActions()
InitializeAttributes()
public void InitializeAttributes()
RemoveAction(CharacterAction)
public void RemoveAction(CharacterAction action)
Parameters
action
CharacterAction
UpdateAttributeCurrentValue(AttributeType, int)
public void UpdateAttributeCurrentValue(AttributeType type, int newValue)
Parameters
type
AttributeType
newValue
int
ValidateConstructor()
public void ValidateConstructor()
AttributeChanged
public event CharacterType.AttributeChangedEventHandler AttributeChanged