Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
Operator
core-defs.swift:1691enum Operator
Cases
case equal
Equality operator (
==
).case notEqual
Inequality operator (
!=
).case less
Less than operator (
<
).case lessEqual
Less than or equal operator (
<=
).case greater
Greater than operator (
>
).case greaterEqual
Greater than or equal operator (
>=
).case add
Addition operator (
+
).case subtract
Subtraction operator (
-
).case multiply
Multiplication operator (
*
).case divide
Division operator (
/
).case negate
Unary negation operator (
-
).case positive
Unary plus operator (
+
).case module
Remainder/modulo operator (
%
).case power
Power operator (
**
).case shiftLeft
Left shift operator (
<<
).case shiftRight
Right shift operator (
>>
).case bitAnd
Bitwise AND operator (
&
).case bitOr
Bitwise OR operator (
|
).case bitXor
Bitwise XOR operator (
^
).case bitNegate
Bitwise NOT operator (
~
).case and
Logical AND operator (
and
or&&
).case or
Logical OR operator (
or
or||
).case xor
Logical XOR operator (not implemented in GDScript).
case not
Logical NOT operator (
not
or!
).case `in`
Logical IN operator (
in
).case max
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (15) members.
Types
enum GType
enum VariantIndexerError
Errors raised by the variant subscript
Type members
init(
) Creates an empty Variant, that represents the Godot type
nil
init(Variant
) Creates a new Variant based on a copy of the reference variant passed in
init(some VariantStorable
) static func typeName(GType
) -> String Gets the name of a Variant type.
static func == (lhs: Variant, rhs: Variant
) -> Bool Compares two variants, does this by delegating the comparison to Godot
Instance members
var debugDescription: String
var description: String
var gtype: GType
This describes the type of the data wrapped by this variant
var isNull: Bool
Returns true if the variant is flagged as being an object (
gtype == .object
) and it has a nil pointer.subscript(Int
) -> Variant? Variants that represent arrays can be indexed, this subscript allows you to fetch the individual elements of those arrays
func asObject<T>(T.Type
) -> T? Attempts to cast the Variant into a SwiftGodot.Object, if the variant contains a value of type
.object
, then a.object, the value
nil` is returned.func call(method: StringName, Variant...
) -> Result<Variant, CallErrorType> Invokes a variant’s method by name.
func hash(into: inout Hasher
)
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.