/
CollisionShape2D.hx
65 lines (51 loc) · 2.06 KB
/
CollisionShape2D.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an `godot.Area2D` to give it a detection shape, or add it to a `godot.PhysicsBody2D` to create a solid object. IMPORTANT: this is an Editor-only helper to create shapes, use `godot.CollisionObject2D.shapeOwnerGetShape` to get the actual shape.
**/
@:libType
@:csNative
@:native("Godot.CollisionShape2D")
@:autoBuild(godot.Godot.buildUserClass())
extern class CollisionShape2D extends godot.Node2D {
/**
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity.
**/
@:native("OneWayCollisionMargin")
public var oneWayCollisionMargin:Single;
/**
Sets whether this collision shape should only detect collision on one side (top or bottom).
**/
@:native("OneWayCollision")
public var oneWayCollision:Bool;
/**
A disabled collision shape has no effect in the world. This property should be changed with `godot.Object.setDeferred`.
**/
@:native("Disabled")
public var disabled:Bool;
/**
The actual shape owned by this collision shape.
**/
@:native("Shape")
public var shape:godot.Shape2D;
@:native("new")
public function new():Void;
@:native("SetShape")
public function setShape(shape:godot.Shape2D):Void;
@:native("GetShape")
public function getShape():godot.Shape2D;
@:native("SetDisabled")
public function setDisabled(disabled:Bool):Void;
@:native("IsDisabled")
public function isDisabled():Bool;
@:native("SetOneWayCollision")
public function setOneWayCollision(enabled:Bool):Void;
@:native("IsOneWayCollisionEnabled")
public function isOneWayCollisionEnabled():Bool;
@:native("SetOneWayCollisionMargin")
public function setOneWayCollisionMargin(margin:Single):Void;
@:native("GetOneWayCollisionMargin")
public function getOneWayCollisionMargin():Single;
}