Ability to keep collisionshapes and collisionpolygons when running the game.

Works for 2D and 3D
These are still just helpers in case you want to animate them or access them
directly.
Modifying the real shapes is still done via CollisionObject and CollisionObject2D APIs
But an API was added so you can query which shapes from CollisionObject correspond to which CollisionShape.

Have Fun!
This commit is contained in:
reduz
2015-09-15 22:07:03 -03:00
parent 4773c19e60
commit 2580ca01e6
25 changed files with 436 additions and 103 deletions

View File

@ -0,0 +1,23 @@
extends Node2D
# member variables here, example:
# var a=2
# var b="textvar"
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.scn").instance()
ball.set_pos( Vector2(randf() * get_viewport_rect().size.x, 0) )
add_child(ball)
func _ready():
set_process(true)
# Initialization here
pass