summaryrefslogtreecommitdiff
path: root/demos/2d/dynamic_collision_shapes
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d/dynamic_collision_shapes')
-rw-r--r--demos/2d/dynamic_collision_shapes/ball.gd17
-rw-r--r--demos/2d/dynamic_collision_shapes/ball.pngbin321 -> 0 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/ball.tscn47
-rw-r--r--demos/2d/dynamic_collision_shapes/box.pngbin253 -> 0 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/circle.pngbin889 -> 0 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd19
-rw-r--r--demos/2d/dynamic_collision_shapes/dynamic_colobjs.tscn178
-rw-r--r--demos/2d/dynamic_collision_shapes/engine.cfg5
-rw-r--r--demos/2d/dynamic_collision_shapes/icon.pngbin1563 -> 0 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/poly.pngbin1638 -> 0 bytes
10 files changed, 0 insertions, 266 deletions
diff --git a/demos/2d/dynamic_collision_shapes/ball.gd b/demos/2d/dynamic_collision_shapes/ball.gd
deleted file mode 100644
index 169079ea46..0000000000
--- a/demos/2d/dynamic_collision_shapes/ball.gd
+++ /dev/null
@@ -1,17 +0,0 @@
-
-extends RigidBody2D
-
-# Member variables
-var timeout = 5
-
-
-func _process(delta):
- timeout -= delta
- if (timeout < 1):
- set_opacity(timeout)
- if (timeout < 0):
- queue_free()
-
-
-func _ready():
- set_process(true)
diff --git a/demos/2d/dynamic_collision_shapes/ball.png b/demos/2d/dynamic_collision_shapes/ball.png
deleted file mode 100644
index b7cf71da29..0000000000
--- a/demos/2d/dynamic_collision_shapes/ball.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/ball.tscn b/demos/2d/dynamic_collision_shapes/ball.tscn
deleted file mode 100644
index 31560e251b..0000000000
--- a/demos/2d/dynamic_collision_shapes/ball.tscn
+++ /dev/null
@@ -1,47 +0,0 @@
-[gd_scene load_steps=4 format=1]
-
-[ext_resource path="res://ball.gd" type="Script" id=1]
-[ext_resource path="res://ball.png" type="Texture" id=2]
-
-[sub_resource type="CircleShape2D" id=1]
-
-custom_solver_bias = 0.0
-radius = 7.45713
-
-[node name="bal" type="RigidBody2D"]
-
-input/pickable = false
-shapes/0/shape = SubResource( 1 )
-shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
-shapes/0/trigger = false
-collision/layers = 1
-collision/mask = 1
-mode = 0
-mass = 1.0
-friction = 1.0
-bounce = 0.0
-gravity_scale = 1.0
-custom_integrator = false
-continuous_cd = 0
-contacts_reported = 0
-contact_monitor = false
-sleeping = false
-can_sleep = true
-velocity/linear = Vector2( 0, 0 )
-velocity/angular = 0.0
-damp_override/linear = -1.0
-damp_override/angular = -1.0
-script/script = ExtResource( 1 )
-
-[node name="sprite" type="Sprite" parent="."]
-
-transform/pos = Vector2( 0, 1 )
-texture = ExtResource( 2 )
-
-[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
-
-shape = SubResource( 1 )
-trigger = false
-_update_shape_index = 0
-
-
diff --git a/demos/2d/dynamic_collision_shapes/box.png b/demos/2d/dynamic_collision_shapes/box.png
deleted file mode 100644
index f29b83ce38..0000000000
--- a/demos/2d/dynamic_collision_shapes/box.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/circle.png b/demos/2d/dynamic_collision_shapes/circle.png
deleted file mode 100644
index 9fdfa550b1..0000000000
--- a/demos/2d/dynamic_collision_shapes/circle.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd b/demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd
deleted file mode 100644
index c43b82a722..0000000000
--- a/demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd
+++ /dev/null
@@ -1,19 +0,0 @@
-
-extends Node2D
-
-# Member variables
-const EMIT_INTERVAL = 0.1
-var timeout = EMIT_INTERVAL
-
-
-func _process(delta):
- timeout -= delta
- if (timeout < 0):
- timeout = EMIT_INTERVAL
- var ball = preload("res://ball.tscn").instance()
- ball.set_pos(Vector2(randf()*get_viewport_rect().size.x, 0))
- add_child(ball)
-
-
-func _ready():
- set_process(true)
diff --git a/demos/2d/dynamic_collision_shapes/dynamic_colobjs.tscn b/demos/2d/dynamic_collision_shapes/dynamic_colobjs.tscn
deleted file mode 100644
index 61af0b8e7d..0000000000
--- a/demos/2d/dynamic_collision_shapes/dynamic_colobjs.tscn
+++ /dev/null
@@ -1,178 +0,0 @@
-[gd_scene load_steps=13 format=1]
-
-[ext_resource path="res://dynamic_colobjs.gd" type="Script" id=1]
-[ext_resource path="res://circle.png" type="Texture" id=2]
-[ext_resource path="res://box.png" type="Texture" id=3]
-[ext_resource path="res://poly.png" type="Texture" id=4]
-
-[sub_resource type="CircleShape2D" id=1]
-
-custom_solver_bias = 0.0
-radius = 28.8504
-
-[sub_resource type="RectangleShape2D" id=2]
-
-custom_solver_bias = 0.0
-extents = Vector2( 32.1805, 30.0328 )
-
-[sub_resource type="ConvexPolygonShape2D" id=3]
-
-custom_solver_bias = 0.0
-points = Vector2Array( 49.5669, -27.9744, 45.1564, 15.3961, 18.6931, -1.51105 )
-
-[sub_resource type="ConvexPolygonShape2D" id=4]
-
-custom_solver_bias = 0.0
-points = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -40.1345, 21.2602, -53.3067, 15.8716 )
-
-[sub_resource type="ConvexPolygonShape2D" id=5]
-
-custom_solver_bias = 0.0
-points = Vector2Array( -40.1345, 21.2602, -37.1739, 2.89948, -14.386, -14.0076, -6.30005, 0.694214 )
-
-[sub_resource type="ConvexPolygonShape2D" id=6]
-
-custom_solver_bias = 0.0
-points = Vector2Array( -14.386, -14.0076, 18.6931, -1.51105, 45.1564, 15.3961, -6.30005, 0.694214 )
-
-[sub_resource type="Animation" id=7]
-
-resource/name = "movethem"
-length = 4.0
-loop = true
-step = 0.1
-tracks/0/type = "value"
-tracks/0/path = NodePath("base/circle:transform/pos")
-tracks/0/interp = 1
-tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 0, 0 ), Vector2( 52.7569, -70.845 ) ] }
-tracks/1/type = "value"
-tracks/1/path = NodePath("base/box:transform/pos")
-tracks/1/interp = 1
-tracks/1/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 193.173, -2.72076 ), Vector2( 195.894, -72.0999 ) ] }
-tracks/2/type = "value"
-tracks/2/path = NodePath("base/box:transform/rot")
-tracks/2/interp = 1
-tracks/2/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 92.8111 ] }
-tracks/3/type = "value"
-tracks/3/path = NodePath("base/polygon:transform/pos")
-tracks/3/interp = 1
-tracks/3/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 382.265, -2.72076 ), Vector2( 495.176, -10.883 ) ] }
-
-[sub_resource type="Animation" id=8]
-
-resource/name = "toggletrigger"
-length = 6.0
-loop = true
-step = 0.1
-tracks/0/type = "value"
-tracks/0/path = NodePath("base/box:trigger")
-tracks/0/interp = 1
-tracks/0/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ false, true ] }
-tracks/1/type = "value"
-tracks/1/path = NodePath("base/box:visibility/opacity")
-tracks/1/interp = 1
-tracks/1/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.2 ] }
-
-[node name="base" type="Node2D"]
-
-script/script = ExtResource( 1 )
-
-[node name="base" type="KinematicBody2D" parent="."]
-
-transform/pos = Vector2( 137, 470 )
-input/pickable = false
-shapes/0/shape = SubResource( 1 )
-shapes/0/transform = Matrix32( 1, 0, 0, 1, 7.91353, -10.6267 )
-shapes/0/trigger = false
-shapes/1/shape = SubResource( 2 )
-shapes/1/transform = Matrix32( 0.970626, -0.240595, 0.240595, 0.970626, 193.581, -13.1276 )
-shapes/1/trigger = false
-shapes/2/shape = SubResource( 3 )
-shapes/2/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
-shapes/2/trigger = false
-shapes/3/shape = SubResource( 4 )
-shapes/3/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
-shapes/3/trigger = false
-shapes/4/shape = SubResource( 5 )
-shapes/4/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
-shapes/4/trigger = false
-shapes/5/shape = SubResource( 6 )
-shapes/5/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
-shapes/5/trigger = false
-collision/layers = 1
-collision/mask = 1
-collision/margin = 0.08
-
-[node name="circle" type="CollisionShape2D" parent="base"]
-
-transform/pos = Vector2( 7.91353, -10.6267 )
-shape = SubResource( 1 )
-trigger = false
-_update_shape_index = 0
-
-[node name="sprite" type="Sprite" parent="base/circle"]
-
-texture = ExtResource( 2 )
-
-[node name="box" type="CollisionShape2D" parent="base"]
-
-transform/pos = Vector2( 193.581, -13.1276 )
-transform/rot = 13.9217
-shape = SubResource( 2 )
-trigger = false
-_update_shape_index = 1
-
-[node name="Sprite" type="Sprite" parent="base/box"]
-
-texture = ExtResource( 3 )
-
-[node name="polygon" type="CollisionPolygon2D" parent="base"]
-
-transform/pos = Vector2( 399.202, -3.9451 )
-build_mode = 0
-polygon = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -14.386, -14.0076, 18.6931, -1.51105, 49.5669, -27.9744, 45.1564, 15.3961, -6.30005, 0.694214, -40.1345, 21.2602, -53.3067, 15.8716 )
-shape_range = Vector2( 2, 5 )
-trigger = false
-
-[node name="Sprite" type="Sprite" parent="base/polygon"]
-
-texture = ExtResource( 4 )
-
-[node name="shapemove" type="AnimationPlayer" parent="."]
-
-playback/process_mode = 1
-playback/default_blend_time = 0.0
-root/root = NodePath("..")
-anims/movethem = SubResource( 7 )
-playback/active = true
-playback/speed = 1.0
-blend_times = [ ]
-autoplay = "movethem"
-
-[node name="triggertoggle" type="AnimationPlayer" parent="."]
-
-playback/process_mode = 1
-playback/default_blend_time = 0.0
-root/root = NodePath("..")
-anims/movethem = SubResource( 7 )
-anims/toggletrigger = SubResource( 8 )
-playback/active = true
-playback/speed = 1.0
-blend_times = [ ]
-autoplay = "toggletrigger"
-
-[node name="Label" type="Label" parent="."]
-
-focus/ignore_mouse = true
-focus/stop_mouse = true
-size_flags/horizontal = 2
-margin/left = 21.0
-margin/top = 21.0
-margin/right = 719.0
-margin/bottom = 73.0
-text = "This demo simply shows that it\'s possible now to move a CollisionShape and CollisionPolygon after it was created\nand also turn it into a trigger at run-time. CollisionShape will remain alive during the running game and you can\ninteract with them, even though they are just meant to be helpers.\nIt is always recommended in a real use-case scenario, to move a body instead of a shape, as that path is better optimized."
-percent_visible = 1.0
-lines_skipped = 0
-max_lines_visible = -1
-
-
diff --git a/demos/2d/dynamic_collision_shapes/engine.cfg b/demos/2d/dynamic_collision_shapes/engine.cfg
deleted file mode 100644
index b1feb20408..0000000000
--- a/demos/2d/dynamic_collision_shapes/engine.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-[application]
-
-name="Run-Time CollisionShape"
-main_scene="res://dynamic_colobjs.tscn"
-icon="res://icon.png"
diff --git a/demos/2d/dynamic_collision_shapes/icon.png b/demos/2d/dynamic_collision_shapes/icon.png
deleted file mode 100644
index b47506d7c8..0000000000
--- a/demos/2d/dynamic_collision_shapes/icon.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/poly.png b/demos/2d/dynamic_collision_shapes/poly.png
deleted file mode 100644
index 49ed55cc7d..0000000000
--- a/demos/2d/dynamic_collision_shapes/poly.png
+++ /dev/null
Binary files differ