From fbdd925d9be1c4c96d05089d7d5a58cd938b002c Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 3 Jan 2015 16:52:37 -0300 Subject: -Work in progress visual shader editor *DOES NOT WORK YET* --- demos/2d/platformer/player.gd | 3 + demos/2d/platformer/player.xml | 173 ++++++++++++++++++++++++----------------- 2 files changed, 103 insertions(+), 73 deletions(-) (limited to 'demos/2d/platformer') diff --git a/demos/2d/platformer/player.gd b/demos/2d/platformer/player.gd index 481f340ab8..b08105212c 100644 --- a/demos/2d/platformer/player.gd +++ b/demos/2d/platformer/player.gd @@ -53,12 +53,15 @@ var enemy 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 + # Get the controls var move_left = Input.is_action_pressed("move_left") var move_right = Input.is_action_pressed("move_right") diff --git a/demos/2d/platformer/player.xml b/demos/2d/platformer/player.xml index c129d01f0d..196881dee4 100644 --- a/demos/2d/platformer/player.xml +++ b/demos/2d/platformer/player.xml @@ -1,13 +1,13 @@ - + - - + + @@ -50,8 +50,8 @@ - "run" - 1.25 + "jumping" + 0.5 True 0.25 "value" @@ -61,24 +61,21 @@ "cont" False "transitions" - 1, 1, 1, 1, 1, 1 + 1, 1, 1 "values" - - 0 - 1 - 2 - 3 - 4 - 0 + + 23 + 24 + 23 "times" - 0, 0.25, 0.5, 0.75, 1, 1.25 + 0, 0.25, 0.5 - "run_gun_fire" - 1.25 + "idle_weapon" + 0.5 True 0.25 "value" @@ -88,24 +85,18 @@ "cont" False "transitions" - 1, 1, 1, 1, 1, 1 + 1 "values" - - 10 - 11 - 12 - 13 - 14 - 5 + + 25 "times" - 0, 0.25, 0.5, 0.75, 1, 1.25 + 0 - "jumping_weapon" - 0.5 + 1.25 True 0.25 "value" @@ -115,13 +106,18 @@ "cont" False "transitions" - 1 + 1, 1, 1, 1, 1, 1 "values" - - 26 + + 0 + 1 + 2 + 3 + 4 + 0 "times" - 0 + 0, 0.25, 0.5, 0.75, 1, 1.25 @@ -148,8 +144,8 @@ - "jumping" - 0.5 + "falling" + 0.01 True 0.25 "value" @@ -159,20 +155,17 @@ "cont" False "transitions" - 1, 1, 1 + 1 "values" - - 23 - 24 - 23 + + 21 "times" - 0, 0.25, 0.5 + 0 - "run_weapon" 1.25 True 0.25 @@ -186,11 +179,11 @@ 1, 1, 1, 1, 1, 1 "values" - 5 - 6 - 7 - 8 - 9 + 10 + 11 + 12 + 13 + 14 5 "times" @@ -199,7 +192,7 @@ - "idle_weapon" + "falling_weapon" 0.5 True 0.25 @@ -213,7 +206,7 @@ 1 "values" - 25 + 26 "times" 0 @@ -221,8 +214,7 @@ - "falling_weapon" - 0.5 + 1.25 True 0.25 "value" @@ -232,19 +224,23 @@ "cont" False "transitions" - 1 + 1, 1, 1, 1, 1, 1 "values" - - 26 + + 5 + 6 + 7 + 8 + 9 + 5 "times" - 0 + 0, 0.25, 0.5, 0.75, 1, 1.25 - "falling" - 0.01 + 0.5 True 0.25 "value" @@ -257,7 +253,7 @@ 1 "values" - 21 + 26 "times" 0 @@ -294,9 +290,10 @@ "names" - + "player" "RigidBody2D" + "_import_path" "visibility/visible" "visibility/opacity" "visibility/self_opacity" @@ -311,6 +308,7 @@ "shapes/1/shape" "shapes/1/transform" "shapes/1/trigger" + "layers" "mode" "mass" "friction" @@ -319,7 +317,7 @@ "continuous_cd" "contacts_reported" "contact_monitor" - "active" + "sleeping" "can_sleep" "velocity/linear" "velocity/angular" @@ -354,6 +352,8 @@ "config/flip_h" "config/flip_v" "config/texture" + "config/h_frames" + "config/v_frames" "params/direction" "params/spread" "params/linear_velocity" @@ -364,9 +364,12 @@ "params/radial_accel" "params/tangential_accel" "params/damping" + "params/initial_angle" "params/initial_size" "params/final_size" "params/hue_variation" + "params/anim_speed_scale" + "params/anim_initial_pos" "randomness/direction" "randomness/spread" "randomness/linear_velocity" @@ -377,9 +380,12 @@ "randomness/radial_accel" "randomness/tangential_accel" "randomness/damping" + "randomness/initial_angle" "randomness/initial_size" "randomness/final_size" "randomness/hue_variation" + "randomness/anim_speed_scale" + "randomness/anim_initial_pos" "color_phases/count" "phase_0/pos" "phase_0/color" @@ -396,15 +402,15 @@ "playback/default_blend_time" "root/root" "anims/idle" - "anims/run" - "anims/standing_weapon_ready" - "anims/jumping_weapon" - "anims/crouch" "anims/jumping" - "anims/run_weapon" "anims/idle_weapon" - "anims/falling_weapon" + "anims/run" + "anims/crouch" "anims/falling" + "anims/standing_weapon_ready" + "anims/falling_weapon" + "anims/run_weapon" + "anims/jumping_weapon" "playback/active" "playback/speed" "blend_times" @@ -473,7 +479,8 @@ "node_count" 14 "variants" - + + "" True 1 False @@ -485,6 +492,7 @@ 1, -0, 0, 1.76469, 0.291992, -12.1587 1, -0, 0, 1, 0, 0 + 1 3 0 3 @@ -507,11 +515,17 @@ False "zoom" 2.272073 + "use_snap" + False "ofs" -181.946, -86.2812 + "snap" + 10 "3D" + "deflight_rot_y" + 0.628319 "zfar" 500 "fov" @@ -525,10 +539,12 @@ 0 "y_rot" 0 - "use_orthogonal" - False + "listener" + True "use_environment" False + "use_orthogonal" + False "pos" 0, 0, 0 @@ -539,10 +555,12 @@ 0 "y_rot" 0 - "use_orthogonal" + "listener" False "use_environment" False + "use_orthogonal" + False "pos" 0, 0, 0 @@ -553,10 +571,12 @@ 0 "y_rot" 0 - "use_orthogonal" + "listener" False "use_environment" False + "use_orthogonal" + False "pos" 0, 0, 0 @@ -567,10 +587,12 @@ 0 "y_rot" 0 - "use_orthogonal" + "listener" False "use_environment" False + "use_orthogonal" + False "pos" 0, 0, 0 @@ -579,12 +601,18 @@ 1 "default_light" True + "ambient_light_color" + 0.15, 0.15, 0.15, 1 "show_grid" True "show_origin" True "znear" 0.1 + "default_srgb" + False + "deflight_rot_x" + 0.942478 "__editor_run_settings__" @@ -595,14 +623,13 @@ 0 "__editor_plugin_screen__" - "3D" + "Script" 16 1, 1, 1, 1 0, 0, 0, 0 0.363636 - 1 20.7312, 3.21187 83.450417 4 @@ -654,7 +681,7 @@ "shoot" "nodes" - -1, -1, 1, 0, -1, 28, 2, 0, 3, 1, 4, 1, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 8, 12, 2, 13, 9, 14, 10, 15, 2, 16, 6, 17, 11, 18, 4, 19, 4, 20, 0, 21, 12, 22, 13, 23, 2, 24, 0, 25, 0, 26, 3, 27, 4, 28, 14, 29, 15, 0, 0, 0, 31, 30, -1, 18, 2, 0, 3, 1, 4, 1, 5, 2, 6, 3, 7, 4, 8, 5, 32, 16, 33, 0, 34, 3, 35, 2, 36, 2, 37, 6, 38, 17, 39, 12, 40, 18, 41, 2, 42, 19, 0, 1, 0, 44, 43, -1, 57, 2, 0, 3, 1, 4, 20, 5, 2, 45, 21, 6, 22, 7, 23, 8, 5, 46, 24, 47, 25, 48, 1, 49, 4, 50, 25, 51, 2, 52, 3, 53, 3, 54, 2, 55, 26, 56, 2, 57, 2, 58, 27, 59, 4, 60, 28, 61, 29, 62, 1, 63, 4, 64, 4, 65, 30, 66, 4, 67, 4, 68, 4, 69, 31, 70, 31, 71, 4, 72, 4, 73, 4, 74, 4, 75, 31, 76, 4, 77, 4, 78, 4, 79, 4, 80, 4, 81, 4, 82, 4, 83, 4, 84, 4, 85, 6, 86, 4, 87, 18, 88, 1, 89, 32, 90, 1, 91, 33, 92, 1, 93, 34, 94, 35, 0, 0, 0, 96, 95, -1, 17, 97, 21, 98, 4, 99, 36, 100, 37, 101, 38, 102, 39, 103, 40, 104, 41, 105, 42, 106, 43, 107, 44, 108, 45, 109, 46, 110, 0, 111, 31, 112, 47, 113, 48, 0, 0, 0, 115, 114, -1, 22, 2, 0, 3, 1, 4, 1, 5, 2, 6, 3, 7, 4, 8, 5, 33, 0, 116, 2, 117, 0, 118, 4, 119, 5, 120, 12, 121, 12, 122, 49, 123, 49, 124, 0, 125, 0, 126, 50, 127, 50, 128, 50, 129, 50, 0, 0, 0, 131, 130, -1, 7, 2, 0, 3, 1, 4, 1, 5, 2, 6, 51, 7, 4, 8, 5, 0, 0, 0, 132, 132, -1, 9, 2, 0, 3, 1, 4, 1, 5, 2, 6, 52, 7, 4, 8, 53, 133, 7, 134, 2, 0, 0, 0, 136, 135, -1, 14, 137, 13, 138, 54, 139, 4, 140, 1, 141, 4, 142, 4, 143, 4, 144, 55, 145, 55, 146, 55, 147, 55, 148, 6, 149, 4, 150, 4, 0, 0, 0, 151, 151, -1, 9, 2, 0, 3, 1, 4, 1, 5, 2, 6, 3, 7, 4, 8, 5, 152, 12, 153, 56, 0, 0, 0, 155, 154, -1, 4, 156, 12, 34, 3, 157, 4, 158, 5, 0, 9, 0, 160, 159, -1, 13, 2, 0, 3, 1, 4, 1, 5, 2, 6, 57, 7, 4, 8, 58, 161, 59, 162, 60, 163, 60, 164, 0, 165, 61, 166, 21, 0, 9, 0, 160, 167, -1, 13, 2, 0, 3, 1, 4, 1, 5, 2, 6, 62, 7, 4, 8, 58, 161, 63, 162, 60, 163, 60, 164, 0, 165, 64, 166, 21, 0, 9, 0, 160, 168, -1, 13, 2, 0, 3, 1, 4, 1, 5, 2, 6, 65, 7, 4, 8, 58, 161, 66, 162, 60, 163, 60, 164, 2, 165, 67, 166, 21, 0, 9, 0, 160, 169, -1, 13, 2, 0, 3, 1, 4, 1, 5, 2, 6, 68, 7, 4, 8, 58, 161, 69, 162, 60, 163, 60, 164, 2, 165, 70, 166, 21, 0 + -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 "conns" -- cgit v1.2.3