Class StatChangeOperation
Class that represents an operation to regenerate a particular stat over time.
Inheritance
System.Object
Priority_Queue.FastPriorityQueueNode
Priority_Queue.StablePriorityQueueNode
StatChangeOperation
Inherited Members
Priority_Queue.StablePriorityQueueNode.InsertionIndex
Priority_Queue.FastPriorityQueueNode.Priority
Priority_Queue.FastPriorityQueueNode.QueueIndex
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fibula.Mechanics.Operations
Assembly: Fibula.Mechanics.dll
Syntax
public class StatChangeOperation : Operation, IEquatable<BaseEvent>, IOperation, IEvent
Constructors
| Improve this Doc View SourceStatChangeOperation(ICreature, CreatureStat, Int32)
Initializes a new instance of the StatChangeOperation class.
Declaration
public StatChangeOperation(ICreature creature, CreatureStat statId, int amount = 1)
Parameters
Type | Name | Description |
---|---|---|
ICreature | creature | The creature for which the stat is being changed. |
CreatureStat | statId | The id of the stat to change. |
System.Int32 | amount | Optional. The amount of points to change. |
Properties
| Improve this Doc View SourceAmount
Gets the amount of points to change the stat by.
Declaration
public int Amount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Creature
Gets the creature for which the stat is being changed.
Declaration
public ICreature Creature { get; }
Property Value
Type | Description |
---|---|
ICreature |
StatId
Gets the type of stat to change.
Declaration
public CreatureStat StatId { get; }
Property Value
Type | Description |
---|---|
CreatureStat |
Methods
| Improve this Doc View SourceExecute(IOperationContext)
Executes the operation's logic.
Declaration
protected override void Execute(IOperationContext context)
Parameters
Type | Name | Description |
---|---|---|
IOperationContext | context | A reference to the operation context. |
Overrides
Implements
System.IEquatable<T>