Skip to main content

TargetAllow

Description:

  A class to specifies how a bullet object should interact with other game objects or units based on their relationship.

Class Object: Platformer.TargetAllow Class.

Inherits from: ContainerItem.

terrainAllowed

Type: Field.

Description:

  Whether the bullet object can collide with terrain.

Signature:

terrainAllowed: boolean

allow

Type: Function.

Description:

  A function that allows or disallows the bullet object to interact with a game object or unit, based on their relationship.

Signature:

allow: function(self: TargetAllow, relation: Data.Relation, allow: boolean)

Parameters:

ParameterTypeDescription
relationData.RelationThe relationship between the bullet object and the other game object or unit.
allowbooleanWhether the bullet object should be allowed to interact.

isAllow

Type: Function.

Description:

  A function that determines whether the bullet object is allowed to interact with a game object or unit, based on their relationship.

Signature:

isAllow: function(self: TargetAllow, relation: Data.Relation): boolean

Parameters:

ParameterTypeDescription
relationData.RelationThe relationship between the bullet object and the other game object or unit.

Returns:

Return TypeDescription
booleanWhether the bullet object is allowed to interact.

toValue

Type: Function.

Description:

  Converts the object to a value that can be used for interaction settings.

Signature:

toValue: function(): integer

Returns:

Return TypeDescription
integerThe value that can be used for interaction settings.