summaryrefslogtreecommitdiff
path: root/demos/2d
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d')
-rw-r--r--demos/2d/area_input/engine.cfg1
-rw-r--r--demos/2d/area_input/icon.pngbin0 -> 3416 bytes
-rw-r--r--demos/2d/area_input/input.gd17
-rw-r--r--demos/2d/area_input/input.scnbin2886 -> 3118 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/ball.gd17
-rw-r--r--demos/2d/dynamic_collision_shapes/ball.pngbin0 -> 321 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/ball.scnbin0 -> 1857 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/box.pngbin0 -> 253 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/circle.pngbin0 -> 889 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd19
-rw-r--r--demos/2d/dynamic_collision_shapes/dynamic_colobjs.scnbin0 -> 4399 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/engine.cfg5
-rw-r--r--demos/2d/dynamic_collision_shapes/icon.pngbin0 -> 1563 bytes
-rw-r--r--demos/2d/dynamic_collision_shapes/poly.pngbin0 -> 1638 bytes
-rw-r--r--demos/2d/fog_of_war/engine.cfg2
-rw-r--r--demos/2d/fog_of_war/fog.gd92
-rw-r--r--demos/2d/fog_of_war/fog.scnbin3714 -> 4159 bytes
-rw-r--r--demos/2d/fog_of_war/icon.png.flags1
-rw-r--r--demos/2d/fog_of_war/tile_edit.scnbin1443 -> 1570 bytes
-rw-r--r--demos/2d/fog_of_war/troll.gd33
-rw-r--r--demos/2d/fog_of_war/troll.scnbin1839 -> 1979 bytes
-rw-r--r--demos/2d/hdr/beach_cave.gd29
-rw-r--r--demos/2d/hdr/beach_cave.scnbin2972 -> 4834 bytes
-rw-r--r--demos/2d/hdr/engine.cfg1
-rw-r--r--demos/2d/hdr/icon.pngbin0 -> 3962 bytes
-rw-r--r--demos/2d/hexamap/map.scnbin2644 -> 3517 bytes
-rw-r--r--demos/2d/hexamap/tiles.scnbin2091 -> 2217 bytes
-rw-r--r--demos/2d/hexamap/troll.gd31
-rw-r--r--demos/2d/hexamap/troll.scnbin1839 -> 1983 bytes
-rw-r--r--demos/2d/isometric/dungeon.scnbin2841 -> 4708 bytes
-rw-r--r--demos/2d/isometric/tileset.scnbin2565 -> 4476 bytes
-rw-r--r--demos/2d/isometric/troll.gd31
-rw-r--r--demos/2d/isometric/troll.scnbin2100 -> 2116 bytes
-rw-r--r--demos/2d/isometric_light/column.scnbin1909 -> 2026 bytes
-rw-r--r--demos/2d/isometric_light/cubio.gd117
-rw-r--r--demos/2d/isometric_light/cubio.scnbin7006 -> 6952 bytes
-rw-r--r--demos/2d/isometric_light/engine.cfg1
-rw-r--r--demos/2d/isometric_light/icon.pngbin0 -> 7675 bytes
-rw-r--r--demos/2d/isometric_light/map.gd15
-rw-r--r--demos/2d/isometric_light/map.scnbin8661 -> 9352 bytes
-rw-r--r--demos/2d/isometric_light/shoot.gd20
-rw-r--r--demos/2d/isometric_light/shoot.scnbin4561 -> 4111 bytes
-rw-r--r--demos/2d/isometric_light/tileset_scene.scnbin4812 -> 5339 bytes
-rw-r--r--demos/2d/isometric_light/torch.scnbin4416 -> 3861 bytes
-rw-r--r--demos/2d/kinematic_char/colworld.gd16
-rw-r--r--demos/2d/kinematic_char/colworld.scnbin7459 -> 7366 bytes
-rw-r--r--demos/2d/kinematic_char/engine.cfg2
-rw-r--r--demos/2d/kinematic_char/player.gd168
-rw-r--r--demos/2d/kinematic_char/player.scnbin1728 -> 1703 bytes
-rw-r--r--demos/2d/kinematic_col/colworld.scnbin2941 -> 4073 bytes
-rw-r--r--demos/2d/kinematic_col/player.gd23
-rw-r--r--demos/2d/kinematic_col/player.scnbin1495 -> 1625 bytes
-rw-r--r--demos/2d/light_mask/engine.cfg1
-rw-r--r--demos/2d/light_mask/icon.pngbin0 -> 6285 bytes
-rw-r--r--demos/2d/light_mask/lightmask.scnbin2916 -> 3829 bytes
-rw-r--r--demos/2d/lights_shadows/engine.cfg1
-rw-r--r--demos/2d/lights_shadows/icon.pngbin0 -> 3988 bytes
-rw-r--r--demos/2d/lights_shadows/light_shadows.scnbin4293 -> 4978 bytes
-rw-r--r--demos/2d/lookat/engine.cfg1
-rw-r--r--demos/2d/lookat/icon.pngbin0 -> 1495 bytes
-rw-r--r--demos/2d/lookat/lookat.gd38
-rw-r--r--demos/2d/lookat/lookat.scnbin1622 -> 1640 bytes
-rw-r--r--demos/2d/motion/engine.cfg1
-rw-r--r--demos/2d/motion/icon.pngbin0 -> 2621 bytes
-rw-r--r--demos/2d/motion/motion.gd35
-rw-r--r--demos/2d/motion/motion.scnbin2845 -> 2738 bytes
-rw-r--r--demos/2d/navpoly/engine.cfg1
-rw-r--r--demos/2d/navpoly/icon.pngbin0 -> 3642 bytes
-rw-r--r--demos/2d/navpoly/navigation.gd64
-rw-r--r--demos/2d/navpoly/navigation.scnbin3456 -> 5128 bytes
-rw-r--r--demos/2d/navpoly/navigation2.scnbin3564 -> 0 bytes
-rw-r--r--demos/2d/normalmaps/engine.cfg1
-rw-r--r--demos/2d/normalmaps/icon.pngbin0 -> 10402 bytes
-rw-r--r--demos/2d/normalmaps/normalmap.scnbin2450 -> 3168 bytes
-rw-r--r--demos/2d/particles/particles.xml265
-rw-r--r--demos/2d/platformer/bullet.gd13
-rw-r--r--demos/2d/platformer/bullet.xml273
-rw-r--r--demos/2d/platformer/coin.gd17
-rw-r--r--demos/2d/platformer/coin.xml293
-rw-r--r--demos/2d/platformer/enemy.gd91
-rw-r--r--demos/2d/platformer/enemy.xml317
-rw-r--r--demos/2d/platformer/engine.cfg6
-rw-r--r--demos/2d/platformer/moving_platform.gd21
-rw-r--r--demos/2d/platformer/moving_platform.xml214
-rw-r--r--demos/2d/platformer/one_way_platform.xml67
-rw-r--r--demos/2d/platformer/parallax_bg.xml258
-rw-r--r--demos/2d/platformer/player.gd237
-rw-r--r--demos/2d/platformer/player.xml411
-rw-r--r--demos/2d/platformer/seesaw.xml207
-rw-r--r--demos/2d/platformer/stage.xml881
-rw-r--r--demos/2d/platformer/tiles_demo.png.flags1
-rw-r--r--demos/2d/platformer/tileset_edit.xml213
-rw-r--r--demos/2d/polygon_path_finder_demo/engine.cfg5
-rw-r--r--demos/2d/polygon_path_finder_demo/icon.pngbin3639 -> 0 bytes
-rw-r--r--demos/2d/polygon_path_finder_demo/icon.png.flags1
-rw-r--r--demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scnbin2609 -> 0 bytes
-rw-r--r--demos/2d/polygon_path_finder_demo/polygonpathfinder.gd80
-rw-r--r--demos/2d/pong/pong.gd82
-rw-r--r--demos/2d/pong/pong.xml206
-rw-r--r--demos/2d/rubegoldberg/ball.xml210
-rw-r--r--demos/2d/rubegoldberg/box.xml242
-rw-r--r--demos/2d/rubegoldberg/domino.xml244
-rw-r--r--demos/2d/rubegoldberg/pendulum.xml210
-rw-r--r--demos/2d/rubegoldberg/platform.xml188
-rw-r--r--demos/2d/rubegoldberg/rubegoldberg.xml181
-rw-r--r--demos/2d/rubegoldberg/seesaw.xml266
-rw-r--r--demos/2d/screen_space_shaders/engine.cfg1
-rw-r--r--demos/2d/screen_space_shaders/icon.pngbin0 -> 7479 bytes
-rw-r--r--demos/2d/screen_space_shaders/screen_shaders.gd19
-rw-r--r--demos/2d/screen_space_shaders/screen_shaders.scnbin5936 -> 7562 bytes
-rw-r--r--demos/2d/sdf_font/engine.cfg1
-rw-r--r--demos/2d/sdf_font/icon.pngbin0 -> 3560 bytes
-rw-r--r--demos/2d/sdf_font/sdf.scnbin2415 -> 2820 bytes
-rw-r--r--demos/2d/shower_of_bullets/bullets.gd59
-rw-r--r--demos/2d/shower_of_bullets/shower.gd29
-rw-r--r--demos/2d/shower_of_bullets/shower.scnbin1836 -> 1909 bytes
-rw-r--r--demos/2d/space_shooter/asteroid.gd42
-rw-r--r--demos/2d/space_shooter/asteroid.scnbin4516 -> 3548 bytes
-rw-r--r--demos/2d/space_shooter/enemy1.gd29
-rw-r--r--demos/2d/space_shooter/enemy1.scnbin3759 -> 3369 bytes
-rw-r--r--demos/2d/space_shooter/enemy2.gd51
-rw-r--r--demos/2d/space_shooter/enemy2.scnbin3801 -> 3253 bytes
-rw-r--r--demos/2d/space_shooter/enemy_shot.gd19
-rw-r--r--demos/2d/space_shooter/enemy_shot.scnbin3944 -> 3218 bytes
-rw-r--r--demos/2d/space_shooter/explosion.scnbin1497 -> 1756 bytes
-rw-r--r--demos/2d/space_shooter/game_state.gd20
-rw-r--r--demos/2d/space_shooter/level.scnbin9185 -> 6496 bytes
-rw-r--r--demos/2d/space_shooter/level_tiles.scnbin2168 -> 1825 bytes
-rw-r--r--demos/2d/space_shooter/main_menu.gd13
-rw-r--r--demos/2d/space_shooter/main_menu.scnbin2402 -> 1903 bytes
-rw-r--r--demos/2d/space_shooter/parallax.scnbin3307 -> 2814 bytes
-rw-r--r--demos/2d/space_shooter/rail.gd18
-rw-r--r--demos/2d/space_shooter/ship.gd65
-rw-r--r--demos/2d/space_shooter/ship.scnbin6752 -> 4965 bytes
-rw-r--r--demos/2d/space_shooter/shot.gd34
-rw-r--r--demos/2d/space_shooter/shot.scnbin4079 -> 3315 bytes
-rw-r--r--demos/2d/splash/engine.cfg1
-rw-r--r--demos/2d/splash/icon.pngbin0 -> 7041 bytes
-rw-r--r--demos/2d/splash/splash.xml338
-rw-r--r--demos/2d/sprite_shaders/engine.cfg1
-rw-r--r--demos/2d/sprite_shaders/icon.pngbin0 -> 8209 bytes
-rw-r--r--demos/2d/sprite_shaders/sprite_shaders.scnbin4079 -> 5477 bytes
-rw-r--r--demos/2d/tetris/grid.gd219
-rw-r--r--demos/2d/tetris/grid.xml252
-rw-r--r--demos/2d/tetris/tetris.xml252
-rw-r--r--demos/2d/texscreen/bubbles.gd10
-rw-r--r--demos/2d/texscreen/bubbles.scnbin1551 -> 2626 bytes
-rw-r--r--demos/2d/texscreen/engine.cfg1
-rw-r--r--demos/2d/texscreen/icon.pngbin0 -> 9245 bytes
-rw-r--r--demos/2d/texscreen/lens.gd45
-rw-r--r--demos/2d/texscreen/lens.scnbin1805 -> 1850 bytes
151 files changed, 3742 insertions, 4261 deletions
diff --git a/demos/2d/area_input/engine.cfg b/demos/2d/area_input/engine.cfg
index 3227e9278f..8fa2e15beb 100644
--- a/demos/2d/area_input/engine.cfg
+++ b/demos/2d/area_input/engine.cfg
@@ -2,3 +2,4 @@
name="Area 2D Input Events"
main_scene="res://input.scn"
+icon="res://icon.png"
diff --git a/demos/2d/area_input/icon.png b/demos/2d/area_input/icon.png
new file mode 100644
index 0000000000..2f412ecf68
--- /dev/null
+++ b/demos/2d/area_input/icon.png
Binary files differ
diff --git a/demos/2d/area_input/input.gd b/demos/2d/area_input/input.gd
index 3f719fc853..e9cc9f3c1d 100644
--- a/demos/2d/area_input/input.gd
+++ b/demos/2d/area_input/input.gd
@@ -1,16 +1,15 @@
extends Area2D
-#virtual from CollisionObject2D (also available as signal)
+
+# Virtual from CollisionObject2D (also available as signal)
func _input_event(viewport, event, shape_idx):
- #convert event to local coordinates
- if (event.type==InputEvent.MOUSE_MOTION):
- event = make_input_local( event )
+ # Convert event to local coordinates
+ if (event.type == InputEvent.MOUSE_MOTION):
+ event = make_input_local(event)
get_node("label").set_text(str(event.pos))
-
-#virtual from CollisionObject2D (also available as signal)
-func _mouse_exit():
- get_node("label").set_text("")
-
+# Virtual from CollisionObject2D (also available as signal)
+func _mouse_exit():
+ get_node("label").set_text("")
diff --git a/demos/2d/area_input/input.scn b/demos/2d/area_input/input.scn
index 1a2dcbc5f4..f3a19f64da 100644
--- a/demos/2d/area_input/input.scn
+++ b/demos/2d/area_input/input.scn
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/ball.gd b/demos/2d/dynamic_collision_shapes/ball.gd
new file mode 100644
index 0000000000..169079ea46
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/ball.gd
@@ -0,0 +1,17 @@
+
+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
new file mode 100644
index 0000000000..b7cf71da29
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/ball.png
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/ball.scn b/demos/2d/dynamic_collision_shapes/ball.scn
new file mode 100644
index 0000000000..51a91d5bc0
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/ball.scn
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/box.png b/demos/2d/dynamic_collision_shapes/box.png
new file mode 100644
index 0000000000..f29b83ce38
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/box.png
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/circle.png b/demos/2d/dynamic_collision_shapes/circle.png
new file mode 100644
index 0000000000..9fdfa550b1
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/circle.png
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd b/demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd
new file mode 100644
index 0000000000..25db51642b
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/dynamic_colobjs.gd
@@ -0,0 +1,19 @@
+
+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.scn").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.scn b/demos/2d/dynamic_collision_shapes/dynamic_colobjs.scn
new file mode 100644
index 0000000000..6d17e2209f
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/dynamic_colobjs.scn
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/engine.cfg b/demos/2d/dynamic_collision_shapes/engine.cfg
new file mode 100644
index 0000000000..76a074f346
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/engine.cfg
@@ -0,0 +1,5 @@
+[application]
+
+name="Run-Time CollisionShape"
+main_scene="res://dynamic_colobjs.scn"
+icon="res://icon.png"
diff --git a/demos/2d/dynamic_collision_shapes/icon.png b/demos/2d/dynamic_collision_shapes/icon.png
new file mode 100644
index 0000000000..b47506d7c8
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/icon.png
Binary files differ
diff --git a/demos/2d/dynamic_collision_shapes/poly.png b/demos/2d/dynamic_collision_shapes/poly.png
new file mode 100644
index 0000000000..49ed55cc7d
--- /dev/null
+++ b/demos/2d/dynamic_collision_shapes/poly.png
Binary files differ
diff --git a/demos/2d/fog_of_war/engine.cfg b/demos/2d/fog_of_war/engine.cfg
index 5c4307b5bc..1f56851c58 100644
--- a/demos/2d/fog_of_war/engine.cfg
+++ b/demos/2d/fog_of_war/engine.cfg
@@ -2,7 +2,7 @@
name="Fog of War"
main_scene="res://fog.scn"
-icon="icon.png"
+icon="res://icon.png"
[input]
diff --git a/demos/2d/fog_of_war/fog.gd b/demos/2d/fog_of_war/fog.gd
index 9da5680e4d..3ac8df0e17 100644
--- a/demos/2d/fog_of_war/fog.gd
+++ b/demos/2d/fog_of_war/fog.gd
@@ -1,86 +1,78 @@
extends TileMap
-# member variables here, example:
-# var a=2
-# var b="textvar"
+# Member variables
-# boundarys for the fog rectangle
-var x_min = -20 # left start tile
-var x_max = 20 # right end tile
-var y_min = -20 # top start tile
-var y_max = 20 # bottom end tile
+# Boundaries for the fog rectangle
+var x_min = -20 # Left start tile
+var x_max = 20 # Right end tile
+var y_min = -20 # Top start tile
+var y_max = 20 # Bottom end tile
-var position # players position
+var position # Player's position
-# iteration variables
+# Iteration variables
var x
var y
-# variable to check if player moved
+# Variables to check if the player moved
var x_old
var y_old
-# array to build up the visible area like a square
-# first value determines the width/height of the tip
-# here it would be 2*2 + 1 = 5 tiles wide/high
-# second value determines the total squares size
-# here it would be 5*2 + 1 = 10 tiles wide/high
-var l = range(2,5)
+# Array to build up the visible area like a square.
+# First value determines the width/height of the tip.
+# Here it would be 2*2 + 1 = 5 tiles wide/high.
+# Second value determines the total squares size.
+# Here it would be 5*2 + 1 = 10 tiles wide/high.
+var l = range(2, 5)
-# process that runs in realtime
+
+# Process that runs in realtime
func _fixed_process(delta):
position = get_node("../troll").get_pos()
- # calculate the corresponding tile
+ # Calculate the corresponding tile
# from the players position
x = int(position.x/get_cell_size().x)
- # switching from positive to negative tile positions
+ # Switching from positive to negative tile positions
# causes problems because of rounding problems
if position.x < 0:
- x -= 1 # correct negative values
+ x -= 1 # Correct negative values
y = int(position.y/get_cell_size().y)
- if position.y < 0:
+ if (position.y < 0):
y -= 1
-
- # check if the player moved one tile further
- if (x_old != x) or (y_old != y):
-
- # create the transparent part (visited area)
- var end = l.size()-1
+
+ # Check if the player moved one tile further
+ if ((x_old != x) or (y_old != y)):
+ # Create the transparent part (visited area)
+ var end = l.size() - 1
var start = 0
for steps in range(l.size()):
- for m in range(x-l[end]-1,x+l[end]+2):
- for n in range(y-l[start]-1,y+l[start]+2):
- if get_cell(m,n) != 0:
- set_cell(m,n,1,0,0)
+ for m in range(x - l[end] - 1, x + l[end] + 2):
+ for n in range(y - l[start] - 1, y + l[start] + 2):
+ if (get_cell(m, n) != 0):
+ set_cell(m, n, 1, 0, 0)
end -= 1
start += 1
-
- # create the actual and active visible part
- var end = l.size()-1
+
+ # Create the actual and active visible part
+ var end = l.size() - 1
var start = 0
for steps in range(l.size()):
- for m in range(x-l[end],x+l[end]+1):
- for n in range(y-l[start],y+l[start]+1):
- set_cell(m,n,-1)
+ for m in range(x - l[end], x + l[end] + 1):
+ for n in range(y - l[start], y + l[start] + 1):
+ set_cell(m, n, -1)
end -= 1
start += 1
-
+
x_old = x
y_old = y
-
- pass
+
func _ready():
- # Initalization here
-
- # create a square filled with the 100% opaque fog
- for x in range(x_min,x_max):
- for y in range(y_min,y_max):
- set_cell(x,y,0,0,0)
+ # Create a square filled with the 100% opaque fog
+ for x in range(x_min, x_max):
+ for y in range(y_min, y_max):
+ set_cell(x, y, 0, 0, 0)
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/fog_of_war/fog.scn b/demos/2d/fog_of_war/fog.scn
index 4987f1ead5..cf19601567 100644
--- a/demos/2d/fog_of_war/fog.scn
+++ b/demos/2d/fog_of_war/fog.scn
Binary files differ
diff --git a/demos/2d/fog_of_war/icon.png.flags b/demos/2d/fog_of_war/icon.png.flags
deleted file mode 100644
index dbef2209e8..0000000000
--- a/demos/2d/fog_of_war/icon.png.flags
+++ /dev/null
@@ -1 +0,0 @@
-gen_mipmaps=true
diff --git a/demos/2d/fog_of_war/tile_edit.scn b/demos/2d/fog_of_war/tile_edit.scn
index aaca19d370..3eddf38e48 100644
--- a/demos/2d/fog_of_war/tile_edit.scn
+++ b/demos/2d/fog_of_war/tile_edit.scn
Binary files differ
diff --git a/demos/2d/fog_of_war/troll.gd b/demos/2d/fog_of_war/troll.gd
index d118d3a2ba..6f40072e84 100644
--- a/demos/2d/fog_of_war/troll.gd
+++ b/demos/2d/fog_of_war/troll.gd
@@ -2,42 +2,37 @@
extends KinematicBody2D
# This is a simple collision demo showing how
-# the kinematic cotroller works.
+# the kinematic controller works.
# move() will allow to move the node, and will
-# always move it to a non-colliding spot,
+# always move it to a non-colliding spot,
# as long as it starts from a non-colliding spot too.
+# Member variables
+const MOTION_SPEED = 160 # Pixels/second
-#pixels / second
-const MOTION_SPEED=160
func _fixed_process(delta):
-
var motion = Vector2()
if (Input.is_action_pressed("move_up")):
- motion+=Vector2(0,-1)
+ motion += Vector2(0, -1)
if (Input.is_action_pressed("move_bottom")):
- motion+=Vector2(0,1)
+ motion += Vector2(0, 1)
if (Input.is_action_pressed("move_left")):
- motion+=Vector2(-1,0)
+ motion += Vector2(-1, 0)
if (Input.is_action_pressed("move_right")):
- motion+=Vector2(1,0)
+ motion += Vector2(1, 0)
- motion = motion.normalized() * MOTION_SPEED * delta
+ motion = motion.normalized()*MOTION_SPEED*delta
motion = move(motion)
- #make character slide nicely through the world
+ # Make character slide nicely through the world
var slide_attempts = 4
- while(is_colliding() and slide_attempts>0):
+ while(is_colliding() and slide_attempts > 0):
motion = get_collision_normal().slide(motion)
- motion=move(motion)
- slide_attempts-=1
-
+ motion = move(motion)
+ slide_attempts -= 1
+
func _ready():
- # Initalization here
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/fog_of_war/troll.scn b/demos/2d/fog_of_war/troll.scn
index f5d87c3631..ab9af17221 100644
--- a/demos/2d/fog_of_war/troll.scn
+++ b/demos/2d/fog_of_war/troll.scn
Binary files differ
diff --git a/demos/2d/hdr/beach_cave.gd b/demos/2d/hdr/beach_cave.gd
index 9dffbc4662..fcc878e565 100644
--- a/demos/2d/hdr/beach_cave.gd
+++ b/demos/2d/hdr/beach_cave.gd
@@ -1,26 +1,21 @@
extends Node2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-const CAVE_LIMIT=1000
+# Member variables
+const CAVE_LIMIT = 1000
-func _input(ev):
- if (ev.type==InputEvent.MOUSE_MOTION and ev.button_mask&1):
- var rel_x = ev.relative_x
+
+func _input(event):
+ if (event.type == InputEvent.MOUSE_MOTION and event.button_mask&1):
+ var rel_x = event.relative_x
var cavepos = get_node("cave").get_pos()
- cavepos.x+=rel_x
- if (cavepos.x<-CAVE_LIMIT):
- cavepos.x=-CAVE_LIMIT
- elif (cavepos.x>0):
- cavepos.x=0
+ cavepos.x += rel_x
+ if (cavepos.x < -CAVE_LIMIT):
+ cavepos.x = -CAVE_LIMIT
+ elif (cavepos.x > 0):
+ cavepos.x = 0
get_node("cave").set_pos(cavepos)
-
+
func _ready():
set_process_input(true)
- # Initialization here
- pass
-
-
diff --git a/demos/2d/hdr/beach_cave.scn b/demos/2d/hdr/beach_cave.scn
index 4147a130ad..6a4108e7a5 100644
--- a/demos/2d/hdr/beach_cave.scn
+++ b/demos/2d/hdr/beach_cave.scn
Binary files differ
diff --git a/demos/2d/hdr/engine.cfg b/demos/2d/hdr/engine.cfg
index 3d8b4222d5..ab53a022f0 100644
--- a/demos/2d/hdr/engine.cfg
+++ b/demos/2d/hdr/engine.cfg
@@ -2,6 +2,7 @@
name="HDR for 2D"
main_scene="res://beach_cave.scn"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/hdr/icon.png b/demos/2d/hdr/icon.png
new file mode 100644
index 0000000000..461cd4638a
--- /dev/null
+++ b/demos/2d/hdr/icon.png
Binary files differ
diff --git a/demos/2d/hexamap/map.scn b/demos/2d/hexamap/map.scn
index 5798aab850..de49527003 100644
--- a/demos/2d/hexamap/map.scn
+++ b/demos/2d/hexamap/map.scn
Binary files differ
diff --git a/demos/2d/hexamap/tiles.scn b/demos/2d/hexamap/tiles.scn
index 265aedac2b..a019bbb92d 100644
--- a/demos/2d/hexamap/tiles.scn
+++ b/demos/2d/hexamap/tiles.scn
Binary files differ
diff --git a/demos/2d/hexamap/troll.gd b/demos/2d/hexamap/troll.gd
index d118d3a2ba..82938fdf10 100644
--- a/demos/2d/hexamap/troll.gd
+++ b/demos/2d/hexamap/troll.gd
@@ -2,42 +2,37 @@
extends KinematicBody2D
# This is a simple collision demo showing how
-# the kinematic cotroller works.
+# the kinematic controller works.
# move() will allow to move the node, and will
# always move it to a non-colliding spot,
# as long as it starts from a non-colliding spot too.
+# Member variables
+const MOTION_SPEED = 160 # Pixels/second
-#pixels / second
-const MOTION_SPEED=160
func _fixed_process(delta):
-
var motion = Vector2()
if (Input.is_action_pressed("move_up")):
- motion+=Vector2(0,-1)
+ motion += Vector2(0, -1)
if (Input.is_action_pressed("move_bottom")):
- motion+=Vector2(0,1)
+ motion += Vector2(0, 1)
if (Input.is_action_pressed("move_left")):
- motion+=Vector2(-1,0)
+ motion += Vector2(-1, 0)
if (Input.is_action_pressed("move_right")):
- motion+=Vector2(1,0)
+ motion += Vector2(1, 0)
- motion = motion.normalized() * MOTION_SPEED * delta
+ motion = motion.normalized()*MOTION_SPEED*delta
motion = move(motion)
- #make character slide nicely through the world
+ # Make character slide nicely through the world
var slide_attempts = 4
- while(is_colliding() and slide_attempts>0):
+ while(is_colliding() and slide_attempts > 0):
motion = get_collision_normal().slide(motion)
- motion=move(motion)
- slide_attempts-=1
-
+ motion = move(motion)
+ slide_attempts -= 1
+
func _ready():
- # Initalization here
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/hexamap/troll.scn b/demos/2d/hexamap/troll.scn
index f5d87c3631..1f33dabf8e 100644
--- a/demos/2d/hexamap/troll.scn
+++ b/demos/2d/hexamap/troll.scn
Binary files differ
diff --git a/demos/2d/isometric/dungeon.scn b/demos/2d/isometric/dungeon.scn
index 64efc257c0..8f0f316d73 100644
--- a/demos/2d/isometric/dungeon.scn
+++ b/demos/2d/isometric/dungeon.scn
Binary files differ
diff --git a/demos/2d/isometric/tileset.scn b/demos/2d/isometric/tileset.scn
index c04ea5382c..e487285f83 100644
--- a/demos/2d/isometric/tileset.scn
+++ b/demos/2d/isometric/tileset.scn
Binary files differ
diff --git a/demos/2d/isometric/troll.gd b/demos/2d/isometric/troll.gd
index d118d3a2ba..d8d4880df1 100644
--- a/demos/2d/isometric/troll.gd
+++ b/demos/2d/isometric/troll.gd
@@ -2,42 +2,37 @@
extends KinematicBody2D
# This is a simple collision demo showing how
-# the kinematic cotroller works.
+# the kinematic controller works.
# move() will allow to move the node, and will
# always move it to a non-colliding spot,
# as long as it starts from a non-colliding spot too.
+# Member variables
+const MOTION_SPEED = 160 # Pixels/seconds
-#pixels / second
-const MOTION_SPEED=160
func _fixed_process(delta):
-
var motion = Vector2()
if (Input.is_action_pressed("move_up")):
- motion+=Vector2(0,-1)
+ motion += Vector2(0, -1)
if (Input.is_action_pressed("move_bottom")):
- motion+=Vector2(0,1)
+ motion += Vector2(0, 1)
if (Input.is_action_pressed("move_left")):
- motion+=Vector2(-1,0)
+ motion += Vector2(-1, 0)
if (Input.is_action_pressed("move_right")):
- motion+=Vector2(1,0)
+ motion += Vector2(1, 0)
- motion = motion.normalized() * MOTION_SPEED * delta
+ motion = motion.normalized()*MOTION_SPEED*delta
motion = move(motion)
- #make character slide nicely through the world
+ # Make character slide nicely through the world
var slide_attempts = 4
- while(is_colliding() and slide_attempts>0):
+ while(is_colliding() and slide_attempts > 0):
motion = get_collision_normal().slide(motion)
- motion=move(motion)
- slide_attempts-=1
-
+ motion = move(motion)
+ slide_attempts -= 1
+
func _ready():
- # Initalization here
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/isometric/troll.scn b/demos/2d/isometric/troll.scn
index 19b566fe05..d53aac4fbf 100644
--- a/demos/2d/isometric/troll.scn
+++ b/demos/2d/isometric/troll.scn
Binary files differ
diff --git a/demos/2d/isometric_light/column.scn b/demos/2d/isometric_light/column.scn
index f0b7683885..03f3c2c976 100644
--- a/demos/2d/isometric_light/column.scn
+++ b/demos/2d/isometric_light/column.scn
Binary files differ
diff --git a/demos/2d/isometric_light/cubio.gd b/demos/2d/isometric_light/cubio.gd
index 30c766936c..508cd3728c 100644
--- a/demos/2d/isometric_light/cubio.gd
+++ b/demos/2d/isometric_light/cubio.gd
@@ -1,96 +1,85 @@
extends KinematicBody2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
+# Member variables
const MAX_SPEED = 300.0
const IDLE_SPEED = 10.0
-const ACCEL=5.0
-const VSCALE=0.5
-const SHOOT_INTERVAL=0.3
+const ACCEL = 5.0
+const VSCALE = 0.5
+const SHOOT_INTERVAL = 0.3
+
+var speed = Vector2()
+var current_anim = ""
+var current_mirror = false
-var speed=Vector2()
-var current_anim=""
-var current_mirror=false
+var shoot_countdown = 0
-var shoot_countdown=0
-func _input(ev):
- if (ev.type==InputEvent.MOUSE_BUTTON and ev.button_index==1 and ev.pressed and shoot_countdown<=0):
- var pos = get_canvas_transform().affine_inverse() * ev.pos
- var dir = (pos-get_global_pos()).normalized()
+func _input(event):
+ if (event.type == InputEvent.MOUSE_BUTTON and event.button_index == 1 and event.pressed and shoot_countdown <= 0):
+ var pos = get_canvas_transform().affine_inverse()*event.pos
+ var dir = (pos - get_global_pos()).normalized()
var bullet = preload("res://shoot.scn").instance()
- bullet.advance_dir=dir
- bullet.set_pos( get_global_pos() + dir * 60 )
+ bullet.advance_dir = dir
+ bullet.set_pos(get_global_pos() + dir*60)
get_parent().add_child(bullet)
- shoot_countdown=SHOOT_INTERVAL
-
-
-
+ shoot_countdown = SHOOT_INTERVAL
+
func _fixed_process(delta):
-
- shoot_countdown-=delta
+ shoot_countdown -= delta
var dir = Vector2()
if (Input.is_action_pressed("up")):
- dir+=Vector2(0,-1)
+ dir += Vector2(0, -1)
if (Input.is_action_pressed("down")):
- dir+=Vector2(0,1)
+ dir += Vector2(0, 1)
if (Input.is_action_pressed("left")):
- dir+=Vector2(-1,0)
+ dir += Vector2(-1, 0)
if (Input.is_action_pressed("right")):
- dir+=Vector2(1,0)
-
- if (dir!=Vector2()):
- dir=dir.normalized()
- speed = speed.linear_interpolate(dir*MAX_SPEED,delta*ACCEL)
- var motion = speed * delta
- motion.y*=VSCALE
- motion=move(motion)
+ dir += Vector2(1, 0)
+
+ if (dir != Vector2()):
+ dir = dir.normalized()
+ speed = speed.linear_interpolate(dir*MAX_SPEED, delta*ACCEL)
+ var motion = speed*delta
+ motion.y *= VSCALE
+ motion = move(motion)
if (is_colliding()):
var n = get_collision_normal()
- motion=n.slide(motion)
+ motion = n.slide(motion)
move(motion)
- var next_anim=""
- var next_mirror=false
+ var next_anim = ""
+ var next_mirror = false
- if (dir==Vector2() and speed.length()<IDLE_SPEED):
- next_anim="idle"
- next_mirror=false
- elif (speed.length()>IDLE_SPEED*0.1):
- var angle = atan2(abs(speed.x),speed.y)
+ if (dir == Vector2() and speed.length() < IDLE_SPEED):
+ next_anim = "idle"
+ next_mirror = false
+ elif (speed.length() > IDLE_SPEED*0.1):
+ var angle = atan2(abs(speed.x), speed.y)
- next_mirror = speed.x>0
- if (angle<PI/8):
- next_anim="bottom"
- next_mirror=false
- elif (angle<PI/4+PI/8):
- next_anim="bottom_left"
- elif (angle<PI*2/4+PI/8):
- next_anim="left"
- elif (angle<PI*3/4+PI/8):
- next_anim="top_left"
+ next_mirror = speed.x > 0
+ if (angle < PI/8):
+ next_anim = "bottom"
+ next_mirror = false
+ elif (angle < PI/4 + PI/8):
+ next_anim = "bottom_left"
+ elif (angle < PI*2/4 + PI/8):
+ next_anim = "left"
+ elif (angle < PI*3/4 + PI/8):
+ next_anim = "top_left"
else:
- next_anim="top"
- next_mirror=false
-
-
- if (next_anim!=current_anim or next_mirror!=current_mirror):
+ next_anim = "top"
+ next_mirror = false
+
+ if (next_anim != current_anim or next_mirror != current_mirror):
get_node("frames").set_flip_h(next_mirror)
get_node("anim").play(next_anim)
- current_anim=next_anim
- current_mirror=next_mirror
-
+ current_anim = next_anim
+ current_mirror = next_mirror
func _ready():
- # Initialization here
set_fixed_process(true)
set_process_input(true)
- pass
-
-
diff --git a/demos/2d/isometric_light/cubio.scn b/demos/2d/isometric_light/cubio.scn
index fc931b0c8d..55e2185247 100644
--- a/demos/2d/isometric_light/cubio.scn
+++ b/demos/2d/isometric_light/cubio.scn
Binary files differ
diff --git a/demos/2d/isometric_light/engine.cfg b/demos/2d/isometric_light/engine.cfg
index 08393f1724..a5b053aa95 100644
--- a/demos/2d/isometric_light/engine.cfg
+++ b/demos/2d/isometric_light/engine.cfg
@@ -2,6 +2,7 @@
name="Isometric 2D + Lighting"
main_scene="res://map.scn"
+icon="res://icon.png"
[input]
diff --git a/demos/2d/isometric_light/icon.png b/demos/2d/isometric_light/icon.png
new file mode 100644
index 0000000000..0801f78ea5
--- /dev/null
+++ b/demos/2d/isometric_light/icon.png
Binary files differ
diff --git a/demos/2d/isometric_light/map.gd b/demos/2d/isometric_light/map.gd
index f712aeeaec..6b790ddf1c 100644
--- a/demos/2d/isometric_light/map.gd
+++ b/demos/2d/isometric_light/map.gd
@@ -1,18 +1,7 @@
extends Node2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-func _ready():
- # Initialization here
- pass
-
-
-
-
-func _on_prince_area_body_enter( body ):
- if (body.get_name()=="cubio"):
+func _on_prince_area_body_enter(body):
+ if (body.get_name() == "cubio"):
get_node("message").show()
- pass # replace with function body
diff --git a/demos/2d/isometric_light/map.scn b/demos/2d/isometric_light/map.scn
index 89002f991f..da3fc5654f 100644
--- a/demos/2d/isometric_light/map.scn
+++ b/demos/2d/isometric_light/map.scn
Binary files differ
diff --git a/demos/2d/isometric_light/shoot.gd b/demos/2d/isometric_light/shoot.gd
index 0486bbb658..b48d4ad34b 100644
--- a/demos/2d/isometric_light/shoot.gd
+++ b/demos/2d/isometric_light/shoot.gd
@@ -1,27 +1,21 @@
extends KinematicBody2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
-var advance_dir=Vector2(1,0)
+# Member variables
const ADVANCE_SPEED = 500.0
-var hit=false
+var advance_dir = Vector2(1, 0)
+var hit = false
+
func _fixed_process(delta):
-
if (hit):
return
- move(advance_dir*delta*ADVANCE_SPEED)
+ move(advance_dir*delta*ADVANCE_SPEED)
if (is_colliding()):
get_node("anim").play("explode")
- hit=true
+ hit = true
+
func _ready():
- # Initialization here
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/isometric_light/shoot.scn b/demos/2d/isometric_light/shoot.scn
index 672608810f..6909ae0c71 100644
--- a/demos/2d/isometric_light/shoot.scn
+++ b/demos/2d/isometric_light/shoot.scn
Binary files differ
diff --git a/demos/2d/isometric_light/tileset_scene.scn b/demos/2d/isometric_light/tileset_scene.scn
index 3d0773c9c5..4841cc18a7 100644
--- a/demos/2d/isometric_light/tileset_scene.scn
+++ b/demos/2d/isometric_light/tileset_scene.scn
Binary files differ
diff --git a/demos/2d/isometric_light/torch.scn b/demos/2d/isometric_light/torch.scn
index 3f08b33311..9d6a8e2eae 100644
--- a/demos/2d/isometric_light/torch.scn
+++ b/demos/2d/isometric_light/torch.scn
Binary files differ
diff --git a/demos/2d/kinematic_char/colworld.gd b/demos/2d/kinematic_char/colworld.gd
index fe2dc30bb6..7926ef9d54 100644
--- a/demos/2d/kinematic_char/colworld.gd
+++ b/demos/2d/kinematic_char/colworld.gd
@@ -1,18 +1,8 @@
extends Node2D
-#member variables here, example:
-#var a=2
-#var b="textvar"
-func _ready():
- #Initalization here
- pass
-
-
-
-
-func _on_princess_body_enter( body ):
- #the name of this editor-generated callback is unfortunate
- if (body.get_name()=="player"):
+func _on_princess_body_enter(body):
+ # The name of this editor-generated callback is unfortunate
+ if (body.get_name() == "player"):
get_node("youwin").show()
diff --git a/demos/2d/kinematic_char/colworld.scn b/demos/2d/kinematic_char/colworld.scn
index e66705368d..ff10826563 100644
--- a/demos/2d/kinematic_char/colworld.scn
+++ b/demos/2d/kinematic_char/colworld.scn
Binary files differ
diff --git a/demos/2d/kinematic_char/engine.cfg b/demos/2d/kinematic_char/engine.cfg
index 4ce8f836ae..8bdd5e2fc5 100644
--- a/demos/2d/kinematic_char/engine.cfg
+++ b/demos/2d/kinematic_char/engine.cfg
@@ -1,6 +1,6 @@
[application]
-name="Kinematic Collision"
+name="Kinematic Character"
main_scene="res://colworld.scn"
icon="res://icon.png"
diff --git a/demos/2d/kinematic_char/player.gd b/demos/2d/kinematic_char/player.gd
index 329382408b..2890cc2ce3 100644
--- a/demos/2d/kinematic_char/player.gd
+++ b/demos/2d/kinematic_char/player.gd
@@ -1,137 +1,123 @@
extends KinematicBody2D
-#This is a simple collision demo showing how
-#the kinematic cotroller works.
-#move() will allow to move the node, and will
-#always move it to a non-colliding spot,
-#as long as it starts from a non-colliding spot too.
+# This is a simple collision demo showing how
+# the kinematic controller works.
+# move() will allow to move the node, and will
+# always move it to a non-colliding spot,
+# as long as it starts from a non-colliding spot too.
+# Member variables
+const GRAVITY = 500.0 # Pixels/second
-#pixels / second
-const GRAVITY = 500.0
-
-#Angle in degrees towards either side that the player can
-#consider "floor".
+# Angle in degrees towards either side that the player can consider "floor"
const FLOOR_ANGLE_TOLERANCE = 40
const WALK_FORCE = 600
-const WALK_MIN_SPEED=10
+const WALK_MIN_SPEED = 10
const WALK_MAX_SPEED = 200
const STOP_FORCE = 1300
const JUMP_SPEED = 200
-const JUMP_MAX_AIRBORNE_TIME=0.2
+const JUMP_MAX_AIRBORNE_TIME = 0.2
-const SLIDE_STOP_VELOCITY=1.0 #one pixel per second
-const SLIDE_STOP_MIN_TRAVEL=1.0 #one pixel
+const SLIDE_STOP_VELOCITY = 1.0 # One pixel per second
+const SLIDE_STOP_MIN_TRAVEL = 1.0 # One pixel
var velocity = Vector2()
-var on_air_time=100
-var jumping=false
+var on_air_time = 100
+var jumping = false
-var prev_jump_pressed=false
+var prev_jump_pressed = false
-func _fixed_process(delta):
- #create forces
- var force = Vector2(0,GRAVITY)
+func _fixed_process(delta):
+ # Create forces
+ var force = Vector2(0, GRAVITY)
var walk_left = Input.is_action_pressed("move_left")
var walk_right = Input.is_action_pressed("move_right")
var jump = Input.is_action_pressed("jump")
-
- var stop=true
+
+ var stop = true
if (walk_left):
- if (velocity.x<=WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED):
- force.x-=WALK_FORCE
- stop=false
-
+ if (velocity.x <= WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED):
+ force.x -= WALK_FORCE
+ stop = false
elif (walk_right):
- if (velocity.x>=-WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED):
- force.x+=WALK_FORCE
- stop=false
+ if (velocity.x >= -WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED):
+ force.x += WALK_FORCE
+ stop = false
if (stop):
var vsign = sign(velocity.x)
var vlen = abs(velocity.x)
- vlen -= STOP_FORCE * delta
- if (vlen<0):
- vlen=0
-
- velocity.x=vlen*vsign
+ vlen -= STOP_FORCE*delta
+ if (vlen < 0):
+ vlen = 0
-
-
- #integrate forces to velocity
- velocity += force * delta
+ velocity.x = vlen*vsign
- #integrate velocity into motion and move
- var motion = velocity * delta
-
- #move and consume motion
+ # Integrate forces to velocity
+ velocity += force*delta
+
+ # Integrate velocity into motion and move
+ var motion = velocity*delta
+
+ # Move and consume motion
motion = move(motion)
-
-
- var floor_velocity=Vector2()
-
+
+ var floor_velocity = Vector2()
+
if (is_colliding()):
- # you can check which tile was collision against with this
+ # You can check which tile was collision against with this
# print(get_collider_metadata())
-
- #ran against something, is it the floor? get normal
+
+ # Ran against something, is it the floor? Get normal
var n = get_collision_normal()
-
- if ( rad2deg(acos(n.dot( Vector2(0,-1)))) < FLOOR_ANGLE_TOLERANCE ):
- #if angle to the "up" vectors is < angle tolerance
- #char is on floor
- on_air_time=0
- floor_velocity=get_collider_velocity()
-
-
- if (on_air_time==0 and force.x==0 and get_travel().length() < SLIDE_STOP_MIN_TRAVEL and abs(velocity.x) < SLIDE_STOP_VELOCITY and get_collider_velocity()==Vector2()):
- #Since this formula will always slide the character around,
- #a special case must be considered to to stop it from moving
- #if standing on an inclined floor. Conditions are:
- # 1) Standing on floor (on_air_time==0)
+
+ if (rad2deg(acos(n.dot(Vector2(0, -1)))) < FLOOR_ANGLE_TOLERANCE):
+ # If angle to the "up" vectors is < angle tolerance
+ # char is on floor
+ on_air_time = 0
+ floor_velocity = get_collider_velocity()
+
+ if (on_air_time == 0 and force.x == 0 and get_travel().length() < SLIDE_STOP_MIN_TRAVEL and abs(velocity.x) < SLIDE_STOP_VELOCITY and get_collider_velocity() == Vector2()):
+ # Since this formula will always slide the character around,
+ # a special case must be considered to to stop it from moving
+ # if standing on an inclined floor. Conditions are:
+ # 1) Standing on floor (on_air_time == 0)
# 2) Did not move more than one pixel (get_travel().length() < SLIDE_STOP_MIN_TRAVEL)
# 3) Not moving horizontally (abs(velocity.x) < SLIDE_STOP_VELOCITY)
# 4) Collider is not moving
-
+
revert_motion()
- velocity.y=0.0
-
+ velocity.y = 0.0
else:
- #For every other case of motion,our motion was interrupted.
- #Try to complete the motion by "sliding"
- #by the normal
-
+ # For every other case of motion, our motion was interrupted.
+ # Try to complete the motion by "sliding" by the normal
motion = n.slide(motion)
- velocity = n.slide(velocity)
- #then move again
+ velocity = n.slide(velocity)
+ # Then move again
move(motion)
-
- if (floor_velocity!=Vector2()):
- #if floor moves, move with floor
+
+ if (floor_velocity != Vector2()):
+ # If floor moves, move with floor
move(floor_velocity*delta)
-
- if (jumping and velocity.y>0):
- #if falling, no longer jumping
- jumping=false
-
- if (on_air_time<JUMP_MAX_AIRBORNE_TIME and jump and not prev_jump_pressed and not jumping):
- # Jump must also be allowed to happen if the
- # character left the floor a little bit ago.
+
+ if (jumping and velocity.y > 0):
+ # If falling, no longer jumping
+ jumping = false
+
+ if (on_air_time < JUMP_MAX_AIRBORNE_TIME and jump and not prev_jump_pressed and not jumping):
+ # Jump must also be allowed to happen if the character left the floor a little bit ago.
# Makes controls more snappy.
- velocity.y=-JUMP_SPEED
- jumping=true
-
- on_air_time+=delta
- prev_jump_pressed=jump
+ velocity.y = -JUMP_SPEED
+ jumping = true
+
+ on_air_time += delta
+ prev_jump_pressed = jump
+
func _ready():
- #Initalization here
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/kinematic_char/player.scn b/demos/2d/kinematic_char/player.scn
index 5809c0e98a..5ee86ce85d 100644
--- a/demos/2d/kinematic_char/player.scn
+++ b/demos/2d/kinematic_char/player.scn
Binary files differ
diff --git a/demos/2d/kinematic_col/colworld.scn b/demos/2d/kinematic_col/colworld.scn
index 064ff12075..06607b7efd 100644
--- a/demos/2d/kinematic_col/colworld.scn
+++ b/demos/2d/kinematic_col/colworld.scn
Binary files differ
diff --git a/demos/2d/kinematic_col/player.gd b/demos/2d/kinematic_col/player.gd
index 36784a9d9f..ce09e1509e 100644
--- a/demos/2d/kinematic_col/player.gd
+++ b/demos/2d/kinematic_col/player.gd
@@ -2,35 +2,30 @@
extends KinematicBody2D
# This is a simple collision demo showing how
-# the kinematic cotroller works.
+# the kinematic controller works.
# move() will allow to move the node, and will
# always move it to a non-colliding spot,
# as long as it starts from a non-colliding spot too.
+# Member variables
+const MOTION_SPEED = 160 # Pixels/second
-#pixels / second
-const MOTION_SPEED=160
func _fixed_process(delta):
-
var motion = Vector2()
if (Input.is_action_pressed("move_up")):
- motion+=Vector2(0,-1)
+ motion += Vector2(0, -1)
if (Input.is_action_pressed("move_bottom")):
- motion+=Vector2(0,1)
+ motion += Vector2(0, 1)
if (Input.is_action_pressed("move_left")):
- motion+=Vector2(-1,0)
+ motion += Vector2(-1, 0)
if (Input.is_action_pressed("move_right")):
- motion+=Vector2(1,0)
+ motion += Vector2(1, 0)
- motion = motion.normalized() * MOTION_SPEED * delta
+ motion = motion.normalized()*MOTION_SPEED*delta
move(motion)
-
+
func _ready():
- # Initalization here
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/kinematic_col/player.scn b/demos/2d/kinematic_col/player.scn
index e558bffe8e..28ad204472 100644
--- a/demos/2d/kinematic_col/player.scn
+++ b/demos/2d/kinematic_col/player.scn
Binary files differ
diff --git a/demos/2d/light_mask/engine.cfg b/demos/2d/light_mask/engine.cfg
index 8b0ae6f61d..39608669ab 100644
--- a/demos/2d/light_mask/engine.cfg
+++ b/demos/2d/light_mask/engine.cfg
@@ -2,6 +2,7 @@
name="Using Lights As Mask"
main_scene="res://lightmask.scn"
+icon="res://icon.png"
[rasterizer]
diff --git a/demos/2d/light_mask/icon.png b/demos/2d/light_mask/icon.png
new file mode 100644
index 0000000000..34a6b709f6
--- /dev/null
+++ b/demos/2d/light_mask/icon.png
Binary files differ
diff --git a/demos/2d/light_mask/lightmask.scn b/demos/2d/light_mask/lightmask.scn
index 08805f44c6..fcf56b5b84 100644
--- a/demos/2d/light_mask/lightmask.scn
+++ b/demos/2d/light_mask/lightmask.scn
Binary files differ
diff --git a/demos/2d/lights_shadows/engine.cfg b/demos/2d/lights_shadows/engine.cfg
index 771288c209..80142633d3 100644
--- a/demos/2d/lights_shadows/engine.cfg
+++ b/demos/2d/lights_shadows/engine.cfg
@@ -2,6 +2,7 @@
name="2D Lighting"
main_scene="res://light_shadows.scn"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/lights_shadows/icon.png b/demos/2d/lights_shadows/icon.png
new file mode 100644
index 0000000000..554f01bb46
--- /dev/null
+++ b/demos/2d/lights_shadows/icon.png
Binary files differ
diff --git a/demos/2d/lights_shadows/light_shadows.scn b/demos/2d/lights_shadows/light_shadows.scn
index a13e31376e..24ccd1e0be 100644
--- a/demos/2d/lights_shadows/light_shadows.scn
+++ b/demos/2d/lights_shadows/light_shadows.scn
Binary files differ
diff --git a/demos/2d/lookat/engine.cfg b/demos/2d/lookat/engine.cfg
index 56917a39ec..81df107f0e 100644
--- a/demos/2d/lookat/engine.cfg
+++ b/demos/2d/lookat/engine.cfg
@@ -2,3 +2,4 @@
name="Look At Pointer"
main_scene="res://lookat.scn"
+icon="res://icon.png"
diff --git a/demos/2d/lookat/icon.png b/demos/2d/lookat/icon.png
new file mode 100644
index 0000000000..442cc1799f
--- /dev/null
+++ b/demos/2d/lookat/icon.png
Binary files differ
diff --git a/demos/2d/lookat/lookat.gd b/demos/2d/lookat/lookat.gd
index 742c5b0671..c45c3ad622 100644
--- a/demos/2d/lookat/lookat.gd
+++ b/demos/2d/lookat/lookat.gd
@@ -1,43 +1,33 @@
extends Sprite
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
-const MODE_DIRECT=0
-const MODE_CONSTANT=1
-const MODE_SMOOTH=2
+# Member variables
+const MODE_DIRECT = 0
+const MODE_CONSTANT = 1
+const MODE_SMOOTH = 2
const ROTATION_SPEED = 1
const SMOOTH_SPEED = 2.0
-export(int,"Direct","Constant","Smooth") var mode=MODE_DIRECT
+export(int, "Direct", "Constant", "Smooth") var mode = MODE_DIRECT
+
func _process(delta):
var mpos = get_viewport().get_mouse_pos()
- if (mode==MODE_DIRECT):
-
+ if (mode == MODE_DIRECT):
look_at(mpos)
-
- elif (mode==MODE_CONSTANT):
-
+ elif (mode == MODE_CONSTANT):
var ang = get_angle_to(mpos)
var s = sign(ang)
- ang=abs(ang)
-
- rotate( min(ang,ROTATION_SPEED*delta)*s )
+ ang = abs(ang)
- elif (mode==MODE_SMOOTH):
-
- var ang = get_angle_to(mpos)
+ rotate(min(ang, ROTATION_SPEED*delta)*s)
+ elif (mode == MODE_SMOOTH):
+ var ang = get_angle_to(mpos)
- rotate( ang*delta*SMOOTH_SPEED )
+ rotate(ang*delta*SMOOTH_SPEED)
+
func _ready():
- # Initialization here
set_process(true)
- pass
-
-
diff --git a/demos/2d/lookat/lookat.scn b/demos/2d/lookat/lookat.scn
index 880070b4c7..66be060c06 100644
--- a/demos/2d/lookat/lookat.scn
+++ b/demos/2d/lookat/lookat.scn
Binary files differ
diff --git a/demos/2d/motion/engine.cfg b/demos/2d/motion/engine.cfg
index 261111904c..6e660572d6 100644
--- a/demos/2d/motion/engine.cfg
+++ b/demos/2d/motion/engine.cfg
@@ -2,6 +2,7 @@
name="Motion Test"
main_scene="res://motion.scn"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/motion/icon.png b/demos/2d/motion/icon.png
new file mode 100644
index 0000000000..9e64961d3c
--- /dev/null
+++ b/demos/2d/motion/icon.png
Binary files differ
diff --git a/demos/2d/motion/motion.gd b/demos/2d/motion/motion.gd
index 8f8f56a889..f9bbd6f90d 100644
--- a/demos/2d/motion/motion.gd
+++ b/demos/2d/motion/motion.gd
@@ -1,38 +1,33 @@
extends Sprite
-
-export var use_idle=true
-
-# member variables here, example:
-# var a=2
-# var b="textvar"
+# Member variables
const BEGIN = -113
const END = 907
-const TIME = 5.0 # seconds
-const SPEED = (END-BEGIN)/TIME
+const TIME = 5.0 # Seconds
+const SPEED = (END - BEGIN)/TIME
+
+export var use_idle = true
+
func _process(delta):
var ofs = get_pos()
- ofs.x+=delta*SPEED
- if (ofs.x>END):
- ofs.x=BEGIN
+ ofs.x += delta*SPEED
+ if (ofs.x > END):
+ ofs.x = BEGIN
set_pos(ofs)
-
+
+
func _fixed_process(delta):
var ofs = get_pos()
- ofs.x+=delta*SPEED
- if (ofs.x>END):
- ofs.x=BEGIN
+ ofs.x += delta*SPEED
+ if (ofs.x > END):
+ ofs.x = BEGIN
set_pos(ofs)
-
+
func _ready():
- # Initialization here
if (use_idle):
set_process(true)
else:
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/motion/motion.scn b/demos/2d/motion/motion.scn
index 6c5b5307ac..6e19356674 100644
--- a/demos/2d/motion/motion.scn
+++ b/demos/2d/motion/motion.scn
Binary files differ
diff --git a/demos/2d/navpoly/engine.cfg b/demos/2d/navpoly/engine.cfg
index 40515dd3d2..b750419915 100644
--- a/demos/2d/navpoly/engine.cfg
+++ b/demos/2d/navpoly/engine.cfg
@@ -2,6 +2,7 @@
name="Navigation Polygon (2D)"
main_scene="res://navigation.scn"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/navpoly/icon.png b/demos/2d/navpoly/icon.png
new file mode 100644
index 0000000000..7a28a367c6
--- /dev/null
+++ b/demos/2d/navpoly/icon.png
Binary files differ
diff --git a/demos/2d/navpoly/navigation.gd b/demos/2d/navpoly/navigation.gd
index 9c3dc2921d..4cfa2ad733 100644
--- a/demos/2d/navpoly/navigation.gd
+++ b/demos/2d/navpoly/navigation.gd
@@ -1,63 +1,53 @@
extends Navigation2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-var begin=Vector2()
-var end=Vector2()
-var path=[]
+# Member variables
+const SPEED = 200.0
-const SPEED=200.0
-
-func _process(delta):
+var begin = Vector2()
+var end = Vector2()
+var path = []
- if (path.size()>1):
-
+func _process(delta):
+ if (path.size() > 1):
var to_walk = delta*SPEED
- while(to_walk>0 and path.size()>=2):
- var pfrom = path[path.size()-1]
- var pto = path[path.size()-2]
+ while(to_walk > 0 and path.size() >= 2):
+ var pfrom = path[path.size() - 1]
+ var pto = path[path.size() - 2]
var d = pfrom.distance_to(pto)
- if (d<=to_walk):
- path.remove(path.size()-1)
- to_walk-=d
+ if (d <= to_walk):
+ path.remove(path.size() - 1)
+ to_walk -= d
else:
- path[path.size()-1] = pfrom.linear_interpolate(pto,to_walk/d)
- to_walk=0
-
- var atpos = path[path.size()-1]
+ path[path.size() - 1] = pfrom.linear_interpolate(pto, to_walk/d)
+ to_walk = 0
+
+ var atpos = path[path.size() - 1]
get_node("agent").set_pos(atpos)
- if (path.size()<2):
- path=[]
+ if (path.size() < 2):
+ path = []
set_process(false)
-
else:
set_process(false)
-
func _update_path():
-
- var p = get_simple_path(begin,end,true)
- path=Array(p) # Vector2array to complex to use, convert to regular array
+ var p = get_simple_path(begin, end, true)
+ path = Array(p) # Vector2array too complex to use, convert to regular array
path.invert()
set_process(true)
-func _input(ev):
- if (ev.type==InputEvent.MOUSE_BUTTON and ev.pressed and ev.button_index==1):
- begin=get_node("agent").get_pos()
- #mouse to local navigatio cooards
- end=ev.pos - get_pos()
+func _input(event):
+ if (event.type == InputEvent.MOUSE_BUTTON and event.pressed and event.button_index == 1):
+ begin = get_node("agent").get_pos()
+ # Mouse to local navigation coordinates
+ end = event.pos - get_pos()
_update_path()
+
func _ready():
- # Initialization here
set_process_input(true)
- pass
-
-
diff --git a/demos/2d/navpoly/navigation.scn b/demos/2d/navpoly/navigation.scn
index 1bb7de391b..c56270bfd3 100644
--- a/demos/2d/navpoly/navigation.scn
+++ b/demos/2d/navpoly/navigation.scn
Binary files differ
diff --git a/demos/2d/navpoly/navigation2.scn b/demos/2d/navpoly/navigation2.scn
deleted file mode 100644
index 224aed73f5..0000000000
--- a/demos/2d/navpoly/navigation2.scn
+++ /dev/null
Binary files differ
diff --git a/demos/2d/normalmaps/engine.cfg b/demos/2d/normalmaps/engine.cfg
index f0002dc2b8..4f9f4f67f0 100644
--- a/demos/2d/normalmaps/engine.cfg
+++ b/demos/2d/normalmaps/engine.cfg
@@ -2,6 +2,7 @@
name="2D Normal Mapping"
main_scene="res://normalmap.scn"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/normalmaps/icon.png b/demos/2d/normalmaps/icon.png
new file mode 100644
index 0000000000..11ff5de829
--- /dev/null
+++ b/demos/2d/normalmaps/icon.png
Binary files differ
diff --git a/demos/2d/normalmaps/normalmap.scn b/demos/2d/normalmaps/normalmap.scn
index ab737e83f3..cf5fc05ce1 100644
--- a/demos/2d/normalmaps/normalmap.scn
+++ b/demos/2d/normalmaps/normalmap.scn
Binary files differ
diff --git a/demos/2d/particles/particles.xml b/demos/2d/particles/particles.xml
index c8f7596b86..c21ccb1f55 100644
--- a/demos/2d/particles/particles.xml
+++ b/demos/2d/particles/particles.xml
@@ -1,37 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="4" version="1.0" version_name="Godot Engine v1.0.3917-beta1">
- <ext_resource path="res://fire_particle.png" type="Texture"></ext_resource>
- <ext_resource path="res://smoke_particle.png" type="Texture"></ext_resource>
- <ext_resource path="res://spark_particle2.png" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="8" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://fire_particle.png" type="Texture" index="0"></ext_resource>
+ <ext_resource path="res://smoke_particle.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://spark_particle2.png" type="Texture" index="2"></ext_resource>
+ <resource type="ColorRamp" path="local://1">
+ <real_array name="offsets" len="3"> 0, 0.1, 1 </real_array>
+ <color_array name="colors" len="3"> 1, 1, 1, 0, 0.886275, 0.371681, 0, 1, 1, 0.99115, 1, 0 </color_array>
+
+ </resource>
+ <resource type="ColorRamp" path="local://2">
+ <real_array name="offsets" len="3"> 0, 0.2, 1 </real_array>
+ <color_array name="colors" len="3"> 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0 </color_array>
+
+ </resource>
+ <resource type="ColorRamp" path="local://3">
+ <real_array name="offsets" len="4"> 0, 0.1, 0.5, 1 </real_array>
+ <color_array name="colors" len="4"> 1, 1, 1, 0.870518, 1, 0.47451, 0.6, 1, 0.529412, 0.74902, 1, 1, 0, 1, 0.698039, 0 </color_array>
+
+ </resource>
+ <resource type="ColorRamp" path="local://4">
+ <real_array name="offsets" len="4"> 0, 0.1, 0.7, 1 </real_array>
+ <color_array name="colors" len="4"> 1, 1, 1, 0, 0.886275, 0.401015, 0, 1, 1, 0.679866, 0.432123, 0.12654, 0, 0, 0, 0 </color_array>
+
+ </resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="68">
+ <string_array len="41">
<string> "Node" </string>
- <string> "_import_path" </string>
<string> "__meta__" </string>
<string> "Fire" </string>
- <string> "Particles2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/behind_parent" </string>
<string> "visibility/blend_mode" </string>
<string> "transform/pos" </string>
<string> "transform/rot" </string>
- <string> "transform/scale" </string>
<string> "config/amount" </string>
<string> "config/lifetime" </string>
- <string> "config/time_scale" </string>
- <string> "config/preprocess" </string>
- <string> "config/emit_timeout" </string>
- <string> "config/emitting" </string>
- <string> "config/offset" </string>
<string> "config/half_extents" </string>
<string> "config/local_space" </string>
- <string> "config/explosiveness" </string>
- <string> "config/flip_h" </string>
- <string> "config/flip_v" </string>
<string> "config/texture" </string>
<string> "params/direction" </string>
<string> "params/spread" </string>
@@ -47,136 +59,159 @@
<string> "params/initial_size" </string>
<string> "params/final_size" </string>
<string> "params/hue_variation" </string>
- <string> "randomness/direction" </string>
- <string> "randomness/spread" </string>
- <string> "randomness/linear_velocity" </string>
- <string> "randomness/spin_velocity" </string>
- <string> "randomness/orbit_velocity" </string>
- <string> "randomness/gravity_direction" </string>
- <string> "randomness/gravity_strength" </string>
- <string> "randomness/radial_accel" </string>
- <string> "randomness/tangential_accel" </string>
- <string> "randomness/damping" </string>
+ <string> "params/anim_speed_scale" </string>
+ <string> "params/anim_initial_pos" </string>
<string> "randomness/initial_angle" </string>
- <string> "randomness/initial_size" </string>
- <string> "randomness/final_size" </string>
- <string> "randomness/hue_variation" </string>
- <string> "color_phases/count" </string>
- <string> "phase_0/pos" </string>
- <string> "phase_0/color" </string>
- <string> "phase_1/pos" </string>
- <string> "phase_1/color" </string>
- <string> "phase_2/pos" </string>
- <string> "phase_2/color" </string>
- <string> "phase_3/pos" </string>
- <string> "phase_3/color" </string>
- <string> "emission_points" </string>
+ <string> "color/color_ramp" </string>
+ <string> "Particles2D" </string>
<string> "Smoke" </string>
+ <string> "randomness/spin_velocity" </string>
<string> "Magic" </string>
+ <string> "randomness/orbit_velocity" </string>
<string> "Explosion" </string>
+ <string> "visibility/behind_parent" </string>
+ <string> "config/time_scale" </string>
+ <string> "config/explosiveness" </string>
<string> "Mask" </string>
+ <string> "color/color" </string>
+ <string> "emission_points" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 6 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="304"> -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 29, 2, -1, 26, 3, 1, 4, 2, 5, 3, 6, 4, 7, 5, 8, 6, 9, 7, 10, 8, 11, 9, 12, 9, 13, 10, 14, 9, 15, 9, 16, 11, 17, 12, 18, 9, 19, 9, 20, 9, 21, 11, 22, 13, 23, 14, 24, 9, 25, 5, 26, 9, 27, 15, 28, 16, 0, 0, 0, 29, 30, -1, 25, 4, 17, 5, 18, 6, 4, 7, 19, 9, 7, 10, 20, 11, 9, 12, 21, 13, 22, 14, 5, 15, 9, 16, 9, 17, 9, 18, 9, 19, 9, 20, 9, 21, 11, 22, 5, 23, 23, 24, 9, 25, 5, 26, 9, 31, 5, 27, 5, 28, 24, 0, 0, 0, 29, 32, -1, 26, 4, 25, 6, 4, 7, 15, 8, 26, 9, 7, 10, 27, 11, 9, 12, 11, 13, 10, 14, 14, 15, 28, 16, 9, 17, 29, 18, 9, 19, 30, 20, 9, 21, 31, 22, 23, 23, 5, 24, 9, 25, 5, 26, 9, 31, 5, 33, 32, 27, 5, 28, 33, 0, 0, 0, 29, 34, -1, 28, 35, 34, 3, 1, 4, 35, 5, 3, 6, 4, 7, 15, 36, 15, 8, 6, 9, 7, 37, 36, 10, 20, 11, 9, 12, 11, 13, 37, 14, 9, 15, 9, 16, 11, 17, 12, 18, 9, 19, 9, 20, 38, 21, 5, 22, 13, 23, 23, 24, 9, 25, 5, 26, 9, 28, 39, 0, 0, 0, 29, 38, -1, 25, 4, 40, 6, 41, 7, 42, 8, 43, 9, 7, 10, 27, 11, 9, 12, 11, 13, 9, 14, 15, 15, 9, 16, 9, 17, 9, 18, 9, 19, 9, 20, 9, 21, 5, 22, 5, 23, 5, 24, 9, 25, 5, 26, 9, 31, 5, 39, 44, 40, 45, 0 </int_array>
<string> "variants" </string>
- <array len="65" shared="false">
- <node_path> "" </node_path>
+ <array len="46" shared="false">
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -193.367, -465.428 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
<bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 0.440127 </real>
- <string> "use_snap" </string>
- <bool> False </bool>
- <string> "ofs" </string>
- <vector2> -193.367, -173.288 </vector2>
- <string> "snap" </string>
- <int> 10 </int>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -185,77 +220,55 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <bool> True </bool>
- <real> 1 </real>
- <bool> False </bool>
<int> 1 </int>
<vector2> 165.787, 527.801 </vector2>
<real> -179.790649 </real>
- <vector2> 1, 1 </vector2>
<int> 32 </int>
- <real> 0 </real>
- <vector2> 0, 0 </vector2>
+ <real> 1 </real>
<vector2> 15, 15 </vector2>
- <resource resource_type="Texture" path="res://fire_particle.png"> </resource>
+ <bool> False </bool>
+ <resource external="0"> </resource>
+ <real> 0 </real>
<real> 20 </real>
<real> 180 </real>
<real> 80 </real>
<real> 0.7 </real>
<real> 0.3 </real>
<real> 2 </real>
- <int> 3 </int>
- <color> 1, 1, 1, 0 </color>
- <real> 0.1 </real>
- <color> 0.886275, 0.371681, 0, 1 </color>
- <color> 1, 0.99115, 1, 0 </color>
- <color> 0, 0, 0, 1 </color>
- <vector2_array len="0"> </vector2_array>
+ <resource resource_type="ColorRamp" path="local://1"> </resource>
<vector2> 377.396, 543.147 </vector2>
<real> 176.575912 </real>
<real> 4 </real>
- <resource resource_type="Texture" path="res://smoke_particle.png"> </resource>
+ <resource external="1"> </resource>
<real> 20.907272 </real>
<real> 47.151516 </real>
<real> 3 </real>
- <real> 0.2 </real>
- <color> 1, 1, 1, 1 </color>
- <color> 0, 0, 0, 0 </color>
+ <resource resource_type="ColorRamp" path="local://2"> </resource>
<vector2> 593.848, 531.064 </vector2>
<vector2> 40, 40 </vector2>
- <resource resource_type="Texture" path="res://spark_particle2.png"> </resource>
+ <resource external="2"> </resource>
<real> 0.01 </real>
<real> 9.8 </real>
<real> 15.515152 </real>
<real> 45 </real>
<real> 100 </real>
- <int> 4 </int>
- <color> 1, 1, 1, 0.870518 </color>
- <color> 1, 0.47451, 0.6, 1 </color>
- <real> 0.5 </real>
- <color> 0.529412, 0.74902, 1, 1 </color>
- <color> 0, 1, 0.698039, 0 </color>
+ <resource resource_type="ColorRamp" path="local://3"> </resource>
+ <bool> True </bool>
<vector2> 613.467, 182.62 </vector2>
<real> 0.05 </real>
<real> 184.546997 </real>
<real> 366.300415 </real>
- <color> 0.886275, 0.401015, 0, 1 </color>
- <color> 1, 0.679866, 0.432123, 0.12654 </color>
+ <resource resource_type="ColorRamp" path="local://4"> </resource>
<vector2> 192.975, 141.598 </vector2>
<int> 170 </int>
+ <real> 0.1 </real>
<vector2> 128, 128 </vector2>
- <int> 0 </int>
<color> 1, 0.477876, 0.60177, 1 </color>
- <color> 0.533333, 0.752212, 1, 1 </color>
- <color> 0, 1, 0.699115, 0 </color>
<vector2_array len="512"> -0.125, -0.03125, 0.65625, -0.148438, 0.609375, 0.0234375, -0.757812, 0.375, 0.265625, 0.078125, 0.632812, 0.382812, 0.671875, 0.414062, 0.367188, -0.226562, 0.75, -0.125, 0.4375, 0.421875, 0.335938, -0.148438, -0.125, 0.257812, -0.171875, 0.359375, -0.601562, -0.265625, 0.375, 0.382812, -0.296875, 0.09375, -0.664062, -0.21875, -0.554688, -0.226562, -0.320312, 0.367188, -0.320312, -0.257812, 0, -0.257812, 0.578125, -0.25, -0.164062, 0.109375, -0.578125, -0.015625, -0.445312, 0, 0.273438, 0.101562, 0.320312, 0.03125, -0.125, 0.0703125, -0.570312, 0.289062, 0.257812, -0.09375, -0.585938, 0.179688, -0.664062, 0.0234375, -0.25, -0.0859375, 0.6875, -0.109375, 0.234375, 0, -0.5, -0.265625, 0.710938, 0.335938, 0.609375, -0.046875, 0.664062, -0.210938, -0.242188, -0.21875, -0.484375, -0.257812, -0.453125, 0.414062, 0.609375, -0.203125, 0.289062, 0.132812, -0.03125, -0.257812, -0.492188, -0.1875, 0.5625, -0.140625, -0.5625, 0.148438, -0.257812, -0.234375, -0.140625, 0.15625, -0.5625, 0.109375, 0.132812, 0.398438, -0.640625, -0.25, -0.585938, 0.304688, -0.328125, -0.257812, 0.226562, 0.148438, -0.546875, 0.210938, 0.625, 0.179688, 0.648438, -0.0078125, 0.367188, 0.328125, 0.265625, 0.0546875, -0.59375, -0.273438, -0.203125, 0.21875, 0.570312, -0.21875, -0.695312, 0.078125, -0.375, 0.03125, -0.164062, 0.0390625, 0.265625, 0.226562, -0.625, -0.109375, 0.203125, -0.132812, -0.671875, 0.328125, 0.625, -0.179688, -0.640625, 0.0859375, 0.65625, 0, -0.242188, 0.414062, 0.242188, 0.25, -0.148438, -0.0625, 0.390625, -0.25, 0.664062, 0.351562, 0.320312, 0.203125, -0.546875, 0.335938, 0.328125, -0.148438, 0.609375, -0.0625, -0.171875, 0.046875, -0.578125, 0.0546875, -0.304688, -0.28125, 0.734375, -0.0546875, 0.679688, 0.390625, -0.460938, 0.0859375, -0.703125, 0.101562, -0.140625, 0.234375, -0.507812, 0.078125, -0.25, 0.304688, -0.046875, 0.359375, 0.1875, 0.0703125, -0.570312, 0.242188, 0.65625, 0.0859375, -0.203125, -0.265625, -0.164062, -0.179688, 0.367188, -0.1875, -0.601562, -0.101562, -0.117188, -0.210938, -0.546875, 0.109375, -0.585938, -0.28125, -0.59375, -0.03125, 0.3125, -0.179688, 0.414062, 0.429688, -0.476562, -0.195312, -0.0703125, -0.21875, -0.5625, 0.304688, -0.609375, 0.226562, 0.429688, 0.429688, 0.203125, 0.242188, 0.078125, 0.367188, 0.242188, 0.03125, 0.601562, -0.0390625, 0.328125, 0.03125, -0.53125, -0.195312, -0.53125, -0.210938, 0.3125, -0.257812, 0.445312, -0.273438, 0.273438, -0.273438, -0.695312, -0.179688, 0.234375, -0.15625, -0.546875, -0.242188, -0.234375, -0.125, 0.734375, -0.226562, 0.367188, -0.234375, -0.15625, 0.046875, -0.445312, -0.226562, 0.625, 0.03125, -0.0859375, 0.210938, -0.648438, 0.296875, 0.335938, -0.109375, 0.625, -0.078125, 0.601562, 0.351562, 0.242188, 0.140625, 0.0234375, -0.273438, -0.679688, -0.109375, 0.640625, 0.15625, 0.171875, 0.0859375, -0.273438, -0.273438, -0.242188, 0.34375, 0.179688, 0.15625, -0.179688, -0.117188, 0.671875, 0.03125, -0.640625, 0.304688, 0.109375, -0.242188, -0.210938, 0.382812, -0.0859375, 0.0078125, -0.695312, 0.078125, 0.296875, 0.320312, 0.304688, -0.226562, 0.257812, -0.0234375, -0.203125, -0.015625, -0.648438, 0.335938, -0.703125, -0.132812, -0.273438, -0.210938, -0.15625, -0.273438, -0.0390625, 0.335938, 0.617188, 0.179688, 0.34375, 0.390625, -0.210938, -0.132812, -0.226562, -0.117188, 0.617188, -0.289062, 0.125, -0.21875, 0.71875, -0.164062, -0.570312, 0.1875, -0.1875, 0.382812, 0.640625, -0.296875, -0.125, 0.109375, 0.671875, 0.289062, -0.515625, 0.382812, 0.359375, -0.179688, 0.726562, -0.226562, 0.25, 0.320312, -0.328125, 0, -0.117188, -0.234375, -0.210938, -0.148438, -0.546875, -0.117188, 0.359375, 0.429688, -0.15625, -0.226562, 0.632812, -0.257812, -0.28125, -0.273438, 0.265625, 0.015625, -0.765625, 0.351562, 0.703125, 0.421875, -0.585938, 0.0078125, 0.28125, 0.109375, 0.304688, 0.171875, 0.65625, 0.421875, 0.078125, 0.382812, 0.179688, 0.25, -0.382812, 0.0703125, 0.585938, -0.140625, -0.109375, 0.382812, -0.59375, -0.09375, 0.4375, 0.398438, -0.132812, 0.0234375, -0.625, 0.0078125, -0.210938, -0.21875, -0.25, 0.257812, 0.257812, 0.398438, 0.625, 0.195312, 0.148438, -0.234375, -0.476562, 0.398438, -0.210938, 0.046875, 0.695312, -0.101562, 0.695312, 0.140625, -0.492188, -0.1875, 0.25, -0.09375, -0.195312, -0.195312, -0.328125, 0.0703125, -0.242188, -0.0625, 0.296875, 0.34375, -0.632812, 0.0078125, -0.265625, 0.09375, 0.421875, -0.203125, 0.171875, 0.03125, -0.09375, -0.0703125, 0.289062, 0.0859375, -0.609375, 0.390625, -0.554688, 0.257812, -0.6875, 0.0078125, 0.304688, 0.414062, 0.226562, 0.390625, -0.21875, -0.28125, 0.265625, 0.320312, -0.671875, 0.234375, -0.210938, 0.03125, 0.679688, -0.0234375, 0.359375, -0.203125, 0.3125, 0.289062, 0.671875, 0.140625, -0.78125, 0.414062, -0.546875, 0.40625, 0.625, 0.367188, 0.0859375, 0.421875, 0.1875, -0.09375, 0.617188, 0.40625, -0.078125, -0.0390625, 0.695312, 0.0859375, -0.6875, -0.265625, 0.421875, -0.265625, 0.601562, -0.0234375, -0.3125, -0.265625, -0.078125, 0.046875, 0.617188, 0.164062, 0.273438, -0.03125, -0.695312, -0.015625, -0.5625, 0.164062, -0.578125, 0.265625, -0.726562, 0.421875, -0.078125, -0.25, -0.171875, 0.171875, -0.234375, -0.0390625, 0.257812, 0.429688, -0.179688, -0.117188, 0.351562, -0.03125, -0.78125, -0.234375, -0.546875, -0.171875, -0.460938, -0.234375, -0.164062, 0.09375, -0.65625, 0.398438, -0.445312, 0.0859375, -0.71875, -0.226562, 0.671875, 0.101562, -0.46875, -0.195312, -0.71875, -0.265625, 0.617188, 0.125, -0.78125, -0.21875, -0.226562, -0.15625, 0.21875, 0.0234375, 0.289062, 0.101562, 0.648438, -0.171875, 0.390625, -0.273438, -0.257812, 0.078125, -0.21875, 0, 0.65625, -0.203125, -0.679688, 0.171875, -0.1875, 0.328125, -0.46875, -0.28125, 0.273438, 0, 0.664062, 0.296875, -0.140625, 0.335938, -0.625, 0.382812, -0.34375, -0.21875, -0.171875, -0.25, -0.546875, -0.117188, -0.117188, -0.203125, -0.1875, 0.351562, -0.585938, -0.109375, -0.203125, -0.0625, -0.570312, 0.03125, -0.5625, -0.109375, 0.601562, -0.195312, 0.3125, 0.140625, -0.101562, 0.25, 0.25, 0.3125, 0.125, -0.203125, -0.09375, -0.140625, -0.242188, 0.414062, 0.664062, -0.0625, -0.21875, -0.078125, 0.6875, -0.210938, -0.140625, 0.015625, -0.632812, -0.25, -0.109375, 0.234375, -0.695312, 0.015625, -0.3125, -0.28125, 0.296875, -0.0234375, 0.296875, 0.203125, -0.125, 0.234375, 0.570312, 0.390625, -0.554688, 0.203125, -0.5625, 0.351562, -0.15625, 0.21875, -0.375, 0.0390625, -0.226562, -0.140625, 0.695312, 0.164062, 0.632812, 0.367188, -0.328125, -0.210938, -0.59375, 0.34375, 0.304688, -0.242188, -0.34375, 0.0703125, -0.679688, -0.179688, 0.664062, 0.101562, 0.34375, 0.171875, -0.695312, -0.078125, -0.242188, -0.0546875, 0.304688, -0.234375, -0.0078125, -0.21875, -0.632812, 0.203125, 0.625, 0.03125, -0.414062, 0.015625, 0.273438, -0.078125, 0.695312, 0.28125, 0.34375, 0.101562, -0.164062, 0.289062, -0.1875, 0.273438, -0.203125, 0.0703125, 0.734375, -0.171875, -0.59375, 0.34375, -0.15625, 0.210938, 0.429688, 0.375, -0.234375, 0.34375, 0.617188, 0.101562, 0.703125, 0, -0.578125, 0.148438, 0.21875, -0.171875, -0.304688, 0.375, -0.65625, -0.09375, -0.101562, 0.25, -0.4375, 0.03125, -0.242188, 0.421875, -0.546875, 0.0625, -0.632812, -0.148438, -0.125, 0.179688, 0.179688, 0.304688, -0.265625, 0.078125, -0.289062, 0.421875, -0.585938, 0.1875, -0.289062, 0.34375, 0.273438, 0.367188, -0.109375, 0.117188, 0.34375, 0.046875, -0.0625, 0.320312, 0.6875, -0.234375, -0.523438, 0.320312, -0.09375, -0.242188, -0.65625, 0.25, -0.609375, -0.117188, -0.140625, 0.140625, 0.28125, -0.09375, -0.625, -0.28125, 0.34375, 0.328125, 0.265625, 0.109375, -0.609375, 0.0078125, -0.078125, -0.234375, -0.289062, -0.203125, 0.289062, 0.289062, -0.0859375, 0.0078125, -0.101562, -0.28125, -0.625, -0.101562, -0.546875, 0.382812, -0.539062, -0.195312, -0.210938, 0.046875, -0.492188, 0.390625, -0.664062, -0.0703125, 0.71875, -0.101562, -0.140625, -0.046875, 0.695312, 0.289062, -0.710938, 0.429688, -0.703125, 0.3125, -0.203125, 0.109375, 0.421875, -0.273438, 0.304688, 0.21875, 0.328125, 0.257812, -0.632812, -0.0703125, 0.320312, -0.140625, 0.265625, -0.203125, -0.109375, -0.179688, 0.25, -0.210938, 0.65625, 0.109375, -0.648438, -0.0625, -0.0859375, 0.375, -0.429688, 0.398438, 0.320312, 0.3125, -0.0703125, 0.265625, 0.648438, 0.0078125, 0.320312, 0.335938, 0.398438, 0.421875, -0.101562, -0.0625, -0.296875, 0.40625, 0.695312, -0.0390625, 0.335938, 0.21875, -0.546875, 0.117188, -0.476562, 0.390625, -0.648438, 0.117188, -0.078125, -0.28125, 0.328125, 0.289062, -0.226562, 0.179688, 0.226562, 0.375, -0.429688, 0.382812, -0.0546875, 0.34375, 0.59375, -0.125, 0.632812, 0.265625, 0.226562, 0.3125, -0.523438, -0.140625, -0.546875, 0.046875, 0.242188, -0.148438, -0.648438, 0.0234375, -0.289062, 0, -0.546875, 0.101562, -0.125, -0.0625, -0.492188, 0.367188, 0.328125, 0.15625, -0.351562, 0.0546875, -0.609375, 0.414062, -0.296875, 0.09375, 0.671875, -0.203125, -0.257812, -0.273438, -0.335938, 0.414062, 0.65625, -0.195312, -0.601562, -0.101562, -0.203125, -0.078125, 0.210938, 0.242188, 0.296875, 0.335938, -0.578125, 0.40625, -0.664062, -0.078125, -0.0859375, 0.390625, 0.171875, 0.304688, -0.6875, 0.390625, -0.554688, 0.0078125, -0.570312, -0.179688, -0.210938, -0.09375, 0.726562, -0.03125, -0.546875, -0.0859375, -0.265625, -0.171875, -0.65625, 0.179688, -0.171875, 0.257812, -0.164062, -0.171875, 0.203125, 0.335938, -0.640625, 0.21875, 0.390625, 0.375, 0.6875, -0.234375, 0.742188, 0.34375, -0.0546875, 0.351562, -0.632812, 0.195312, 0.671875, -0.21875, 0.195312, 0.015625, 0.226562, 0.117188, -0.507812, 0.078125, -0.140625, -0.15625, 0.703125, -0.28125, 0.226562, -0.140625, 0.328125, 0.421875, 0.3125, 0.1875, 0.703125, 0.078125, 0.351562, 0.289062, 0.21875, -0.242188, -0.328125, 0, 0.171875, 0.101562, -0.304688, -0.242188, -0.210938, 0.078125, 0.625, -0.0078125, 0.25, 0.242188, -0.664062, 0.117188, 0.203125, -0.140625, 0.226562, 0.429688, 0.328125, -0.203125, -0.679688, 0.0703125, -0.195312, -0.148438, -0.523438, 0.328125, 0.382812, -0.257812, 0.578125, -0.171875, 0.65625, 0.320312, -0.632812, -0.148438, 0.703125, 0.0703125, -0.53125, 0.398438, -0.414062, 0.03125, -0.0859375, 0.0546875, -0.53125, 0.335938, 0.304688, 0.429688, -0.234375, -0.148438, -0.375, 0.046875, -0.148438, 0.289062, -0.0390625, 0.421875, 0.226562, -0.125, -0.570312, 0.398438, -0.0703125, -0.0234375, 0.257812, -0.132812 </vector2_array>
</array>
- <string> "nodes" </string>
- <int_array len="640"> -1, -1, 0, 0, -1, 2, 1, 0, 2, 1, 0, 0, 0, 4, 3, -1, 60, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 13, 9, 14, 3, 15, 3, 16, 10, 17, 10, 18, 2, 19, 11, 20, 12, 21, 4, 22, 3, 23, 4, 24, 4, 25, 13, 26, 10, 27, 10, 28, 14, 29, 10, 30, 10, 31, 15, 32, 16, 33, 10, 34, 10, 35, 10, 36, 15, 37, 17, 38, 18, 39, 10, 40, 10, 41, 10, 42, 10, 43, 10, 44, 10, 45, 10, 46, 10, 47, 10, 48, 10, 49, 10, 50, 19, 51, 10, 52, 10, 53, 10, 54, 20, 55, 10, 56, 21, 57, 22, 58, 23, 59, 3, 60, 24, 61, 3, 62, 25, 63, 26, 0, 0, 0, 4, 64, -1, 59, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 10, 27, 11, 28, 12, 8, 13, 9, 14, 29, 15, 3, 16, 10, 17, 10, 18, 2, 19, 11, 20, 11, 21, 4, 22, 3, 23, 4, 24, 4, 25, 30, 26, 10, 27, 31, 28, 32, 29, 3, 30, 10, 31, 10, 32, 10, 33, 10, 34, 10, 35, 10, 36, 15, 37, 3, 38, 33, 39, 10, 40, 10, 41, 10, 42, 10, 43, 3, 44, 10, 45, 10, 46, 10, 47, 10, 48, 10, 49, 10, 50, 3, 51, 10, 52, 10, 53, 10, 54, 20, 55, 10, 56, 21, 57, 34, 58, 35, 59, 3, 60, 36, 61, 3, 62, 25, 63, 26, 0, 0, 0, 4, 65, -1, 59, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 10, 37, 11, 10, 12, 8, 13, 9, 14, 19, 15, 3, 16, 10, 17, 10, 18, 2, 19, 11, 20, 38, 21, 4, 22, 3, 23, 4, 24, 4, 25, 39, 26, 10, 27, 15, 28, 14, 29, 18, 30, 40, 31, 10, 32, 41, 33, 10, 34, 42, 35, 10, 36, 43, 37, 33, 38, 3, 39, 10, 40, 10, 41, 10, 42, 10, 43, 3, 44, 44, 45, 10, 46, 10, 47, 10, 48, 10, 49, 10, 50, 3, 51, 10, 52, 10, 53, 10, 54, 45, 55, 10, 56, 46, 57, 22, 58, 47, 59, 48, 60, 49, 61, 3, 62, 50, 63, 26, 0, 0, 0, 4, 66, -1, 60, 1, 0, 5, 2, 6, 3, 7, 3, 8, 2, 9, 5, 10, 51, 11, 7, 12, 8, 13, 9, 14, 19, 15, 19, 16, 10, 17, 10, 18, 2, 19, 11, 20, 12, 21, 4, 22, 52, 23, 4, 24, 4, 25, 30, 26, 10, 27, 15, 28, 53, 29, 10, 30, 10, 31, 15, 32, 16, 33, 10, 34, 10, 35, 54, 36, 3, 37, 17, 38, 33, 39, 10, 40, 10, 41, 10, 42, 10, 43, 10, 44, 10, 45, 10, 46, 10, 47, 10, 48, 10, 49, 10, 50, 10, 51, 10, 52, 10, 53, 10, 54, 45, 55, 10, 56, 21, 57, 22, 58, 55, 59, 17, 60, 56, 61, 3, 62, 36, 63, 26, 0, 0, 0, 4, 67, -1, 59, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 10, 57, 11, 10, 12, 8, 13, 58, 14, 22, 15, 3, 16, 10, 17, 10, 18, 2, 19, 11, 20, 59, 21, 4, 22, 3, 23, 4, 24, 4, 25, 39, 26, 10, 27, 15, 28, 10, 29, 19, 30, 10, 31, 10, 32, 10, 33, 10, 34, 10, 35, 10, 36, 3, 37, 3, 38, 3, 39, 10, 40, 10, 41, 10, 42, 10, 43, 3, 44, 10, 45, 10, 46, 10, 47, 10, 48, 10, 49, 10, 50, 10, 51, 10, 52, 10, 53, 10, 54, 60, 55, 10, 56, 61, 57, 48, 58, 62, 59, 3, 60, 63, 61, 3, 62, 25, 63, 64, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/bullet.gd b/demos/2d/platformer/bullet.gd
index 9aacc9809d..3aee69714e 100644
--- a/demos/2d/platformer/bullet.gd
+++ b/demos/2d/platformer/bullet.gd
@@ -1,21 +1,16 @@
extends RigidBody2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
+# Member variables
+var disabled = false
-var disabled=false
func disable():
if (disabled):
return
get_node("anim").play("shutdown")
- disabled=true
+ disabled = true
+
func _ready():
- # Initalization here
get_node("Timer").start()
- pass
-
-
diff --git a/demos/2d/platformer/bullet.xml b/demos/2d/platformer/bullet.xml
index 84c903803f..63938581ad 100644
--- a/demos/2d/platformer/bullet.xml
+++ b/demos/2d/platformer/bullet.xml
@@ -1,12 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="5" version="1.0" version_name="Godot Engine v1.0.3917-beta1">
- <ext_resource path="res://bullet.*" type="Texture"></ext_resource>
- <ext_resource path="res://bullet.*" type="Script"></ext_resource>
+<resource_file type="PackedScene" subresource_count="6" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://bullet.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://bullet.gd" type="Script" index="0"></ext_resource>
<resource type="CircleShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<real name="radius"> 10 </real>
</resource>
+ <resource type="ColorRamp" path="local://3">
+ <real_array name="offsets" len="2"> 0, 1 </real_array>
+ <color_array name="colors" len="2"> 1, 1, 1, 1, 1, 0, 0, 0 </color_array>
+
+ </resource>
<resource type="Animation" path="local://2">
<string name="resource/name"> "shutdown" </string>
<real name="length"> 1.5 </real>
@@ -18,14 +23,14 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<bool> False </bool>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
<string name="tracks/1/type"> "value" </string>
<node_path name="tracks/1/path"> "sprite:visibility/self_opacity" </node_path>
@@ -33,6 +38,8 @@
<dictionary name="tracks/1/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 0, 1.00394 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -40,13 +47,13 @@
<real> 1 </real>
<real> 0 </real>
</array>
- <string> "times" </string>
- <real_array len="2"> 0, 1.00394 </real_array>
</dictionary>
<string name="tracks/2/type"> "method" </string>
<node_path name="tracks/2/path"> "." </node_path>
<int name="tracks/2/interp"> 1 </int>
<dictionary name="tracks/2/keys" shared="false">
+ <string> "times" </string>
+ <real_array len="1"> 1.31 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
@@ -59,57 +66,51 @@
<string> "queue_free" </string>
</dictionary>
</array>
- <string> "times" </string>
- <real_array len="1"> 1.31 </real_array>
</dictionary>
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 1 </int>
+ <string> "conns" </string>
+ <int_array len="6"> 4, 0, 73, 72, 2, 0 </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="111">
+ <string_array len="74">
<string> "bullet" </string>
- <string> "RigidBody2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "RigidBody2D" </string>
<string> "particles" </string>
- <string> "Particles2D" </string>
+ <string> "visibility/opacity" </string>
<string> "visibility/blend_mode" </string>
<string> "config/amount" </string>
<string> "config/lifetime" </string>
- <string> "config/time_scale" </string>
- <string> "config/preprocess" </string>
- <string> "config/emit_timeout" </string>
- <string> "config/emitting" </string>
- <string> "config/offset" </string>
- <string> "config/half_extents" </string>
<string> "config/local_space" </string>
- <string> "config/explosiveness" </string>
- <string> "config/flip_h" </string>
- <string> "config/flip_v" </string>
<string> "config/texture" </string>
<string> "params/direction" </string>
<string> "params/spread" </string>
@@ -121,54 +122,27 @@
<string> "params/radial_accel" </string>
<string> "params/tangential_accel" </string>
<string> "params/damping" </string>
+ <string> "params/initial_angle" </string>
<string> "params/initial_size" </string>
<string> "params/final_size" </string>
<string> "params/hue_variation" </string>
- <string> "randomness/direction" </string>
- <string> "randomness/spread" </string>
- <string> "randomness/linear_velocity" </string>
- <string> "randomness/spin_velocity" </string>
- <string> "randomness/orbit_velocity" </string>
- <string> "randomness/gravity_direction" </string>
- <string> "randomness/gravity_strength" </string>
- <string> "randomness/radial_accel" </string>
- <string> "randomness/tangential_accel" </string>
- <string> "randomness/damping" </string>
- <string> "randomness/initial_size" </string>
- <string> "randomness/final_size" </string>
- <string> "randomness/hue_variation" </string>
- <string> "color_phases/count" </string>
- <string> "phase_0/pos" </string>
- <string> "phase_0/color" </string>
- <string> "phase_1/pos" </string>
- <string> "phase_1/color" </string>
- <string> "phase_2/pos" </string>
- <string> "phase_2/color" </string>
- <string> "phase_3/pos" </string>
- <string> "phase_3/color" </string>
- <string> "emission_points" </string>
+ <string> "params/anim_speed_scale" </string>
+ <string> "params/anim_initial_pos" </string>
+ <string> "color/color_ramp" </string>
+ <string> "Particles2D" </string>
<string> "sprite" </string>
- <string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
+ <string> "Sprite" </string>
<string> "CollisionShape2D" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
<string> "Timer" </string>
+ <string> "process_mode" </string>
<string> "wait_time" </string>
<string> "one_shot" </string>
<string> "autostart" </string>
<string> "anim" </string>
- <string> "AnimationPlayer" </string>
<string> "playback/process_mode" </string>
<string> "playback/default_blend_time" </string>
<string> "root/root" </string>
@@ -177,128 +151,158 @@
<string> "playback/speed" </string>
<string> "blend_times" </string>
<string> "autoplay" </string>
+ <string> "AnimationPlayer" </string>
<string> "disable" </string>
<string> "timeout" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 1 </int>
<string> "node_count" </string>
<int> 6 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="166"> -1, -1, 24, 0, -1, 23, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 5, 10, 6, 11, 5, 12, 0, 13, 7, 14, 4, 15, 0, 16, 0, 17, 8, 18, 9, 19, 6, 20, 10, 21, 10, 22, 11, 23, 12, 0, 0, 0, 49, 25, -1, 23, 26, 13, 27, 3, 28, 14, 29, 15, 30, 0, 31, 16, 32, 6, 33, 17, 34, 6, 35, 6, 36, 6, 37, 6, 38, 6, 39, 6, 40, 6, 41, 6, 42, 6, 43, 5, 44, 6, 45, 6, 46, 5, 47, 6, 48, 18, 0, 0, 0, 52, 50, -1, 1, 51, 16, 0, 0, 0, 53, 53, -1, 3, 54, 1, 55, 0, 56, 19, 0, 0, 0, 57, 57, -1, 4, 58, 3, 59, 5, 60, 8, 61, 0, 0, 0, 0, 71, 62, -1, 8, 63, 3, 64, 6, 65, 20, 66, 21, 67, 8, 68, 5, 69, 22, 70, 23, 0 </int_array>
<string> "variants" </string>
- <array len="27" shared="false">
- <bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 1 </int>
+ <array len="24" shared="false">
+ <bool> False </bool>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
- <bool> False </bool>
+ <int> 1 </int>
<int> 0 </int>
+ <real> 1 </real>
+ <real> 0 </real>
<int> 2 </int>
- <resource resource_type="Script" path="res://bullet.*"> </resource>
+ <bool> True </bool>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
+ <resource external="0"> </resource>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 2 </int>
- <string> "sources" </string>
- <array len="3" shared="false">
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://bullet.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -74.7573, -35.9676 </vector2>
+ <string> "snap_grid" </string>
<bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 3.424785 </real>
- <string> "ofs" </string>
- <vector2> -74.7573, -35.9676 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -307,29 +311,22 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
<real> 0.559322 </real>
<int> 24 </int>
<real> 0.1 </real>
- <resource resource_type="Texture" path="res://bullet.*"> </resource>
+ <resource external="1"> </resource>
<real> 10 </real>
- <color> 1, 1, 1, 1 </color>
- <color> 1, 0, 0, 0 </color>
- <color> 0, 0, 0, 1 </color>
- <vector2_array len="0"> </vector2_array>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource resource_type="ColorRamp" path="local://3"> </resource>
+ <int> -1 </int>
<node_path> ".." </node_path>
<resource resource_type="Animation" path="local://2"> </resource>
<array len="0" shared="false">
</array>
<string> "" </string>
</array>
- <string> "nodes" </string>
- <int_array len="282"> -1, -1, 1, 0, -1, 25, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 13, 9, 14, 1, 15, 1, 16, 3, 17, 8, 18, 10, 19, 9, 20, 8, 21, 0, 22, 0, 23, 2, 24, 3, 25, 11, 26, 12, 0, 0, 0, 28, 27, -1, 57, 2, 0, 3, 13, 4, 1, 5, 0, 29, 5, 6, 2, 7, 3, 8, 4, 30, 14, 31, 15, 32, 1, 33, 3, 34, 3, 35, 0, 36, 2, 37, 2, 38, 8, 39, 1, 40, 8, 41, 8, 42, 16, 43, 3, 44, 17, 45, 3, 46, 3, 47, 3, 48, 3, 49, 3, 50, 3, 51, 3, 52, 3, 53, 1, 54, 3, 55, 3, 56, 3, 57, 3, 58, 3, 59, 3, 60, 3, 61, 3, 62, 3, 63, 3, 64, 3, 65, 3, 66, 3, 67, 3, 68, 3, 69, 10, 70, 3, 71, 18, 72, 1, 73, 19, 74, 1, 75, 20, 76, 1, 77, 20, 78, 21, 0, 0, 0, 80, 79, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 81, 16, 82, 0, 83, 2, 84, 8, 85, 8, 86, 5, 87, 5, 88, 9, 89, 18, 90, 8, 91, 22, 0, 0, 0, 92, 92, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 93, 6, 94, 8, 0, 0, 0, 95, 95, -1, 3, 96, 1, 97, 0, 98, 8, 0, 0, 0, 100, 99, -1, 8, 101, 5, 102, 3, 103, 23, 104, 24, 105, 0, 106, 1, 107, 25, 108, 26, 0 </int_array>
- <string> "conns" </string>
- <int_array len="6"> 4, 0, 110, 109, 2, 0 </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/coin.gd b/demos/2d/platformer/coin.gd
index 3e31a395ae..1118732707 100644
--- a/demos/2d/platformer/coin.gd
+++ b/demos/2d/platformer/coin.gd
@@ -1,20 +1,19 @@
extends Area2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
-var taken=false
+# Member variables
+var taken = false
func _on_body_enter( body ):
if (not taken and body extends preload("res://player.gd")):
get_node("anim").play("taken")
- taken=true
+ taken = true
+
+func _on_coin_area_enter(area):
+ pass # replace with function body
-func _ready():
- # Initalization here
- pass
+func _on_coin_area_enter_shape(area_id, area, area_shape, area_shape):
+ pass # replace with function body
diff --git a/demos/2d/platformer/coin.xml b/demos/2d/platformer/coin.xml
index 194ea711b0..f33a63bd57 100644
--- a/demos/2d/platformer/coin.xml
+++ b/demos/2d/platformer/coin.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="9" version="1.0" version_name="Godot Engine v1.0.3917-beta1">
- <ext_resource path="res://bullet.*" type="Texture"></ext_resource>
- <ext_resource path="res://coin.*" type="Texture"></ext_resource>
- <ext_resource path="res://sound_coin.*" type="Sample"></ext_resource>
- <ext_resource path="res://coin.*" type="Script"></ext_resource>
+<resource_file type="PackedScene" subresource_count="10" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://bullet.png" type="Texture" index="3"></ext_resource>
+ <ext_resource path="res://coin.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://sound_coin.wav" type="Sample" index="2"></ext_resource>
+ <ext_resource path="res://coin.gd" type="Script" index="0"></ext_resource>
<resource type="CircleShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<real name="radius"> 10 </real>
@@ -20,14 +20,14 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<int> 0 </int>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
<string name="tracks/1/type"> "value" </string>
<node_path name="tracks/1/path"> "sound:play/play" </node_path>
@@ -35,14 +35,14 @@
<dictionary name="tracks/1/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<string> "coin" </string>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
<string name="tracks/2/type"> "value" </string>
<node_path name="tracks/2/path"> "particles:visibility/self_opacity" </node_path>
@@ -50,6 +50,8 @@
<dictionary name="tracks/2/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 0, 1.66 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -57,8 +59,6 @@
<real> 1 </real>
<real> 0 </real>
</array>
- <string> "times" </string>
- <real_array len="2"> 0, 1.66 </real_array>
</dictionary>
<string name="tracks/3/type"> "value" </string>
<node_path name="tracks/3/path"> "sprite:visibility/self_opacity" </node_path>
@@ -66,6 +66,8 @@
<dictionary name="tracks/3/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 0, 0.4 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -73,8 +75,6 @@
<real> 1 </real>
<real> 0 </real>
</array>
- <string> "times" </string>
- <real_array len="2"> 0, 0.4 </real_array>
</dictionary>
<string name="tracks/4/type"> "value" </string>
<node_path name="tracks/4/path"> "particles:config/emitting" </node_path>
@@ -82,19 +82,21 @@
<dictionary name="tracks/4/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<bool> True </bool>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
<string name="tracks/5/type"> "method" </string>
<node_path name="tracks/5/path"> "." </node_path>
<int name="tracks/5/interp"> 1 </int>
<dictionary name="tracks/5/keys" shared="false">
+ <string> "times" </string>
+ <real_array len="1"> 2.7 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
@@ -107,8 +109,6 @@
<string> "queue_free" </string>
</dictionary>
</array>
- <string> "times" </string>
- <real_array len="1"> 2.7 </real_array>
</dictionary>
</resource>
@@ -123,6 +123,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="7"> 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 </real_array>
<string> "transitions" </string>
<real_array len="7"> 1, 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
@@ -135,8 +137,6 @@
<int> 1 </int>
<int> 0 </int>
</array>
- <string> "times" </string>
- <real_array len="7"> 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 </real_array>
</dictionary>
</resource>
@@ -147,49 +147,43 @@
<string> "pitch" </string>
<real> 1 </real>
<string> "sample" </string>
- <resource resource_type="Sample" path="res://sound_coin.*"> </resource>
+ <resource external="2"> </resource>
</dictionary>
</resource>
+ <resource type="ColorRamp" path="local://5">
+ <real_array name="offsets" len="2"> 0, 1 </real_array>
+ <color_array name="colors" len="2"> 1, 1, 1, 1, 0, 0, 0, 1 </color_array>
+
+ </resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 1 </int>
+ <string> "conns" </string>
+ <int_array len="6"> 0, 0, 76, 75, 2, 0 </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="115">
+ <string_array len="77">
<string> "coin" </string>
- <string> "Area2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
- <string> "gravity_point" </string>
<string> "gravity_vec" </string>
<string> "gravity" </string>
- <string> "density" </string>
- <string> "monitoring" </string>
+ <string> "linear_damp" </string>
+ <string> "angular_damp" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "Area2D" </string>
<string> "sprite" </string>
- <string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
<string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
+ <string> "Sprite" </string>
<string> "anim" </string>
- <string> "AnimationPlayer" </string>
<string> "playback/process_mode" </string>
<string> "playback/default_blend_time" </string>
<string> "root/root" </string>
@@ -199,12 +193,13 @@
<string> "playback/speed" </string>
<string> "blend_times" </string>
<string> "autoplay" </string>
+ <string> "AnimationPlayer" </string>
<string> "collision" </string>
- <string> "CollisionShape2D" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
+ <string> "CollisionShape2D" </string>
<string> "sound" </string>
- <string> "SamplePlayer2D" </string>
<string> "params/volume_db" </string>
<string> "params/pitch_scale" </string>
<string> "params/attenuation/min_distance" </string>
@@ -213,19 +208,13 @@
<string> "config/polyphony" </string>
<string> "config/samples" </string>
<string> "config/pitch_random" </string>
+ <string> "SamplePlayer2D" </string>
<string> "particles" </string>
- <string> "Particles2D" </string>
<string> "visibility/blend_mode" </string>
<string> "config/amount" </string>
<string> "config/lifetime" </string>
- <string> "config/time_scale" </string>
- <string> "config/preprocess" </string>
- <string> "config/emit_timeout" </string>
<string> "config/emitting" </string>
- <string> "config/offset" </string>
<string> "config/half_extents" </string>
- <string> "config/local_space" </string>
- <string> "config/explosiveness" </string>
<string> "config/texture" </string>
<string> "params/direction" </string>
<string> "params/spread" </string>
@@ -237,160 +226,170 @@
<string> "params/radial_accel" </string>
<string> "params/tangential_accel" </string>
<string> "params/damping" </string>
+ <string> "params/initial_angle" </string>
<string> "params/initial_size" </string>
<string> "params/final_size" </string>
<string> "params/hue_variation" </string>
- <string> "randomness/direction" </string>
- <string> "randomness/spread" </string>
- <string> "randomness/linear_velocity" </string>
- <string> "randomness/spin_velocity" </string>
- <string> "randomness/orbit_velocity" </string>
- <string> "randomness/gravity_direction" </string>
- <string> "randomness/gravity_strength" </string>
- <string> "randomness/radial_accel" </string>
- <string> "randomness/tangential_accel" </string>
- <string> "randomness/damping" </string>
- <string> "randomness/initial_size" </string>
- <string> "randomness/final_size" </string>
- <string> "randomness/hue_variation" </string>
- <string> "color_phases/count" </string>
- <string> "phase_0/pos" </string>
- <string> "phase_0/color" </string>
- <string> "phase_1/pos" </string>
- <string> "phase_1/color" </string>
- <string> "phase_2/pos" </string>
- <string> "phase_2/color" </string>
- <string> "phase_3/pos" </string>
- <string> "phase_3/color" </string>
- <string> "emission_points" </string>
+ <string> "params/anim_speed_scale" </string>
+ <string> "params/anim_initial_pos" </string>
+ <string> "color/color_ramp" </string>
+ <string> "Particles2D" </string>
<string> "enabler" </string>
- <string> "VisibilityEnabler2D" </string>
<string> "rect" </string>
<string> "enabler/pause_animations" </string>
<string> "enabler/freeze_bodies" </string>
+ <string> "enabler/pause_particles" </string>
+ <string> "enabler/process_parent" </string>
+ <string> "enabler/fixed_process_parent" </string>
+ <string> "VisibilityEnabler2D" </string>
<string> "_on_body_enter" </string>
<string> "body_enter" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 1 </int>
<string> "node_count" </string>
<int> 7 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="171"> -1, -1, 11, 0, -1, 10, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 0, 0, 0, 15, 12, -1, 2, 13, 10, 14, 11, 0, 0, 0, 26, 16, -1, 9, 17, 12, 18, 13, 19, 14, 20, 15, 21, 16, 22, 0, 23, 17, 24, 18, 25, 19, 0, 0, 0, 31, 27, -1, 3, 28, 1, 29, 3, 30, 20, 0, 0, 0, 41, 32, -1, 8, 33, 13, 34, 7, 35, 7, 36, 21, 37, 7, 38, 12, 39, 22, 40, 13, 0, 0, 0, 66, 42, -1, 23, 43, 12, 44, 23, 45, 24, 46, 3, 47, 25, 48, 26, 49, 13, 50, 27, 51, 13, 52, 13, 53, 13, 54, 13, 55, 13, 56, 13, 57, 13, 58, 13, 59, 13, 60, 28, 61, 28, 62, 13, 63, 7, 64, 13, 65, 29, 0, 0, 0, 74, 67, -1, 6, 68, 30, 69, 0, 70, 0, 71, 0, 72, 3, 73, 3, 0 </int_array>
<string> "variants" </string>
- <array len="37" shared="false">
+ <array len="31" shared="false">
<bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 1 </int>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
<bool> False </bool>
<vector2> 0, 1 </vector2>
<real> 98 </real>
<real> 0.1 </real>
- <resource resource_type="Script" path="res://coin.*"> </resource>
+ <real> 1 </real>
+ <resource external="0"> </resource>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 2 </int>
- <string> "sources" </string>
- <array len="3" shared="false">
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -34.3697, -21.6562 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
<bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 3.794776 </real>
- <string> "ofs" </string>
- <vector2> -34.3697, -21.6562 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -399,14 +398,11 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="Texture" path="res://coin.*"> </resource>
+ <resource external="1"> </resource>
<int> 4 </int>
- <int> 0 </int>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <int> 1 </int>
+ <real> 0 </real>
<node_path> ".." </node_path>
<resource resource_type="Animation" path="local://2"> </resource>
<resource resource_type="Animation" path="local://3"> </resource>
@@ -414,23 +410,20 @@
<array len="0" shared="false">
</array>
<string> "spin" </string>
+ <int> -1 </int>
<real> 2048 </real>
<resource resource_type="SampleLibrary" path="local://4"> </resource>
<int> 8 </int>
<real> 0.4 </real>
<vector2> 5, 5 </vector2>
- <resource resource_type="Texture" path="res://bullet.*"> </resource>
+ <resource external="3"> </resource>
<real> 10 </real>
<real> 0.2 </real>
- <int> 2 </int>
- <color> 0, 0, 0, 1 </color>
- <vector2_array len="0"> </vector2_array>
+ <resource resource_type="ColorRamp" path="local://5"> </resource>
<rect2> -10, -10, 20, 20 </rect2>
</array>
- <string> "nodes" </string>
- <int_array len="317"> -1, -1, 1, 0, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 13, 8, 14, 9, 15, 10, 16, 11, 17, 0, 18, 12, 19, 13, 0, 0, 0, 21, 20, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 22, 14, 23, 0, 24, 2, 25, 8, 26, 8, 27, 5, 28, 15, 29, 16, 30, 17, 31, 8, 32, 18, 0, 0, 0, 34, 33, -1, 9, 35, 5, 36, 3, 37, 19, 38, 20, 39, 21, 40, 0, 41, 22, 42, 23, 43, 24, 0, 0, 0, 45, 44, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 46, 6, 47, 8, 0, 0, 0, 49, 48, -1, 15, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 50, 3, 51, 1, 52, 1, 53, 25, 54, 1, 55, 5, 56, 26, 57, 3, 0, 0, 0, 59, 58, -1, 55, 2, 0, 3, 1, 4, 1, 5, 0, 60, 5, 6, 2, 7, 3, 8, 4, 61, 27, 62, 28, 63, 1, 64, 3, 65, 3, 66, 8, 67, 2, 68, 29, 69, 0, 70, 1, 71, 30, 72, 3, 73, 31, 74, 3, 75, 3, 76, 3, 77, 3, 78, 3, 79, 3, 80, 3, 81, 3, 82, 32, 83, 32, 84, 3, 85, 3, 86, 3, 87, 3, 88, 3, 89, 3, 90, 3, 91, 3, 92, 3, 93, 3, 94, 3, 95, 3, 96, 3, 97, 3, 98, 33, 99, 3, 100, 17, 101, 1, 102, 34, 103, 1, 104, 34, 105, 1, 106, 34, 107, 35, 0, 0, 0, 109, 108, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 110, 36, 111, 0, 112, 0, 0 </int_array>
- <string> "conns" </string>
- <int_array len="6"> 0, 0, 114, 113, 2, 0 </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/enemy.gd b/demos/2d/platformer/enemy.gd
index a264cd0cff..5a4d8af579 100644
--- a/demos/2d/platformer/enemy.gd
+++ b/demos/2d/platformer/enemy.gd
@@ -1,98 +1,83 @@
extends RigidBody2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
+# Member variables
const STATE_WALKING = 0
const STATE_DYING = 1
-
var state = STATE_WALKING
-
var direction = -1
-var anim=""
+var anim = ""
-var rc_left=null
-var rc_right=null
+var rc_left = null
+var rc_right = null
var WALK_SPEED = 50
var bullet_class = preload("res://bullet.gd")
+
func _die():
queue_free()
+
func _pre_explode():
- #stay there
+ # Stay there
clear_shapes()
set_mode(MODE_STATIC)
get_node("sound").play("explode")
-
-func _integrate_forces(s):
+func _integrate_forces(s):
var lv = s.get_linear_velocity()
- var new_anim=anim
+ var new_anim = anim
- if (state==STATE_DYING):
- new_anim="explode"
- elif (state==STATE_WALKING):
-
- new_anim="walk"
+ if (state == STATE_DYING):
+ new_anim = "explode"
+ elif (state == STATE_WALKING):
+ new_anim = "walk"
- var wall_side=0.0
+ var wall_side = 0.0
for i in range(s.get_contact_count()):
var cc = s.get_contact_collider_object(i)
var dp = s.get_contact_local_normal(i)
if (cc):
-
-
if (cc extends bullet_class and not cc.disabled):
set_mode(MODE_RIGID)
- state=STATE_DYING
- #lv=s.get_contact_local_normal(i)*400
+ state = STATE_DYING
+ #lv = s.get_contact_local_normal(i)*400
s.set_angular_velocity(sign(dp.x)*33.0)
set_friction(1)
cc.disable()
get_node("sound").play("hit")
-
break
-
-
- if (dp.x>0.9):
- wall_side=1.0
- elif (dp.x<-0.9):
- wall_side=-1.0
-
- if (wall_side!=0 and wall_side!=direction):
-
- direction=-direction
- get_node("sprite").set_scale( Vector2(-direction,1) )
- if (direction<0 and not rc_left.is_colliding() and rc_right.is_colliding()):
- direction=-direction
- get_node("sprite").set_scale( Vector2(-direction,1) )
- elif (direction>0 and not rc_right.is_colliding() and rc_left.is_colliding()):
- direction=-direction
- get_node("sprite").set_scale( Vector2(-direction,1) )
-
-
- lv.x = direction * WALK_SPEED
- if( anim!=new_anim ):
- anim=new_anim
+ if (dp.x > 0.9):
+ wall_side = 1.0
+ elif (dp.x < -0.9):
+ wall_side = -1.0
+
+ if (wall_side != 0 and wall_side != direction):
+ direction = -direction
+ get_node("sprite").set_scale(Vector2(-direction, 1))
+ if (direction < 0 and not rc_left.is_colliding() and rc_right.is_colliding()):
+ direction = -direction
+ get_node("sprite").set_scale(Vector2(-direction, 1))
+ elif (direction > 0 and not rc_right.is_colliding() and rc_left.is_colliding()):
+ direction = -direction
+ get_node("sprite").set_scale(Vector2(-direction, 1))
+
+ lv.x = direction*WALK_SPEED
+
+ if(anim != new_anim):
+ anim = new_anim
get_node("anim").play(anim)
-
+
s.set_linear_velocity(lv)
func _ready():
- # Initalization here
- rc_left=get_node("raycast_left")
- rc_right=get_node("raycast_right")
-
-
-
+ rc_left = get_node("raycast_left")
+ rc_right = get_node("raycast_right")
diff --git a/demos/2d/platformer/enemy.xml b/demos/2d/platformer/enemy.xml
index 470797db46..72d2ff068e 100644
--- a/demos/2d/platformer/enemy.xml
+++ b/demos/2d/platformer/enemy.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="11" version="1.0" version_name="Godot Engine v1.0.3917-beta1">
- <ext_resource path="res://sound_explode.*" type="Sample"></ext_resource>
- <ext_resource path="res://enemy.*" type="Texture"></ext_resource>
- <ext_resource path="res://enemy.*" type="Script"></ext_resource>
- <ext_resource path="res://sound_hit.*" type="Sample"></ext_resource>
- <ext_resource path="res://bullet.*" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="12" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://bullet.png" type="Texture" index="2"></ext_resource>
+ <ext_resource path="res://enemy.gd" type="Script" index="0"></ext_resource>
+ <ext_resource path="res://sound_explode.wav" type="Sample" index="3"></ext_resource>
+ <ext_resource path="res://sound_hit.wav" type="Sample" index="4"></ext_resource>
+ <ext_resource path="res://enemy.png" type="Texture" index="1"></ext_resource>
<resource type="CircleShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<real name="radius"> 14 </real>
@@ -21,6 +21,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="10"> 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 </real_array>
<string> "transitions" </string>
<real_array len="10"> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
@@ -36,8 +38,6 @@
<int> 7 </int>
<int> 5 </int>
</array>
- <string> "times" </string>
- <real_array len="10"> 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 </real_array>
</dictionary>
</resource>
@@ -52,6 +52,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 3.58422, 4.33851 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -59,8 +61,6 @@
<real> 1 </real>
<real> 0 </real>
</array>
- <string> "times" </string>
- <real_array len="2"> 3.58422, 4.33851 </real_array>
</dictionary>
<string name="tracks/1/type"> "value" </string>
<node_path name="tracks/1/path"> "sprite:frame" </node_path>
@@ -68,14 +68,14 @@
<dictionary name="tracks/1/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<int> 4 </int>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
<string name="tracks/2/type"> "value" </string>
<node_path name="tracks/2/path"> "Particles2D:config/emitting" </node_path>
@@ -83,19 +83,21 @@
<dictionary name="tracks/2/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 3.47394 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<bool> True </bool>
</array>
- <string> "times" </string>
- <real_array len="1"> 3.47394 </real_array>
</dictionary>
<string name="tracks/3/type"> "method" </string>
<node_path name="tracks/3/path"> "." </node_path>
<int name="tracks/3/interp"> 1 </int>
<dictionary name="tracks/3/keys" shared="false">
+ <string> "times" </string>
+ <real_array len="2"> 3.20357, 5.07305 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -115,8 +117,6 @@
<string> "_die" </string>
</dictionary>
</array>
- <string> "times" </string>
- <real_array len="2"> 3.20357, 5.07305 </real_array>
</dictionary>
</resource>
@@ -131,6 +131,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
<string> "transitions" </string>
<real_array len="6"> 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
@@ -142,44 +144,46 @@
<int> 4 </int>
<int> 0 </int>
</array>
- <string> "times" </string>
- <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
</dictionary>
</resource>
+ <resource type="ColorRamp" path="local://6">
+ <real_array name="offsets" len="2"> 0, 1 </real_array>
+ <color_array name="colors" len="2"> 1, 0.884956, 0.823009, 1, 0.768627, 0.389381, 0, 0 </color_array>
+
+ </resource>
<resource type="SampleLibrary" path="local://5">
- <dictionary name="samples/explode" shared="false">
+ <dictionary name="samples/hit" shared="false">
<string> "db" </string>
<real> 0 </real>
<string> "pitch" </string>
<real> 1 </real>
<string> "sample" </string>
- <resource resource_type="Sample" path="res://sound_explode.*"> </resource>
+ <resource external="4"> </resource>
</dictionary>
- <dictionary name="samples/hit" shared="false">
+ <dictionary name="samples/explode" shared="false">
<string> "db" </string>
<real> 0 </real>
<string> "pitch" </string>
<real> 1 </real>
<string> "sample" </string>
- <resource resource_type="Sample" path="res://sound_hit.*"> </resource>
+ <resource external="3"> </resource>
</dictionary>
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="132">
+ <string_array len="108">
<string> "enemy" </string>
- <string> "RigidBody2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
@@ -189,27 +193,37 @@
<string> "shapes/2/shape" </string>
<string> "shapes/2/transform" </string>
<string> "shapes/2/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "RigidBody2D" </string>
<string> "enabler" </string>
- <string> "VisibilityEnabler2D" </string>
+ <string> "transform/pos" </string>
+ <string> "transform/scale" </string>
<string> "rect" </string>
<string> "enabler/pause_animations" </string>
<string> "enabler/freeze_bodies" </string>
+ <string> "enabler/pause_particles" </string>
+ <string> "enabler/process_parent" </string>
+ <string> "enabler/fixed_process_parent" </string>
+ <string> "VisibilityEnabler2D" </string>
<string> "anim" </string>
- <string> "AnimationPlayer" </string>
<string> "playback/process_mode" </string>
<string> "playback/default_blend_time" </string>
<string> "root/root" </string>
@@ -220,40 +234,32 @@
<string> "playback/speed" </string>
<string> "blend_times" </string>
<string> "autoplay" </string>
+ <string> "AnimationPlayer" </string>
+ <string> "sprite" </string>
+ <string> "texture" </string>
+ <string> "hframes" </string>
+ <string> "frame" </string>
+ <string> "Sprite" </string>
<string> "CollisionShape2D" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
<string> "CollisionShape2D 2" </string>
<string> "CollisionShape2D 3" </string>
- <string> "sprite" </string>
- <string> "Sprite" </string>
- <string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "raycast_left" </string>
- <string> "RayCast2D" </string>
<string> "enabled" </string>
<string> "cast_to" </string>
+ <string> "layer_mask" </string>
+ <string> "type_mask" </string>
+ <string> "RayCast2D" </string>
<string> "raycast_right" </string>
<string> "Particles2D" </string>
+ <string> "visibility/self_opacity" </string>
<string> "visibility/blend_mode" </string>
<string> "config/amount" </string>
<string> "config/lifetime" </string>
- <string> "config/time_scale" </string>
- <string> "config/preprocess" </string>
<string> "config/emit_timeout" </string>
<string> "config/emitting" </string>
- <string> "config/offset" </string>
- <string> "config/half_extents" </string>
- <string> "config/local_space" </string>
<string> "config/explosiveness" </string>
<string> "config/texture" </string>
<string> "params/direction" </string>
@@ -266,34 +272,15 @@
<string> "params/radial_accel" </string>
<string> "params/tangential_accel" </string>
<string> "params/damping" </string>
+ <string> "params/initial_angle" </string>
<string> "params/initial_size" </string>
<string> "params/final_size" </string>
<string> "params/hue_variation" </string>
- <string> "randomness/direction" </string>
- <string> "randomness/spread" </string>
- <string> "randomness/linear_velocity" </string>
+ <string> "params/anim_speed_scale" </string>
+ <string> "params/anim_initial_pos" </string>
<string> "randomness/spin_velocity" </string>
- <string> "randomness/orbit_velocity" </string>
- <string> "randomness/gravity_direction" </string>
- <string> "randomness/gravity_strength" </string>
- <string> "randomness/radial_accel" </string>
- <string> "randomness/tangential_accel" </string>
- <string> "randomness/damping" </string>
- <string> "randomness/initial_size" </string>
- <string> "randomness/final_size" </string>
- <string> "randomness/hue_variation" </string>
- <string> "color_phases/count" </string>
- <string> "phase_0/pos" </string>
- <string> "phase_0/color" </string>
- <string> "phase_1/pos" </string>
- <string> "phase_1/color" </string>
- <string> "phase_2/pos" </string>
- <string> "phase_2/color" </string>
- <string> "phase_3/pos" </string>
- <string> "phase_3/color" </string>
- <string> "emission_points" </string>
+ <string> "color/color_ramp" </string>
<string> "sound" </string>
- <string> "SamplePlayer2D" </string>
<string> "params/volume_db" </string>
<string> "params/pitch_scale" </string>
<string> "params/attenuation/min_distance" </string>
@@ -302,126 +289,159 @@
<string> "config/polyphony" </string>
<string> "config/samples" </string>
<string> "config/pitch_random" </string>
+ <string> "SamplePlayer2D" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 11 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="289"> -1, -1, 30, 0, -1, 29, 1, 0, 2, 1, 3, 2, 4, 0, 5, 1, 6, 3, 7, 0, 8, 1, 9, 4, 10, 0, 11, 5, 12, 5, 13, 6, 14, 7, 15, 8, 16, 8, 17, 7, 18, 0, 19, 9, 20, 10, 21, 0, 22, 0, 23, 11, 24, 12, 25, 8, 26, 13, 27, 13, 28, 14, 29, 15, 0, 0, 0, 40, 31, -1, 8, 32, 16, 33, 17, 34, 18, 35, 11, 36, 11, 37, 11, 38, 0, 39, 0, 0, 0, 0, 52, 41, -1, 10, 42, 5, 43, 8, 44, 19, 45, 20, 46, 21, 47, 22, 48, 11, 49, 23, 50, 24, 51, 25, 0, 0, 0, 57, 53, -1, 3, 54, 26, 55, 27, 56, 10, 0, 0, 0, 58, 58, -1, 4, 32, 28, 59, 1, 60, 0, 61, 29, 0, 0, 0, 58, 62, -1, 4, 32, 30, 59, 1, 60, 0, 61, 29, 0, 0, 0, 58, 63, -1, 4, 32, 31, 59, 1, 60, 0, 61, 29, 0, 0, 0, 69, 64, -1, 5, 32, 32, 65, 11, 66, 33, 67, 5, 68, 34, 0, 0, 0, 69, 70, -1, 5, 32, 35, 65, 11, 66, 33, 67, 5, 68, 34, 0, 0, 0, 71, 71, -1, 26, 72, 36, 73, 5, 74, 37, 75, 38, 76, 38, 77, 0, 78, 39, 79, 40, 80, 8, 81, 41, 82, 42, 83, 43, 84, 8, 85, 8, 86, 44, 87, 8, 88, 8, 89, 8, 90, 8, 91, 43, 92, 23, 93, 8, 94, 7, 95, 8, 96, 7, 97, 45, 0, 0, 0, 107, 98, -1, 8, 99, 8, 100, 7, 101, 7, 102, 46, 103, 7, 104, 47, 105, 48, 106, 8, 0 </int_array>
<string> "variants" </string>
- <array len="51" shared="false">
- <bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 3 </int>
+ <array len="49" shared="false">
+ <bool> False </bool>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, -0, 0, 1, -1.08072, -2.16144 </matrix32>
- <bool> False </bool>
<matrix32> 1, -0, 0, 1, 6.48431, 3.24216 </matrix32>
<matrix32> 1, -0, 0, 1, -12.495, 3.53415 </matrix32>
+ <int> 1 </int>
<int> 2 </int>
+ <real> 1 </real>
+ <real> 0 </real>
+ <int> 0 </int>
<int> 4 </int>
- <resource resource_type="Script" path="res://enemy.*"> </resource>
+ <bool> True </bool>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
+ <resource external="0"> </resource>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1" shared="false">
- <string> "res://enemy.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -227.625, -197.9 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
<bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 1.108033 </real>
- <string> "ofs" </string>
- <vector2> -227.625, -197.9 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -430,13 +450,10 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
<vector2> 16.2569, 11.0034 </vector2>
<vector2> 23.5056, 10.8629 </vector2>
<rect2> -10, -10, 20, 20 </rect2>
- <int> 1 </int>
<node_path> ".." </node_path>
<resource resource_type="Animation" path="local://2"> </resource>
<resource resource_type="Animation" path="local://3"> </resource>
@@ -445,36 +462,32 @@
<array len="0" shared="false">
</array>
<string> "" </string>
+ <resource external="1"> </resource>
+ <int> 8 </int>
<vector2> -1.08072, -2.16144 </vector2>
+ <int> -1 </int>
<vector2> 6.48431, 3.24216 </vector2>
<vector2> -12.495, 3.53415 </vector2>
- <resource resource_type="Texture" path="res://enemy.*"> </resource>
- <int> 8 </int>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
<vector2> -33.2868, -9.34363 </vector2>
<vector2> 0, 45 </vector2>
+ <int> 15 </int>
<vector2> 29.1987, -9.34363 </vector2>
<real> 0.121212 </real>
<int> 32 </int>
<real> 0.5 </real>
<real> 0.1 </real>
- <resource resource_type="Texture" path="res://bullet.*"> </resource>
+ <resource external="2"> </resource>
<real> 180 </real>
<real> 90 </real>
<real> 2 </real>
<real> 9.8 </real>
- <color> 1, 0.884956, 0.823009, 1 </color>
- <color> 0.768627, 0.389381, 0, 0 </color>
- <color> 0, 0, 0, 1 </color>
- <vector2_array len="0"> </vector2_array>
+ <resource resource_type="ColorRamp" path="local://6"> </resource>
<real> 2048 </real>
+ <int> 3 </int>
<resource resource_type="SampleLibrary" path="local://5"> </resource>
</array>
- <string> "nodes" </string>
- <int_array len="445"> -1, -1, 1, 0, -1, 31, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 13, 6, 14, 9, 15, 8, 16, 6, 17, 10, 18, 8, 19, 11, 20, 1, 21, 3, 22, 3, 23, 8, 24, 8, 25, 12, 26, 8, 27, 0, 28, 0, 29, 2, 30, 3, 31, 13, 32, 14, 0, 0, 0, 34, 33, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 15, 7, 3, 8, 16, 35, 17, 36, 0, 37, 0, 0, 0, 0, 39, 38, -1, 10, 40, 18, 41, 3, 42, 19, 43, 20, 44, 21, 45, 22, 46, 0, 47, 23, 48, 24, 49, 25, 0, 0, 0, 50, 50, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 26, 7, 3, 8, 4, 51, 6, 52, 8, 0, 0, 0, 50, 53, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 27, 7, 3, 8, 4, 51, 6, 52, 8, 0, 0, 0, 50, 54, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 28, 7, 3, 8, 4, 51, 6, 52, 8, 0, 0, 0, 56, 55, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 57, 29, 58, 0, 59, 2, 60, 8, 61, 8, 62, 18, 63, 30, 64, 12, 65, 31, 66, 8, 67, 32, 0, 0, 0, 69, 68, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 33, 7, 3, 8, 4, 70, 0, 71, 34, 0, 0, 0, 69, 72, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 35, 7, 3, 8, 4, 70, 0, 71, 34, 0, 0, 0, 73, 73, -1, 55, 2, 0, 3, 1, 4, 36, 5, 0, 74, 18, 6, 2, 7, 3, 8, 4, 75, 37, 76, 38, 77, 1, 78, 3, 79, 38, 80, 8, 81, 2, 82, 2, 83, 0, 84, 39, 85, 40, 86, 3, 87, 41, 88, 42, 89, 43, 90, 3, 91, 3, 92, 44, 93, 3, 94, 3, 95, 3, 96, 43, 97, 23, 98, 3, 99, 3, 100, 3, 101, 3, 102, 1, 103, 3, 104, 3, 105, 3, 106, 3, 107, 3, 108, 3, 109, 3, 110, 3, 111, 3, 112, 11, 113, 3, 114, 45, 115, 1, 116, 46, 117, 1, 118, 47, 119, 1, 120, 47, 121, 48, 0, 0, 0, 123, 122, -1, 15, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 124, 3, 125, 1, 126, 1, 127, 49, 128, 1, 129, 5, 130, 50, 131, 3, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/engine.cfg b/demos/2d/platformer/engine.cfg
index 50b6b862e9..044d661e3e 100644
--- a/demos/2d/platformer/engine.cfg
+++ b/demos/2d/platformer/engine.cfg
@@ -4,14 +4,14 @@ name="Platformer"
main_scene="res://stage.xml"
icon="res://icon.png"
name_es="Plataformero"
+target_fps="60"
[display]
width=800
height=480
-stretch_2d=false
-stretch_mode="viewport"
-stretch_aspect="keep"
+stretch_mode="2d"
+stretch_aspect="keep_height"
[image_loader]
diff --git a/demos/2d/platformer/moving_platform.gd b/demos/2d/platformer/moving_platform.gd
index 719d9e460e..21c312d5c3 100644
--- a/demos/2d/platformer/moving_platform.gd
+++ b/demos/2d/platformer/moving_platform.gd
@@ -1,27 +1,20 @@
extends Node2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
+# Member variables
export var motion = Vector2()
export var cycle = 1.0
-var accum=0.0
+var accum = 0.0
-func _fixed_process(delta):
- accum += delta * (1.0/cycle) * PI * 2.0
- accum = fmod(accum,PI*2.0)
+func _fixed_process(delta):
+ accum += delta*(1.0/cycle)*PI*2.0
+ accum = fmod(accum, PI*2.0)
var d = sin(accum)
var xf = Matrix32()
- xf[2]= motion * d
+ xf[2]= motion*d
get_node("platform").set_transform(xf)
-
+
func _ready():
- # Initalization here
set_fixed_process(true)
- pass
-
-
diff --git a/demos/2d/platformer/moving_platform.xml b/demos/2d/platformer/moving_platform.xml
index 4d54d6d11c..4b94a7af48 100644
--- a/demos/2d/platformer/moving_platform.xml
+++ b/demos/2d/platformer/moving_platform.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="4" version="1.0" version_name="Godot Engine v1.0.3917-beta1">
- <ext_resource path="res://moving_platform.*" type="Texture"></ext_resource>
- <ext_resource path="res://moving_platform.*" type="Script"></ext_resource>
+<resource_file type="PackedScene" subresource_count="4" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://moving_platform.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://moving_platform.gd" type="Script" index="0"></ext_resource>
<resource type="ConvexPolygonShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<vector2_array name="points" len="4"> -88, 24, -88, -24, 88, -24, 88, 24 </vector2_array>
@@ -9,169 +9,189 @@
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="46">
+ <string_array len="36">
<string> "moving_platform" </string>
- <string> "Node2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
<string> "motion" </string>
<string> "cycle" </string>
+ <string> "Node2D" </string>
<string> "platform" </string>
- <string> "RigidBody2D" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
+ <string> "RigidBody2D" </string>
<string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "CollisionPolygon2D" </string>
<string> "build_mode" </string>
<string> "polygon" </string>
+ <string> "shape_range" </string>
+ <string> "trigger" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 4 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="88"> -1, -1, 5, 0, -1, 4, 1, 0, 2, 1, 3, 2, 4, 3, 0, 0, 0, 28, 6, -1, 21, 7, 4, 8, 5, 9, 6, 10, 4, 11, 7, 12, 7, 13, 8, 14, 3, 15, 3, 16, 9, 17, 3, 18, 4, 19, 10, 20, 10, 21, 4, 22, 4, 23, 11, 24, 2, 25, 9, 26, 12, 27, 12, 0, 1, 0, 29, 29, -1, 1, 30, 13, 0, 1, 0, 31, 31, -1, 4, 32, 10, 33, 14, 34, 15, 35, 4, 0 </int_array>
<string> "variants" </string>
- <array len="17" shared="false">
- <bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <resource resource_type="Script" path="res://moving_platform.*"> </resource>
+ <array len="16" shared="false">
+ <resource external="0"> </resource>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="4" shared="false">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -210.652, -172.81 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
<bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 1.360373 </real>
- <string> "ofs" </string>
- <vector2> -210.652, -172.81 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
- <real> 400 </real>
+ <real> 179 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -180,24 +200,24 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <int> 1 </int>
+ <vector2> 0, 0 </vector2>
+ <real> 1 </real>
+ <bool> False </bool>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, -0, 0, 1, 0, 0 </matrix32>
- <bool> False </bool>
+ <int> 1 </int>
<int> 3 </int>
+ <real> 0 </real>
<int> 0 </int>
- <resource resource_type="Texture" path="res://moving_platform.*"> </resource>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <bool> True </bool>
+ <real> -1 </real>
+ <resource external="1"> </resource>
<vector2_array len="4"> -88, -24, 88, -24, 88, 24, -88, 24 </vector2_array>
+ <vector2> -1, -1 </vector2>
</array>
- <string> "nodes" </string>
- <int_array len="150"> -1, -1, 1, 0, -1, 11, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 10, 6, 11, 2, 12, 1, 0, 0, 0, 14, 13, -1, 23, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 15, 7, 16, 8, 17, 9, 18, 10, 19, 11, 20, 1, 21, 1, 22, 3, 23, 10, 24, 10, 25, 12, 26, 10, 27, 0, 28, 0, 29, 2, 30, 3, 0, 1, 0, 31, 31, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 32, 13, 33, 0, 34, 2, 35, 10, 36, 10, 37, 7, 38, 7, 39, 12, 40, 14, 41, 10, 42, 15, 0, 1, 0, 43, 43, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 44, 12, 45, 16, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/one_way_platform.xml b/demos/2d/platformer/one_way_platform.xml
index 491dd32b17..85b2322711 100644
--- a/demos/2d/platformer/one_way_platform.xml
+++ b/demos/2d/platformer/one_way_platform.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="3" version="1.1" version_name="Godot Engine v1.1.rc1.custom_build">
- <ext_resource path="res://one_way_platform.png" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="3" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://one_way_platform.png" type="Texture" index="0"></ext_resource>
<resource type="RectangleShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<vector2 name="extents"> 100, 10 </vector2>
@@ -12,22 +12,13 @@
<int> 0 </int>
<string> "conns" </string>
<int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="42">
+ <string_array len="23">
<string> "one_way_platform" </string>
- <string> "StaticBody2D" </string>
- <string> "_import_path" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/light_mask" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "z/z" </string>
- <string> "z/relative" </string>
<string> "input/pickable" </string>
- <string> "shape_count" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
@@ -40,42 +31,34 @@
<string> "friction" </string>
<string> "bounce" </string>
<string> "__meta__" </string>
+ <string> "StaticBody2D" </string>
<string> "sprite" </string>
- <string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
+ <string> "Sprite" </string>
<string> "CollisionShape2D" </string>
+ <string> "transform/pos" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
</string_array>
<string> "node_count" </string>
<int> 3 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
<string> "nodes" </string>
- <int_array len="135"> -1, -1, 1, 0, -1, 24, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 12, 8, 13, 3, 14, 9, 15, 10, 16, 8, 17, 3, 18, 3, 19, 11, 20, 12, 21, 4, 22, 5, 23, 2, 24, 5, 25, 13, 0, 0, 0, 27, 26, -1, 21, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 28, 14, 29, 1, 30, 4, 31, 8, 32, 8, 33, 3, 34, 3, 35, 7, 36, 15, 37, 8, 38, 16, 0, 0, 0, 39, 39, -1, 12, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 17, 8, 5, 9, 6, 10, 7, 11, 1, 40, 9, 41, 8, 0 </int_array>
+ <int_array len="57"> -1, -1, 14, 0, -1, 13, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 8, 12, 7, 13, 9, 0, 0, 0, 17, 15, -1, 1, 16, 10, 0, 0, 0, 18, 18, -1, 4, 19, 11, 20, 1, 21, 0, 22, 12, 0 </int_array>
<string> "variants" </string>
- <array len="18" shared="false">
- <node_path> "" </node_path>
- <bool> True </bool>
- <real> 1 </real>
- <int> 1 </int>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 0 </int>
+ <array len="13" shared="false">
<bool> False </bool>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, -0, 0, 1, 1.46304, -13.1672 </matrix32>
+ <int> 1 </int>
<vector2> 0, 1 </vector2>
<real> 20 </real>
+ <vector2> 0, 0 </vector2>
+ <real> 0 </real>
+ <real> 1 </real>
<dictionary shared="false">
<string> "__editor_plugin_screen__" </string>
<string> "2D" </string>
@@ -198,6 +181,11 @@
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -207,13 +195,12 @@
<int> 0 </int>
</dictionary>
</dictionary>
- <resource resource_type="Texture" path="res://one_way_platform.png"> </resource>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="0"> </resource>
<vector2> 1.46304, -13.1672 </vector2>
+ <int> -1 </int>
</array>
<string> "version" </string>
- <int> 1 </int>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/parallax_bg.xml b/demos/2d/platformer/parallax_bg.xml
index cc8cfe5de0..3b306aecab 100644
--- a/demos/2d/platformer/parallax_bg.xml
+++ b/demos/2d/platformer/parallax_bg.xml
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="7" version="0.99" version_name="Godot Engine v0.99.3046-pre-beta">
- <ext_resource path="res://scroll_bg_sky.png" type="Texture"></ext_resource>
- <ext_resource path="res://scroll_bg_cloud_1.png" type="Texture"></ext_resource>
- <ext_resource path="res://scroll_bg_cloud_3.png" type="Texture"></ext_resource>
- <ext_resource path="res://scroll_bg_cloud_2.png" type="Texture"></ext_resource>
- <ext_resource path="res://scroll_bg_fg_1.png" type="Texture"></ext_resource>
- <ext_resource path="res://scroll_bg_fg_2.png" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="7" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://scroll_bg_cloud_1.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://scroll_bg_sky.png" type="Texture" index="0"></ext_resource>
+ <ext_resource path="res://scroll_bg_fg_2.png" type="Texture" index="4"></ext_resource>
+ <ext_resource path="res://scroll_bg_cloud_3.png" type="Texture" index="3"></ext_resource>
+ <ext_resource path="res://scroll_bg_cloud_2.png" type="Texture" index="2"></ext_resource>
+ <ext_resource path="res://scroll_bg_fg_1.png" type="Texture" index="5"></ext_resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="51">
+ <string_array len="32">
<string> "parallax_bg" </string>
- <string> "ParallaxBackground" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
<string> "layer" </string>
<string> "offset" </string>
<string> "rotation" </string>
@@ -27,148 +27,204 @@
<string> "scroll/base_scale" </string>
<string> "scroll/limit_begin" </string>
<string> "scroll/limit_end" </string>
- <string> "script/script" </string>
+ <string> "scroll/ignore_camera_zoom" </string>
<string> "__meta__" </string>
+ <string> "ParallaxBackground" </string>
<string> "sky" </string>
- <string> "ParallaxLayer" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
<string> "motion/scale" </string>
<string> "motion/mirroring" </string>
+ <string> "ParallaxLayer" </string>
<string> "Sprite" </string>
+ <string> "transform/scale" </string>
<string> "texture" </string>
<string> "centered" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "clouds" </string>
+ <string> "transform/pos" </string>
<string> "Sprite 2" </string>
<string> "Sprite 3" </string>
<string> "Sprite 4" </string>
<string> "Sprite 5" </string>
<string> "Sprite 6" </string>
<string> "mount_ 2" </string>
+ <string> "region" </string>
+ <string> "region_rect" </string>
<string> "mount_1" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 14 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="198"> -1, -1, 12, 0, -1, 11, 1, 0, 2, 1, 3, 2, 4, 3, 5, 1, 6, 1, 7, 4, 8, 1, 9, 1, 10, 5, 11, 6, 0, 0, 0, 16, 13, -1, 2, 14, 3, 15, 7, 0, 1, 0, 17, 17, -1, 3, 18, 8, 19, 9, 20, 5, 0, 0, 0, 16, 21, -1, 2, 14, 10, 15, 7, 0, 3, 0, 17, 17, -1, 3, 22, 11, 19, 12, 20, 5, 0, 3, 0, 17, 23, -1, 3, 22, 13, 19, 12, 20, 5, 0, 3, 0, 17, 24, -1, 3, 22, 14, 19, 15, 20, 5, 0, 3, 0, 17, 25, -1, 3, 22, 16, 19, 15, 20, 5, 0, 3, 0, 17, 26, -1, 3, 22, 17, 19, 18, 20, 5, 0, 3, 0, 17, 27, -1, 3, 22, 19, 19, 18, 20, 5, 0, 0, 0, 16, 28, -1, 2, 14, 20, 15, 7, 0, 10, 0, 17, 17, -1, 5, 22, 21, 19, 22, 20, 5, 29, 23, 30, 24, 0, 0, 0, 16, 31, -1, 2, 14, 25, 15, 7, 0, 12, 0, 17, 17, -1, 5, 22, 21, 19, 26, 20, 5, 29, 23, 30, 24, 0 </int_array>
<string> "variants" </string>
- <array len="33">
- <bool> False </bool>
- <int> 0 </int>
+ <array len="27" shared="false">
<int> -1 </int>
<vector2> 0, 0 </vector2>
<real> 0 </real>
<vector2> 1, 1 </vector2>
<vector2> 0.7, 0 </vector2>
- <resource name=""></resource> <dictionary>
+ <bool> False </bool>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
- <string> "Script" </string>
- <dictionary>
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="4">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
- <string> "zoom" </string>
- <real> 1 </real>
+ <dictionary shared="false">
<string> "ofs" </string>
<vector2> -5, -25 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 1 </real>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <bool> True </bool>
- <real> 1 </real>
<vector2> 800, 0 </vector2>
<vector2> 32, 0.94 </vector2>
- <resource resource_type="Texture" path="res://scroll_bg_sky.png"> </resource>
- <int> 1 </int>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="0"> </resource>
<vector2> 0.1, 1 </vector2>
<vector2> 28, 127 </vector2>
- <resource resource_type="Texture" path="res://scroll_bg_cloud_1.png"> </resource>
+ <resource external="1"> </resource>
<vector2> 404, 24 </vector2>
<vector2> 154, 46 </vector2>
- <resource resource_type="Texture" path="res://scroll_bg_cloud_2.png"> </resource>
+ <resource external="2"> </resource>
<vector2> 525, 130 </vector2>
<vector2> 255, 158 </vector2>
- <resource resource_type="Texture" path="res://scroll_bg_cloud_3.png"> </resource>
+ <resource external="3"> </resource>
<vector2> 674, 70 </vector2>
<vector2> 0.2, 1 </vector2>
<vector2> 0, 225 </vector2>
- <resource resource_type="Texture" path="res://scroll_bg_fg_2.png"> </resource>
+ <resource external="4"> </resource>
+ <bool> True </bool>
<rect2> 0, 0, 800, 256 </rect2>
<vector2> 0.4, 1 </vector2>
- <resource resource_type="Texture" path="res://scroll_bg_fg_1.png"> </resource>
+ <resource external="5"> </resource>
</array>
- <string> "nodes" </string>
- <int_array len="760"> -1, -1, 1, 0, -1, 16, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 3, 12, 3, 13, 6, 14, 3, 15, 3, 16, 7, 17, 8, 0, 0, 0, 19, 18, -1, 18, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 3, 28, 4, 29, 5, 30, 5, 31, 11, 16, 7, 0, 1, 0, 32, 32, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 3, 28, 4, 29, 12, 33, 13, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 0, 42, 16, 16, 7, 0, 0, 0, 19, 43, -1, 18, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 3, 28, 4, 29, 5, 30, 17, 31, 11, 16, 7, 0, 3, 0, 32, 32, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 18, 28, 4, 29, 5, 33, 19, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 0, 42, 16, 16, 7, 0, 3, 0, 32, 44, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 20, 28, 4, 29, 5, 33, 19, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 0, 42, 16, 16, 7, 0, 3, 0, 32, 45, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 21, 28, 4, 29, 5, 33, 22, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 0, 42, 16, 16, 7, 0, 3, 0, 32, 46, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 23, 28, 4, 29, 5, 33, 22, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 0, 42, 16, 16, 7, 0, 3, 0, 32, 47, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 24, 28, 4, 29, 5, 33, 25, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 0, 42, 16, 16, 7, 0, 3, 0, 32, 48, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 26, 28, 4, 29, 5, 33, 25, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 0, 42, 16, 16, 7, 0, 0, 0, 19, 49, -1, 18, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 3, 28, 4, 29, 5, 30, 27, 31, 11, 16, 7, 0, 10, 0, 32, 32, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 28, 28, 4, 29, 5, 33, 29, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 9, 42, 30, 16, 7, 0, 0, 0, 19, 50, -1, 18, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 3, 28, 4, 29, 5, 30, 31, 31, 11, 16, 7, 0, 12, 0, 32, 32, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 20, 9, 21, 0, 22, 10, 23, 10, 24, 9, 25, 1, 26, 0, 27, 28, 28, 4, 29, 5, 33, 32, 34, 0, 8, 3, 35, 0, 36, 0, 37, 14, 38, 14, 39, 1, 40, 15, 41, 9, 42, 30, 16, 7, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/platformer/player.gd b/demos/2d/platformer/player.gd
index 9ee189df21..7ed99df9bd 100644
--- a/demos/2d/platformer/player.gd
+++ b/demos/2d/platformer/player.gd
@@ -1,3 +1,4 @@
+
extends RigidBody2D
# Character Demo, written by Juan Linietsky.
@@ -24,42 +25,40 @@ extends RigidBody2D
# -Friction cant be used, so floor velocity must be considered
# for moving platforms.
-var anim=""
-var siding_left=false
-var jumping=false
-var stopping_jump=false
-var shooting=false
+# Member variables
+var anim = ""
+var siding_left = false
+var jumping = false
+var stopping_jump = false
+var shooting = false
var WALK_ACCEL = 800.0
-var WALK_DEACCEL= 800.0
-var WALK_MAX_VELOCITY= 200.0
+var WALK_DEACCEL = 800.0
+var WALK_MAX_VELOCITY = 200.0
var AIR_ACCEL = 200.0
-var AIR_DEACCEL= 200.0
-var JUMP_VELOCITY=460
-var STOP_JUMP_FORCE=900.0
+var AIR_DEACCEL = 200.0
+var JUMP_VELOCITY = 460
+var STOP_JUMP_FORCE = 900.0
var MAX_FLOOR_AIRBORNE_TIME = 0.15
-var airborne_time=1e20
-var shoot_time=1e20
+var airborne_time = 1e20
+var shoot_time = 1e20
var MAX_SHOOT_POSE_TIME = 0.3
var bullet = preload("res://bullet.xml")
-var floor_h_velocity=0.0
+var floor_h_velocity = 0.0
var enemy
-func _integrate_forces(s):
-
-
+func _integrate_forces(s):
var lv = s.get_linear_velocity()
var step = s.get_step()
- var new_anim=anim
- var new_siding_left=siding_left
-
+ var new_anim = anim
+ var new_siding_left = siding_left
# Get the controls
var move_left = Input.is_action_pressed("move_left")
@@ -74,188 +73,160 @@ func _integrate_forces(s):
p.y = p.y - 100
e.set_pos(p)
get_parent().add_child(e)
-
-
- #deapply prev floor velocity
- lv.x-=floor_h_velocity
- floor_h_velocity=0.0
+ # Deapply prev floor velocity
+ lv.x -= floor_h_velocity
+ floor_h_velocity = 0.0
# Find the floor (a contact with upwards facing collision normal)
- var found_floor=false
- var floor_index=-1
+ var found_floor = false
+ var floor_index = -1
for x in range(s.get_contact_count()):
-
var ci = s.get_contact_local_normal(x)
- if (ci.dot(Vector2(0,-1))>0.6):
- found_floor=true
- floor_index=x
+ if (ci.dot(Vector2(0, -1)) > 0.6):
+ found_floor = true
+ floor_index = x
# A good idea when impementing characters of all kinds,
- # Compensates for physics imprecission, as well as human
- # reaction delay.
-
+ # compensates for physics imprecission, as well as human reaction delay.
if (shoot and not shooting):
- shoot_time=0
+ shoot_time = 0
var bi = bullet.instance()
var ss
if (siding_left):
- ss=-1.0
+ ss = -1.0
else:
- ss=1.0
- var pos = get_pos() + get_node("bullet_shoot").get_pos()*Vector2(ss,1.0)
-
+ ss = 1.0
+ var pos = get_pos() + get_node("bullet_shoot").get_pos()*Vector2(ss, 1.0)
+
bi.set_pos(pos)
get_parent().add_child(bi)
-
- bi.set_linear_velocity( Vector2(800.0*ss,-80) )
- get_node("sprite/smoke").set_emitting(true)
+
+ bi.set_linear_velocity(Vector2(800.0*ss, -80))
+ get_node("sprite/smoke").set_emitting(true)
get_node("sound").play("shoot")
- PS2D.body_add_collision_exception(bi.get_rid(),get_rid()) # make bullet and this not collide
-
-
+ PS2D.body_add_collision_exception(bi.get_rid(), get_rid()) # Make bullet and this not collide
else:
- shoot_time+=step
-
+ shoot_time += step
if (found_floor):
- airborne_time=0.0
+ airborne_time = 0.0
else:
- airborne_time+=step #time it spent in the air
-
+ airborne_time += step # Time it spent in the air
+
var on_floor = airborne_time < MAX_FLOOR_AIRBORNE_TIME
- # Process jump
+ # Process jump
if (jumping):
- if (lv.y>0):
- #set off the jumping flag if going down
- jumping=false
+ if (lv.y > 0):
+ # Set off the jumping flag if going down
+ jumping = false
elif (not jump):
- stopping_jump=true
-
- if (stopping_jump):
- lv.y+=STOP_JUMP_FORCE*step
+ stopping_jump = true
+ if (stopping_jump):
+ lv.y += STOP_JUMP_FORCE*step
+
if (on_floor):
-
# Process logic when character is on floor
-
if (move_left and not move_right):
if (lv.x > -WALK_MAX_VELOCITY):
- lv.x-=WALK_ACCEL*step
+ lv.x -= WALK_ACCEL*step
elif (move_right and not move_left):
if (lv.x < WALK_MAX_VELOCITY):
- lv.x+=WALK_ACCEL*step
+ lv.x += WALK_ACCEL*step
else:
var xv = abs(lv.x)
- xv-=WALK_DEACCEL*step
- if (xv<0):
- xv=0
- lv.x=sign(lv.x)*xv
-
- #Check jump
+ xv -= WALK_DEACCEL*step
+ if (xv < 0):
+ xv = 0
+ lv.x = sign(lv.x)*xv
+
+ # Check jump
if (not jumping and jump):
- lv.y=-JUMP_VELOCITY
- jumping=true
- stopping_jump=false
+ lv.y = -JUMP_VELOCITY
+ jumping = true
+ stopping_jump = false
get_node("sound").play("jump")
-
- #check siding
+ # Check siding
if (lv.x < 0 and move_left):
- new_siding_left=true
+ new_siding_left = true
elif (lv.x > 0 and move_right):
- new_siding_left=false
+ new_siding_left = false
if (jumping):
- new_anim="jumping"
- elif (abs(lv.x)<0.1):
- if (shoot_time<MAX_SHOOT_POSE_TIME):
- new_anim="idle_weapon"
+ new_anim = "jumping"
+ elif (abs(lv.x) < 0.1):
+ if (shoot_time < MAX_SHOOT_POSE_TIME):
+ new_anim = "idle_weapon"
else:
- new_anim="idle"
+ new_anim = "idle"
else:
- if (shoot_time<MAX_SHOOT_POSE_TIME):
- new_anim="run_weapon"
+ if (shoot_time < MAX_SHOOT_POSE_TIME):
+ new_anim = "run_weapon"
else:
- new_anim="run"
+ new_anim = "run"
else:
-
# Process logic when the character is in the air
-
if (move_left and not move_right):
if (lv.x > -WALK_MAX_VELOCITY):
- lv.x-=AIR_ACCEL*step
+ lv.x -= AIR_ACCEL*step
elif (move_right and not move_left):
if (lv.x < WALK_MAX_VELOCITY):
- lv.x+=AIR_ACCEL*step
+ lv.x += AIR_ACCEL*step
else:
var xv = abs(lv.x)
- xv-=AIR_DEACCEL*step
- if (xv<0):
- xv=0
- lv.x=sign(lv.x)*xv
-
- if (lv.y<0):
- if (shoot_time<MAX_SHOOT_POSE_TIME):
- new_anim="jumping_weapon"
+ xv -= AIR_DEACCEL*step
+ if (xv < 0):
+ xv = 0
+ lv.x = sign(lv.x)*xv
+
+ if (lv.y < 0):
+ if (shoot_time < MAX_SHOOT_POSE_TIME):
+ new_anim = "jumping_weapon"
else:
- new_anim="jumping"
+ new_anim = "jumping"
else:
- if (shoot_time<MAX_SHOOT_POSE_TIME):
- new_anim="falling_weapon"
+ if (shoot_time < MAX_SHOOT_POSE_TIME):
+ new_anim = "falling_weapon"
else:
- new_anim="falling"
-
-
- #Update siding
+ new_anim = "falling"
- if (new_siding_left!=siding_left):
+ # Update siding
+ if (new_siding_left != siding_left):
if (new_siding_left):
- get_node("sprite").set_scale( Vector2(-1,1) )
+ get_node("sprite").set_scale(Vector2(-1, 1))
else:
- get_node("sprite").set_scale( Vector2(1,1) )
-
- siding_left=new_siding_left
-
- #Change animation
- if (new_anim!=anim):
- anim=new_anim
- get_node("anim").play(anim)
-
- shooting=shoot
-
- # Apply floor velocity
- if (found_floor):
- floor_h_velocity=s.get_contact_collider_velocity_at_pos(floor_index).x
- lv.x+=floor_h_velocity
+ get_node("sprite").set_scale(Vector2(1, 1))
+ siding_left = new_siding_left
-
-
- #Finally, apply gravity and set back the linear velocity
- lv+=s.get_total_gravity()*step
- s.set_linear_velocity(lv)
-
+ # Change animation
+ if (new_anim != anim):
+ anim = new_anim
+ get_node("anim").play(anim)
-
+ shooting = shoot
+ # Apply floor velocity
+ if (found_floor):
+ floor_h_velocity = s.get_contact_collider_velocity_at_pos(floor_index).x
+ lv.x += floor_h_velocity
+ # Finally, apply gravity and set back the linear velocity
+ lv += s.get_total_gravity()*step
+ s.set_linear_velocity(lv)
func _ready():
- # Initalization here
-
+ enemy = ResourceLoader.load("res://enemy.xml")
+
# if !Globals.has_singleton("Facebook"):
-# return
+# return
# var Facebook = Globals.get_singleton("Facebook")
# var link = Globals.get("facebook/link")
# var icon = Globals.get("facebook/icon")
# var msg = "I just sneezed on your wall! Beat my score and Stop the Running nose!"
# var title = "I just sneezed on your wall!"
# Facebook.post("feed", msg, title, link, icon)
- enemy = ResourceLoader.load("res://enemy.xml")
- pass
-
-
-
diff --git a/demos/2d/platformer/player.xml b/demos/2d/platformer/player.xml
index 196881dee4..493279672f 100644
--- a/demos/2d/platformer/player.xml
+++ b/demos/2d/platformer/player.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="24" version="1.0" version_name="Godot Engine v1.0.rc2.custom_build">
- <ext_resource path="res://osb_jump.png" type="Texture"></ext_resource>
- <ext_resource path="res://bullet.png" type="Texture"></ext_resource>
- <ext_resource path="res://osb_right.png" type="Texture"></ext_resource>
- <ext_resource path="res://sound_coin.wav" type="Sample"></ext_resource>
- <ext_resource path="res://osb_fire.png" type="Texture"></ext_resource>
- <ext_resource path="res://sound_shoot.wav" type="Sample"></ext_resource>
- <ext_resource path="res://osb_left.png" type="Texture"></ext_resource>
- <ext_resource path="res://robot_demo.png" type="Texture"></ext_resource>
- <ext_resource path="res://player.gd" type="Script"></ext_resource>
- <ext_resource path="res://sound_jump.wav" type="Sample"></ext_resource>
+<resource_file type="PackedScene" subresource_count="25" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://bullet.png" type="Texture" index="2"></ext_resource>
+ <ext_resource path="res://sound_coin.wav" type="Sample" index="3"></ext_resource>
+ <ext_resource path="res://player.gd" type="Script" index="0"></ext_resource>
+ <ext_resource path="res://robot_demo.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://sound_shoot.wav" type="Sample" index="5"></ext_resource>
+ <ext_resource path="res://sound_jump.wav" type="Sample" index="4"></ext_resource>
+ <ext_resource path="res://osb_left.png" type="Texture" index="6"></ext_resource>
+ <ext_resource path="res://osb_right.png" type="Texture" index="7"></ext_resource>
+ <ext_resource path="res://osb_jump.png" type="Texture" index="8"></ext_resource>
+ <ext_resource path="res://osb_fire.png" type="Texture" index="9"></ext_resource>
<resource type="RayShape2D" path="local://1">
<real name="custom_solver_bias"> 0.5 </real>
<real name="length"> 20 </real>
@@ -20,6 +20,11 @@
<vector2_array name="points" len="3"> -19.902, -24.8691, 19.3625, -24.6056, -0.138023, 16.5036 </vector2_array>
</resource>
+ <resource type="ColorRamp" path="local://14">
+ <real_array name="offsets" len="2"> 0, 1 </real_array>
+ <color_array name="colors" len="2"> 1, 1, 1, 1, 0, 0, 0, 0.0442478 </color_array>
+
+ </resource>
<resource type="Animation" path="local://3">
<string name="resource/name"> "idle" </string>
<real name="length"> 7 </real>
@@ -31,6 +36,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="8"> 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 </real_array>
<string> "transitions" </string>
<real_array len="8"> 1, 1, 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
@@ -44,8 +51,6 @@
<int> 19 </int>
<int> 16 </int>
</array>
- <string> "times" </string>
- <real_array len="8"> 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 </real_array>
</dictionary>
</resource>
@@ -60,6 +65,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="3"> 0, 0.25, 0.5 </real_array>
<string> "transitions" </string>
<real_array len="3"> 1, 1, 1 </real_array>
<string> "values" </string>
@@ -68,13 +75,11 @@
<int> 24 </int>
<int> 23 </int>
</array>
- <string> "times" </string>
- <real_array len="3"> 0, 0.25, 0.5 </real_array>
</dictionary>
</resource>
- <resource type="Animation" path="local://5">
- <string name="resource/name"> "idle_weapon" </string>
+ <resource type="Animation" path="local://10">
+ <string name="resource/name"> "falling_weapon" </string>
<real name="length"> 0.5 </real>
<bool name="loop"> True </bool>
<real name="step"> 0.25 </real>
@@ -84,19 +89,20 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
- <int> 25 </int>
+ <int> 26 </int>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
</resource>
- <resource type="Animation" path="local://6">
- <real name="length"> 1.25 </real>
+ <resource type="Animation" path="local://5">
+ <string name="resource/name"> "idle_weapon" </string>
+ <real name="length"> 0.5 </real>
<bool name="loop"> True </bool>
<real name="step"> 0.25 </real>
<string name="tracks/0/type"> "value" </string>
@@ -105,19 +111,14 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
- <real_array len="6"> 1, 1, 1, 1, 1, 1 </real_array>
+ <real_array len="1"> 1 </real_array>
<string> "values" </string>
- <array len="6" shared="false">
- <int> 0 </int>
- <int> 1 </int>
- <int> 2 </int>
- <int> 3 </int>
- <int> 4 </int>
- <int> 0 </int>
+ <array len="1" shared="false">
+ <int> 25 </int>
</array>
- <string> "times" </string>
- <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
</dictionary>
</resource>
@@ -132,14 +133,14 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<int> 22 </int>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
</resource>
@@ -154,14 +155,14 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<int> 21 </int>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
</resource>
@@ -175,6 +176,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
<string> "transitions" </string>
<real_array len="6"> 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
@@ -186,13 +189,10 @@
<int> 14 </int>
<int> 5 </int>
</array>
- <string> "times" </string>
- <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
</dictionary>
</resource>
- <resource type="Animation" path="local://10">
- <string name="resource/name"> "falling_weapon" </string>
+ <resource type="Animation" path="local://12">
<real name="length"> 0.5 </real>
<bool name="loop"> True </bool>
<real name="step"> 0.25 </real>
@@ -202,18 +202,18 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="1"> 0 </real_array>
<string> "transitions" </string>
<real_array len="1"> 1 </real_array>
<string> "values" </string>
<array len="1" shared="false">
<int> 26 </int>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
</resource>
- <resource type="Animation" path="local://11">
+ <resource type="Animation" path="local://6">
<real name="length"> 1.25 </real>
<bool name="loop"> True </bool>
<real name="step"> 0.25 </real>
@@ -223,24 +223,24 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
<string> "transitions" </string>
<real_array len="6"> 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
<array len="6" shared="false">
- <int> 5 </int>
- <int> 6 </int>
- <int> 7 </int>
- <int> 8 </int>
- <int> 9 </int>
- <int> 5 </int>
+ <int> 0 </int>
+ <int> 1 </int>
+ <int> 2 </int>
+ <int> 3 </int>
+ <int> 4 </int>
+ <int> 0 </int>
</array>
- <string> "times" </string>
- <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
</dictionary>
</resource>
- <resource type="Animation" path="local://12">
- <real name="length"> 0.5 </real>
+ <resource type="Animation" path="local://11">
+ <real name="length"> 1.25 </real>
<bool name="loop"> True </bool>
<real name="step"> 0.25 </real>
<string name="tracks/0/type"> "value" </string>
@@ -249,14 +249,19 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="6"> 0, 0.25, 0.5, 0.75, 1, 1.25 </real_array>
<string> "transitions" </string>
- <real_array len="1"> 1 </real_array>
+ <real_array len="6"> 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
- <array len="1" shared="false">
- <int> 26 </int>
+ <array len="6" shared="false">
+ <int> 5 </int>
+ <int> 6 </int>
+ <int> 7 </int>
+ <int> 8 </int>
+ <int> 9 </int>
+ <int> 5 </int>
</array>
- <string> "times" </string>
- <real_array len="1"> 0 </real_array>
</dictionary>
</resource>
@@ -267,7 +272,7 @@
<string> "pitch" </string>
<real> 1 </real>
<string> "sample" </string>
- <resource resource_type="Sample" path="res://sound_jump.wav"> </resource>
+ <resource external="4"> </resource>
</dictionary>
<dictionary name="samples/shoot" shared="false">
<string> "db" </string>
@@ -275,7 +280,7 @@
<string> "pitch" </string>
<real> 1 </real>
<string> "sample" </string>
- <resource resource_type="Sample" path="res://sound_shoot.wav"> </resource>
+ <resource external="5"> </resource>
</dictionary>
<dictionary name="samples/coin" shared="false">
<string> "db" </string>
@@ -283,36 +288,36 @@
<string> "pitch" </string>
<real> 1 </real>
<string> "sample" </string>
- <resource resource_type="Sample" path="res://sound_coin.wav"> </resource>
+ <resource external="3"> </resource>
</dictionary>
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="180">
+ <string_array len="144">
<string> "player" </string>
- <string> "RigidBody2D" </string>
- <string> "_import_path" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/behind_parent" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
<string> "shapes/1/shape" </string>
<string> "shapes/1/transform" </string>
<string> "shapes/1/trigger" </string>
- <string> "layers" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
@@ -321,39 +326,28 @@
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "RigidBody2D" </string>
<string> "sprite" </string>
- <string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
<string> "vframes" </string>
<string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
+ <string> "Sprite" </string>
<string> "smoke" </string>
- <string> "Particles2D" </string>
+ <string> "visibility/self_opacity" </string>
<string> "visibility/blend_mode" </string>
+ <string> "transform/pos" </string>
+ <string> "transform/rot" </string>
<string> "config/amount" </string>
<string> "config/lifetime" </string>
- <string> "config/time_scale" </string>
- <string> "config/preprocess" </string>
<string> "config/emit_timeout" </string>
<string> "config/emitting" </string>
- <string> "config/offset" </string>
- <string> "config/half_extents" </string>
<string> "config/local_space" </string>
<string> "config/explosiveness" </string>
- <string> "config/flip_h" </string>
- <string> "config/flip_v" </string>
<string> "config/texture" </string>
- <string> "config/h_frames" </string>
- <string> "config/v_frames" </string>
<string> "params/direction" </string>
<string> "params/spread" </string>
<string> "params/linear_velocity" </string>
@@ -370,53 +364,30 @@
<string> "params/hue_variation" </string>
<string> "params/anim_speed_scale" </string>
<string> "params/anim_initial_pos" </string>
- <string> "randomness/direction" </string>
- <string> "randomness/spread" </string>
- <string> "randomness/linear_velocity" </string>
<string> "randomness/spin_velocity" </string>
- <string> "randomness/orbit_velocity" </string>
- <string> "randomness/gravity_direction" </string>
- <string> "randomness/gravity_strength" </string>
- <string> "randomness/radial_accel" </string>
- <string> "randomness/tangential_accel" </string>
- <string> "randomness/damping" </string>
- <string> "randomness/initial_angle" </string>
- <string> "randomness/initial_size" </string>
- <string> "randomness/final_size" </string>
- <string> "randomness/hue_variation" </string>
- <string> "randomness/anim_speed_scale" </string>
- <string> "randomness/anim_initial_pos" </string>
- <string> "color_phases/count" </string>
- <string> "phase_0/pos" </string>
- <string> "phase_0/color" </string>
- <string> "phase_1/pos" </string>
- <string> "phase_1/color" </string>
- <string> "phase_2/pos" </string>
- <string> "phase_2/color" </string>
- <string> "phase_3/pos" </string>
- <string> "phase_3/color" </string>
- <string> "emission_points" </string>
+ <string> "color/color_ramp" </string>
+ <string> "Particles2D" </string>
<string> "anim" </string>
- <string> "AnimationPlayer" </string>
<string> "playback/process_mode" </string>
<string> "playback/default_blend_time" </string>
<string> "root/root" </string>
<string> "anims/idle" </string>
<string> "anims/jumping" </string>
+ <string> "anims/falling_weapon" </string>
<string> "anims/idle_weapon" </string>
- <string> "anims/run" </string>
<string> "anims/crouch" </string>
<string> "anims/falling" </string>
<string> "anims/standing_weapon_ready" </string>
- <string> "anims/falling_weapon" </string>
- <string> "anims/run_weapon" </string>
<string> "anims/jumping_weapon" </string>
+ <string> "anims/run" </string>
+ <string> "anims/run_weapon" </string>
<string> "playback/active" </string>
<string> "playback/speed" </string>
<string> "blend_times" </string>
<string> "autoplay" </string>
+ <string> "AnimationPlayer" </string>
<string> "camera" </string>
- <string> "Camera2D" </string>
+ <string> "anchor_mode" </string>
<string> "rotating" </string>
<string> "current" </string>
<string> "smoothing" </string>
@@ -431,14 +402,16 @@
<string> "drag_margin/top" </string>
<string> "drag_margin/right" </string>
<string> "drag_margin/bottom" </string>
+ <string> "Camera2D" </string>
<string> "bullet_shoot" </string>
<string> "Position2D" </string>
<string> "CollisionShape2D" </string>
+ <string> "transform/scale" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
<string> "sound" </string>
- <string> "SamplePlayer" </string>
- <string> "config/voices" </string>
+ <string> "config/polyphony" </string>
<string> "config/samples" </string>
<string> "default/volume_db" </string>
<string> "default/pitch_scale" </string>
@@ -452,167 +425,180 @@
<string> "default/reverb_room" </string>
<string> "default/reverb_send" </string>
<string> "default/chorus_send" </string>
+ <string> "SamplePlayer" </string>
<string> "CollisionPolygon2D" </string>
<string> "build_mode" </string>
<string> "polygon" </string>
+ <string> "shape_range" </string>
<string> "ui" </string>
- <string> "CanvasLayer" </string>
<string> "layer" </string>
+ <string> "offset" </string>
<string> "rotation" </string>
<string> "scale" </string>
+ <string> "CanvasLayer" </string>
<string> "left" </string>
- <string> "TouchScreenButton" </string>
<string> "normal" </string>
<string> "pressed" </string>
<string> "bitmask" </string>
<string> "passby_press" </string>
<string> "action" </string>
<string> "visibility_mode" </string>
+ <string> "TouchScreenButton" </string>
<string> "right" </string>
<string> "jump" </string>
<string> "fire" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 14 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="398"> -1, -1, 27, 0, -1, 26, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 4, 7, 0, 8, 5, 9, 5, 10, 6, 11, 7, 12, 8, 13, 8, 14, 9, 15, 10, 16, 11, 17, 12, 18, 0, 19, 0, 20, 10, 21, 13, 22, 8, 23, 14, 24, 14, 25, 15, 26, 16, 0, 0, 0, 32, 28, -1, 3, 29, 17, 30, 6, 31, 18, 0, 1, 0, 63, 33, -1, 29, 34, 19, 35, 5, 36, 20, 37, 21, 38, 22, 39, 23, 40, 23, 41, 0, 42, 0, 43, 24, 44, 25, 45, 8, 46, 26, 47, 27, 48, 9, 49, 8, 50, 8, 51, 28, 52, 8, 53, 8, 54, 8, 55, 8, 56, 29, 57, 29, 58, 8, 59, 9, 60, 8, 61, 29, 62, 30, 0, 0, 0, 82, 64, -1, 17, 65, 5, 66, 8, 67, 31, 68, 32, 69, 33, 70, 34, 71, 35, 72, 36, 73, 37, 74, 38, 75, 39, 76, 40, 77, 41, 78, 10, 79, 29, 80, 42, 81, 43, 0, 0, 0, 99, 83, -1, 15, 84, 5, 85, 0, 86, 10, 87, 8, 88, 44, 89, 11, 90, 11, 91, 45, 92, 45, 93, 10, 94, 10, 95, 46, 96, 46, 97, 46, 98, 46, 0, 0, 0, 101, 100, -1, 1, 36, 47, 0, 0, 0, 102, 102, -1, 5, 36, 48, 103, 49, 104, 1, 105, 0, 106, 50, 0, 0, 0, 122, 107, -1, 14, 108, 5, 109, 51, 110, 8, 111, 9, 112, 8, 113, 8, 114, 8, 115, 11, 116, 8, 117, 8, 118, 8, 119, 6, 120, 8, 121, 8, 0, 0, 0, 123, 123, -1, 4, 124, 11, 125, 52, 126, 53, 105, 0, 0, 0, 0, 132, 127, -1, 4, 128, 11, 129, 13, 130, 8, 131, 44, 0, 9, 0, 140, 133, -1, 8, 36, 54, 103, 55, 134, 56, 135, 57, 136, 57, 137, 10, 138, 58, 139, 5, 0, 9, 0, 140, 141, -1, 8, 36, 59, 103, 55, 134, 60, 135, 57, 136, 57, 137, 10, 138, 61, 139, 5, 0, 9, 0, 140, 142, -1, 8, 36, 62, 103, 55, 134, 63, 135, 57, 136, 57, 137, 0, 138, 64, 139, 5, 0, 9, 0, 140, 143, -1, 8, 36, 65, 103, 55, 134, 66, 135, 57, 136, 57, 137, 0, 138, 67, 139, 5, 0 </int_array>
<string> "variants" </string>
- <array len="72" shared="false">
- <node_path> "" </node_path>
- <bool> True </bool>
- <real> 1 </real>
+ <array len="68" shared="false">
<bool> False </bool>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 2 </int>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, -0, 0, 1.76469, 0.291992, -12.1587 </matrix32>
<resource resource_type="Shape2D" path="local://2"> </resource>
<matrix32> 1, -0, 0, 1, 0, 0 </matrix32>
<int> 1 </int>
+ <int> 2 </int>
<real> 3 </real>
+ <real> 0 </real>
+ <real> 1 </real>
+ <bool> True </bool>
<int> 0 </int>
<int> 3 </int>
- <resource resource_type="Script" path="res://player.gd"> </resource>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
+ <resource external="0"> </resource>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1" shared="false">
- <string> "res://player.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -110.795, -101.2 </vector2>
+ <string> "snap_grid" </string>
<bool> False </bool>
- <string> "zoom" </string>
- <real> 2.272073 </real>
- <string> "use_snap" </string>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
<bool> False </bool>
- <string> "ofs" </string>
- <vector2> -181.946, -86.2812 </vector2>
- <string> "snap" </string>
- <int> 10 </int>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 2.050546 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
<string> "deflight_rot_y" </string>
<real> 0.628319 </real>
- <string> "zfar" </string>
- <real> 500 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
<string> "listener" </string>
<bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "ambient_light_color" </string>
- <color> 0.15, 0.15, 0.15, 1 </color>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "default_srgb" </string>
+ </dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
<bool> False </bool>
- <string> "deflight_rot_x" </string>
- <real> 0.942478 </real>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -622,68 +608,61 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "Script" </string>
</dictionary>
- <resource resource_type="Texture" path="res://robot_demo.png"> </resource>
+ <resource external="1"> </resource>
<int> 16 </int>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
<real> 0.363636 </real>
<vector2> 20.7312, 3.21187 </vector2>
<real> 83.450417 </real>
<int> 4 </int>
<real> 0.3 </real>
<real> 0.1 </real>
- <resource resource_type="Texture" path="res://bullet.png"> </resource>
+ <resource external="2"> </resource>
<real> 180 </real>
<real> 20 </real>
<real> 9.8 </real>
<real> 2 </real>
- <color> 0, 0, 0, 0.0442478 </color>
- <color> 1, 0, 0, 1 </color>
- <color> 0, 0, 0, 1 </color>
- <vector2_array len="0"> </vector2_array>
+ <resource resource_type="ColorRamp" path="local://14"> </resource>
<node_path> ".." </node_path>
<resource resource_type="Animation" path="local://3"> </resource>
<resource resource_type="Animation" path="local://4"> </resource>
+ <resource resource_type="Animation" path="local://10"> </resource>
<resource resource_type="Animation" path="local://5"> </resource>
- <resource resource_type="Animation" path="local://6"> </resource>
<resource resource_type="Animation" path="local://7"> </resource>
<resource resource_type="Animation" path="local://8"> </resource>
<resource resource_type="Animation" path="local://9"> </resource>
- <resource resource_type="Animation" path="local://10"> </resource>
- <resource resource_type="Animation" path="local://11"> </resource>
<resource resource_type="Animation" path="local://12"> </resource>
+ <resource resource_type="Animation" path="local://6"> </resource>
+ <resource resource_type="Animation" path="local://11"> </resource>
<array len="0" shared="false">
</array>
<string> "" </string>
+ <vector2> 1, 1 </vector2>
<int> 10000000 </int>
<real> 0.2 </real>
<vector2> 31.2428, 4.08784 </vector2>
<vector2> 0.291992, -12.1587 </vector2>
<vector2> 1, 1.76469 </vector2>
+ <int> -1 </int>
<resource resource_type="SampleLibrary" path="local://13"> </resource>
- <nil> </nil>
<vector2_array len="3"> -0.138023, 16.5036, -19.902, -24.8691, 19.3625, -24.6056 </vector2_array>
+ <vector2> -1, -1 </vector2>
<vector2> 27.7593, 360.87 </vector2>
<vector2> 1.49157, 1.46265 </vector2>
- <resource resource_type="Texture" path="res://osb_left.png"> </resource>
+ <resource external="6"> </resource>
<resource name=""></resource> <string> "move_left" </string>
<vector2> 121.542, 361.415 </vector2>
- <resource resource_type="Texture" path="res://osb_right.png"> </resource>
+ <resource external="7"> </resource>
<string> "move_right" </string>
<vector2> 666.224, 359.02 </vector2>
- <resource resource_type="Texture" path="res://osb_jump.png"> </resource>
+ <resource external="8"> </resource>
<string> "jump" </string>
<vector2> 668.073, 262.788 </vector2>
- <resource resource_type="Texture" path="res://osb_fire.png"> </resource>
+ <resource external="9"> </resource>
<string> "shoot" </string>
</array>
- <string> "nodes" </string>
- <int_array len="618"> -1, -1, 1, 0, -1, 30, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 8, 12, 9, 13, 3, 14, 10, 15, 11, 16, 3, 17, 12, 18, 7, 19, 13, 20, 5, 21, 5, 22, 1, 23, 14, 24, 15, 25, 3, 26, 3, 27, 1, 28, 4, 29, 5, 30, 16, 31, 17, 0, 0, 0, 33, 32, -1, 19, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 34, 18, 35, 1, 36, 4, 37, 3, 38, 3, 39, 7, 40, 19, 41, 14, 42, 20, 43, 3, 44, 21, 0, 1, 0, 46, 45, -1, 66, 2, 0, 3, 1, 4, 2, 5, 22, 6, 3, 47, 12, 7, 23, 8, 24, 9, 6, 48, 25, 49, 26, 50, 2, 51, 5, 52, 26, 53, 3, 54, 4, 55, 4, 56, 3, 57, 27, 58, 3, 59, 3, 60, 28, 61, 12, 62, 12, 63, 5, 64, 29, 65, 30, 66, 2, 67, 5, 68, 5, 69, 31, 70, 5, 71, 5, 72, 5, 73, 5, 74, 32, 75, 32, 76, 5, 77, 2, 78, 5, 79, 5, 80, 5, 81, 5, 82, 32, 83, 5, 84, 5, 85, 5, 86, 5, 87, 5, 88, 5, 89, 5, 90, 5, 91, 5, 92, 5, 93, 5, 94, 5, 95, 7, 96, 5, 97, 20, 98, 2, 99, 33, 100, 2, 101, 34, 102, 2, 103, 35, 104, 36, 0, 0, 0, 106, 105, -1, 18, 2, 0, 107, 12, 108, 5, 109, 37, 110, 38, 111, 39, 112, 40, 113, 41, 114, 42, 115, 43, 116, 44, 117, 45, 118, 46, 119, 47, 120, 1, 121, 32, 122, 48, 123, 49, 0, 0, 0, 125, 124, -1, 23, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 35, 1, 126, 3, 127, 1, 128, 5, 129, 6, 130, 14, 131, 14, 132, 50, 133, 50, 134, 1, 135, 1, 136, 51, 137, 51, 138, 51, 139, 51, 0, 0, 0, 141, 140, -1, 8, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 52, 8, 5, 9, 6, 0, 0, 0, 142, 142, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 53, 8, 5, 9, 54, 143, 8, 144, 3, 0, 0, 0, 146, 145, -1, 15, 2, 0, 147, 15, 148, 55, 149, 5, 150, 2, 151, 5, 152, 5, 153, 5, 154, 56, 155, 56, 156, 56, 157, 56, 158, 7, 159, 5, 160, 5, 0, 0, 0, 161, 161, -1, 10, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 162, 14, 163, 57, 0, 0, 0, 165, 164, -1, 5, 2, 0, 166, 14, 36, 4, 167, 5, 168, 6, 0, 9, 0, 170, 169, -1, 14, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 58, 8, 5, 9, 59, 171, 60, 172, 61, 173, 61, 174, 1, 175, 62, 176, 12, 0, 9, 0, 170, 177, -1, 14, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 63, 8, 5, 9, 59, 171, 64, 172, 61, 173, 61, 174, 1, 175, 65, 176, 12, 0, 9, 0, 170, 178, -1, 14, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 66, 8, 5, 9, 59, 171, 67, 172, 61, 173, 61, 174, 3, 175, 68, 176, 12, 0, 9, 0, 170, 179, -1, 14, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 69, 8, 5, 9, 59, 171, 70, 172, 61, 173, 61, 174, 3, 175, 71, 176, 12, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/seesaw.xml b/demos/2d/platformer/seesaw.xml
index ed879a9319..760423167f 100644
--- a/demos/2d/platformer/seesaw.xml
+++ b/demos/2d/platformer/seesaw.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="4" version="1.0" version_name="Godot Engine v1.0.3917-beta1">
- <ext_resource path="res://plank.*" type="Texture"></ext_resource>
- <ext_resource path="res://plankpin.*" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="4" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://plank.png" type="Texture" index="0"></ext_resource>
+ <ext_resource path="res://plankpin.png" type="Texture" index="1"></ext_resource>
<resource type="RectangleShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<vector2 name="extents"> 128, 8 </vector2>
@@ -9,159 +9,192 @@
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="49">
+ <string_array len="40">
<string> "seesaw" </string>
- <string> "Node2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
<string> "__meta__" </string>
+ <string> "Node2D" </string>
<string> "plank" </string>
- <string> "RigidBody2D" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
+ <string> "RigidBody2D" </string>
<string> "sprite" </string>
- <string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
+ <string> "Sprite" </string>
<string> "CollisionShape2D" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
<string> "pin" </string>
- <string> "PinJoint2D" </string>
<string> "node_a" </string>
<string> "node_b" </string>
<string> "bias/bias" </string>
+ <string> "softness" </string>
+ <string> "PinJoint2D" </string>
+ <string> "transform/pos" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 6 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="106"> -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 25, 3, -1, 21, 4, 1, 5, 2, 6, 3, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 0, 1, 0, 28, 26, -1, 1, 27, 12, 0, 1, 0, 29, 29, -1, 3, 30, 2, 31, 1, 32, 13, 0, 0, 0, 38, 33, -1, 4, 34, 14, 35, 15, 36, 8, 37, 8, 0, 0, 0, 28, 28, -1, 2, 39, 16, 27, 17, 0 </int_array>
<string> "variants" </string>
- <array len="19" shared="false">
- <bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
+ <array len="18" shared="false">
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -116.979, -109.897 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
<bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 2.050547 </real>
- <string> "ofs" </string>
- <vector2> -116.979, -109.897 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
- <real> 400 </real>
+ <real> 179 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -170,27 +203,27 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <int> 1 </int>
+ <bool> False </bool>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
- <bool> False </bool>
+ <int> 1 </int>
<int> 0 </int>
<real> 5.102041 </real>
- <resource resource_type="Texture" path="res://plank.*"> </resource>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <real> 1 </real>
+ <real> 0 </real>
+ <bool> True </bool>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
+ <resource external="0"> </resource>
+ <int> -1 </int>
<node_path> "../plank" </node_path>
<node_path> "" </node_path>
<vector2> -0.290825, 20.2425 </vector2>
- <resource resource_type="Texture" path="res://plankpin.*"> </resource>
+ <resource external="1"> </resource>
</array>
- <string> "nodes" </string>
- <int_array len="214"> -1, -1, 1, 0, -1, 8, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 0, 0, 0, 11, 10, -1, 23, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 12, 6, 13, 7, 14, 8, 15, 9, 16, 10, 17, 11, 18, 1, 19, 3, 20, 9, 21, 9, 22, 10, 23, 9, 24, 0, 25, 0, 26, 2, 27, 3, 0, 1, 0, 29, 28, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 30, 12, 31, 0, 32, 2, 33, 9, 34, 9, 35, 6, 36, 6, 37, 10, 38, 13, 39, 9, 40, 14, 0, 1, 0, 41, 41, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 42, 7, 43, 9, 0, 0, 0, 45, 44, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 46, 15, 47, 16, 48, 3, 0, 0, 0, 29, 29, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 17, 7, 3, 8, 4, 30, 18, 31, 0, 32, 2, 33, 9, 34, 9, 35, 6, 36, 6, 37, 10, 38, 13, 39, 9, 40, 14, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/stage.xml b/demos/2d/platformer/stage.xml
index 4d6083adf6..3b5d281551 100644
--- a/demos/2d/platformer/stage.xml
+++ b/demos/2d/platformer/stage.xml
@@ -1,37 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="10" version="1.1" version_name="Godot Engine v1.1.rc1.custom_build">
- <ext_resource path="res://tileset.xml" type="TileSet"></ext_resource>
- <ext_resource path="res://coin.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://moving_platform.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://seesaw.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://one_way_platform.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://player.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://music.ogg" type="AudioStream"></ext_resource>
- <ext_resource path="res://enemy.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://parallax_bg.xml" type="PackedScene"></ext_resource>
+<resource_file type="PackedScene" subresource_count="10" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://tileset.xml" type="TileSet" index="0"></ext_resource>
+ <ext_resource path="res://music.ogg" type="AudioStream" index="6"></ext_resource>
+ <ext_resource path="res://coin.xml" type="PackedScene" index="1"></ext_resource>
+ <ext_resource path="res://one_way_platform.xml" type="PackedScene" index="4"></ext_resource>
+ <ext_resource path="res://moving_platform.xml" type="PackedScene" index="2"></ext_resource>
+ <ext_resource path="res://enemy.xml" type="PackedScene" index="7"></ext_resource>
+ <ext_resource path="res://seesaw.xml" type="PackedScene" index="3"></ext_resource>
+ <ext_resource path="res://player.xml" type="PackedScene" index="5"></ext_resource>
+ <ext_resource path="res://parallax_bg.xml" type="PackedScene" index="8"></ext_resource>
<main_resource>
<dictionary name="_bundled" shared="false">
<string> "conn_count" </string>
<int> 0 </int>
<string> "conns" </string>
<int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="133">
+ <string_array len="112">
<string> "stage" </string>
- <string> "Node" </string>
- <string> "_import_path" </string>
<string> "__meta__" </string>
+ <string> "Node" </string>
<string> "tile_map" </string>
- <string> "TileMap" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/light_mask" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "z/z" </string>
- <string> "z/relative" </string>
<string> "mode" </string>
<string> "tile_set" </string>
<string> "cell/size" </string>
@@ -46,9 +38,13 @@
<string> "collision/layers" </string>
<string> "collision/mask" </string>
<string> "tile_data" </string>
+ <string> "TileMap" </string>
<string> "coins" </string>
<string> "coin" </string>
- <string> "Area2D" </string>
+ <string> "transform/pos" </string>
+ <string> "input/pickable" </string>
+ <string> "linear_damp" </string>
+ <string> "angular_damp" </string>
<string> "coin 2" </string>
<string> "coin 3" </string>
<string> "coin 4" </string>
@@ -92,24 +88,23 @@
<string> "coin 31 7 5" </string>
<string> "props" </string>
<string> "moving_platform" </string>
- <string> "Node2D" </string>
<string> "motion" </string>
<string> "cycle" </string>
<string> "moving_platform 2" </string>
<string> "moving_platform 3" </string>
<string> "seesaw" </string>
<string> "one_way_platform" </string>
- <string> "StaticBody2D" </string>
<string> "player" </string>
- <string> "RigidBody2D" </string>
<string> "music" </string>
- <string> "StreamPlayer" </string>
<string> "stream/stream" </string>
<string> "stream/play" </string>
<string> "stream/loop" </string>
<string> "stream/volume_db" </string>
<string> "stream/autoplay" </string>
<string> "stream/paused" </string>
+ <string> "stream/loop_restart_time" </string>
+ <string> "stream/buffering_ms" </string>
+ <string> "StreamPlayer" </string>
<string> "enemies" </string>
<string> "enemy 5" </string>
<string> "enemy 6" </string>
@@ -123,50 +118,39 @@
<string> "enemy 14" </string>
<string> "enemy 15" </string>
<string> "parallax_bg" </string>
- <string> "ParallaxBackground" </string>
+ <string> "scroll/ignore_camera_zoom" </string>
<string> "Label" </string>
<string> "margin/left" </string>
<string> "margin/top" </string>
<string> "margin/right" </string>
<string> "margin/bottom" </string>
- <string> "focus_neighbour/left" </string>
- <string> "focus_neighbour/top" </string>
- <string> "focus_neighbour/right" </string>
- <string> "focus_neighbour/bottom" </string>
<string> "focus/ignore_mouse" </string>
<string> "focus/stop_mouse" </string>
<string> "size_flags/horizontal" </string>
- <string> "size_flags/stretch_ratio" </string>
- <string> "range/min" </string>
- <string> "range/max" </string>
- <string> "range/step" </string>
- <string> "range/page" </string>
- <string> "range/value" </string>
- <string> "range/exp_edit" </string>
- <string> "rounded_values" </string>
<string> "text" </string>
- <string> "align" </string>
- <string> "valign" </string>
<string> "autowrap" </string>
- <string> "uppercase" </string>
<string> "percent_visible" </string>
+ <string> "lines_skipped" </string>
+ <string> "max_lines_visible" </string>
</string_array>
<string> "node_count" </string>
<int> 67 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
<string> "nodes" </string>
- <int_array len="973"> -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 25, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 2, 15, 8, 16, 9, 17, 10, 18, 11, 19, 12, 20, 13, 21, 8, 22, 14, 23, 14, 24, 3, 25, 6, 26, 4, 27, 4, 28, 15, 3, 16, 0, 0, 0, 1, 29, -1, 1, 2, 0, 0, 2, 0, 31, 30, 17, 3, 2, 0, 10, 18, 3, 19, 0, 2, 0, 31, 32, 17, 3, 2, 0, 10, 20, 3, 19, 0, 2, 0, 31, 33, 17, 3, 2, 0, 10, 21, 3, 19, 0, 2, 0, 31, 34, 17, 3, 2, 0, 10, 22, 3, 19, 0, 2, 0, 31, 35, 17, 3, 2, 0, 10, 23, 3, 19, 0, 2, 0, 31, 36, 17, 3, 2, 0, 10, 24, 3, 19, 0, 2, 0, 31, 37, 17, 3, 2, 0, 10, 25, 3, 19, 0, 2, 0, 31, 38, 17, 3, 2, 0, 10, 26, 3, 19, 0, 2, 0, 31, 39, 17, 3, 2, 0, 10, 27, 3, 19, 0, 2, 0, 31, 40, 17, 3, 2, 0, 10, 28, 3, 19, 0, 2, 0, 31, 41, 17, 3, 2, 0, 10, 29, 3, 19, 0, 2, 0, 31, 42, 17, 3, 2, 0, 10, 30, 3, 19, 0, 2, 0, 31, 43, 17, 3, 2, 0, 10, 31, 3, 19, 0, 2, 0, 31, 44, 17, 3, 2, 0, 10, 32, 3, 19, 0, 2, 0, 31, 45, 17, 3, 2, 0, 10, 33, 3, 19, 0, 2, 0, 31, 46, 17, 3, 2, 0, 10, 34, 3, 19, 0, 2, 0, 31, 47, 17, 3, 2, 0, 10, 35, 3, 19, 0, 2, 0, 31, 48, 17, 3, 2, 0, 10, 36, 3, 19, 0, 2, 0, 31, 49, 17, 3, 2, 0, 10, 37, 3, 19, 0, 2, 0, 31, 50, 17, 3, 2, 0, 10, 38, 3, 19, 0, 2, 0, 31, 51, 17, 3, 2, 0, 10, 39, 3, 19, 0, 2, 0, 31, 52, 17, 3, 2, 0, 10, 40, 3, 19, 0, 2, 0, 31, 53, 17, 3, 2, 0, 10, 41, 3, 19, 0, 2, 0, 31, 54, 17, 3, 2, 0, 10, 42, 3, 19, 0, 2, 0, 31, 55, 17, 3, 2, 0, 10, 43, 3, 19, 0, 2, 0, 31, 56, 17, 3, 2, 0, 10, 44, 3, 19, 0, 2, 0, 31, 57, 17, 3, 2, 0, 10, 45, 3, 19, 0, 2, 0, 31, 58, 17, 3, 2, 0, 10, 46, 3, 19, 0, 2, 0, 31, 59, 17, 3, 2, 0, 10, 47, 3, 19, 0, 2, 0, 31, 60, 17, 3, 2, 0, 10, 48, 3, 19, 0, 2, 0, 31, 61, 17, 3, 2, 0, 10, 49, 3, 19, 0, 2, 0, 31, 62, 17, 3, 2, 0, 10, 50, 3, 19, 0, 2, 0, 31, 63, 17, 3, 2, 0, 10, 51, 3, 19, 0, 2, 0, 31, 64, 17, 3, 2, 0, 10, 52, 3, 19, 0, 2, 0, 31, 65, 17, 3, 2, 0, 10, 53, 3, 19, 0, 2, 0, 31, 66, 17, 3, 2, 0, 10, 54, 3, 19, 0, 2, 0, 31, 67, 17, 3, 2, 0, 10, 55, 3, 19, 0, 2, 0, 31, 68, 17, 3, 2, 0, 10, 56, 3, 19, 0, 2, 0, 31, 69, 17, 3, 2, 0, 10, 57, 3, 19, 0, 2, 0, 31, 70, 17, 3, 2, 0, 10, 58, 3, 19, 0, 2, 0, 31, 71, 17, 3, 2, 0, 10, 59, 3, 19, 0, 2, 0, 31, 72, 17, 3, 2, 0, 10, 60, 3, 19, 0, 0, 0, 1, 73, -1, 1, 2, 0, 0, 45, 0, 75, 74, 61, 5, 2, 0, 10, 62, 3, 63, 76, 64, 77, 65, 0, 45, 0, 75, 78, 61, 5, 2, 0, 10, 66, 3, 63, 76, 67, 77, 68, 0, 45, 0, 75, 79, 61, 5, 2, 0, 10, 69, 3, 63, 76, 70, 77, 68, 0, 45, 0, 75, 80, 71, 3, 2, 0, 10, 72, 3, 73, 0, 45, 0, 82, 81, 74, 3, 2, 0, 10, 75, 3, 76, 0, 0, 0, 84, 83, 77, 3, 2, 0, 10, 78, 3, 79, 0, 0, 0, 86, 85, -1, 7, 2, 0, 87, 80, 88, 14, 89, 2, 90, 81, 91, 2, 92, 14, 0, 0, 0, 1, 93, -1, 1, 2, 0, 0, 53, 0, 84, 94, 82, 3, 2, 0, 10, 83, 3, 84, 0, 53, 0, 84, 95, 82, 3, 2, 0, 10, 85, 3, 84, 0, 53, 0, 84, 96, 82, 3, 2, 0, 10, 86, 3, 84, 0, 53, 0, 84, 97, 82, 3, 2, 0, 10, 87, 3, 84, 0, 53, 0, 84, 98, 82, 3, 2, 0, 10, 88, 3, 84, 0, 53, 0, 84, 99, 82, 3, 2, 0, 10, 89, 3, 84, 0, 53, 0, 84, 100, 82, 3, 2, 0, 10, 90, 3, 84, 0, 53, 0, 84, 101, 82, 3, 2, 0, 10, 91, 3, 84, 0, 53, 0, 84, 102, 82, 3, 2, 0, 10, 92, 3, 84, 0, 53, 0, 84, 103, 82, 3, 2, 0, 10, 93, 3, 84, 0, 53, 0, 84, 104, 82, 3, 2, 0, 10, 94, 3, 84, 0, 0, 0, 106, 105, 95, 2, 2, 0, 3, 96, 0, 0, 0, 107, 107, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 108, 97, 109, 98, 110, 99, 111, 100, 112, 0, 113, 0, 114, 0, 115, 0, 116, 2, 117, 2, 118, 13, 119, 3, 120, 6, 121, 101, 122, 3, 123, 102, 124, 6, 125, 14, 126, 14, 127, 103, 128, 8, 129, 8, 130, 2, 131, 14, 132, 104, 0 </int_array>
+ <int_array len="925"> -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 18, 3, -1, 15, 4, 1, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 11, 7, 12, 7, 13, 8, 14, 9, 15, 10, 16, 10, 17, 11, 1, 12, 0, 0, 0, 2, 19, -1, 0, 0, 2, 0, 2147483647, 20, 13, 4, 21, 14, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 25, 13, 4, 21, 17, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 26, 13, 4, 21, 18, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 27, 13, 4, 21, 19, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 28, 13, 4, 21, 20, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 29, 13, 4, 21, 21, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 30, 13, 4, 21, 22, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 31, 13, 4, 21, 23, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 32, 13, 4, 21, 24, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 33, 13, 4, 21, 25, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 34, 13, 4, 21, 26, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 35, 13, 4, 21, 27, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 36, 13, 4, 21, 28, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 37, 13, 4, 21, 29, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 38, 13, 4, 21, 30, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 39, 13, 4, 21, 31, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 40, 13, 4, 21, 32, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 41, 13, 4, 21, 33, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 42, 13, 4, 21, 34, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 43, 13, 4, 21, 35, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 44, 13, 4, 21, 36, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 45, 13, 4, 21, 37, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 46, 13, 4, 21, 38, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 47, 13, 4, 21, 39, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 48, 13, 4, 21, 40, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 49, 13, 4, 21, 41, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 50, 13, 4, 21, 42, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 51, 13, 4, 21, 43, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 52, 13, 4, 21, 44, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 53, 13, 4, 21, 45, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 54, 13, 4, 21, 46, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 55, 13, 4, 21, 47, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 56, 13, 4, 21, 48, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 57, 13, 4, 21, 49, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 58, 13, 4, 21, 50, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 59, 13, 4, 21, 51, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 60, 13, 4, 21, 52, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 61, 13, 4, 21, 53, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 62, 13, 4, 21, 54, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 63, 13, 4, 21, 55, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 64, 13, 4, 21, 56, 22, 15, 23, 16, 24, 8, 0, 2, 0, 2147483647, 65, 13, 4, 21, 57, 22, 15, 23, 16, 24, 8, 0, 0, 0, 2, 66, -1, 0, 0, 45, 0, 2147483647, 67, 58, 3, 21, 59, 68, 60, 69, 61, 0, 45, 0, 2147483647, 70, 58, 3, 21, 62, 68, 63, 69, 64, 0, 45, 0, 2147483647, 71, 58, 3, 21, 65, 68, 66, 69, 64, 0, 45, 0, 2147483647, 72, 67, 1, 21, 68, 0, 45, 0, 2147483647, 73, 69, 1, 21, 70, 0, 0, 0, 2147483647, 74, 71, 1, 21, 72, 0, 0, 0, 84, 75, -1, 8, 76, 73, 77, 7, 78, 15, 79, 74, 80, 15, 81, 7, 82, 9, 83, 75, 0, 0, 0, 2, 85, -1, 0, 0, 53, 0, 2147483647, 86, 76, 1, 21, 77, 0, 53, 0, 2147483647, 87, 76, 1, 21, 78, 0, 53, 0, 2147483647, 88, 76, 1, 21, 79, 0, 53, 0, 2147483647, 89, 76, 1, 21, 80, 0, 53, 0, 2147483647, 90, 76, 1, 21, 81, 0, 53, 0, 2147483647, 91, 76, 1, 21, 82, 0, 53, 0, 2147483647, 92, 76, 1, 21, 83, 0, 53, 0, 2147483647, 93, 76, 1, 21, 84, 0, 53, 0, 2147483647, 94, 76, 1, 21, 85, 0, 53, 0, 2147483647, 95, 76, 1, 21, 86, 0, 53, 0, 2147483647, 96, 76, 1, 21, 87, 0, 0, 0, 2147483647, 97, 88, 1, 98, 7, 0, 0, 0, 99, 99, -1, 12, 100, 89, 101, 90, 102, 91, 103, 92, 104, 15, 105, 15, 106, 6, 107, 93, 108, 15, 109, 8, 110, 1, 111, 94, 0 </int_array>
<string> "variants" </string>
- <array len="105" shared="false">
- <node_path> "" </node_path>
+ <array len="95" shared="false">
<dictionary shared="false">
<string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
+ <string> "Script" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
<string> "ofs" </string>
- <vector2> 328.379, 822.226 </vector2>
+ <vector2> -70.6559, 735.599 </vector2>
<string> "snap_grid" </string>
<bool> False </bool>
<string> "snap_offset" </string>
@@ -186,7 +170,7 @@
<string> "snap_step" </string>
<vector2> 10, 10 </vector2>
<string> "zoom" </string>
- <real> 1.108032 </real>
+ <real> 0.663419 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
@@ -280,17 +264,10 @@
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
- <string> "Script" </string>
+ <string> "Anim" </string>
<dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="4" shared="false">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
+ <string> "visible" </string>
+ <bool> False </bool>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -301,136 +278,25 @@
<int> 0 </int>
</dictionary>
</dictionary>
- <bool> True </bool>
- <real> 1 </real>
- <int> 1 </int>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
<int> 0 </int>
- <resource resource_type="TileSet" path="res://tileset.xml"> </resource>
+ <resource external="0"> </resource>
<vector2> 64, 64 </vector2>
<int> 8 </int>
<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
<int> 2 </int>
<bool> False </bool>
+ <real> 1 </real>
+ <real> 0 </real>
+ <int> 1 </int>
<int_array len="2008"> 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 0, 983052, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870914, 1048587, 536870922, 1048588, 2, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114122, 536870925, 1114123, 11, 1114124, 13, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 0, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 </int_array>
<dictionary shared="false">
<string> "_edit_lock_" </string>
<bool> True </bool>
</dictionary>
- <resource resource_type="PackedScene" path="res://coin.xml"> </resource>
+ <resource external="1"> </resource>
<vector2> 672, 1179 </vector2>
- <dictionary shared="false">
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
- <string> "__editor_plugin_states__" </string>
- <dictionary shared="false">
- <string> "2D" </string>
- <dictionary shared="false">
- <string> "ofs" </string>
- <vector2> -34.3697, -21.6562 </vector2>
- <string> "pixel_snap" </string>
- <bool> False </bool>
- <string> "zoom" </string>
- <real> 3.794776 </real>
- </dictionary>
- <string> "3D" </string>
- <dictionary shared="false">
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "fov" </string>
- <real> 45 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "viewports" </string>
- <array len="4" shared="false">
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- </array>
- <string> "zfar" </string>
- <real> 500 </real>
- <string> "znear" </string>
- <real> 0.1 </real>
- </dictionary>
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 2 </int>
- <string> "sources" </string>
- <array len="3" shared="false">
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
- </dictionary>
- <string> "__editor_run_settings__" </string>
- <dictionary shared="false">
- <string> "custom_args" </string>
- <string> "-l $scene" </string>
- <string> "run_mode" </string>
- <int> 0 </int>
- </dictionary>
- </dictionary>
+ <bool> True </bool>
+ <real> 0.1 </real>
<vector2> 704, 1179 </vector2>
<vector2> 736, 1179 </vector2>
<vector2> 1120, 992 </vector2>
@@ -472,119 +338,8 @@
<vector2> 4300.75, 541.058 </vector2>
<vector2> 4236.75, 541.058 </vector2>
<vector2> 4172.75, 541.058 </vector2>
- <resource resource_type="PackedScene" path="res://moving_platform.xml"> </resource>
+ <resource external="2"> </resource>
<vector2> 1451.86, 742.969 </vector2>
- <dictionary shared="false">
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
- <string> "__editor_plugin_states__" </string>
- <dictionary shared="false">
- <string> "2D" </string>
- <dictionary shared="false">
- <string> "ofs" </string>
- <vector2> -210.652, -172.81 </vector2>
- <string> "pixel_snap" </string>
- <bool> False </bool>
- <string> "zoom" </string>
- <real> 1.360373 </real>
- </dictionary>
- <string> "3D" </string>
- <dictionary shared="false">
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "fov" </string>
- <real> 400 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "viewports" </string>
- <array len="4" shared="false">
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- </array>
- <string> "zfar" </string>
- <real> 500 </real>
- <string> "znear" </string>
- <real> 0.1 </real>
- </dictionary>
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="4" shared="false">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
- </dictionary>
- <string> "__editor_run_settings__" </string>
- <dictionary shared="false">
- <string> "custom_args" </string>
- <string> "-l $scene" </string>
- <string> "run_mode" </string>
- <int> 0 </int>
- </dictionary>
- </dictionary>
<vector2> 0, 140 </vector2>
<real> 5 </real>
<vector2> 624.824, 545.544 </vector2>
@@ -592,482 +347,17 @@
<real> 10 </real>
<vector2> 3419.86, 739.662 </vector2>
<vector2> 450, 0 </vector2>
- <resource resource_type="PackedScene" path="res://seesaw.xml"> </resource>
+ <resource external="3"> </resource>
<vector2> 2402.79, 849.52 </vector2>
- <dictionary shared="false">
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
- <string> "__editor_plugin_states__" </string>
- <dictionary shared="false">
- <string> "2D" </string>
- <dictionary shared="false">
- <string> "ofs" </string>
- <vector2> -116.979, -109.897 </vector2>
- <string> "pixel_snap" </string>
- <bool> False </bool>
- <string> "zoom" </string>
- <real> 2.050547 </real>
- </dictionary>
- <string> "3D" </string>
- <dictionary shared="false">
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "fov" </string>
- <real> 400 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "viewports" </string>
- <array len="4" shared="false">
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- </array>
- <string> "zfar" </string>
- <real> 500 </real>
- <string> "znear" </string>
- <real> 0.1 </real>
- </dictionary>
- </dictionary>
- <string> "__editor_run_settings__" </string>
- <dictionary shared="false">
- <string> "custom_args" </string>
- <string> "-l $scene" </string>
- <string> "run_mode" </string>
- <int> 0 </int>
- </dictionary>
- </dictionary>
- <resource resource_type="PackedScene" path="res://one_way_platform.xml"> </resource>
+ <resource external="4"> </resource>
<vector2> 927.698, 1120.81 </vector2>
- <dictionary shared="false">
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
- <string> "__editor_plugin_states__" </string>
- <dictionary shared="false">
- <string> "2D" </string>
- <dictionary shared="false">
- <string> "ofs" </string>
- <vector2> -133.699, -110.553 </vector2>
- <string> "snap_grid" </string>
- <bool> False </bool>
- <string> "snap_offset" </string>
- <vector2> 0, 0 </vector2>
- <string> "snap_pixel" </string>
- <bool> False </bool>
- <string> "snap_relative" </string>
- <bool> False </bool>
- <string> "snap_rotation" </string>
- <bool> False </bool>
- <string> "snap_rotation_offset" </string>
- <real> 0 </real>
- <string> "snap_rotation_step" </string>
- <real> 0.261799 </real>
- <string> "snap_show_grid" </string>
- <bool> False </bool>
- <string> "snap_step" </string>
- <vector2> 10, 10 </vector2>
- <string> "zoom" </string>
- <real> 2.050546 </real>
- </dictionary>
- <string> "3D" </string>
- <dictionary shared="false">
- <string> "ambient_light_color" </string>
- <color> 0.15, 0.15, 0.15, 1 </color>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "default_srgb" </string>
- <bool> False </bool>
- <string> "deflight_rot_x" </string>
- <real> 0.942478 </real>
- <string> "deflight_rot_y" </string>
- <real> 0.628319 </real>
- <string> "fov" </string>
- <real> 45 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "viewports" </string>
- <array len="4" shared="false">
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- </array>
- <string> "zfar" </string>
- <real> 500 </real>
- <string> "znear" </string>
- <real> 0.1 </real>
- </dictionary>
- </dictionary>
- <string> "__editor_run_settings__" </string>
- <dictionary shared="false">
- <string> "custom_args" </string>
- <string> "-l $scene" </string>
- <string> "run_mode" </string>
- <int> 0 </int>
- </dictionary>
- </dictionary>
- <resource resource_type="PackedScene" path="res://player.xml"> </resource>
+ <resource external="5"> </resource>
<vector2> 251.684, 1045.6 </vector2>
- <dictionary shared="false">
- <string> "__editor_plugin_screen__" </string>
- <string> "Script" </string>
- <string> "__editor_plugin_states__" </string>
- <dictionary shared="false">
- <string> "2D" </string>
- <dictionary shared="false">
- <string> "ofs" </string>
- <vector2> -181.946, -86.2812 </vector2>
- <string> "pixel_snap" </string>
- <bool> False </bool>
- <string> "snap" </string>
- <int> 10 </int>
- <string> "use_snap" </string>
- <bool> False </bool>
- <string> "zoom" </string>
- <real> 2.272073 </real>
- </dictionary>
- <string> "3D" </string>
- <dictionary shared="false">
- <string> "ambient_light_color" </string>
- <color> 0.15, 0.15, 0.15, 1 </color>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "default_srgb" </string>
- <bool> False </bool>
- <string> "deflight_rot_x" </string>
- <real> 0.942478 </real>
- <string> "deflight_rot_y" </string>
- <real> 0.628319 </real>
- <string> "fov" </string>
- <real> 45 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "viewports" </string>
- <array len="4" shared="false">
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "listener" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- </array>
- <string> "zfar" </string>
- <real> 500 </real>
- <string> "znear" </string>
- <real> 0.1 </real>
- </dictionary>
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1" shared="false">
- <string> "res://player.gd" </string>
- </array>
- </dictionary>
- </dictionary>
- <string> "__editor_run_settings__" </string>
- <dictionary shared="false">
- <string> "custom_args" </string>
- <string> "-l $scene" </string>
- <string> "run_mode" </string>
- <int> 0 </int>
- </dictionary>
- </dictionary>
- <resource resource_type="AudioStream" path="res://music.ogg"> </resource>
+ <resource external="6"> </resource>
<real> 2 </real>
- <resource resource_type="PackedScene" path="res://enemy.xml"> </resource>
+ <int> 500 </int>
+ <resource external="7"> </resource>
<vector2> 834.664, 1309.6 </vector2>
- <dictionary shared="false">
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
- <string> "__editor_plugin_states__" </string>
- <dictionary shared="false">
- <string> "2D" </string>
- <dictionary shared="false">
- <string> "ofs" </string>
- <vector2> -227.625, -197.9 </vector2>
- <string> "pixel_snap" </string>
- <bool> False </bool>
- <string> "zoom" </string>
- <real> 1.108033 </real>
- </dictionary>
- <string> "3D" </string>
- <dictionary shared="false">
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "fov" </string>
- <real> 45 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "viewports" </string>
- <array len="4" shared="false">
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
- </dictionary>
- </array>
- <string> "zfar" </string>
- <real> 500 </real>
- <string> "znear" </string>
- <real> 0.1 </real>
- </dictionary>
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1" shared="false">
- <string> "res://enemy.gd" </string>
- </array>
- </dictionary>
- </dictionary>
- <string> "__editor_run_settings__" </string>
- <dictionary shared="false">
- <string> "custom_args" </string>
- <string> "-l $scene" </string>
- <string> "run_mode" </string>
- <int> 0 </int>
- </dictionary>
- </dictionary>
<vector2> 707.665, 1225.05 </vector2>
<vector2> 1125.21, 1053.06 </vector2>
<vector2> 1292.11, 1059.24 </vector2>
@@ -1078,79 +368,16 @@
<vector2> 3429.73, 540.865 </vector2>
<vector2> 3546.2, 1356.19 </vector2>
<vector2> 2406.63, 815.115 </vector2>
- <resource resource_type="PackedScene" path="res://parallax_bg.xml"> </resource>
- <dictionary shared="false">
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
- <string> "__editor_plugin_states__" </string>
- <dictionary shared="false">
- <string> "2D" </string>
- <dictionary shared="false">
- <string> "ofs" </string>
- <vector2> -5, -25 </vector2>
- <string> "zoom" </string>
- <real> 1 </real>
- </dictionary>
- <string> "3D" </string>
- <dictionary shared="false">
- <string> "fov" </string>
- <real> 45 </real>
- <string> "window_0" </string>
- <dictionary shared="false">
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- </dictionary>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "zfar" </string>
- <real> 500 </real>
- <string> "znear" </string>
- <real> 0.1 </real>
- </dictionary>
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="4" shared="false">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
- </dictionary>
- <string> "__editor_run_settings__" </string>
- <dictionary shared="false">
- <string> "custom_args" </string>
- <string> "-l $scene" </string>
- <string> "run_mode" </string>
- <int> 0 </int>
- </dictionary>
- </dictionary>
+ <resource external="8"> </resource>
<real> 12 </real>
<real> -202 </real>
<real> 358 </real>
<real> -10 </real>
- <real> 7 </real>
- <real> 14.769231 </real>
<string> "This is a simple demo on how to make a platformer game with Godot.&quot;This version uses physics and the 2D physics engine for motion and collision.&quot;&quot;The demo also shows the benefits of using the scene system, where coins,&quot;enemies and the player are edited separatedly and instanced in the stage.&quot;&quot;To edit the base tiles for the tileset, open the tileset_edit.xml file and follow &quot;instructions.&quot;" </string>
- <real> -1 </real>
+ <int> -1 </int>
</array>
<string> "version" </string>
- <int> 1 </int>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/platformer/tiles_demo.png.flags b/demos/2d/platformer/tiles_demo.png.flags
new file mode 100644
index 0000000000..efb2b8ce5f
--- /dev/null
+++ b/demos/2d/platformer/tiles_demo.png.flags
@@ -0,0 +1 @@
+filter=false
diff --git a/demos/2d/platformer/tileset_edit.xml b/demos/2d/platformer/tileset_edit.xml
index db289433ab..3ae9f1bd2a 100644
--- a/demos/2d/platformer/tileset_edit.xml
+++ b/demos/2d/platformer/tileset_edit.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="14" version="1.0" version_name="Godot Engine v1.0.stable.custom_build">
- <ext_resource path="res://tiles_demo.png" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="14" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://tiles_demo.png" type="Texture" index="0"></ext_resource>
<resource type="ConvexPolygonShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<vector2_array name="points" len="4"> -32, -24, 32, -24, 32, 32, -32, 32 </vector2_array>
@@ -63,48 +63,41 @@
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="77">
+ <string_array len="49">
<string> "Node" </string>
- <string> "_import_path" </string>
<string> "__meta__" </string>
<string> "floor" </string>
- <string> "Sprite" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "z/z" </string>
- <string> "z/relative" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
<string> "region" </string>
<string> "region_rect" </string>
+ <string> "Sprite" </string>
<string> "collision" </string>
- <string> "StaticBody2D" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
- <string> "layers" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "constant_linear_velocity" </string>
<string> "constant_angular_velocity" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "StaticBody2D" </string>
<string> "CollisionPolygon2D" </string>
<string> "build_mode" </string>
<string> "polygon" </string>
+ <string> "shape_range" </string>
<string> "trigger" </string>
<string> "edge" </string>
+ <string> "transform/pos" </string>
<string> "wall" </string>
<string> "wall_deco" </string>
<string> "corner" </string>
@@ -118,147 +111,152 @@
<string> "ramp" </string>
<string> "ceiling2wall" </string>
<string> "help" </string>
- <string> "Label" </string>
- <string> "focus_neighbour/left" </string>
- <string> "focus_neighbour/top" </string>
- <string> "focus_neighbour/right" </string>
- <string> "focus_neighbour/bottom" </string>
<string> "focus/ignore_mouse" </string>
<string> "focus/stop_mouse" </string>
<string> "size_flags/horizontal" </string>
- <string> "size_flags/stretch_ratio" </string>
- <string> "range/min" </string>
- <string> "range/max" </string>
- <string> "range/step" </string>
- <string> "range/page" </string>
- <string> "range/value" </string>
- <string> "range/exp_edit" </string>
- <string> "rounded_values" </string>
<string> "text" </string>
- <string> "align" </string>
- <string> "valign" </string>
- <string> "autowrap" </string>
- <string> "uppercase" </string>
<string> "percent_visible" </string>
+ <string> "lines_skipped" </string>
+ <string> "max_lines_visible" </string>
+ <string> "Label" </string>
<string> "platform_floor" </string>
<string> "platform_edge" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 42 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="772"> -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 6, 2, -1, 3, 3, 1, 4, 2, 5, 3, 0, 1, 0, 18, 7, -1, 10, 8, 4, 9, 5, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 2, 0, 19, 19, -1, 4, 20, 11, 21, 12, 22, 13, 23, 4, 0, 0, 0, 6, 24, -1, 4, 25, 14, 3, 1, 4, 2, 5, 15, 0, 4, 0, 18, 7, -1, 10, 8, 4, 9, 16, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 5, 0, 19, 19, -1, 4, 20, 11, 21, 17, 22, 13, 23, 4, 0, 0, 0, 6, 26, -1, 4, 25, 18, 3, 1, 4, 2, 5, 19, 0, 7, 0, 18, 7, -1, 10, 8, 4, 9, 20, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 8, 0, 19, 19, -1, 4, 20, 11, 21, 21, 22, 13, 23, 4, 0, 0, 0, 6, 27, -1, 4, 25, 22, 3, 1, 4, 2, 5, 23, 0, 10, 0, 18, 7, -1, 10, 8, 4, 9, 24, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 11, 0, 19, 19, -1, 4, 20, 11, 21, 25, 22, 13, 23, 4, 0, 0, 0, 6, 28, -1, 4, 25, 26, 3, 1, 4, 2, 5, 27, 0, 13, 0, 18, 7, -1, 10, 8, 4, 9, 28, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 14, 0, 19, 19, -1, 4, 20, 11, 21, 29, 22, 13, 23, 4, 0, 0, 0, 6, 29, -1, 4, 25, 30, 3, 1, 4, 2, 5, 31, 0, 16, 0, 18, 7, -1, 10, 8, 4, 9, 32, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 17, 0, 19, 19, -1, 4, 20, 11, 21, 33, 22, 13, 23, 4, 0, 0, 0, 6, 30, -1, 4, 25, 34, 3, 1, 4, 2, 5, 35, 0, 19, 0, 18, 7, -1, 10, 8, 4, 9, 36, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 20, 0, 19, 19, -1, 4, 20, 11, 21, 33, 22, 13, 23, 4, 0, 0, 0, 6, 31, -1, 4, 25, 37, 3, 1, 4, 2, 5, 38, 0, 0, 0, 6, 32, -1, 4, 25, 39, 3, 1, 4, 2, 5, 40, 0, 0, 0, 6, 33, -1, 4, 25, 41, 3, 1, 4, 2, 5, 42, 0, 0, 0, 6, 34, -1, 4, 25, 43, 3, 1, 4, 2, 5, 44, 0, 0, 0, 6, 35, -1, 4, 25, 45, 3, 1, 4, 2, 5, 46, 0, 26, 0, 18, 7, -1, 10, 8, 4, 9, 47, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 27, 0, 19, 19, -1, 4, 20, 11, 21, 48, 22, 13, 23, 4, 0, 0, 0, 6, 36, -1, 4, 25, 49, 3, 1, 4, 2, 5, 50, 0, 29, 0, 18, 7, -1, 10, 8, 4, 9, 51, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 30, 0, 19, 19, -1, 4, 20, 11, 21, 52, 22, 13, 23, 4, 0, 0, 0, 6, 37, -1, 4, 25, 53, 3, 1, 4, 2, 5, 54, 0, 32, 0, 18, 7, -1, 10, 8, 4, 9, 55, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 33, 0, 19, 19, -1, 4, 20, 11, 21, 21, 22, 13, 23, 4, 0, 0, 0, 46, 38, -1, 7, 39, 2, 40, 2, 41, 56, 42, 57, 43, 10, 44, 11, 45, 58, 0, 0, 0, 6, 47, -1, 4, 25, 59, 3, 1, 4, 2, 5, 60, 0, 36, 0, 18, 7, -1, 10, 8, 4, 9, 61, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 37, 0, 19, 19, -1, 4, 20, 11, 21, 62, 22, 13, 23, 4, 0, 0, 0, 6, 48, -1, 4, 25, 63, 3, 1, 4, 2, 5, 64, 0, 39, 0, 18, 7, -1, 10, 8, 4, 9, 65, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 40, 0, 19, 19, -1, 4, 20, 11, 21, 66, 22, 13, 23, 4, 0 </int_array>
<string> "variants" </string>
- <array len="69" shared="false">
- <node_path> "" </node_path>
+ <array len="67" shared="false">
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "Script" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
- <bool> True </bool>
- <string> "zoom" </string>
- <real> 1.670183 </real>
- <string> "use_snap" </string>
- <bool> True </bool>
<string> "ofs" </string>
<vector2> -446.534, -87.6905 </vector2>
- <string> "snap" </string>
- <int> 8 </int>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 1.670183 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
<string> "deflight_rot_y" </string>
<real> 0.628319 </real>
- <string> "zfar" </string>
- <real> 500 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
<string> "listener" </string>
<bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "ambient_light_color" </string>
- <color> 0.15, 0.15, 0.15, 1 </color>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "default_srgb" </string>
+ </dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
<bool> False </bool>
- <string> "deflight_rot_x" </string>
- <real> 0.942478 </real>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -268,23 +266,20 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
+ <resource external="0"> </resource>
<bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 0 </int>
- <resource resource_type="Texture" path="res://tiles_demo.png"> </resource>
- <bool> False </bool>
- <int> 1 </int>
- <color> 1, 1, 1, 1 </color>
<rect2> 0, 0, 64, 64 </rect2>
+ <bool> False </bool>
<resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, -0, 0, 1, 0, 0 </matrix32>
+ <int> 1 </int>
+ <vector2> 0, 0 </vector2>
+ <real> 0 </real>
+ <real> 1 </real>
+ <int> 0 </int>
<vector2_array len="4"> 32, -24, 32, 32, -32, 32, -32, -24 </vector2_array>
+ <vector2> -1, -1 </vector2>
<vector2> 64, 0 </vector2>
<rect2> 64, 0, 64, 64 </rect2>
<resource resource_type="Shape2D" path="local://2"> </resource>
@@ -329,7 +324,7 @@
<resource resource_type="Shape2D" path="local://10"> </resource>
<int> 2 </int>
<string> "This scene serves as a tool for editing the tileset.&#0010;Nodes (sprites) and their respective collisions&#0010;are edited here. &#0010;&#0010;To create a tileset from this, a &quot;TileSet&quot; resoucre &#0010;must be created. Use the helper in:&#0010;&#0010; Scene -&lt; Convert To -&lt; TileSet&#0010;&#0010;This will save a tileset. Saving over it will merge your changes.&#0010;&#0010;Finally, the saved tileset resource (tileset.xml in this&#0010; case), can be opened to be used into a TileMap node&#0010; for editing a tile map.&#0010;" </string>
- <real> -1 </real>
+ <int> -1 </int>
<vector2> 0, 256 </vector2>
<rect2> 128, 0, 64, 64 </rect2>
<resource resource_type="Shape2D" path="local://11"> </resource>
@@ -339,10 +334,8 @@
<resource resource_type="Shape2D" path="local://12"> </resource>
<vector2_array len="4"> 24, -24, 24, 24, -32, 24, -32, -24 </vector2_array>
</array>
- <string> "nodes" </string>
- <int_array len="1708"> -1, -1, 0, 0, -1, 2, 1, 0, 2, 1, 0, 0, 0, 4, 3, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 12, 0, 1, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 13, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 2, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 15, 38, 9, 0, 0, 0, 4, 39, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 16, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 17, 0, 4, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 18, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 5, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 19, 38, 9, 0, 0, 0, 4, 40, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 20, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 21, 0, 7, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 22, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 8, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 23, 38, 9, 0, 0, 0, 4, 41, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 24, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 25, 0, 10, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 26, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 11, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 27, 38, 9, 0, 0, 0, 4, 42, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 28, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 29, 0, 13, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 30, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 14, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 31, 38, 9, 0, 0, 0, 4, 43, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 32, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 33, 0, 16, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 34, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 17, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 35, 38, 9, 0, 0, 0, 4, 44, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 36, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 37, 0, 19, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 38, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 20, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 35, 38, 9, 0, 0, 0, 4, 45, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 39, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 40, 0, 0, 0, 4, 46, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 41, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 42, 0, 0, 0, 4, 47, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 43, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 44, 0, 0, 0, 4, 48, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 45, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 46, 0, 0, 0, 4, 49, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 47, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 48, 0, 26, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 49, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 27, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 50, 38, 9, 0, 0, 0, 4, 50, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 51, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 52, 0, 29, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 53, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 30, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 54, 38, 9, 0, 0, 0, 4, 51, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 55, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 56, 0, 32, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 57, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 33, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 23, 38, 9, 0, 0, 0, 53, 52, -1, 25, 1, 0, 5, 2, 6, 3, 7, 3, 54, 0, 55, 0, 56, 0, 57, 0, 58, 2, 59, 2, 60, 58, 61, 3, 62, 5, 63, 3, 64, 3, 65, 3, 66, 5, 67, 9, 68, 9, 69, 59, 70, 7, 71, 7, 72, 9, 73, 9, 74, 60, 0, 0, 0, 4, 75, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 61, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 62, 0, 36, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 63, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 37, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 64, 38, 9, 0, 0, 0, 4, 76, -1, 20, 1, 0, 5, 2, 6, 3, 7, 3, 8, 65, 9, 5, 10, 6, 11, 7, 12, 2, 13, 8, 14, 2, 15, 4, 16, 9, 17, 9, 18, 10, 19, 10, 20, 7, 21, 11, 22, 2, 23, 66, 0, 39, 0, 25, 24, -1, 18, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 26, 10, 27, 67, 28, 14, 29, 9, 30, 10, 31, 4, 32, 5, 33, 3, 34, 5, 0, 40, 0, 35, 35, -1, 12, 1, 0, 5, 2, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 2, 36, 7, 37, 68, 38, 9, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/polygon_path_finder_demo/engine.cfg b/demos/2d/polygon_path_finder_demo/engine.cfg
deleted file mode 100644
index 41c4adf701..0000000000
--- a/demos/2d/polygon_path_finder_demo/engine.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-[application]
-
-name="polygon_path_finder_demo"
-main_scene="res://new_scene_poly_with_holes.scn"
-icon="icon.png"
diff --git a/demos/2d/polygon_path_finder_demo/icon.png b/demos/2d/polygon_path_finder_demo/icon.png
deleted file mode 100644
index 0c422e37b0..0000000000
--- a/demos/2d/polygon_path_finder_demo/icon.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/polygon_path_finder_demo/icon.png.flags b/demos/2d/polygon_path_finder_demo/icon.png.flags
deleted file mode 100644
index dbef2209e8..0000000000
--- a/demos/2d/polygon_path_finder_demo/icon.png.flags
+++ /dev/null
@@ -1 +0,0 @@
-gen_mipmaps=true
diff --git a/demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scn b/demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scn
deleted file mode 100644
index 07838be41e..0000000000
--- a/demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scn
+++ /dev/null
Binary files differ
diff --git a/demos/2d/polygon_path_finder_demo/polygonpathfinder.gd b/demos/2d/polygon_path_finder_demo/polygonpathfinder.gd
deleted file mode 100644
index a0e71dd127..0000000000
--- a/demos/2d/polygon_path_finder_demo/polygonpathfinder.gd
+++ /dev/null
@@ -1,80 +0,0 @@
-
-extends Spatial
-
-func _ready():
- var pf = PolygonPathFinder.new()
-
- var points = Vector2Array()
- var connections = IntArray()
-
- # poly 1
- points.push_back(Vector2(0, 0)) #0
- points.push_back(Vector2(10, 0)) #1
- points.push_back(Vector2(10, 10)) #2
- points.push_back(Vector2(0, 10)) #3
-
- connections.push_back(0) # connect vertex 0 ...
- connections.push_back(1) # ... to 1
- drawLine(points[0], points[1], get_node("/root/Spatial/Polys"))
- connections.push_back(1) # connect vertex 1 ...
- connections.push_back(2) # ... to 2
- drawLine(points[1], points[2], get_node("/root/Spatial/Polys"))
- connections.push_back(2) # etc.
- connections.push_back(3)
- drawLine(points[2], points[3], get_node("/root/Spatial/Polys"))
- connections.push_back(3) # connect vertex 3 ...
- connections.push_back(0) # back to vertex 0, to close the polygon
- drawLine(points[3], points[0], get_node("/root/Spatial/Polys"))
-
- # poly 2, as obstacle inside poly 1
- points.push_back(Vector2(2, 0.5)) #4
- points.push_back(Vector2(4, 0.5)) #5
- points.push_back(Vector2(4, 9.5)) #6
- points.push_back(Vector2(2, 9.5)) #7
-
- connections.push_back(4)
- connections.push_back(5)
- drawLine(points[4], points[5], get_node("/root/Spatial/Polys"))
- connections.push_back(5)
- connections.push_back(6)
- drawLine(points[5], points[6], get_node("/root/Spatial/Polys"))
- connections.push_back(6)
- connections.push_back(7)
- drawLine(points[6], points[7], get_node("/root/Spatial/Polys"))
- connections.push_back(7)
- connections.push_back(4)
- drawLine(points[7], points[4], get_node("/root/Spatial/Polys"))
-
-
- print("points: ",points)
- print("connections: ",connections)
-
- pf.setup(points, connections)
-
- var path = pf.find_path(Vector2(1, 5), Vector2(8, 5))
-
- var lastStep = null
- print("path: ",path)
- for step in path:
- print("step: ",step)
- if (lastStep != null):
- var currPathSegment = Vector2Array()
- drawLine(lastStep, step, get_node("/root/Spatial/Path"))
- lastStep = step
-
-
-
-func drawLine(pointA, pointB, immediateGeo):
- var drawPosY = 0.1
- var im = immediateGeo
-
- im.begin(Mesh.PRIMITIVE_POINTS, null)
- im.add_vertex(Vector3(pointA.x, drawPosY, pointA.y))
- im.add_vertex(Vector3(pointB.x, drawPosY, pointB.y))
- im.end()
- im.begin(Mesh.PRIMITIVE_LINE_STRIP, null)
- im.add_vertex(Vector3(pointA.x, drawPosY, pointA.y))
- im.add_vertex(Vector3(pointB.x, drawPosY, pointB.y))
- im.end()
-
-
diff --git a/demos/2d/pong/pong.gd b/demos/2d/pong/pong.gd
index cf6003c659..81afbd9961 100644
--- a/demos/2d/pong/pong.gd
+++ b/demos/2d/pong/pong.gd
@@ -1,73 +1,67 @@
extends Node2D
-#member variables here, example:
-#var a=2
-#var b="textvar"
+# Member variables
const INITIAL_BALL_SPEED = 80
var ball_speed = INITIAL_BALL_SPEED
-var screen_size = Vector2(640,400)
-#default ball direction
-var direction = Vector2(-1,0)
-var pad_size = Vector2(8,32)
+var screen_size = Vector2(640, 400)
+
+# Default ball direction
+var direction = Vector2(-1, 0)
+var pad_size = Vector2(8, 32)
const PAD_SPEED = 150
func _process(delta):
-
-
- #get ball position and pad rectangles
+ # Get ball position and pad rectangles
var ball_pos = get_node("ball").get_pos()
- var left_rect = Rect2( get_node("left").get_pos() - pad_size*0.5, pad_size )
- var right_rect = Rect2( get_node("right").get_pos() - pad_size*0.5, pad_size )
+ var left_rect = Rect2(get_node("left").get_pos() - pad_size*0.5, pad_size)
+ var right_rect = Rect2(get_node("right").get_pos() - pad_size*0.5, pad_size)
- #integrate new ball postion
- ball_pos+=direction*ball_speed*delta
+ # Integrate new ball postion
+ ball_pos += direction*ball_speed*delta
- #flip when touching roof or floor
- if ( (ball_pos.y<0 and direction.y <0) or (ball_pos.y>screen_size.y and direction.y>0)):
+ # Flip when touching roof or floor
+ if ((ball_pos.y < 0 and direction.y < 0) or (ball_pos.y > screen_size.y and direction.y > 0)):
direction.y = -direction.y
-
- #flip, change direction and increase speed when touching pads
- if ( (left_rect.has_point(ball_pos) and direction.x < 0) or (right_rect.has_point(ball_pos) and direction.x > 0)):
- direction.x=-direction.x
- ball_speed*=1.1
- direction.y=randf()*2.0-1
+
+ # Flip, change direction and increase speed when touching pads
+ if ((left_rect.has_point(ball_pos) and direction.x < 0) or (right_rect.has_point(ball_pos) and direction.x > 0)):
+ direction.x = -direction.x
+ ball_speed *= 1.1
+ direction.y = randf()*2.0 - 1
direction = direction.normalized()
-
- #check gameover
- if (ball_pos.x<0 or ball_pos.x>screen_size.x):
- ball_pos=screen_size*0.5
- ball_speed=INITIAL_BALL_SPEED
- direction=Vector2(-1,0)
-
-
+
+ # Check gameover
+ if (ball_pos.x < 0 or ball_pos.x > screen_size.x):
+ ball_pos = screen_size*0.5
+ ball_speed = INITIAL_BALL_SPEED
+ direction = Vector2(-1, 0)
+
get_node("ball").set_pos(ball_pos)
-
- #move left pad
+
+ # Move left pad
var left_pos = get_node("left").get_pos()
if (left_pos.y > 0 and Input.is_action_pressed("left_move_up")):
- left_pos.y+=-PAD_SPEED*delta
+ left_pos.y += -PAD_SPEED*delta
if (left_pos.y < screen_size.y and Input.is_action_pressed("left_move_down")):
- left_pos.y+=PAD_SPEED*delta
-
+ left_pos.y += PAD_SPEED*delta
+
get_node("left").set_pos(left_pos)
-
- #move right pad
+
+ # Move right pad
var right_pos = get_node("right").get_pos()
if (right_pos.y > 0 and Input.is_action_pressed("right_move_up")):
- right_pos.y+=-PAD_SPEED*delta
+ right_pos.y += -PAD_SPEED*delta
if (right_pos.y < screen_size.y and Input.is_action_pressed("right_move_down")):
- right_pos.y+=PAD_SPEED*delta
-
- get_node("right").set_pos(right_pos)
+ right_pos.y += PAD_SPEED*delta
-
+ get_node("right").set_pos(right_pos)
+
func _ready():
- screen_size = get_viewport_rect().size #get actual size
+ screen_size = get_viewport_rect().size # Get actual size
pad_size = get_node("left").get_texture().get_size()
set_process(true)
-
diff --git a/demos/2d/pong/pong.xml b/demos/2d/pong/pong.xml
index cf47a8db9f..2189be7c62 100644
--- a/demos/2d/pong/pong.xml
+++ b/demos/2d/pong/pong.xml
@@ -1,153 +1,170 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="6" version="0.99" version_name="Godot Engine v0.99.3735-pre-beta">
- <ext_resource path="res://pong.*" type="GDScript"></ext_resource>
- <ext_resource path="res://separator.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://left_pallete.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://right_pallete.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://ball.*" type="ImageTexture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="6" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://pong.gd" type="Script" index="0"></ext_resource>
+ <ext_resource path="res://left_pallete.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://separator.png" type="Texture" index="3"></ext_resource>
+ <ext_resource path="res://right_pallete.png" type="Texture" index="2"></ext_resource>
+ <ext_resource path="res://ball.png" type="Texture" index="4"></ext_resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="27">
+ <string_array len="11">
<string> "game" </string>
- <string> "Node2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "Node2D" </string>
<string> "left" </string>
- <string> "Sprite" </string>
+ <string> "transform/pos" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
+ <string> "Sprite" </string>
<string> "right" </string>
<string> "separator" </string>
<string> "ball" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 5 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="55"> -1, -1, 3, 0, -1, 2, 1, 0, 2, 1, 0, 0, 0, 7, 4, -1, 2, 5, 2, 6, 3, 0, 0, 0, 7, 8, -1, 2, 5, 4, 6, 5, 0, 0, 0, 7, 9, -1, 2, 5, 6, 6, 7, 0, 0, 0, 7, 10, -1, 2, 5, 8, 6, 9, 0 </int_array>
<string> "variants" </string>
- <array len="20" shared="false">
- <bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <resource resource_type="GDScript" path="res://pong.*"> </resource>
+ <array len="10" shared="false">
+ <resource external="0"> </resource>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "Script" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1" shared="false">
- <string> "res://pong.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
- <bool> True </bool>
- <string> "zoom" </string>
- <real> 1.108033 </real>
<string> "ofs" </string>
<vector2> -54.59, -36.0052 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 1.108033 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -156,27 +173,18 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "Script" </string>
</dictionary>
<vector2> 67.6875, 183.208 </vector2>
- <resource resource_type="ImageTexture" path="res://left_pallete.*"> </resource>
- <bool> False </bool>
- <int> 1 </int>
- <int> 0 </int>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="1"> </resource>
<vector2> 577, 187 </vector2>
- <resource resource_type="ImageTexture" path="res://right_pallete.*"> </resource>
+ <resource external="2"> </resource>
<vector2> 320, 200 </vector2>
- <resource resource_type="ImageTexture" path="res://separator.*"> </resource>
+ <resource external="3"> </resource>
<vector2> 320.283, 188 </vector2>
- <resource resource_type="ImageTexture" path="res://ball.*"> </resource>
+ <resource external="4"> </resource>
</array>
- <string> "nodes" </string>
- <int_array len="197"> -1, -1, 1, 0, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 10, 6, 0, 0, 0, 12, 11, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 7, 7, 3, 8, 4, 13, 8, 14, 0, 15, 2, 16, 9, 17, 9, 18, 10, 19, 10, 20, 11, 21, 12, 22, 9, 23, 13, 0, 0, 0, 12, 24, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 14, 7, 3, 8, 4, 13, 15, 14, 0, 15, 2, 16, 9, 17, 9, 18, 10, 19, 10, 20, 11, 21, 12, 22, 9, 23, 13, 0, 0, 0, 12, 25, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 16, 7, 3, 8, 4, 13, 17, 14, 0, 15, 2, 16, 9, 17, 9, 18, 10, 19, 10, 20, 11, 21, 12, 22, 9, 23, 13, 0, 0, 0, 12, 26, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 18, 7, 3, 8, 4, 13, 19, 14, 0, 15, 2, 16, 9, 17, 9, 18, 10, 19, 10, 20, 11, 21, 12, 22, 9, 23, 13, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/rubegoldberg/ball.xml b/demos/2d/rubegoldberg/ball.xml
index 625438eb75..73b699514c 100644
--- a/demos/2d/rubegoldberg/ball.xml
+++ b/demos/2d/rubegoldberg/ball.xml
@@ -1,171 +1,200 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="3" version="0.99" version_name="Godot Engine v0.99.3656-pre-beta">
- <ext_resource path="res://art/bowling_ball.*" type="ImageTexture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="3" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://art/bowling_ball.png" type="Texture" index="0"></ext_resource>
<resource type="CircleShape2D" path="local://1">
- <string name="resource/name"> "" </string>
<real name="custom_solver_bias"> 0 </real>
<real name="radius"> 32 </real>
- <resource name="script/script"></resource>
+
</resource>
<main_resource>
- <string name="resource/name"> "" </string>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="48">
+ <string_array len="30">
<string> "Ball" </string>
- <string> "RigidBody2D" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/pause_mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
- <string> "script/script" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
<string> "__meta__" </string>
+ <string> "RigidBody2D" </string>
<string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "CollisionShape2D" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 3 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="73"> -1, -1, 23, 0, -1, 22, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 6, 12, 0, 13, 4, 14, 4, 15, 0, 16, 0, 17, 8, 18, 9, 19, 7, 20, 10, 21, 10, 22, 11, 0, 0, 0, 24, 24, -1, 1, 25, 12, 0, 0, 0, 26, 26, -1, 3, 27, 1, 28, 0, 29, 13, 0 </int_array>
<string> "variants" </string>
- <array len="16" shared="true">
+ <array len="14" shared="false">
<bool> False </bool>
+ <resource resource_type="Shape2D" path="local://1"> </resource>
+ <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
+ <int> 1 </int>
<int> 0 </int>
- <bool> True </bool>
+ <real> 3 </real>
<real> 1 </real>
- <vector2> 0, 0 </vector2>
<real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 1 </int>
- <resource resource_type="CircleShape2D" path="local://1"> </resource>
- <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
- <real> 3 </real>
- <resource name=""></resource> <dictionary shared="false">
+ <bool> True </bool>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "zoom" </string>
- <real> 1.50734 </real>
<string> "ofs" </string>
<vector2> -80.5995, -149.825 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 1.50734 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
- <array len="4" shared="true">
+ <array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -174,18 +203,13 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "Script" </string>
</dictionary>
- <resource resource_type="ImageTexture" path="res://art/bowling_ball.*"> </resource>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="0"> </resource>
+ <int> -1 </int>
</array>
- <string> "nodes" </string>
- <int_array len="165"> -1, -1, 1, 0, -1, 31, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 3, 9, 3, 10, 2, 11, 1, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 17, 9, 18, 0, 19, 1, 20, 10, 21, 3, 22, 5, 23, 0, 24, 0, 25, 1, 26, 0, 27, 2, 28, 2, 29, 4, 30, 5, 31, 11, 32, 12, 0, 0, 0, 33, 33, -1, 25, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 3, 9, 3, 10, 2, 11, 1, 12, 4, 13, 5, 14, 6, 34, 13, 35, 2, 36, 4, 37, 0, 38, 0, 39, 7, 40, 7, 41, 1, 42, 14, 43, 0, 44, 15, 31, 11, 0, 0, 0, 45, 45, -1, 16, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 3, 9, 3, 10, 2, 11, 1, 12, 4, 13, 5, 14, 6, 46, 8, 47, 0, 31, 11, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/rubegoldberg/box.xml b/demos/2d/rubegoldberg/box.xml
index c715326ae0..c30d30e9f9 100644
--- a/demos/2d/rubegoldberg/box.xml
+++ b/demos/2d/rubegoldberg/box.xml
@@ -1,142 +1,214 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="3" version="0.99" version_name="Godot Engine v0.99.2864-pre-beta">
- <ext_resource path="res://art/box.png" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="3" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://art/box.png" type="Texture" index="0"></ext_resource>
<resource type="RectangleShape2D" path="local://1">
- <string name="resource/name"> "" </string>
<real name="custom_solver_bias"> 0 </real>
<vector2 name="extents"> 32, 32 </vector2>
- <resource name="script/script"></resource>
+
</resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="48">
+ <string_array len="30">
<string> "box" </string>
- <string> "RigidBody2D" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
+ <string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
- <string> "script/script" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
<string> "__meta__" </string>
+ <string> "RigidBody2D" </string>
<string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "CollisionShape2D" </string>
<string> "shape" </string>
+ <string> "trigger" </string>
+ <string> "_update_shape_index" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 3 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="73"> -1, -1, 23, 0, -1, 22, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 5, 10, 6, 11, 5, 12, 0, 13, 4, 14, 4, 15, 0, 16, 0, 17, 7, 18, 8, 19, 6, 20, 9, 21, 9, 22, 10, 0, 0, 0, 24, 24, -1, 1, 25, 11, 0, 0, 0, 26, 26, -1, 3, 27, 1, 28, 0, 29, 12, 0 </int_array>
<string> "variants" </string>
- <array len="15">
+ <array len="13" shared="false">
<bool> False </bool>
+ <resource resource_type="Shape2D" path="local://1"> </resource>
+ <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
+ <int> 1 </int>
<int> 0 </int>
- <bool> True </bool>
<real> 1 </real>
- <vector2> 0, 0 </vector2>
<real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 1 </int>
- <resource resource_type="RectangleShape2D" path="local://1"> </resource>
- <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
- <resource name=""></resource> <dictionary>
+ <bool> True </bool>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
- <string> "zoom" </string>
- <real> 1 </real>
+ <dictionary shared="false">
<string> "ofs" </string>
<vector2> -125, -163 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 1 </real>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="Texture" path="res://art/box.png"> </resource>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="0"> </resource>
+ <int> -1 </int>
</array>
- <string> "nodes" </string>
- <int_array len="173"> -1, -1, 1, 0, -1, 32, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 4, 15, 5, 16, 6, 17, 7, 18, 8, 19, 9, 20, 1, 21, 3, 22, 3, 23, 5, 24, 0, 25, 0, 26, 1, 27, 0, 28, 2, 29, 2, 30, 4, 31, 5, 32, 10, 33, 11, 0, 0, 0, 34, 34, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 4, 15, 5, 16, 6, 35, 12, 36, 2, 37, 4, 38, 0, 39, 0, 40, 7, 41, 7, 42, 1, 43, 13, 44, 0, 45, 14, 32, 10, 0, 0, 0, 46, 46, -1, 17, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 4, 15, 5, 16, 6, 47, 8, 32, 10, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/rubegoldberg/domino.xml b/demos/2d/rubegoldberg/domino.xml
index 324bf57e66..ec86c833df 100644
--- a/demos/2d/rubegoldberg/domino.xml
+++ b/demos/2d/rubegoldberg/domino.xml
@@ -1,143 +1,215 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="3" version="0.99" version_name="Godot Engine v0.99.2864-pre-beta">
- <ext_resource path="res://art/domino.png" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="3" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://art/domino.png" type="Texture" index="0"></ext_resource>
<resource type="RectangleShape2D" path="local://1">
- <string name="resource/name"> "" </string>
<real name="custom_solver_bias"> 0 </real>
<vector2 name="extents"> 16, 64 </vector2>
- <resource name="script/script"></resource>
+
</resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="48">
+ <string_array len="30">
<string> "domino" </string>
- <string> "RigidBody2D" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
+ <string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
- <string> "script/script" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
<string> "__meta__" </string>
+ <string> "RigidBody2D" </string>
<string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "CollisionShape2D" </string>
<string> "shape" </string>
+ <string> "trigger" </string>
+ <string> "_update_shape_index" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 3 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="73"> -1, -1, 23, 0, -1, 22, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 5, 12, 0, 13, 4, 14, 4, 15, 0, 16, 0, 17, 8, 18, 9, 19, 7, 20, 10, 21, 10, 22, 11, 0, 0, 0, 24, 24, -1, 1, 25, 12, 0, 0, 0, 26, 26, -1, 3, 27, 1, 28, 0, 29, 13, 0 </int_array>
<string> "variants" </string>
- <array len="16">
+ <array len="14" shared="false">
<bool> False </bool>
+ <resource resource_type="Shape2D" path="local://1"> </resource>
+ <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
+ <int> 1 </int>
<int> 0 </int>
- <bool> True </bool>
<real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 1 </int>
- <resource resource_type="RectangleShape2D" path="local://1"> </resource>
- <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
<real> 0.5 </real>
- <resource name=""></resource> <dictionary>
+ <real> 0 </real>
+ <bool> True </bool>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
- <string> "zoom" </string>
- <real> 1 </real>
+ <dictionary shared="false">
<string> "ofs" </string>
<vector2> -135, -114 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 1 </real>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="Texture" path="res://art/domino.png"> </resource>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="0"> </resource>
+ <int> -1 </int>
</array>
- <string> "nodes" </string>
- <int_array len="173"> -1, -1, 1, 0, -1, 32, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 4, 15, 5, 16, 6, 17, 7, 18, 8, 19, 9, 20, 1, 21, 3, 22, 10, 23, 5, 24, 0, 25, 0, 26, 1, 27, 0, 28, 2, 29, 2, 30, 4, 31, 5, 32, 11, 33, 12, 0, 0, 0, 34, 34, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 4, 15, 5, 16, 6, 35, 13, 36, 2, 37, 4, 38, 0, 39, 0, 40, 7, 41, 7, 42, 1, 43, 14, 44, 0, 45, 15, 32, 11, 0, 0, 0, 46, 46, -1, 17, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 4, 15, 5, 16, 6, 47, 8, 32, 11, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/rubegoldberg/pendulum.xml b/demos/2d/rubegoldberg/pendulum.xml
index 2a5378ff2f..90ad45f287 100644
--- a/demos/2d/rubegoldberg/pendulum.xml
+++ b/demos/2d/rubegoldberg/pendulum.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="5" version="0.99" version_name="Godot Engine v0.99.3735-pre-beta">
- <ext_resource path="res://art/bowling_ball.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://art/box.*" type="ImageTexture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="5" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://art/bowling_ball.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://art/box.png" type="Texture" index="0"></ext_resource>
<resource type="RectangleShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<vector2 name="extents"> 3, 12 </vector2>
@@ -14,165 +14,201 @@
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="57">
+ <string_array len="49">
<string> "pendulum" </string>
- <string> "Node2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
<string> "__meta__" </string>
+ <string> "Node2D" </string>
<string> "union_0" </string>
- <string> "RigidBody2D" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "mode" </string>
<string> "mass" </string>
<string> "friction" </string>
<string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
+ <string> "RigidBody2D" </string>
<string> "Sprite" </string>
+ <string> "transform/scale" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "collision" </string>
- <string> "CollisionShape2D" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
+ <string> "CollisionShape2D" </string>
<string> "union_ 2" </string>
+ <string> "transform/pos" </string>
<string> "union_ 3" </string>
<string> "union_ 4" </string>
<string> "joint1" </string>
- <string> "PinJoint2D" </string>
<string> "node_a" </string>
<string> "node_b" </string>
<string> "bias/bias" </string>
+ <string> "softness" </string>
+ <string> "PinJoint2D" </string>
<string> "joint 2_3" </string>
<string> "joint 3_4" </string>
<string> "ball" </string>
<string> "joint 4_ball" </string>
<string> "joint wall" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 21 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="479"> -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 25, 3, -1, 22, 4, 1, 5, 2, 6, 3, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 12, 0, 1, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 1, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 25, 34, -1, 23, 35, 16, 4, 1, 5, 2, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 4, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 4, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 25, 36, -1, 23, 35, 19, 4, 1, 5, 2, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 7, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 7, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 25, 37, -1, 23, 35, 20, 4, 1, 5, 2, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 10, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 10, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 43, 38, -1, 5, 35, 21, 39, 22, 40, 23, 41, 8, 42, 8, 0, 0, 0, 43, 44, -1, 5, 35, 24, 39, 23, 40, 25, 41, 8, 42, 8, 0, 0, 0, 43, 45, -1, 5, 35, 26, 39, 25, 40, 27, 41, 6, 42, 8, 0, 0, 0, 25, 46, -1, 24, 35, 28, 27, 29, 4, 1, 5, 30, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 16, 0, 26, 26, -1, 2, 27, 31, 28, 32, 0, 16, 0, 33, 29, -1, 3, 30, 30, 31, 1, 32, 15, 0, 0, 0, 43, 47, -1, 5, 35, 33, 39, 27, 40, 34, 41, 8, 42, 8, 0, 0, 0, 43, 48, -1, 5, 35, 35, 39, 22, 40, 36, 41, 8, 42, 8, 0 </int_array>
<string> "variants" </string>
- <array len="38" shared="false">
- <bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
+ <array len="37" shared="false">
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "zoom" </string>
- <real> 2.78951 </real>
<string> "ofs" </string>
<vector2> -121.028, 0.923909 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 2.78951 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -181,23 +217,25 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <int> 1 </int>
- <resource resource_type="RectangleShape2D" path="local://1"> </resource>
- <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
<bool> False </bool>
+ <resource resource_type="Shape2D" path="local://1"> </resource>
+ <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
+ <int> 1 </int>
<int> 0 </int>
<real> 0.2 </real>
+ <real> 1 </real>
+ <real> 0 </real>
+ <bool> True </bool>
+ <vector2> 0, 0 </vector2>
+ <real> -1 </real>
<dictionary shared="false">
<string> "_edit_group_" </string>
<bool> True </bool>
</dictionary>
<vector2> 0.1, 0.4 </vector2>
- <resource resource_type="ImageTexture" path="res://art/box.*"> </resource>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="0"> </resource>
+ <int> -1 </int>
<vector2> 0, 26.9432 </vector2>
<matrix32> 1, -0, 0, 1, 0, 0 </matrix32>
<dictionary shared="false">
@@ -215,18 +253,16 @@
<node_path> "../union_ 4" </node_path>
<vector2> 0, 106.787 </vector2>
<vector2> 0.98476, 1 </vector2>
- <resource resource_type="CircleShape2D" path="local://2"> </resource>
+ <resource resource_type="Shape2D" path="local://2"> </resource>
<vector2> 0.5, 0.5 </vector2>
- <resource resource_type="ImageTexture" path="res://art/bowling_ball.*"> </resource>
+ <resource external="1"> </resource>
<vector2> 0, 92.5287 </vector2>
<node_path> "../ball" </node_path>
<vector2> 0, -12.1024 </vector2>
<node_path> "" </node_path>
</array>
- <string> "nodes" </string>
- <int_array len="773"> -1, -1, 1, 0, -1, 8, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 0, 0, 0, 11, 10, -1, 24, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 12, 6, 13, 7, 14, 8, 15, 9, 16, 10, 17, 11, 18, 1, 19, 3, 20, 9, 21, 9, 22, 10, 23, 9, 24, 0, 25, 0, 26, 2, 27, 3, 9, 12, 0, 1, 0, 28, 28, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 13, 29, 14, 30, 0, 31, 2, 32, 9, 33, 9, 34, 6, 35, 6, 36, 10, 37, 15, 38, 9, 39, 16, 0, 1, 0, 41, 40, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 42, 7, 43, 9, 0, 0, 0, 11, 44, -1, 24, 2, 0, 3, 1, 4, 1, 5, 0, 6, 17, 7, 3, 8, 4, 12, 6, 13, 7, 14, 18, 15, 9, 16, 10, 17, 11, 18, 1, 19, 3, 20, 9, 21, 9, 22, 10, 23, 9, 24, 0, 25, 0, 26, 2, 27, 3, 9, 19, 0, 4, 0, 28, 28, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 13, 29, 14, 30, 0, 31, 2, 32, 9, 33, 9, 34, 6, 35, 6, 36, 10, 37, 15, 38, 9, 39, 16, 0, 4, 0, 41, 40, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 42, 7, 43, 9, 0, 0, 0, 11, 45, -1, 24, 2, 0, 3, 1, 4, 1, 5, 0, 6, 20, 7, 3, 8, 4, 12, 6, 13, 7, 14, 18, 15, 9, 16, 10, 17, 11, 18, 1, 19, 3, 20, 9, 21, 9, 22, 10, 23, 9, 24, 0, 25, 0, 26, 2, 27, 3, 9, 19, 0, 7, 0, 28, 28, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 13, 29, 14, 30, 0, 31, 2, 32, 9, 33, 9, 34, 6, 35, 6, 36, 10, 37, 15, 38, 9, 39, 16, 0, 7, 0, 41, 40, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 42, 7, 43, 9, 0, 0, 0, 11, 46, -1, 24, 2, 0, 3, 1, 4, 1, 5, 0, 6, 21, 7, 3, 8, 4, 12, 6, 13, 7, 14, 18, 15, 9, 16, 10, 17, 11, 18, 1, 19, 3, 20, 9, 21, 9, 22, 10, 23, 9, 24, 0, 25, 0, 26, 2, 27, 3, 9, 19, 0, 10, 0, 28, 28, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 13, 29, 14, 30, 0, 31, 2, 32, 9, 33, 9, 34, 6, 35, 6, 36, 10, 37, 15, 38, 9, 39, 16, 0, 10, 0, 41, 40, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 42, 7, 43, 9, 0, 0, 0, 48, 47, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 22, 7, 3, 8, 4, 49, 23, 50, 24, 51, 3, 0, 0, 0, 48, 52, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 25, 7, 3, 8, 4, 49, 24, 50, 26, 51, 3, 0, 0, 0, 48, 53, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 27, 7, 3, 8, 4, 49, 26, 50, 28, 51, 11, 0, 0, 0, 11, 54, -1, 24, 2, 0, 3, 1, 4, 1, 5, 0, 6, 29, 7, 3, 8, 30, 12, 6, 13, 31, 14, 18, 15, 9, 16, 10, 17, 11, 18, 1, 19, 3, 20, 9, 21, 9, 22, 10, 23, 9, 24, 0, 25, 0, 26, 2, 27, 3, 9, 19, 0, 16, 0, 28, 28, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 32, 29, 33, 30, 0, 31, 2, 32, 9, 33, 9, 34, 6, 35, 6, 36, 10, 37, 15, 38, 9, 39, 16, 0, 16, 0, 41, 40, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 42, 31, 43, 9, 0, 0, 0, 48, 55, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 34, 7, 3, 8, 4, 49, 28, 50, 35, 51, 3, 0, 0, 0, 48, 56, -1, 10, 2, 0, 3, 1, 4, 1, 5, 0, 6, 36, 7, 3, 8, 4, 49, 23, 50, 37, 51, 3, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/rubegoldberg/platform.xml b/demos/2d/rubegoldberg/platform.xml
index 0cc8f4b137..09cd0fdda6 100644
--- a/demos/2d/rubegoldberg/platform.xml
+++ b/demos/2d/rubegoldberg/platform.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="3" version="0.99" version_name="Godot Engine v0.99.3735-pre-beta">
- <ext_resource path="res://art/platform.*" type="ImageTexture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="3" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://art/platform.png" type="Texture" index="0"></ext_resource>
<resource type="RectangleShape2D" path="local://1">
<real name="custom_solver_bias"> 0 </real>
<vector2 name="extents"> 128, 16 </vector2>
@@ -8,148 +8,178 @@
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="34">
+ <string_array len="19">
<string> "platform" </string>
- <string> "StaticBody2D" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
<string> "shapes/0/trigger" </string>
- <string> "simulate_motion" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "constant_linear_velocity" </string>
<string> "constant_angular_velocity" </string>
<string> "friction" </string>
<string> "bounce" </string>
<string> "__meta__" </string>
+ <string> "StaticBody2D" </string>
<string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "CollisionShape2D" </string>
<string> "shape" </string>
<string> "trigger" </string>
+ <string> "_update_shape_index" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 3 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="51"> -1, -1, 12, 0, -1, 11, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 5, 11, 7, 0, 0, 0, 13, 13, -1, 1, 14, 8, 0, 0, 0, 15, 15, -1, 3, 16, 1, 17, 0, 18, 9, 0 </int_array>
<string> "variants" </string>
- <array len="14" shared="false">
- <bool> True </bool>
- <real> 1 </real>
+ <array len="10" shared="false">
+ <bool> False </bool>
+ <resource resource_type="Shape2D" path="local://1"> </resource>
+ <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
+ <int> 1 </int>
<vector2> 0, 0 </vector2>
<real> 0 </real>
- <vector2> 1, 1 </vector2>
- <int> 1 </int>
- <resource resource_type="RectangleShape2D" path="local://1"> </resource>
- <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
- <bool> False </bool>
+ <real> 1 </real>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -135, -114 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
<bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 1 </real>
- <string> "ofs" </string>
- <vector2> -135, -114 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -158,18 +188,12 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="ImageTexture" path="res://art/platform.*"> </resource>
- <int> 0 </int>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
+ <resource external="0"> </resource>
+ <int> -1 </int>
</array>
- <string> "nodes" </string>
- <int_array len="109"> -1, -1, 1, 0, -1, 17, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 13, 8, 14, 2, 15, 3, 16, 1, 17, 3, 18, 9, 0, 0, 0, 19, 19, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 20, 10, 21, 0, 22, 2, 23, 8, 24, 8, 25, 5, 26, 5, 27, 11, 28, 12, 29, 8, 30, 13, 0, 0, 0, 31, 31, -1, 9, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 3, 8, 4, 32, 6, 33, 8, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/rubegoldberg/rubegoldberg.xml b/demos/2d/rubegoldberg/rubegoldberg.xml
index edb6dda0e1..490b0f9d34 100644
--- a/demos/2d/rubegoldberg/rubegoldberg.xml
+++ b/demos/2d/rubegoldberg/rubegoldberg.xml
@@ -1,25 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="7" version="0.99" version_name="Godot Engine v0.99.3735-pre-beta">
- <ext_resource path="res://platform.*" type="PackedScene"></ext_resource>
- <ext_resource path="res://ball.*" type="PackedScene"></ext_resource>
- <ext_resource path="res://domino.*" type="PackedScene"></ext_resource>
- <ext_resource path="res://seesaw.*" type="PackedScene"></ext_resource>
- <ext_resource path="res://box.*" type="PackedScene"></ext_resource>
- <ext_resource path="res://pendulum.*" type="PackedScene"></ext_resource>
+<resource_file type="PackedScene" subresource_count="7" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://platform.xml" type="PackedScene" index="0"></ext_resource>
+ <ext_resource path="res://seesaw.xml" type="PackedScene" index="3"></ext_resource>
+ <ext_resource path="res://pendulum.xml" type="PackedScene" index="5"></ext_resource>
+ <ext_resource path="res://box.xml" type="PackedScene" index="4"></ext_resource>
+ <ext_resource path="res://ball.xml" type="PackedScene" index="1"></ext_resource>
+ <ext_resource path="res://domino.xml" type="PackedScene" index="2"></ext_resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="29">
+ <string_array len="33">
<string> "Node" </string>
<string> "__meta__" </string>
<string> "platform" </string>
- <string> "StaticBody2D" </string>
<string> "transform/pos" </string>
<string> "transform/rot" </string>
+ <string> "input/pickable" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "platform 2" </string>
<string> "platform 3" </string>
<string> "Ball" </string>
- <string> "RigidBody2D" </string>
+ <string> "gravity_scale" </string>
+ <string> "sleeping" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
<string> "domino" </string>
<string> "domino 2" </string>
<string> "domino 4" </string>
@@ -31,7 +43,6 @@
<string> "platform 7" </string>
<string> "platform 8" </string>
<string> "SeeSaw" </string>
- <string> "Node2D" </string>
<string> "box" </string>
<string> "pendulum" </string>
<string> "pendulum 2" </string>
@@ -40,102 +51,142 @@
<string> "Ball 5" </string>
<string> "velocity/linear" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 21 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="347"> -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 2147483647, 2, 1, 5, 3, 2, 4, 3, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 8, 1, 4, 3, 6, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 9, 1, 4, 3, 7, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 10, 8, 8, 3, 9, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 15, 12, 8, 3, 13, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 16, 12, 8, 3, 14, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 17, 12, 8, 3, 15, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 18, 1, 5, 3, 16, 4, 17, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 19, 1, 6, 3, 18, 4, 19, 20, 20, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 21, 8, 8, 3, 21, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 22, 1, 4, 3, 22, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 23, 1, 4, 3, 23, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 24, 1, 4, 3, 24, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 25, 25, 1, 3, 26, 0, 0, 0, 2147483647, 26, 27, 9, 3, 28, 4, 29, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 27, 30, 1, 3, 31, 0, 0, 0, 2147483647, 28, 30, 1, 3, 32, 0, 0, 0, 2147483647, 29, 30, 1, 3, 33, 0, 0, 0, 2147483647, 30, 30, 1, 3, 34, 0, 0, 0, 2147483647, 31, 8, 9, 3, 35, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 32, 36, 13, 11, 14, 11, 0 </int_array>
<string> "variants" </string>
- <array len="33" shared="false">
+ <array len="37" shared="false">
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -717.096, -249.162 </vector2>
+ <string> "snap_grid" </string>
<bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 0.598737 </real>
- <string> "ofs" </string>
- <vector2> -15.4883, -75.0379 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -144,17 +195,19 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="PackedScene" path="res://platform.*"> </resource>
+ <resource external="0"> </resource>
<vector2> 116.881, 145.589 </vector2>
<real> -20.87962 </real>
+ <bool> False </bool>
+ <int> 1 </int>
<vector2> 336.29, 264.52 </vector2>
<vector2> 526.99, 264.52 </vector2>
- <resource resource_type="PackedScene" path="res://ball.*"> </resource>
+ <resource external="1"> </resource>
<vector2> 76.0801, 67.2141 </vector2>
- <resource resource_type="PackedScene" path="res://domino.*"> </resource>
+ <real> 1 </real>
+ <real> -1 </real>
+ <resource external="2"> </resource>
<vector2> 262.764, 182.008 </vector2>
<vector2> 356.951, 182.008 </vector2>
<vector2> 448.834, 179.291 </vector2>
@@ -167,12 +220,12 @@
<vector2> 679.231, 588.598 </vector2>
<vector2> 424.491, 588.598 </vector2>
<vector2> 185.655, 588.598 </vector2>
- <resource resource_type="PackedScene" path="res://seesaw.*"> </resource>
+ <resource external="3"> </resource>
<vector2> 602.935, 554.501 </vector2>
- <resource resource_type="PackedScene" path="res://box.*"> </resource>
+ <resource external="4"> </resource>
<vector2> 476.002, 509.406 </vector2>
<real> 21.737282 </real>
- <resource resource_type="PackedScene" path="res://pendulum.*"> </resource>
+ <resource external="5"> </resource>
<vector2> 391.607, 305.444 </vector2>
<vector2> 343.172, 303.774 </vector2>
<vector2> 288.056, 303.774 </vector2>
@@ -180,10 +233,8 @@
<vector2> 116.165, 526.515 </vector2>
<vector2> 0, -200 </vector2>
</array>
- <string> "nodes" </string>
- <int_array len="201"> -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 3, 2, 1, 2, 4, 2, 5, 3, 0, 0, 0, 3, 6, 1, 1, 4, 4, 0, 0, 0, 3, 7, 1, 1, 4, 5, 0, 0, 0, 9, 8, 6, 1, 4, 7, 0, 0, 0, 9, 10, 8, 1, 4, 9, 0, 0, 0, 9, 11, 8, 1, 4, 10, 0, 0, 0, 9, 12, 8, 1, 4, 11, 0, 0, 0, 3, 13, 1, 2, 4, 12, 5, 13, 0, 0, 0, 3, 14, 1, 3, 4, 14, 5, 15, 15, 16, 0, 0, 0, 9, 16, 6, 1, 4, 17, 0, 0, 0, 3, 17, 1, 1, 4, 18, 0, 0, 0, 3, 18, 1, 1, 4, 19, 0, 0, 0, 3, 19, 1, 1, 4, 20, 0, 0, 0, 21, 20, 21, 1, 4, 22, 0, 0, 0, 9, 22, 23, 2, 4, 24, 5, 25, 0, 0, 0, 21, 23, 26, 1, 4, 27, 0, 0, 0, 21, 24, 26, 1, 4, 28, 0, 0, 0, 21, 25, 26, 1, 4, 29, 0, 0, 0, 21, 26, 26, 1, 4, 30, 0, 0, 0, 9, 27, 6, 2, 4, 31, 28, 32, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/rubegoldberg/seesaw.xml b/demos/2d/rubegoldberg/seesaw.xml
index 30edbe9162..281e4e7c0d 100644
--- a/demos/2d/rubegoldberg/seesaw.xml
+++ b/demos/2d/rubegoldberg/seesaw.xml
@@ -1,169 +1,243 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="5" version="0.99" version_name="Godot Engine v0.99.2864-pre-beta">
- <ext_resource path="res://art/seesaw_top.png" type="Texture"></ext_resource>
- <ext_resource path="res://art/seesaw_base.png" type="Texture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="5" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://art/seesaw_top.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://art/seesaw_base.png" type="Texture" index="0"></ext_resource>
<resource type="ConcavePolygonShape2D" path="local://1">
- <string name="resource/name"> "" </string>
<real name="custom_solver_bias"> 0 </real>
<vector2_array name="segments" len="6"> -32.6231, 32.0838, -1.28218, -31.1383, -1.28218, -31.1383, 33.8412, 33.1645, 33.8412, 33.1645, -32.6231, 32.0838 </vector2_array>
- <resource name="script/script"></resource>
+
</resource>
<resource type="ConvexPolygonShape2D" path="local://2">
- <string name="resource/name"> "" </string>
<real name="custom_solver_bias"> 0 </real>
<vector2_array name="points" len="4"> -99.0874, 7.76759, -125.025, -8.98358, 125.162, -8.44321, 99.2248, 7.22723 </vector2_array>
- <resource name="script/script"></resource>
+
</resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="58">
+ <string_array len="43">
<string> "SeeSaw" </string>
- <string> "Node2D" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
- <string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "Node2D" </string>
<string> "Sprite" </string>
<string> "texture" </string>
- <string> "centered" </string>
- <string> "offset" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
- <string> "vframes" </string>
- <string> "hframes" </string>
- <string> "frame" </string>
- <string> "modulate" </string>
- <string> "region" </string>
- <string> "region_rect" </string>
<string> "StaticBody2D" </string>
- <string> "shape_count" </string>
+ <string> "input/pickable" </string>
<string> "shapes/0/shape" </string>
<string> "shapes/0/transform" </string>
- <string> "simulate_motion" </string>
+ <string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "constant_linear_velocity" </string>
<string> "constant_angular_velocity" </string>
+ <string> "friction" </string>
+ <string> "bounce" </string>
<string> "CollisionPolygon2D" </string>
<string> "build_mode" </string>
<string> "polygon" </string>
+ <string> "shape_range" </string>
+ <string> "trigger" </string>
<string> "RigidBody2D" </string>
+ <string> "transform/pos" </string>
+ <string> "transform/rot" </string>
<string> "mode" </string>
<string> "mass" </string>
- <string> "friction" </string>
- <string> "bounce" </string>
+ <string> "gravity_scale" </string>
<string> "custom_integrator" </string>
<string> "continuous_cd" </string>
<string> "contacts_reported" </string>
<string> "contact_monitor" </string>
- <string> "active" </string>
+ <string> "sleeping" </string>
<string> "can_sleep" </string>
<string> "velocity/linear" </string>
<string> "velocity/angular" </string>
+ <string> "damp_override/linear" </string>
+ <string> "damp_override/angular" </string>
+ <string> "transform/scale" </string>
<string> "PinJoint2D" </string>
<string> "node_a" </string>
<string> "node_b" </string>
<string> "bias/bias" </string>
+ <string> "softness" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 8 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="156"> -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 3, 3, -1, 1, 4, 1, 0, 1, 0, 5, 5, -1, 10, 6, 2, 7, 3, 8, 4, 9, 2, 10, 5, 11, 5, 12, 6, 13, 7, 14, 8, 15, 7, 0, 2, 0, 16, 16, -1, 4, 17, 9, 18, 10, 19, 11, 20, 2, 0, 0, 0, 21, 21, -1, 23, 22, 12, 23, 13, 6, 2, 7, 14, 8, 4, 9, 2, 10, 5, 11, 5, 24, 9, 25, 8, 14, 8, 15, 7, 26, 8, 27, 2, 28, 9, 29, 9, 30, 2, 31, 2, 32, 15, 33, 6, 34, 7, 35, 16, 36, 16, 0, 4, 0, 3, 3, -1, 2, 37, 17, 4, 18, 0, 4, 0, 16, 16, -1, 4, 17, 9, 18, 19, 19, 11, 20, 2, 0, 0, 0, 38, 38, -1, 5, 22, 20, 39, 21, 40, 22, 41, 7, 42, 7, 0 </int_array>
<string> "variants" </string>
- <array len="25">
- <bool> False </bool>
- <int> 0 </int>
- <bool> True </bool>
- <real> 1 </real>
- <vector2> 0, 0 </vector2>
- <real> 0 </real>
- <vector2> 1, 1 </vector2>
- <resource name=""></resource> <dictionary>
+ <array len="23" shared="false">
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
- <string> "zoom" </string>
- <real> 1.670183 </real>
+ <dictionary shared="false">
<string> "ofs" </string>
<vector2> -277.779, -292.484 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 1.670183 </real>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="Texture" path="res://art/seesaw_base.png"> </resource>
- <int> 1 </int>
- <color> 1, 1, 1, 1 </color>
- <rect2> 0, 0, 0, 0 </rect2>
- <resource resource_type="ConcavePolygonShape2D" path="local://1"> </resource>
+ <resource external="0"> </resource>
+ <bool> False </bool>
+ <resource resource_type="Shape2D" path="local://1"> </resource>
<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
+ <int> 1 </int>
+ <vector2> 0, 0 </vector2>
+ <real> 0 </real>
+ <real> 1 </real>
+ <int> 0 </int>
<vector2_array len="3"> -32.6231, 32.0838, -1.28218, -31.1383, 33.8412, 33.1645 </vector2_array>
+ <vector2> -1, -1 </vector2>
<vector2> 1.19748, -29.9368 </vector2>
<real> 16.223282 </real>
- <resource resource_type="ConvexPolygonShape2D" path="local://2"> </resource>
+ <resource resource_type="Shape2D" path="local://2"> </resource>
+ <bool> True </bool>
+ <real> -1 </real>
<vector2> 1, 0.5 </vector2>
- <resource resource_type="Texture" path="res://art/seesaw_top.png"> </resource>
+ <resource external="1"> </resource>
<vector2_array len="4"> -125.025, -8.98358, 125.162, -8.44321, 99.2248, 7.22723, -99.0874, 7.76759 </vector2_array>
<vector2> 0, -31.1343 </vector2>
<node_path> "../RigidBody2D" </node_path>
<node_path> "../Sprite/StaticBody2D" </node_path>
</array>
- <string> "nodes" </string>
- <int_array len="414"> -1, -1, 1, 0, -1, 17, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 4, 15, 5, 16, 6, 17, 7, 18, 8, 0, 0, 0, 19, 19, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 4, 15, 5, 16, 6, 20, 9, 21, 2, 22, 4, 23, 0, 24, 0, 25, 10, 26, 10, 27, 1, 28, 11, 29, 0, 30, 12, 17, 7, 0, 1, 0, 31, 31, -1, 22, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 4, 15, 5, 16, 6, 32, 10, 33, 13, 34, 14, 35, 0, 36, 4, 37, 5, 17, 7, 0, 2, 0, 38, 38, -1, 18, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 4, 15, 5, 16, 6, 39, 1, 40, 15, 17, 7, 0, 0, 0, 41, 41, -1, 31, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 16, 15, 17, 16, 6, 32, 10, 33, 18, 34, 14, 42, 1, 43, 3, 44, 3, 45, 5, 46, 0, 47, 0, 48, 1, 49, 0, 50, 2, 51, 2, 52, 4, 53, 5, 17, 7, 0, 4, 0, 19, 19, -1, 27, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 4, 15, 5, 16, 19, 20, 20, 21, 2, 22, 4, 23, 0, 24, 0, 25, 10, 26, 10, 27, 1, 28, 11, 29, 0, 30, 12, 17, 7, 0, 4, 0, 38, 38, -1, 18, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 2, 14, 4, 15, 5, 16, 6, 39, 1, 40, 21, 17, 7, 0, 0, 0, 54, 54, -1, 19, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 22, 15, 5, 16, 6, 55, 23, 56, 24, 57, 5, 17, 7, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/screen_space_shaders/engine.cfg b/demos/2d/screen_space_shaders/engine.cfg
index 527e2f8f0a..383ca7bf11 100644
--- a/demos/2d/screen_space_shaders/engine.cfg
+++ b/demos/2d/screen_space_shaders/engine.cfg
@@ -2,6 +2,7 @@
name="Screen-Space Shaders"
main_scene="res://screen_shaders.scn"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/screen_space_shaders/icon.png b/demos/2d/screen_space_shaders/icon.png
new file mode 100644
index 0000000000..e3cc049081
--- /dev/null
+++ b/demos/2d/screen_space_shaders/icon.png
Binary files differ
diff --git a/demos/2d/screen_space_shaders/screen_shaders.gd b/demos/2d/screen_space_shaders/screen_shaders.gd
index 4e8a548539..b847a9c923 100644
--- a/demos/2d/screen_space_shaders/screen_shaders.gd
+++ b/demos/2d/screen_space_shaders/screen_shaders.gd
@@ -1,32 +1,25 @@
extends Control
-# member variables here, example:
-# var a=2
-# var b="textvar"
func _ready():
- # Initialization here
for c in get_node("pictures").get_children():
- get_node("picture").add_item("PIC: "+c.get_name())
+ get_node("picture").add_item("PIC: " + c.get_name())
for c in get_node("effects").get_children():
- get_node("effect").add_item("FX: "+c.get_name())
- pass
+ get_node("effect").add_item("FX: " + c.get_name())
-
-
-func _on_picture_item_selected( ID ):
+func _on_picture_item_selected(ID):
for c in range(get_node("pictures").get_child_count()):
- if (ID==c):
+ if (ID == c):
get_node("pictures").get_child(c).show()
else:
get_node("pictures").get_child(c).hide()
-func _on_effect_item_selected( ID ):
+func _on_effect_item_selected(ID):
for c in range(get_node("effects").get_child_count()):
- if (ID==c):
+ if (ID == c):
get_node("effects").get_child(c).show()
else:
get_node("effects").get_child(c).hide()
diff --git a/demos/2d/screen_space_shaders/screen_shaders.scn b/demos/2d/screen_space_shaders/screen_shaders.scn
index fc2be96fc9..be12cef02d 100644
--- a/demos/2d/screen_space_shaders/screen_shaders.scn
+++ b/demos/2d/screen_space_shaders/screen_shaders.scn
Binary files differ
diff --git a/demos/2d/sdf_font/engine.cfg b/demos/2d/sdf_font/engine.cfg
index bdf26ce741..bf983041fa 100644
--- a/demos/2d/sdf_font/engine.cfg
+++ b/demos/2d/sdf_font/engine.cfg
@@ -2,3 +2,4 @@
name="Signed Distance Field Font"
main_scene="res://sdf.scn"
+icon="res://icon.png"
diff --git a/demos/2d/sdf_font/icon.png b/demos/2d/sdf_font/icon.png
new file mode 100644
index 0000000000..0c700ad77c
--- /dev/null
+++ b/demos/2d/sdf_font/icon.png
Binary files differ
diff --git a/demos/2d/sdf_font/sdf.scn b/demos/2d/sdf_font/sdf.scn
index 89d6245bf0..4880500d6d 100644
--- a/demos/2d/sdf_font/sdf.scn
+++ b/demos/2d/sdf_font/sdf.scn
Binary files differ
diff --git a/demos/2d/shower_of_bullets/bullets.gd b/demos/2d/shower_of_bullets/bullets.gd
index 79f4faaae6..e0eba2682a 100644
--- a/demos/2d/shower_of_bullets/bullets.gd
+++ b/demos/2d/shower_of_bullets/bullets.gd
@@ -4,73 +4,68 @@ extends Node2D
# This demo is an example of controling a high number of 2D objects with logic and collision without using scene nodes.
# This technique is a lot more efficient than using instancing and nodes, but requires more programming and is less visual
+# Member variables
const BULLET_COUNT = 500
const SPEED_MIN = 20
const SPEED_MAX = 50
-var bullets=[]
+var bullets = []
var shape
+
+# Inner classes
class Bullet:
var pos = Vector2()
var speed = 1.0
var body = RID()
-
-func _draw():
+func _draw():
var t = preload("res://bullet.png")
var tofs = -t.get_size()*0.5
for b in bullets:
- draw_texture(t,b.pos+tofs)
-
-
+ draw_texture(t, b.pos + tofs)
+
+
func _process(delta):
var width = get_viewport_rect().size.x*2.0
var mat = Matrix32()
for b in bullets:
- b.pos.x-=b.speed*delta
+ b.pos.x -= b.speed*delta
if (b.pos.x < -30):
- b.pos.x+=width
- mat.o=b.pos
-
- Physics2DServer.body_set_state(b.body,Physics2DServer.BODY_STATE_TRANSFORM,mat)
+ b.pos.x += width
+ mat.o = b.pos
+ Physics2DServer.body_set_state(b.body, Physics2DServer.BODY_STATE_TRANSFORM, mat)
+
update()
-
-
-func _ready():
- shape = Physics2DServer.shape_create(Physics2DServer.SHAPE_CIRCLE)
- Physics2DServer.shape_set_data(shape,8) #radius
+func _ready():
+ shape = Physics2DServer.shape_create(Physics2DServer.SHAPE_CIRCLE)
+ Physics2DServer.shape_set_data(shape, 8) # Radius
+
for i in range(BULLET_COUNT):
var b = Bullet.new()
- b.speed=rand_range(SPEED_MIN,SPEED_MAX)
+ b.speed = rand_range(SPEED_MIN, SPEED_MAX)
b.body = Physics2DServer.body_create(Physics2DServer.BODY_MODE_KINEMATIC)
- Physics2DServer.body_set_space(b.body,get_world_2d().get_space())
- Physics2DServer.body_add_shape(b.body,shape)
+ Physics2DServer.body_set_space(b.body, get_world_2d().get_space())
+ Physics2DServer.body_add_shape(b.body, shape)
- b.pos = Vector2( get_viewport_rect().size * Vector2(randf()*2.0,randf()) ) #twice as long
- b.pos.x += get_viewport_rect().size.x # start outside
+ b.pos = Vector2(get_viewport_rect().size * Vector2(randf()*2.0, randf())) # Twice as long
+ b.pos.x += get_viewport_rect().size.x # Start outside
var mat = Matrix32()
- mat.o=b.pos
- Physics2DServer.body_set_state(b.body,Physics2DServer.BODY_STATE_TRANSFORM,mat)
+ mat.o = b.pos
+ Physics2DServer.body_set_state(b.body, Physics2DServer.BODY_STATE_TRANSFORM, mat)
bullets.append(b)
-
-
- set_process(true)
-
+ set_process(true)
+
+
func _exit_tree():
for b in bullets:
Physics2DServer.free_rid(b.body)
Physics2DServer.free_rid(shape)
- # Initalization here
bullets.clear()
-
- pass
-
-
diff --git a/demos/2d/shower_of_bullets/shower.gd b/demos/2d/shower_of_bullets/shower.gd
index bba8431764..50c1109489 100644
--- a/demos/2d/shower_of_bullets/shower.gd
+++ b/demos/2d/shower_of_bullets/shower.gd
@@ -1,32 +1,25 @@
extends Node2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
+# Member variables
+var touching = 0
-var touching=0
+func _input(event):
+ if (event.type == InputEvent.MOUSE_MOTION):
+ get_node("player").set_pos(event.pos - Vector2(0, 16))
-func _input(ev):
- if (ev.type==InputEvent.MOUSE_MOTION):
- get_node("player").set_pos(ev.pos-Vector2(0,16))
-
-
-func _on_player_body_enter_shape( body_id, body, body_shape, area_shape ):
-
- touching+=1
- if (touching==1):
+func _on_player_body_enter_shape(body_id, body, body_shape, area_shape):
+ touching += 1
+ if (touching == 1):
get_node("player/sprite").set_frame(1)
-func _on_player_body_exit_shape( body_id, body, body_shape, area_shape ):
-
- touching-=1
- if (touching==0):
+func _on_player_body_exit_shape(body_id, body, body_shape, area_shape):
+ touching -= 1
+ if (touching == 0):
get_node("player/sprite").set_frame(0)
func _ready():
set_process_input(true)
- pass
diff --git a/demos/2d/shower_of_bullets/shower.scn b/demos/2d/shower_of_bullets/shower.scn
index 648888d099..9e2181e9c6 100644
--- a/demos/2d/shower_of_bullets/shower.scn
+++ b/demos/2d/shower_of_bullets/shower.scn
Binary files differ
diff --git a/demos/2d/space_shooter/asteroid.gd b/demos/2d/space_shooter/asteroid.gd
index f21b9777bb..9f6734e122 100644
--- a/demos/2d/space_shooter/asteroid.gd
+++ b/demos/2d/space_shooter/asteroid.gd
@@ -1,49 +1,43 @@
extends Area2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
+# Member variables
+const SPEED = -200
+const Y_RANDOM = 10
-const SPEED=-200
-const Y_RANDOM=10
+var points = 1
+var speed_y = 0.0
+var destroyed = false
-var points=1
-
-
-var speed_y=0.0
func _process(delta):
+ translate(Vector2(SPEED, speed_y)*delta)
- translate( Vector2(SPEED,speed_y) * delta )
func _ready():
- # Initialization here
- speed_y=rand_range(-Y_RANDOM,Y_RANDOM)
- pass
+ speed_y = rand_range(-Y_RANDOM, Y_RANDOM)
-var destroyed=false
func destroy():
if (destroyed):
- return
- destroyed=true
+ return
+ destroyed = true
get_node("anim").play("explode")
set_process(false)
get_node("sfx").play("sound_explode")
- #accum points
- get_node("/root/game_state").points+=1
-
+ # Accumulate points
+ get_node("/root/game_state").points += 1
+
+
func is_enemy():
- return not destroyed
-
+ return not destroyed
+
func _on_visibility_enter_screen():
set_process(true)
- #make it spin!
+ # Make it spin!
get_node("anim").play("spin")
-
+
func _on_visibility_exit_screen():
queue_free()
- pass # replace with function body
diff --git a/demos/2d/space_shooter/asteroid.scn b/demos/2d/space_shooter/asteroid.scn
index b881725ea4..6bca98cd30 100644
--- a/demos/2d/space_shooter/asteroid.scn
+++ b/demos/2d/space_shooter/asteroid.scn
Binary files differ
diff --git a/demos/2d/space_shooter/enemy1.gd b/demos/2d/space_shooter/enemy1.gd
index 051798742a..204995c05d 100644
--- a/demos/2d/space_shooter/enemy1.gd
+++ b/demos/2d/space_shooter/enemy1.gd
@@ -1,17 +1,15 @@
extends Area2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
+# Member variables
+const SPEED = -200
+
+var destroyed=false
-const SPEED=-200
func _process(delta):
- get_parent().translate(Vector2(SPEED*delta,0))
+ get_parent().translate(Vector2(SPEED*delta, 0))
-
-var destroyed=false
func is_enemy():
return not destroyed
@@ -19,19 +17,20 @@ func is_enemy():
func destroy():
if (destroyed):
- return
- destroyed=true
+ return
+ destroyed = true
get_node("anim").play("explode")
- set_process(false)
+ set_process(false)
get_node("sfx").play("sound_explode")
- #accum points
- get_node("/root/game_state").points+=5
+ # Accumulate points
+ get_node("/root/game_state").points += 5
+
func _on_visibility_enter_screen():
set_process(true)
- get_node("anim").play("zigzag")
- get_node("anim").seek(randf()*2.0) #make it start from any pos
+ get_node("anim").play("zigzag")
+ get_node("anim").seek(randf()*2.0) # Make it start from any pos
+
func _on_visibility_exit_screen():
queue_free()
-
diff --git a/demos/2d/space_shooter/enemy1.scn b/demos/2d/space_shooter/enemy1.scn
index 14298f0a59..805071b772 100644
--- a/demos/2d/space_shooter/enemy1.scn
+++ b/demos/2d/space_shooter/enemy1.scn
Binary files differ
diff --git a/demos/2d/space_shooter/enemy2.gd b/demos/2d/space_shooter/enemy2.gd
index 4f632a053d..bfdb743103 100644
--- a/demos/2d/space_shooter/enemy2.gd
+++ b/demos/2d/space_shooter/enemy2.gd
@@ -1,56 +1,51 @@
extends Area2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-const SPEED=-220
-const SHOOT_INTERVAL=1
-var shoot_timeout=0
+# Member variables
+const SPEED = -220
+const SHOOT_INTERVAL = 1
+
+var shoot_timeout = 0
+var destroyed=false
+
func _process(delta):
- translate( Vector2(SPEED*delta,0) )
- shoot_timeout-=delta
+ translate(Vector2(SPEED*delta, 0))
+ shoot_timeout -= delta
- if (shoot_timeout<0):
-
- shoot_timeout=SHOOT_INTERVAL
+ if (shoot_timeout < 0):
+ shoot_timeout = SHOOT_INTERVAL
- #instance a shot
+ # Instance a shot
var shot = preload("res://enemy_shot.scn").instance()
- #set pos as "shoot_from" Position2D node
- shot.set_pos( get_node("shoot_from").get_global_pos() )
- #add it to parent, so it has world coordinates
+ # Set pos as "shoot_from" Position2D node
+ shot.set_pos(get_node("shoot_from").get_global_pos())
+ # Add it to parent, so it has world coordinates
get_parent().add_child(shot)
-
-var destroyed=false
+
func is_enemy():
return not destroyed
+
func destroy():
if (destroyed):
- return
- destroyed=true
+ return
+ destroyed = true
get_node("anim").play("explode")
- set_process(false)
+ set_process(false)
get_node("sfx").play("sound_explode")
- #accum points
- get_node("/root/game_state").points+=10
+ # Accumulate points
+ get_node("/root/game_state").points += 10
+
func _ready():
set_fixed_process(true)
- # Initialization here
- pass
-
-
func _on_visibility_enter_screen():
set_process(true)
- pass # replace with function body
func _on_visibility_exit_screen():
queue_free()
- pass # replace with function body
diff --git a/demos/2d/space_shooter/enemy2.scn b/demos/2d/space_shooter/enemy2.scn
index 1d31f9c30e..644add77aa 100644
--- a/demos/2d/space_shooter/enemy2.scn
+++ b/demos/2d/space_shooter/enemy2.scn
Binary files differ
diff --git a/demos/2d/space_shooter/enemy_shot.gd b/demos/2d/space_shooter/enemy_shot.gd
index 238d24e4a2..6c782b69f1 100644
--- a/demos/2d/space_shooter/enemy_shot.gd
+++ b/demos/2d/space_shooter/enemy_shot.gd
@@ -1,32 +1,31 @@
extends Area2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
+# Member variables
const SPEED = -800
+var hit = false
+
+
func _process(delta):
- translate(Vector2(delta*SPEED,0))
+ translate(Vector2(delta*SPEED, 0))
+
func _ready():
- # Initialization here
set_process(true)
-var hit=false
-
func is_enemy():
return true
+
func _hit_something():
if (hit):
return
- hit=true
+ hit = true
set_process(false)
get_node("anim").play("splash")
+
func _on_visibility_exit_screen():
queue_free()
-
diff --git a/demos/2d/space_shooter/enemy_shot.scn b/demos/2d/space_shooter/enemy_shot.scn
index 13f5ae89e5..353c9058f7 100644
--- a/demos/2d/space_shooter/enemy_shot.scn
+++ b/demos/2d/space_shooter/enemy_shot.scn
Binary files differ
diff --git a/demos/2d/space_shooter/explosion.scn b/demos/2d/space_shooter/explosion.scn
index 4edcf709cb..6fc105fac3 100644
--- a/demos/2d/space_shooter/explosion.scn
+++ b/demos/2d/space_shooter/explosion.scn
Binary files differ
diff --git a/demos/2d/space_shooter/game_state.gd b/demos/2d/space_shooter/game_state.gd
index f66d0fa8fa..0aa5e1f42b 100644
--- a/demos/2d/space_shooter/game_state.gd
+++ b/demos/2d/space_shooter/game_state.gd
@@ -1,24 +1,22 @@
-extends Node
+extends Node
+# Member variables
var points = 0
var max_points = 0
func _ready():
var f = File.new()
- #load high score
-
- if (f.open("user://highscore",File.READ)==OK):
-
- max_points=f.get_var()
+ # Load high score
+ if (f.open("user://highscore", File.READ) == OK):
+ max_points = f.get_var()
func game_over():
- if (points>max_points):
- max_points=points
- #save high score
+ if (points > max_points):
+ max_points = points
+ # Save high score
var f = File.new()
- f.open("user://highscore",File.WRITE)
+ f.open("user://highscore", File.WRITE)
f.store_var(max_points)
- \ No newline at end of file
diff --git a/demos/2d/space_shooter/level.scn b/demos/2d/space_shooter/level.scn
index 12a679f8b6..6d5f8005f5 100644
--- a/demos/2d/space_shooter/level.scn
+++ b/demos/2d/space_shooter/level.scn
Binary files differ
diff --git a/demos/2d/space_shooter/level_tiles.scn b/demos/2d/space_shooter/level_tiles.scn
index 4d1feea70f..932be39a29 100644
--- a/demos/2d/space_shooter/level_tiles.scn
+++ b/demos/2d/space_shooter/level_tiles.scn
Binary files differ
diff --git a/demos/2d/space_shooter/main_menu.gd b/demos/2d/space_shooter/main_menu.gd
index 52221aba1b..a7f242da7b 100644
--- a/demos/2d/space_shooter/main_menu.gd
+++ b/demos/2d/space_shooter/main_menu.gd
@@ -1,20 +1,11 @@
extends Control
-# member variables here, example:
-# var a=2
-# var b="textvar"
func _ready():
-
- get_node("score").set_text( "HIGH SCORE: "+str( get_node("/root/game_state").max_points ) )
- # Initialization here
- pass
-
-
+ get_node("score").set_text("HIGH SCORE: " + str(get_node("/root/game_state").max_points))
func _on_play_pressed():
- get_node("/root/game_state").points=0
+ get_node("/root/game_state").points = 0
get_tree().change_scene("res://level.scn")
- pass # replace with function body
diff --git a/demos/2d/space_shooter/main_menu.scn b/demos/2d/space_shooter/main_menu.scn
index b87cc5d3a8..91b0b37b14 100644
--- a/demos/2d/space_shooter/main_menu.scn
+++ b/demos/2d/space_shooter/main_menu.scn
Binary files differ
diff --git a/demos/2d/space_shooter/parallax.scn b/demos/2d/space_shooter/parallax.scn
index f67277dc01..2753d16e84 100644
--- a/demos/2d/space_shooter/parallax.scn
+++ b/demos/2d/space_shooter/parallax.scn
Binary files differ
diff --git a/demos/2d/space_shooter/rail.gd b/demos/2d/space_shooter/rail.gd
index 22ebd02670..7362dff97d 100644
--- a/demos/2d/space_shooter/rail.gd
+++ b/demos/2d/space_shooter/rail.gd
@@ -1,25 +1,19 @@
extends Node2D
+# Member variables
+const SPEED = 200
+var offset = 0
-const SPEED=200
-# member variables here, example:
-# var a=2
-# var b="textvar"
func stop():
set_process(false)
-var offset=0
-
func _process(delta):
- offset+=delta*SPEED
- set_pos(Vector2(offset,0))
+ offset += delta*SPEED
+ set_pos(Vector2(offset, 0))
+
func _ready():
set_process(true)
- # Initialization here
-
-
-
diff --git a/demos/2d/space_shooter/ship.gd b/demos/2d/space_shooter/ship.gd
index fa444868a4..b6c1200632 100644
--- a/demos/2d/space_shooter/ship.gd
+++ b/demos/2d/space_shooter/ship.gd
@@ -1,71 +1,65 @@
extends Area2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
+# Member variables
const SPEED = 200
var screen_size
+var prev_shooting = false
+var killed = false
-var prev_shooting=false
func _process(delta):
-
var motion = Vector2()
if Input.is_action_pressed("move_up"):
- motion+=Vector2(0,-1)
+ motion += Vector2(0, -1)
if Input.is_action_pressed("move_down"):
- motion+=Vector2(0,1)
+ motion += Vector2(0, 1)
if Input.is_action_pressed("move_left"):
- motion+=Vector2(-1,0)
+ motion += Vector2(-1, 0)
if Input.is_action_pressed("move_right"):
- motion+=Vector2(1,0)
+ motion += Vector2(1, 0)
var shooting = Input.is_action_pressed("shoot")
-
+
var pos = get_pos()
- pos+=motion*delta*SPEED
- if (pos.x<0):
- pos.x=0
- if (pos.x>screen_size.x):
- pos.x=screen_size.x
- if (pos.y<0):
- pos.y=0
- if (pos.y>screen_size.y):
- pos.y=screen_size.y
-
+ pos += motion*delta*SPEED
+ if (pos.x < 0):
+ pos.x = 0
+ if (pos.x > screen_size.x):
+ pos.x = screen_size.x
+ if (pos.y < 0):
+ pos.y = 0
+ if (pos.y > screen_size.y):
+ pos.y = screen_size.y
+
set_pos(pos)
if (shooting and not prev_shooting):
- # just pressed
+ # Just pressed
var shot = preload("res://shot.scn").instance()
- #use the position3d as reference
- shot.set_pos( get_node("shootfrom").get_global_pos() )
- #put it two parents above, so it is not moved by us
+ # Use the Position2D as reference
+ shot.set_pos(get_node("shootfrom").get_global_pos())
+ # Put it two parents above, so it is not moved by us
get_node("../..").add_child(shot)
- #play sound
+ # Play sound
get_node("sfx").play("shoot")
-
prev_shooting = shooting
+
+ # Update points counter
+ get_node("../hud/score_points").set_text(str(get_node("/root/game_state").points))
- #update points counter
- get_node("../hud/score_points").set_text( str(get_node("/root/game_state").points) )
func _ready():
- # Initialization here
screen_size = get_viewport().get_rect().size
set_process(true)
- pass
-var killed=false
func _hit_something():
if (killed):
return
- killed=true
+ killed = true
get_node("anim").play("explode")
get_node("sfx").play("sound_explode")
get_node("../hud/game_over").show()
@@ -74,15 +68,14 @@ func _hit_something():
set_process(false)
-func _on_ship_body_enter( body ):
+func _on_ship_body_enter(body):
_hit_something()
-func _on_ship_area_enter( area ):
+func _on_ship_area_enter(area):
if (area.has_method("is_enemy") and area.is_enemy()):
_hit_something()
func _on_back_to_menu_pressed():
get_tree().change_scene("res://main_menu.scn")
- pass # replace with function body
diff --git a/demos/2d/space_shooter/ship.scn b/demos/2d/space_shooter/ship.scn
index 82c710eda7..c60e2e3e3b 100644
--- a/demos/2d/space_shooter/ship.scn
+++ b/demos/2d/space_shooter/ship.scn
Binary files differ
diff --git a/demos/2d/space_shooter/shot.gd b/demos/2d/space_shooter/shot.gd
index 28b67bd26d..936dde73d1 100644
--- a/demos/2d/space_shooter/shot.gd
+++ b/demos/2d/space_shooter/shot.gd
@@ -1,48 +1,40 @@
extends Area2D
-# member variables here, example:
-# var a=2
-# var b="textvar"
-
+# Member variables
const SPEED = 800
+var hit = false
+
+
func _process(delta):
- translate(Vector2(delta*SPEED,0))
+ translate(Vector2(delta*SPEED, 0))
+
func _ready():
- # Initialization here
set_process(true)
- pass
-var hit=false
func _hit_something():
if (hit):
return
- hit=true
+ hit = true
set_process(false)
get_node("anim").play("splash")
+
func _on_visibility_exit_screen():
queue_free()
- pass # replace with function body
-
-func _on_shot_area_enter( area ):
- #hit an enemy or asteroid
+func _on_shot_area_enter(area):
+ # Hit an enemy or asteroid
if (area.has_method("destroy")):
- #duck typing at it's best
+ # Duck typing at it's best
area.destroy()
_hit_something()
-
-
- pass
-func _on_shot_body_enter( body ):
- #hit the tilemap
+func _on_shot_body_enter(body):
+ # Hit the tilemap
_hit_something()
- pass # replace with function body
-
diff --git a/demos/2d/space_shooter/shot.scn b/demos/2d/space_shooter/shot.scn
index 86a20ffa47..9daf4ebe82 100644
--- a/demos/2d/space_shooter/shot.scn
+++ b/demos/2d/space_shooter/shot.scn
Binary files differ
diff --git a/demos/2d/splash/engine.cfg b/demos/2d/splash/engine.cfg
index cb50c7b1be..e461426305 100644
--- a/demos/2d/splash/engine.cfg
+++ b/demos/2d/splash/engine.cfg
@@ -2,6 +2,7 @@
name="Splash Screen"
main_scene="res://splash.xml"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/splash/icon.png b/demos/2d/splash/icon.png
new file mode 100644
index 0000000000..b8e24f209e
--- /dev/null
+++ b/demos/2d/splash/icon.png
Binary files differ
diff --git a/demos/2d/splash/splash.xml b/demos/2d/splash/splash.xml
index ecfcb0f5b5..4a36619b09 100644
--- a/demos/2d/splash/splash.xml
+++ b/demos/2d/splash/splash.xml
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="20" version="0.99" version_name="Godot Engine v0.99.3735-pre-beta">
- <ext_resource path="res://splash_01.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_02.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_03.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_04.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_05.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_06.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_07.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_08.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://splash_09.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://bg.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://bg_layer_2.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://bg_layer_1.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://button_pressed.*" type="ImageTexture"></ext_resource>
- <ext_resource path="res://freesans.*" type="Font"></ext_resource>
- <ext_resource path="res://button.*" type="ImageTexture"></ext_resource>
+<resource_file type="PackedScene" subresource_count="20" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://splash_02.png" type="Texture" index="4"></ext_resource>
+ <ext_resource path="res://splash_01.png" type="Texture" index="3"></ext_resource>
+ <ext_resource path="res://splash_05.png" type="Texture" index="7"></ext_resource>
+ <ext_resource path="res://splash_06.png" type="Texture" index="8"></ext_resource>
+ <ext_resource path="res://splash_03.png" type="Texture" index="5"></ext_resource>
+ <ext_resource path="res://splash_04.png" type="Texture" index="6"></ext_resource>
+ <ext_resource path="res://splash_07.png" type="Texture" index="9"></ext_resource>
+ <ext_resource path="res://splash_08.png" type="Texture" index="10"></ext_resource>
+ <ext_resource path="res://splash_09.png" type="Texture" index="11"></ext_resource>
+ <ext_resource path="res://bg.png" type="Texture" index="0"></ext_resource>
+ <ext_resource path="res://bg_layer_2.png" type="Texture" index="1"></ext_resource>
+ <ext_resource path="res://bg_layer_1.png" type="Texture" index="2"></ext_resource>
+ <ext_resource path="res://button_pressed.png" type="Texture" index="13"></ext_resource>
+ <ext_resource path="res://button.png" type="Texture" index="12"></ext_resource>
+ <ext_resource path="res://freesans.fnt" type="Font" index="14"></ext_resource>
<resource type="Animation" path="local://1">
<string name="resource/name"> "scroll" </string>
<real name="length"> 1 </real>
@@ -26,6 +26,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 0, 1 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -33,48 +35,23 @@
<vector2> 0, 0 </vector2>
<vector2> -800, 0 </vector2>
</array>
- <string> "times" </string>
- <real_array len="2"> 0, 1 </real_array>
</dictionary>
</resource>
<resource type="SpriteFrames" path="local://2">
<array name="frames" len="9" shared="false">
- <resource resource_type="ImageTexture" path="res://splash_01.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_02.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_03.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_04.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_05.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_06.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_07.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_08.*"> </resource>
- <resource resource_type="ImageTexture" path="res://splash_09.*"> </resource>
+ <resource external="3"> </resource>
+ <resource external="4"> </resource>
+ <resource external="5"> </resource>
+ <resource external="6"> </resource>
+ <resource external="7"> </resource>
+ <resource external="8"> </resource>
+ <resource external="9"> </resource>
+ <resource external="10"> </resource>
+ <resource external="11"> </resource>
</array>
</resource>
- <resource type="Animation" path="local://3">
- <string name="resource/name"> "loop" </string>
- <real name="length"> 0.6 </real>
- <bool name="loop"> True </bool>
- <real name="step"> 0.1 </real>
- <string name="tracks/0/type"> "value" </string>
- <node_path name="tracks/0/path"> "logo:frame" </node_path>
- <int name="tracks/0/interp"> 1 </int>
- <dictionary name="tracks/0/keys" shared="false">
- <string> "cont" </string>
- <bool> False </bool>
- <string> "transitions" </string>
- <real_array len="2"> 1, 1 </real_array>
- <string> "values" </string>
- <array len="2" shared="false">
- <int> 8 </int>
- <int> 7 </int>
- </array>
- <string> "times" </string>
- <real_array len="2"> 0, 0.3 </real_array>
- </dictionary>
-
- </resource>
<resource type="Animation" path="local://4">
<string name="resource/name"> "intro" </string>
<real name="length"> 3 </real>
@@ -86,6 +63,8 @@
<dictionary name="tracks/0/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 1, 1.5 </real_array>
<string> "transitions" </string>
<real_array len="2"> 2, 1 </real_array>
<string> "values" </string>
@@ -93,8 +72,6 @@
<vector2> 412, -212.981 </vector2>
<vector2> 412, 171 </vector2>
</array>
- <string> "times" </string>
- <real_array len="2"> 1, 1.5 </real_array>
</dictionary>
<string name="tracks/1/type"> "value" </string>
<node_path name="tracks/1/path"> "logo:frame" </node_path>
@@ -102,6 +79,8 @@
<dictionary name="tracks/1/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="10"> 0, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3 </real_array>
<string> "transitions" </string>
<real_array len="10"> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 </real_array>
<string> "values" </string>
@@ -117,8 +96,6 @@
<int> 7 </int>
<int> 8 </int>
</array>
- <string> "times" </string>
- <real_array len="10"> 0, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3 </real_array>
</dictionary>
<string name="tracks/2/type"> "value" </string>
<node_path name="tracks/2/path"> "start:visibility/opacity" </node_path>
@@ -126,6 +103,8 @@
<dictionary name="tracks/2/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 2.5, 2.8 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -133,8 +112,6 @@
<real> 0 </real>
<real> 1 </real>
</array>
- <string> "times" </string>
- <real_array len="2"> 2.5, 2.8 </real_array>
</dictionary>
<string name="tracks/3/type"> "value" </string>
<node_path name="tracks/3/path"> "start:visibility/visible" </node_path>
@@ -142,6 +119,8 @@
<dictionary name="tracks/3/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="2"> 0, 2.5 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -149,8 +128,6 @@
<bool> False </bool>
<bool> True </bool>
</array>
- <string> "times" </string>
- <real_array len="2"> 0, 2.5 </real_array>
</dictionary>
<string name="tracks/4/type"> "value" </string>
<node_path name="tracks/4/path"> "copyright:visibility/visible" </node_path>
@@ -158,6 +135,8 @@
<dictionary name="tracks/4/keys" shared="false">
<string> "cont" </string>
<bool> False </bool>
+ <string> "times" </string>
+ <real_array len="2"> 0, 2.5 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -165,8 +144,6 @@
<bool> False </bool>
<bool> True </bool>
</array>
- <string> "times" </string>
- <real_array len="2"> 0, 2.5 </real_array>
</dictionary>
<string name="tracks/5/type"> "value" </string>
<node_path name="tracks/5/path"> "copyright:visibility/opacity" </node_path>
@@ -174,6 +151,8 @@
<dictionary name="tracks/5/keys" shared="false">
<string> "cont" </string>
<bool> True </bool>
+ <string> "times" </string>
+ <real_array len="2"> 2.5, 2.8 </real_array>
<string> "transitions" </string>
<real_array len="2"> 1, 1 </real_array>
<string> "values" </string>
@@ -181,45 +160,61 @@
<real> 0 </real>
<real> 1 </real>
</array>
+ </dictionary>
+
+ </resource>
+ <resource type="Animation" path="local://3">
+ <string name="resource/name"> "loop" </string>
+ <real name="length"> 0.6 </real>
+ <bool name="loop"> True </bool>
+ <real name="step"> 0.1 </real>
+ <string name="tracks/0/type"> "value" </string>
+ <node_path name="tracks/0/path"> "logo:frame" </node_path>
+ <int name="tracks/0/interp"> 1 </int>
+ <dictionary name="tracks/0/keys" shared="false">
+ <string> "cont" </string>
+ <bool> False </bool>
<string> "times" </string>
- <real_array len="2"> 2.5, 2.8 </real_array>
+ <real_array len="2"> 0, 0.3 </real_array>
+ <string> "transitions" </string>
+ <real_array len="2"> 1, 1 </real_array>
+ <string> "values" </string>
+ <array len="2" shared="false">
+ <int> 8 </int>
+ <int> 7 </int>
+ </array>
</dictionary>
</resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="81">
+ <string_array len="51">
<string> "splash" </string>
- <string> "Control" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
<string> "anchor/right" </string>
<string> "anchor/bottom" </string>
- <string> "focus_neighbour/left" </string>
- <string> "focus_neighbour/top" </string>
- <string> "focus_neighbour/right" </string>
- <string> "focus_neighbour/bottom" </string>
<string> "focus/ignore_mouse" </string>
<string> "focus/stop_mouse" </string>
<string> "size_flags/horizontal" </string>
<string> "size_flags/vertical" </string>
- <string> "size_flags/stretch_ratio" </string>
<string> "__meta__" </string>
+ <string> "Control" </string>
<string> "bg" </string>
<string> "margin/right" </string>
<string> "margin/bottom" </string>
<string> "1" </string>
- <string> "TextureFrame" </string>
<string> "texture" </string>
- <string> "modulate" </string>
- <string> "expand" </string>
+ <string> "TextureFrame" </string>
<string> "2" </string>
<string> "margin/left" </string>
<string> "scroll" </string>
- <string> "AnimationPlayer" </string>
<string> "playback/process_mode" </string>
<string> "playback/default_blend_time" </string>
<string> "root/root" </string>
@@ -228,152 +223,172 @@
<string> "playback/speed" </string>
<string> "blend_times" </string>
<string> "autoplay" </string>
+ <string> "AnimationPlayer" </string>
<string> "layer2" </string>
<string> "margin/top" </string>
<string> "layer1" </string>
<string> "logo" </string>
- <string> "AnimatedSprite" </string>
<string> "transform/pos" </string>
- <string> "transform/rot" </string>
- <string> "transform/scale" </string>
<string> "frames" </string>
<string> "frame" </string>
- <string> "centered" </string>
- <string> "flip_h" </string>
- <string> "flip_v" </string>
+ <string> "AnimatedSprite" </string>
<string> "start" </string>
- <string> "TextureButton" </string>
- <string> "disabled" </string>
<string> "toggle_mode" </string>
- <string> "click_on_press" </string>
<string> "textures/normal" </string>
<string> "textures/pressed" </string>
- <string> "textures/hover" </string>
- <string> "textures/disabled" </string>
- <string> "textures/focused" </string>
- <string> "textures/click_mask" </string>
+ <string> "TextureButton" </string>
<string> "copyright" </string>
- <string> "Label" </string>
<string> "custom_fonts/font" </string>
- <string> "range/min" </string>
- <string> "range/max" </string>
- <string> "range/step" </string>
- <string> "range/page" </string>
- <string> "range/value" </string>
- <string> "range/exp_edit" </string>
- <string> "rounded_values" </string>
<string> "text" </string>
- <string> "align" </string>
- <string> "valign" </string>
- <string> "autowrap" </string>
<string> "percent_visible" </string>
+ <string> "lines_skipped" </string>
+ <string> "max_lines_visible" </string>
+ <string> "Label" </string>
<string> "intro" </string>
- <string> "anims/loop" </string>
<string> "anims/intro" </string>
<string> "next/intro" </string>
+ <string> "anims/loop" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
<int> 17 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="387"> -1, -1, 8, 0, -1, 7, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 0, 0, 0, 8, 9, -1, 6, 10, 5, 11, 5, 3, 1, 4, 2, 5, 3, 6, 3, 0, 1, 0, 14, 12, -1, 7, 10, 5, 11, 5, 3, 2, 4, 2, 5, 3, 6, 3, 13, 6, 0, 1, 0, 14, 15, -1, 8, 16, 7, 10, 8, 11, 9, 3, 2, 4, 2, 5, 3, 6, 3, 13, 6, 0, 1, 0, 26, 17, -1, 8, 18, 0, 19, 10, 20, 11, 21, 12, 22, 2, 23, 13, 24, 14, 25, 15, 0, 0, 0, 8, 27, -1, 6, 10, 5, 11, 5, 3, 1, 4, 2, 5, 3, 6, 3, 0, 5, 0, 14, 12, -1, 8, 28, 16, 10, 7, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 18, 0, 5, 0, 14, 15, -1, 9, 16, 7, 28, 16, 10, 8, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 18, 0, 5, 0, 26, 17, -1, 8, 18, 0, 19, 10, 20, 11, 21, 12, 22, 2, 23, 19, 24, 14, 25, 15, 0, 0, 0, 8, 29, -1, 6, 10, 5, 11, 5, 3, 1, 4, 2, 5, 3, 6, 3, 0, 9, 0, 14, 12, -1, 8, 28, 20, 10, 7, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 21, 0, 9, 0, 14, 15, -1, 9, 16, 7, 28, 20, 10, 8, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 21, 0, 9, 0, 26, 17, -1, 8, 18, 0, 19, 10, 20, 11, 21, 12, 22, 2, 23, 22, 24, 14, 25, 15, 0, 0, 0, 34, 30, -1, 3, 31, 23, 32, 24, 33, 25, 0, 0, 0, 39, 35, -1, 11, 16, 26, 28, 27, 10, 28, 11, 29, 3, 1, 4, 2, 5, 3, 6, 3, 36, 1, 37, 30, 38, 31, 0, 0, 0, 46, 40, -1, 12, 16, 32, 28, 33, 10, 34, 11, 35, 3, 2, 4, 2, 5, 3, 41, 36, 42, 37, 43, 38, 44, 39, 45, 40, 0, 0, 0, 26, 47, -1, 10, 18, 0, 19, 10, 20, 11, 48, 41, 49, 42, 50, 43, 22, 2, 23, 38, 24, 14, 25, 44, 0 </int_array>
<string> "variants" </string>
- <array len="49" shared="false">
- <bool> True </bool>
- <real> 1 </real>
+ <array len="45" shared="false">
<int> 1 </int>
- <node_path> "" </node_path>
<bool> False </bool>
+ <bool> True </bool>
<int> 2 </int>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
- <bool> True </bool>
+ <string> "ofs" </string>
+ <vector2> -301.424, -450.503 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 0.54036 </real>
- <string> "ofs" </string>
- <vector2> -301.424, 3.30361 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -382,12 +397,9 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
<real> 40 </real>
- <resource resource_type="ImageTexture" path="res://bg.*"> </resource>
- <color> 1, 1, 1, 1 </color>
+ <resource external="0"> </resource>
<real> 800 </real>
<real> 1600 </real>
<real> 450 </real>
@@ -400,38 +412,36 @@
<string> "scroll" </string>
<real> 194 </real>
<real> 456 </real>
- <resource resource_type="ImageTexture" path="res://bg_layer_2.*"> </resource>
+ <resource external="1"> </resource>
<real> 0.1 </real>
<real> 212 </real>
- <resource resource_type="ImageTexture" path="res://bg_layer_1.*"> </resource>
+ <resource external="2"> </resource>
<real> 0.2 </real>
<vector2> 412, 171 </vector2>
- <vector2> 1, 1 </vector2>
<resource resource_type="SpriteFrames" path="local://2"> </resource>
<int> 8 </int>
<real> 345 </real>
<real> 369 </real>
<real> 494 </real>
<real> 443 </real>
- <resource resource_type="ImageTexture" path="res://button.*"> </resource>
- <resource resource_type="ImageTexture" path="res://button_pressed.*"> </resource>
- <resource name=""></resource> <real> 658 </real>
+ <resource external="12"> </resource>
+ <resource external="13"> </resource>
+ <real> 658 </real>
<real> 417 </real>
<real> 776 </real>
<real> 434 </real>
- <resource resource_type="Font" path="res://freesans.*"> </resource>
+ <resource external="14"> </resource>
<string> "(c) 1994 SOGA" </string>
+ <real> 1 </real>
<int> 0 </int>
- <real> -1 </real>
- <resource resource_type="Animation" path="local://3"> </resource>
+ <int> -1 </int>
<resource resource_type="Animation" path="local://4"> </resource>
<string> "loop" </string>
+ <resource resource_type="Animation" path="local://3"> </resource>
<string> "intro" </string>
</array>
- <string> "nodes" </string>
- <int_array len="675"> -1, -1, 1, 0, -1, 16, 2, 0, 3, 1, 4, 1, 5, 0, 6, 2, 7, 2, 8, 3, 9, 3, 10, 3, 11, 3, 12, 4, 13, 0, 14, 5, 15, 5, 16, 1, 17, 6, 0, 0, 0, 1, 18, -1, 15, 2, 0, 3, 1, 4, 1, 5, 0, 19, 7, 20, 7, 8, 3, 9, 3, 10, 3, 11, 3, 12, 4, 13, 0, 14, 5, 15, 5, 16, 1, 0, 1, 0, 22, 21, -1, 18, 2, 0, 3, 1, 4, 1, 5, 0, 19, 7, 20, 7, 8, 3, 9, 3, 10, 3, 11, 3, 12, 0, 13, 0, 14, 5, 15, 5, 16, 1, 23, 8, 24, 9, 25, 4, 0, 1, 0, 22, 26, -1, 19, 2, 0, 3, 1, 4, 1, 5, 0, 27, 10, 19, 11, 20, 12, 8, 3, 9, 3, 10, 3, 11, 3, 12, 0, 13, 0, 14, 5, 15, 5, 16, 1, 23, 8, 24, 9, 25, 4, 0, 1, 0, 29, 28, -1, 8, 30, 2, 31, 13, 32, 14, 33, 15, 34, 0, 35, 16, 36, 17, 37, 18, 0, 0, 0, 1, 38, -1, 15, 2, 0, 3, 1, 4, 1, 5, 0, 19, 7, 20, 7, 8, 3, 9, 3, 10, 3, 11, 3, 12, 4, 13, 0, 14, 5, 15, 5, 16, 1, 0, 5, 0, 22, 21, -1, 19, 2, 0, 3, 1, 4, 1, 5, 0, 39, 19, 19, 10, 20, 20, 8, 3, 9, 3, 10, 3, 11, 3, 12, 0, 13, 0, 14, 5, 15, 5, 16, 1, 23, 21, 24, 9, 25, 4, 0, 5, 0, 22, 26, -1, 20, 2, 0, 3, 1, 4, 1, 5, 0, 27, 10, 39, 19, 19, 11, 20, 20, 8, 3, 9, 3, 10, 3, 11, 3, 12, 0, 13, 0, 14, 5, 15, 5, 16, 1, 23, 21, 24, 9, 25, 4, 0, 5, 0, 29, 28, -1, 8, 30, 2, 31, 13, 32, 14, 33, 15, 34, 0, 35, 22, 36, 17, 37, 18, 0, 0, 0, 1, 40, -1, 15, 2, 0, 3, 1, 4, 1, 5, 0, 19, 7, 20, 7, 8, 3, 9, 3, 10, 3, 11, 3, 12, 4, 13, 0, 14, 5, 15, 5, 16, 1, 0, 9, 0, 22, 21, -1, 19, 2, 0, 3, 1, 4, 1, 5, 0, 39, 23, 19, 10, 20, 20, 8, 3, 9, 3, 10, 3, 11, 3, 12, 0, 13, 0, 14, 5, 15, 5, 16, 1, 23, 24, 24, 9, 25, 4, 0, 9, 0, 22, 26, -1, 20, 2, 0, 3, 1, 4, 1, 5, 0, 27, 10, 39, 23, 19, 11, 20, 20, 8, 3, 9, 3, 10, 3, 11, 3, 12, 0, 13, 0, 14, 5, 15, 5, 16, 1, 23, 24, 24, 9, 25, 4, 0, 9, 0, 29, 28, -1, 8, 30, 2, 31, 13, 32, 14, 33, 15, 34, 0, 35, 25, 36, 17, 37, 18, 0, 0, 0, 42, 41, -1, 13, 2, 0, 3, 1, 4, 1, 5, 0, 43, 26, 44, 13, 45, 27, 46, 28, 47, 29, 48, 0, 49, 4, 50, 4, 24, 9, 0, 0, 0, 52, 51, -1, 26, 2, 0, 3, 1, 4, 1, 5, 0, 27, 30, 39, 31, 19, 32, 20, 33, 8, 3, 9, 3, 10, 3, 11, 3, 12, 4, 13, 0, 14, 5, 15, 5, 16, 1, 53, 4, 54, 4, 55, 4, 56, 34, 57, 35, 58, 36, 59, 36, 60, 36, 61, 36, 0, 0, 0, 63, 62, -1, 29, 2, 0, 3, 1, 4, 1, 5, 0, 27, 37, 39, 38, 19, 39, 20, 40, 8, 3, 9, 3, 10, 3, 11, 3, 12, 0, 13, 0, 14, 5, 16, 1, 64, 41, 65, 13, 66, 1, 67, 1, 68, 1, 69, 13, 70, 4, 71, 4, 72, 42, 73, 43, 74, 43, 75, 4, 76, 44, 0, 0, 0, 29, 77, -1, 10, 30, 2, 31, 13, 32, 14, 78, 45, 79, 46, 80, 47, 34, 0, 35, 1, 36, 17, 37, 48, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
</main_resource>
diff --git a/demos/2d/sprite_shaders/engine.cfg b/demos/2d/sprite_shaders/engine.cfg
index 09f9a59566..17bdada188 100644
--- a/demos/2d/sprite_shaders/engine.cfg
+++ b/demos/2d/sprite_shaders/engine.cfg
@@ -2,3 +2,4 @@
name="2D Shaders for Sprites"
main_scene="res://sprite_shaders.scn"
+icon="res://icon.png"
diff --git a/demos/2d/sprite_shaders/icon.png b/demos/2d/sprite_shaders/icon.png
new file mode 100644
index 0000000000..8b13ef6bb4
--- /dev/null
+++ b/demos/2d/sprite_shaders/icon.png
Binary files differ
diff --git a/demos/2d/sprite_shaders/sprite_shaders.scn b/demos/2d/sprite_shaders/sprite_shaders.scn
index 7c36f2137c..b6060f8eaa 100644
--- a/demos/2d/sprite_shaders/sprite_shaders.scn
+++ b/demos/2d/sprite_shaders/sprite_shaders.scn
Binary files differ
diff --git a/demos/2d/tetris/grid.gd b/demos/2d/tetris/grid.gd
index 8708d168e4..75fabb4210 100644
--- a/demos/2d/tetris/grid.gd
+++ b/demos/2d/tetris/grid.gd
@@ -1,82 +1,76 @@
-
extends Control
# Simple Tetris-like demo, (c) 2012 Juan Linietsky
# Implemented by using a regular Control and drawing on it during the _draw() callback.
# The drawing surface is updated only when changes happen (by calling update())
-
+# Member variables
var score = 0
-var score_label=null
+var score_label = null
const MAX_SHAPES = 7
var block = preload("block.png")
-var block_colors=[
- Color(1,0.5,0.5),
- Color(0.5,1,0.5),
- Color(0.5,0.5,1),
- Color(0.8,0.4,0.8),
- Color(0.8,0.8,0.4),
- Color(0.4,0.8,0.8),
- Color(0.7,0.7,0.7)]
-
-var block_shapes=[
- [ Vector2(0,-1),Vector2(0,0),Vector2(0,1),Vector2(0,2) ], # I
- [ Vector2(0,0),Vector2(1,0),Vector2(1,1),Vector2(0,1) ], # O
- [ Vector2(-1,1),Vector2(0,1),Vector2(0,0),Vector2(1,0) ], # S
- [ Vector2(1,1),Vector2(0,1),Vector2(0,0),Vector2(-1,0) ], # Z
- [ Vector2(-1,1),Vector2(-1,0),Vector2(0,0),Vector2(1,0) ], # L
- [ Vector2(1,1),Vector2(1,0),Vector2(0,0),Vector2(-1,0) ], # J
- [ Vector2(0,1),Vector2(1,0),Vector2(0,0),Vector2(-1,0) ]] # T
-
+var block_colors = [
+ Color(1, 0.5, 0.5),
+ Color(0.5, 1, 0.5),
+ Color(0.5, 0.5, 1),
+ Color(0.8, 0.4, 0.8),
+ Color(0.8, 0.8, 0.4),
+ Color(0.4, 0.8, 0.8),
+ Color(0.7, 0.7, 0.7)]
-var block_rotations=[
- Matrix32( Vector2(1,0),Vector2(0,1), Vector2() ),
- Matrix32( Vector2(0,1),Vector2(-1,0), Vector2() ),
- Matrix32( Vector2(-1,0),Vector2(0,-1), Vector2() ),
- Matrix32( Vector2(0,-1),Vector2(1,0), Vector2() )
-]
-
+var block_shapes = [
+ [ Vector2(0, -1), Vector2(0, 0), Vector2(0, 1), Vector2(0, 2) ], # I
+ [ Vector2(0, 0), Vector2(1, 0), Vector2(1, 1), Vector2(0, 1) ], # O
+ [ Vector2(-1, 1), Vector2(0, 1), Vector2(0, 0), Vector2(1, 0) ], # S
+ [ Vector2(1, 1), Vector2(0, 1), Vector2(0, 0), Vector2(-1, 0) ], # Z
+ [ Vector2(-1, 1), Vector2(-1, 0), Vector2(0, 0), Vector2(1, 0) ], # L
+ [ Vector2(1, 1), Vector2(1, 0), Vector2(0, 0), Vector2(-1, 0) ], # J
+ [ Vector2(0, 1), Vector2(1, 0), Vector2(0, 0), Vector2(-1, 0) ]] # T
-var width=0
-var height=0
+var block_rotations = [
+ Matrix32(Vector2(1, 0), Vector2(0, 1), Vector2()),
+ Matrix32(Vector2(0, 1), Vector2(-1, 0), Vector2()),
+ Matrix32(Vector2(-1, 0), Vector2(0, -1), Vector2()),
+ Matrix32(Vector2(0, -1), Vector2(1, 0), Vector2())]
-var cells={}
+var width = 0
+var height = 0
-var piece_active=false
-var piece_shape=0
-var piece_pos=Vector2()
-var piece_rot=0
+var cells = {}
+var piece_active = false
+var piece_shape = 0
+var piece_pos = Vector2()
+var piece_rot = 0
-func piece_cell_xform(p,er=0):
- var r = (4+er+piece_rot)%4
- return piece_pos+block_rotations[r].xform(p)
-func _draw():
+func piece_cell_xform(p, er = 0):
+ var r = (4 + er + piece_rot) % 4
+ return piece_pos + block_rotations[r].xform(p)
+
- var sb = get_stylebox("bg","Tree") # use line edit bg
- draw_style_box(sb,Rect2(Vector2(),get_size()).grow(3))
+func _draw():
+ var sb = get_stylebox("bg", "Tree") # Use line edit bg
+ draw_style_box(sb, Rect2(Vector2(), get_size()).grow(3))
var bs = block.get_size()
for y in range(height):
for x in range(width):
- if (Vector2(x,y) in cells):
- draw_texture_rect(block,Rect2(Vector2(x,y)*bs,bs),false,block_colors[cells[Vector2(x,y)]])
-
+ if (Vector2(x, y) in cells):
+ draw_texture_rect(block, Rect2(Vector2(x, y)*bs, bs), false, block_colors[cells[Vector2(x, y)]])
+
if (piece_active):
-
for c in block_shapes[piece_shape]:
- draw_texture_rect(block,Rect2(piece_cell_xform(c)*bs,bs),false,block_colors[piece_shape])
-
+ draw_texture_rect(block, Rect2(piece_cell_xform(c)*bs, bs), false, block_colors[piece_shape])
-func piece_check_fit(ofs,er=0):
+func piece_check_fit(ofs, er = 0):
for c in block_shapes[piece_shape]:
- var pos = piece_cell_xform(c,er)+ofs
+ var pos = piece_cell_xform(c, er) + ofs
if (pos.x < 0):
return false
if (pos.y < 0):
@@ -88,130 +82,113 @@ func piece_check_fit(ofs,er=0):
if (pos in cells):
return false
- return true
+ return true
-func new_piece():
- piece_shape = randi() % MAX_SHAPES
- piece_pos = Vector2(width/2,0)
- piece_active=true
- piece_rot=0
- if (piece_shape==0):
- piece_pos.y+=1
-
+func new_piece():
+ piece_shape = randi() % MAX_SHAPES
+ piece_pos = Vector2(width/2, 0)
+ piece_active = true
+ piece_rot = 0
+ if (piece_shape == 0):
+ piece_pos.y += 1
+
if (not piece_check_fit(Vector2())):
- #game over
- #print("GAME OVER!")
+ # Game over
game_over()
-
- update()
-
+ update()
+
+
func test_collapse_rows():
- var accum_down=0
+ var accum_down = 0
for i in range(height):
var y = height - i - 1
var collapse = true
for x in range(width):
- if (Vector2(x,y) in cells):
+ if (Vector2(x, y) in cells):
if (accum_down):
- cells[ Vector2(x,y+accum_down) ] = cells[Vector2(x,y)]
+ cells[Vector2(x, y + accum_down)] = cells[Vector2(x, y)]
else:
- collapse=false
+ collapse = false
if (accum_down):
- cells.erase( Vector2(x,y+accum_down) )
-
- if (collapse):
- accum_down+=1
+ cells.erase(Vector2(x, y + accum_down))
-
- score+=accum_down*100
+ if (collapse):
+ accum_down += 1
+
+ score += accum_down*100
score_label.set_text(str(score))
-
-
+
+
func game_over():
+ piece_active = false
+ get_node("gameover").set_text("Game over!")
+ update()
+
- piece_active=false
- get_node("gameover").set_text("Game Over")
- update()
-
-
func restart_pressed():
+ score = 0
+ score_label.set_text("0")
+ cells.clear()
+ get_node("gameover").set_text("")
+ piece_active = true
+ get_node("../restart").release_focus()
+ update()
- score=0
- score_label.set_text("0")
- cells.clear()
- get_node("gameover").set_text("")
- piece_active=true
- get_node("../restart").release_focus()
- update()
-
-
func piece_move_down():
-
if (!piece_active):
return
- if (piece_check_fit(Vector2(0,1))):
- piece_pos.y+=1
- update()
+ if (piece_check_fit(Vector2(0, 1))):
+ piece_pos.y += 1
+ update()
else:
-
for c in block_shapes[piece_shape]:
var pos = piece_cell_xform(c)
- cells[pos]=piece_shape
+ cells[pos] = piece_shape
test_collapse_rows()
new_piece()
-
-func piece_rotate():
+func piece_rotate():
var adv = 1
- if (not piece_check_fit(Vector2(),1)):
+ if (not piece_check_fit(Vector2(), 1)):
return
piece_rot = (piece_rot + adv) % 4
update()
-
-
-
-func _input(ie):
+func _input(ie):
if (not piece_active):
return
if (!ie.is_pressed()):
return
if (ie.is_action("move_left")):
- if (piece_check_fit(Vector2(-1,0))):
- piece_pos.x-=1
+ if (piece_check_fit(Vector2(-1, 0))):
+ piece_pos.x -= 1
update()
elif (ie.is_action("move_right")):
- if (piece_check_fit(Vector2(1,0))):
- piece_pos.x+=1
+ if (piece_check_fit(Vector2(1, 0))):
+ piece_pos.x += 1
update()
elif (ie.is_action("move_down")):
piece_move_down()
elif (ie.is_action("rotate")):
piece_rotate()
-
-
-func setup(w,h):
- width=w
- height=h
- set_size( Vector2(w,h)*block.get_size() )
+
+
+func setup(w, h):
+ width = w
+ height = h
+ set_size(Vector2(w, h)*block.get_size())
new_piece()
get_node("timer").start()
-
-func _ready():
- # Initalization here
- setup(10,20)
+func _ready():
+ setup(10, 20)
score_label = get_node("../score")
-
+
set_process_input(true)
-
-
-
-
diff --git a/demos/2d/tetris/grid.xml b/demos/2d/tetris/grid.xml
index 072ffb5e75..49ad4ccc41 100644
--- a/demos/2d/tetris/grid.xml
+++ b/demos/2d/tetris/grid.xml
@@ -1,153 +1,209 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="2" version="0.99" version_name="Godot Engine v0.99.3037-pre-beta">
- <ext_resource path="res://grid.gd" type="GDScript"></ext_resource>
+<resource_file type="PackedScene" subresource_count="2" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://grid.gd" type="Script" index="0"></ext_resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 1 </int>
+ <string> "conns" </string>
+ <int_array len="6"> 1, 0, 30, 29, 2, 0 </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="57">
+ <string_array len="31">
<string> "Grid" </string>
- <string> "Control" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "anchor/left" </string>
- <string> "anchor/top" </string>
- <string> "anchor/right" </string>
- <string> "anchor/bottom" </string>
- <string> "margin/left" </string>
- <string> "margin/top" </string>
<string> "margin/right" </string>
<string> "margin/bottom" </string>
- <string> "hint/tooltip" </string>
- <string> "focus_neighbour/left" </string>
- <string> "focus_neighbour/top" </string>
- <string> "focus_neighbour/right" </string>
- <string> "focus_neighbour/bottom" </string>
<string> "focus/ignore_mouse" </string>
<string> "focus/stop_mouse" </string>
<string> "size_flags/horizontal" </string>
<string> "size_flags/vertical" </string>
- <string> "size_flags/stretch_ratio" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "Control" </string>
<string> "timer" </string>
- <string> "Timer" </string>
+ <string> "process_mode" </string>
<string> "wait_time" </string>
<string> "one_shot" </string>
<string> "autostart" </string>
+ <string> "Timer" </string>
<string> "gameover" </string>
- <string> "Label" </string>
+ <string> "anchor/right" </string>
+ <string> "anchor/bottom" </string>
<string> "custom_colors/font_color" </string>
+ <string> "custom_colors/font_color_shadow" </string>
<string> "custom_constants/shadow_offset_x" </string>
<string> "custom_constants/shadow_offset_y" </string>
- <string> "range/min" </string>
- <string> "range/max" </string>
- <string> "range/step" </string>
- <string> "range/page" </string>
- <string> "range/value" </string>
- <string> "range/exp_edit" </string>
- <string> "rounded_values" </string>
- <string> "text" </string>
<string> "align" </string>
<string> "valign" </string>
- <string> "autowrap" </string>
+ <string> "percent_visible" </string>
+ <string> "lines_skipped" </string>
+ <string> "max_lines_visible" </string>
+ <string> "Label" </string>
<string> "piece_move_down" </string>
<string> "timeout" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 1 </int>
<string> "node_count" </string>
<int> 3 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="73"> -1, -1, 9, 0, -1, 8, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 8, 5, 0, 0, 0, 15, 10, -1, 4, 11, 6, 12, 7, 13, 1, 14, 1, 0, 0, 0, 28, 16, -1, 14, 17, 6, 18, 6, 3, 2, 4, 2, 5, 3, 19, 8, 20, 9, 21, 6, 22, 6, 23, 6, 24, 6, 25, 7, 26, 10, 27, 11, 0 </int_array>
<string> "variants" </string>
- <array len="14">
+ <array len="12" shared="false">
+ <real> 40 </real>
<bool> False </bool>
- <int> 0 </int>
<bool> True </bool>
- <real> 1 </real>
- <real> 0 </real>
- <real> 40 </real>
- <string> "" </string>
- <node_path> "" </node_path>
<int> 2 </int>
- <resource resource_type="GDScript" path="res://grid.gd"> </resource>
- <dictionary>
+ <resource external="0"> </resource>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
- <string> "Script" </string>
- <dictionary>
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1">
- <string> "res://grid.gd" </string>
- </array>
- </dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
+ <dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -229.129, -80 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 1 </real>
- <string> "ofs" </string>
- <vector2> -69, -22 </vector2>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "Script" </string>
</dictionary>
- <resource name=""></resource> <int> 1 </int>
+ <int> 1 </int>
+ <real> 1 </real>
+ <color> 1, 1, 1, 1 </color>
<color> 0, 0, 0, 1 </color>
+ <int> 0 </int>
+ <int> -1 </int>
</array>
- <string> "nodes" </string>
- <int_array len="193"> -1, -1, 1, 0, -1, 32, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 4, 19, 4, 20, 5, 21, 5, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 0, 28, 2, 29, 8, 30, 8, 31, 3, 32, 9, 33, 10, 0, 0, 0, 35, 34, -1, 9, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 36, 3, 37, 0, 38, 0, 32, 11, 0, 0, 0, 40, 39, -1, 45, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 12, 17, 12, 18, 4, 19, 4, 20, 4, 21, 4, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 2, 28, 2, 29, 8, 30, 1, 31, 3, 41, 13, 42, 12, 43, 12, 44, 4, 45, 3, 46, 3, 47, 3, 48, 4, 49, 0, 50, 0, 51, 6, 52, 12, 53, 12, 54, 0, 32, 11, 0 </int_array>
- <string> "conns" </string>
- <int_array len="6"> 1, 0, 56, 55, 2, 0 </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/tetris/tetris.xml b/demos/2d/tetris/tetris.xml
index 1b5e5afeb0..a8e47a8ae4 100644
--- a/demos/2d/tetris/tetris.xml
+++ b/demos/2d/tetris/tetris.xml
@@ -1,147 +1,192 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="2" version="0.99" version_name="Godot Engine v0.99.3037-pre-beta">
- <ext_resource path="res://grid.xml" type="PackedScene"></ext_resource>
+<resource_file type="PackedScene" subresource_count="2" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://grid.xml" type="PackedScene" index="0"></ext_resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 1 </int>
+ <string> "conns" </string>
+ <int_array len="6"> 4, 1, 23, 22, 2, 0 </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="59">
+ <string_array len="24">
<string> "Tetris" </string>
- <string> "Panel" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "anchor/left" </string>
- <string> "anchor/top" </string>
- <string> "anchor/right" </string>
- <string> "anchor/bottom" </string>
- <string> "margin/left" </string>
- <string> "margin/top" </string>
<string> "margin/right" </string>
<string> "margin/bottom" </string>
- <string> "hint/tooltip" </string>
- <string> "focus_neighbour/left" </string>
- <string> "focus_neighbour/top" </string>
- <string> "focus_neighbour/right" </string>
- <string> "focus_neighbour/bottom" </string>
<string> "focus/ignore_mouse" </string>
<string> "focus/stop_mouse" </string>
<string> "size_flags/horizontal" </string>
<string> "size_flags/vertical" </string>
- <string> "size_flags/stretch_ratio" </string>
- <string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "Panel" </string>
<string> "Grid" </string>
- <string> "Control" </string>
+ <string> "margin/left" </string>
+ <string> "margin/top" </string>
<string> "Label" </string>
- <string> "range/min" </string>
- <string> "range/max" </string>
- <string> "range/step" </string>
- <string> "range/page" </string>
- <string> "range/value" </string>
- <string> "range/exp_edit" </string>
- <string> "rounded_values" </string>
<string> "text" </string>
- <string> "align" </string>
- <string> "valign" </string>
- <string> "autowrap" </string>
+ <string> "percent_visible" </string>
+ <string> "lines_skipped" </string>
+ <string> "max_lines_visible" </string>
<string> "score" </string>
<string> "restart" </string>
- <string> "Button" </string>
- <string> "disabled" </string>
<string> "toggle_mode" </string>
- <string> "click_on_press" </string>
- <string> "icon" </string>
<string> "flat" </string>
- <string> "clip_text" </string>
+ <string> "Button" </string>
<string> "restart_pressed" </string>
<string> "pressed" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 1 </int>
<string> "node_count" </string>
<int> 5 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="123"> -1, -1, 8, 0, -1, 7, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 0, 0, 0, 2147483647, 9, 5, 4, 10, 6, 11, 7, 1, 8, 2, 9, 0, 0, 0, 12, 12, -1, 11, 10, 10, 11, 11, 1, 12, 2, 13, 3, 2, 4, 2, 5, 3, 13, 14, 14, 15, 15, 16, 16, 17, 0, 0, 0, 12, 17, -1, 11, 10, 18, 11, 19, 1, 20, 2, 21, 3, 2, 4, 2, 5, 3, 13, 22, 14, 15, 15, 16, 16, 17, 0, 0, 0, 21, 18, -1, 11, 10, 10, 11, 23, 1, 24, 2, 25, 3, 1, 4, 2, 5, 3, 6, 3, 19, 1, 13, 26, 20, 1, 0 </int_array>
<string> "variants" </string>
- <array len="30">
+ <array len="27" shared="false">
+ <real> 400 </real>
<bool> False </bool>
- <int> 0 </int>
<bool> True </bool>
- <real> 1 </real>
- <real> 0 </real>
- <real> 400 </real>
- <string> "" </string>
- <node_path> "" </node_path>
<int> 2 </int>
- <resource name=""></resource> <dictionary>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
- <string> "Script" </string>
- <dictionary>
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1">
- <string> "res://grid.gd" </string>
- </array>
- </dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
+ <dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -229.129, -54.344 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 1.360374 </real>
- <string> "ofs" </string>
- <vector2> -44.5757, -54.344 </vector2>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="PackedScene" path="res://grid.xml"> </resource>
+ <resource external="0"> </resource>
<real> 40 </real>
<real> 35 </real>
<real> 80 </real>
@@ -151,6 +196,9 @@
<real> 283 </real>
<real> 49 </real>
<string> "Score:" </string>
+ <real> 1 </real>
+ <int> 0 </int>
+ <int> -1 </int>
<real> 252 </real>
<real> 55 </real>
<real> 293 </real>
@@ -161,11 +209,9 @@
<real> 311 </real>
<string> "Restart" </string>
</array>
- <string> "nodes" </string>
- <int_array len="351"> -1, -1, 1, 0, -1, 32, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 4, 19, 4, 20, 5, 21, 5, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 0, 28, 2, 29, 8, 30, 8, 31, 3, 32, 9, 33, 10, 0, 0, 0, 35, 34, 11, 4, 18, 12, 19, 13, 20, 14, 21, 15, 0, 0, 0, 36, 36, -1, 42, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 16, 19, 17, 20, 18, 21, 19, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 2, 28, 2, 29, 8, 30, 1, 31, 3, 37, 4, 38, 3, 39, 3, 40, 3, 41, 4, 42, 0, 43, 0, 44, 20, 45, 1, 46, 1, 47, 0, 32, 9, 0, 0, 0, 36, 48, -1, 42, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 21, 19, 22, 20, 23, 21, 24, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 2, 28, 2, 29, 8, 30, 1, 31, 3, 37, 4, 38, 3, 39, 3, 40, 3, 41, 4, 42, 0, 43, 0, 44, 25, 45, 1, 46, 1, 47, 0, 32, 9, 0, 0, 0, 50, 49, -1, 38, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 16, 19, 26, 20, 27, 21, 28, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 0, 28, 2, 29, 8, 30, 8, 31, 3, 51, 0, 52, 0, 53, 0, 44, 29, 54, 9, 55, 0, 56, 0, 32, 9, 0 </int_array>
- <string> "conns" </string>
- <int_array len="6"> 4, 1, 58, 57, 2, 0 </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/texscreen/bubbles.gd b/demos/2d/texscreen/bubbles.gd
index 2ee227a928..400da1a205 100644
--- a/demos/2d/texscreen/bubbles.gd
+++ b/demos/2d/texscreen/bubbles.gd
@@ -1,17 +1,11 @@
extends Control
-# member variables here, example:
-# var a=2
-# var b="textvar"
+# Member variables
+const MAX_BUBBLES = 10
-const MAX_BUBBLES=10
func _ready():
- # Initialization here
for i in range(MAX_BUBBLES):
var bubble = preload("res://lens.scn").instance()
add_child(bubble)
- pass
-
-
diff --git a/demos/2d/texscreen/bubbles.scn b/demos/2d/texscreen/bubbles.scn
index 41026aceed..8509b3811c 100644
--- a/demos/2d/texscreen/bubbles.scn
+++ b/demos/2d/texscreen/bubbles.scn
Binary files differ
diff --git a/demos/2d/texscreen/engine.cfg b/demos/2d/texscreen/engine.cfg
index fb683dfc1d..92d0e98d5b 100644
--- a/demos/2d/texscreen/engine.cfg
+++ b/demos/2d/texscreen/engine.cfg
@@ -2,6 +2,7 @@
name="Glass Bubbles (Texscreen)"
main_scene="res://bubbles.scn"
+icon="res://icon.png"
[display]
diff --git a/demos/2d/texscreen/icon.png b/demos/2d/texscreen/icon.png
new file mode 100644
index 0000000000..d74d025ced
--- /dev/null
+++ b/demos/2d/texscreen/icon.png
Binary files differ
diff --git a/demos/2d/texscreen/lens.gd b/demos/2d/texscreen/lens.gd
index 2ccbfba497..d1007553b0 100644
--- a/demos/2d/texscreen/lens.gd
+++ b/demos/2d/texscreen/lens.gd
@@ -1,37 +1,32 @@
extends BackBufferCopy
-# member variables here, example:
-# var a=2
-# var b="textvar"
-const MOTION_SPEED=150
+# Member variables
+const MOTION_SPEED = 150
+
+var vsize
+var dir
-var vsize;
-var dir;
func _process(delta):
- var pos = get_pos() + dir * delta * MOTION_SPEED
+ var pos = get_pos() + dir*delta*MOTION_SPEED
+
+ if (pos.x < 0):
+ dir.x = abs(dir.x)
+ elif (pos.x > vsize.x):
+ dir.x = -abs(dir.x)
+
+ if (pos.y < 0):
+ dir.y = abs(dir.y)
+ elif (pos.y > vsize.y):
+ dir.y = -abs(dir.y)
- if (pos.x<0):
- dir.x=abs(dir.x)
- elif (pos.x>vsize.x):
- dir.x=-abs(dir.x)
-
- if (pos.y<0):
- dir.y=abs(dir.y)
- elif (pos.y>vsize.y):
- dir.y=-abs(dir.y)
-
set_pos(pos)
+
func _ready():
vsize = get_viewport_rect().size
- var pos = vsize * Vector2(randf(),randf());
- set_pos(pos);
- dir = Vector2(randf()*2.0-1,randf()*2.0-1).normalized()
+ var pos = vsize*Vector2(randf(), randf())
+ set_pos(pos)
+ dir = Vector2(randf()*2.0 - 1, randf()*2.0 - 1).normalized()
set_process(true)
-
- # Initialization here
- pass
-
-
diff --git a/demos/2d/texscreen/lens.scn b/demos/2d/texscreen/lens.scn
index 5c6f8b7af8..530a0b1eb0 100644
--- a/demos/2d/texscreen/lens.scn
+++ b/demos/2d/texscreen/lens.scn
Binary files differ