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:
Parameter | Type | Description |
---|---|---|
relation | Data.Relation | The relationship between the bullet object and the other game object or unit. |
allow | boolean | Whether 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:
Parameter | Type | Description |
---|---|---|
relation | Data.Relation | The relationship between the bullet object and the other game object or unit. |
Returns:
Return Type | Description |
---|---|
boolean | Whether 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 Type | Description |
---|---|
integer | The value that can be used for interaction settings. |