Attribute class

The Attribute Widget adds certain abilities to an entity. This Widget gives you a varienty of methods to modify speed, attack damage, health and more.

Inheritance

Constructors

Attribute.add(Entity target, AttributeType attribute, {required String? uuid, required double? value, required String? name, AttributeModifier? modifyType = AttributeModifier.add})
adds a modifier with an uuid
Attribute.get(Entity target, AttributeType attribute, {double? scale})
gets the calculated modifier(with base, armor and custom)
Attribute.get_base(Entity target, AttributeType attribute, {double? scale})
gets the base modifier
Attribute.get_modifier(Entity target, AttributeType attribute, {required String? uuid, double? scale})
gets the modifiers value by uuid
Attribute.remove(Entity target, AttributeType attribute, {required String? uuid})
removes a modifier with an uuid again
Attribute.set(Entity target, AttributeType attribute, {required double? value})
sets the base modifier to a value

Properties

attribute AttributeType
final
called bool
Contains the Information, if this RestAction is already called (and can't be called again)
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
modifyType AttributeModifier?
getter/setter pair
name String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double?
getter/setter pair
target Entity
final
uuid String?
getter/setter pair
value double?
getter/setter pair
writable List<Widget>?
The writable list the RestAction writes it's contents on
getter/setter pairinherited

Methods

generate(Context context) Widget
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queue([List<Widget>? writable]) → void
Execute this method to add this to the WidgetList (can use default list or as parameter given list) This method can only be executed once, if it is executed multiple times you will get an Error. You can read out if it is already executed in the boolean Called Example for a queue method:
inherited
toMap() → dynamic
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited