Compare commits

..

No commits in common. "a12e4e4c0b95c5ca4aacf207024e7dc8fe73aa0e" and "a32e99cf420ab1fcc564977b469102ee55044e66" have entirely different histories.

25 changed files with 136 additions and 176 deletions

BIN
icon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -59,11 +59,6 @@ _global_script_classes=[ {
"language": "GDScript",
"path": "res://addons/controller_icons/objects/TextureRect.gd"
}, {
"base": "SceneTree",
"class": "CreateIcon",
"language": "GDScript",
"path": "res://Neuer Ordner/CreateIcon.gd"
}, {
"base": "Actor",
"class": "Enemy",
"language": "GDScript",
@ -89,11 +84,6 @@ _global_script_classes=[ {
"language": "GDScript",
"path": "res://src/RayCasters/RayCaster.gd"
}, {
"base": "Reference",
"class": "ReplaceIcon",
"language": "GDScript",
"path": "res://Neuer Ordner/ReplaceIcon.gd"
}, {
"base": "Button",
"class": "SoundButton",
"language": "GDScript",
@ -115,13 +105,11 @@ _global_script_class_icons={
"ControllerSprite": "",
"ControllerSprite3D": "",
"ControllerTextureRect": "",
"CreateIcon": "",
"Enemy": "",
"GlobalStateResource": "",
"LevelTemplate": "",
"RayCastDebugLines": "",
"RayCaster": "",
"ReplaceIcon": "",
"SoundButton": "",
"StateMachine": ""
}
@ -130,8 +118,8 @@ _global_script_class_icons={
config/name="Blobby"
run/main_scene="res://src/UserInterface/Screens/MainMenu/MainScreen.tscn"
run/low_processor_mode=true
config/icon="res://icon.png"
config/windows_native_icon="res://icon.ico"
[audio]
@ -251,34 +239,34 @@ ui_end={
}
up={
"deadzone": 0.5,
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":87,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777232,"unicode":0,"echo":false,"script":null)
]
}
duck={
"deadzone": 0.5,
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":83,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777234,"unicode":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777231,"unicode":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777233,"unicode":0,"echo":false,"script":null)
]
}
jump={
@ -287,16 +275,16 @@ jump={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
}
run={
boost_move={
"deadzone": 0.5,
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":5,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null)
]
}
interact={
"deadzone": 0.5,
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":69,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
]
}
pause={
@ -328,6 +316,7 @@ ui_click={
common/physics_fps=120
2d/thread_model=0
2d/use_bvh=false
2d/cell_size=100
common/physics_interpolation=true
common/enable_object_picking=false
@ -337,11 +326,17 @@ common/enable_object_picking=false
2d/options/use_nvidia_rect_flicker_workaround=true
quality/intended_usage/framebuffer_allocation=0
quality/intended_usage/framebuffer_allocation.mobile=0
2d/snapping/use_gpu_pixel_snap=true
threads/thread_model=2
quality/reflections/texture_array_reflections=false
quality/reflections/high_quality_ggx=false
2d/options/use_software_skinning=false
gles3/shaders/shader_compilation_mode=2
gles3/shaders/shader_compilation_mode.mobile=2
gles3/shaders/shader_compilation_mode.web=2
2d/options/culling_mode=0
gles3/shaders/max_simultaneous_compiles.web=2
gles3/shaders/shader_cache_size_mb.mobile=256
gles3/shaders/shader_cache_size_mb.web=256
quality/depth/hdr=false
environment/default_environment="res://default_env.tres"
environment/2d/use_nvidia_rect_flicker_workaround=true

View File

@ -80,25 +80,29 @@ cast_to = Vector2( 3, 0 )
collision_mask = 8
[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]]
visible = false
modulate = Color( 0, 0.0392157, 1, 1 )
light_mask = 0
position = Vector2( 0, 5.23628 )
position = Vector2( 0, -6.44095 )
collision_layer = 2
input_pickable = false
monitorable = false
priority = 1.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"]
visible = false
position = Vector2( 0, -2.28618 )
shape = SubResource( 2 )
[node name="EnemySkin" type="Area2D" parent="."]
process_priority = -1
visible = false
collision_layer = 2
collision_mask = 127
input_pickable = false
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"]
visible = false
position = Vector2( 0, 3.49085 )
shape = SubResource( 3 )

View File

@ -257,7 +257,7 @@ cast_to = Vector2( 0, -1 )
collision_mask = 56
collide_with_areas = true
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["frogfood", "harmful"]]
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]]
position = Vector2( 0, -0.5 )
shape = SubResource( 1 )

View File

@ -11,7 +11,7 @@ func _ready() -> void:
# TODO Only moves when on screen
func execute_movement(delta: float) -> void:
func _physics_process(delta: float) -> void:
velocity.y += _gravity * delta
var player_direction := player_on_floor_direction()
if(player_direction != 0):

View File

@ -1,8 +1,7 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=6 format=2]
[ext_resource path="res://assets/enemy/VacuumRobot.png" type="Texture" id=1]
[ext_resource path="res://src/Actors/Enemies/Vacuum.gd" type="Script" id=2]
[ext_resource path="res://src/StateMachines/VacuumStateMachine.gd" type="Script" id=3]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 14, 7 )
@ -15,9 +14,8 @@ extents = Vector2( 15, 6.5 )
[node name="Vacuum" type="KinematicBody2D" groups=["harmful"]]
collision_layer = 2
collision_mask = 11
collision_mask = 9
script = ExtResource( 2 )
mass = 1.0
speed = 180
acceleration = 100
@ -72,9 +70,6 @@ collision_mask = 127
position = Vector2( 0, 5.5 )
shape = SubResource( 3 )
[node name="StateMachine" type="Node" parent="."]
script = ExtResource( 3 )
[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
[connection signal="area_entered" from="EnemySkin" to="." method="_on_EnemySkin_area_entered"]
[connection signal="body_entered" from="EnemySkin" to="." method="_on_EnemySkin_body_entered"]

View File

@ -517,7 +517,6 @@ func is_jump_path_safe(v: Vector2, pos: Vector2) -> bool:
abs(node_pos.x - pos.x) > abs(jump_distance) * 3
|| abs(node_pos.y - pos.y) > block_size * 4
|| abs(node_pos.x - pos.x) < 1
|| node.is_in_group("frogfood")
):
continue
var node_y = node_pos.y - block_size / 2.0

View File

@ -112,18 +112,6 @@ func get_savepoint(levelName: String) -> Vector2:
else:
return Vector2()
func was_level_touched(levelName: String) -> bool:
if OS.is_debug_build():
return true
if !gsr.progress_dict.has(levelName) || !gsr.progress_dict[levelName].has("touched"):
return false
return gsr.progress_dict[levelName]["touched"]
func touch_level(levelName: String) -> void:
if !gsr.progress_dict.has(levelName):
gsr.progress_dict[levelName] = {}
gsr.progress_dict[levelName]["touched"] = true
# TODO This is permanent immediatly
func set_wallet(value) -> void:

View File

@ -85,7 +85,7 @@ valign = 1
unique_name_in_owner = true
position = Vector2( 0, -6 )
scale = Vector2( 0.5, 0.5 )
collision_layer = 0
collision_layer = 24
monitorable = false
[node name="ActivatorAreaShape" type="CollisionShape2D" parent="ActivatorArea"]

View File

@ -93,7 +93,6 @@ volume_db = -22.0
bus = "Effects"
[node name="Area2D" type="Area2D" parent="."]
visible = false
collision_layer = 0
collision_mask = 3
monitorable = false

View File

@ -17,7 +17,6 @@ uniform int n_light_bands : hint_range(1, 13) = 7;
uniform bool will_smooth_shade = false;
uniform float band_decay_rate : hint_range(0.0, 1.0, 0.05) = 0.5;
uniform float light_strength_modifier : hint_range(0.0, 1.0) = 1.0;
uniform float bits = 1.;
varying vec2 world_position;
@ -40,11 +39,7 @@ void fragment() {
// Get the data for this light source as passed in via texture
vec4 texel = texelFetch(light_data, ivec2(i, 0), 0);
vec2 texel_pos = (viewport_transform * (global_transform * vec4(texel.xy, 0.0, 1.0))).xy;
float x_bits = bits / TEXTURE_PIXEL_SIZE.x;
float y_bits = bits / TEXTURE_PIXEL_SIZE.y;
float pixelized_x = floor(texel_pos.x * x_bits)/x_bits + 0.5/x_bits;
float pixelized_y = floor(texel_pos.y * y_bits)/y_bits + 0.5/y_bits;
texel_pos = vec2(pixelized_x, pixelized_y);
vec2 texel_pos2 = texel.xy;
// How far the light source extends
float radius = texel.a;
@ -97,7 +92,6 @@ shader_param/default_light_color = null
shader_param/light_level = 0.0
shader_param/offset_modifier = 1.0
shader_param/n_light_bands = 7
shader_param/will_smooth_shade = true
shader_param/will_smooth_shade = false
shader_param/band_decay_rate = 0.5
shader_param/light_strength_modifier = 1.0
shader_param/bits = 1.0

View File

@ -1226,7 +1226,7 @@ visible = false
position = Vector2( -154, 14 )
texture = ExtResource( 36 )
script = ExtResource( 9 )
color = Color( 1, 0, 0, 0.321569 )
color = Color( 1, 0, 0, 0.615686 )
[node name="Emitter4" type="Sprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer4" groups=["light"]]
visible = false

View File

@ -1172,6 +1172,9 @@ jump_buffer_filled = null
death_sound_1 = null
death_sound_2 = null
[node name="BlobbySprite" parent="Blobby" index="5"]
frame = 10
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
parameters/playback = SubResource( 6 )
parameters/jumpStretching/blend_position = 1
@ -1256,7 +1259,7 @@ position = Vector2( 6, -6 )
[node name="TutorialComboThingy" parent="." instance=ExtResource( 13 )]
visible = false
position = Vector2( 1115, 4 )
action1 = "run"
action1 = "boost_move"
action2 = "move_right"
press_limit = 2

View File

@ -236,6 +236,9 @@ unique_name_in_owner = true
position = Vector2( -180, 113 )
scale = Vector2( 0.878906, 0.936025 )
[node name="BlobbySprite" parent="Blobby" index="5"]
frame = 7
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
parameters/playback = SubResource( 6 )
@ -277,7 +280,7 @@ position = Vector2( 369, -300 )
elevator_time = 10
[node name="Portal" parent="." instance=ExtResource( 9 )]
position = Vector2( 712, 48 )
position = Vector2( 716, 48 )
next_scene = "res://src/Levels/Level 0.4.tscn"
[node name="FlyingPlatform2" parent="." instance=ExtResource( 15 )]
@ -299,7 +302,7 @@ y_target = 112
[node name="TutorialComboThingy" parent="." instance=ExtResource( 6 )]
visible = false
position = Vector2( 276, -35 )
action1 = "run"
action1 = "boost_move"
action2 = "jump"
goal_state = "runToJump"
tutorial_text = "Move and press to runjump:"
@ -317,7 +320,7 @@ position = Vector2( -10, 75 )
[node name="TutorialComboThingy2" parent="." instance=ExtResource( 6 )]
visible = false
position = Vector2( 381, -230 )
action1 = "run"
action1 = "boost_move"
action2 = "jump"
goal_state = "runToJump"
tutorial_text = "Move and press to runjump:"
@ -340,7 +343,6 @@ position = Vector2( -61, 100 )
[node name="ShaderGrass7" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( -55, 98 )
z_index = -1
[node name="ShaderGrass9" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( -41, 100 )
@ -418,7 +420,6 @@ position = Vector2( 511, 100 )
[node name="ShaderGrass5" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 517, 97 )
z_index = -1
[node name="ShaderGrass6" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 503, 100 )
@ -628,7 +629,6 @@ position = Vector2( 556, 100 )
[node name="ShaderGrass99" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 554, 97 )
z_index = -1
[node name="ShaderGrass100" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 589, 100 )
@ -660,7 +660,6 @@ position = Vector2( 614, 100 )
[node name="ShaderGrass109" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 612, 97 )
z_index = -1
[node name="ShaderGrass110" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 647, 100 )
@ -682,7 +681,6 @@ position = Vector2( 57, 100 )
[node name="ShaderGrass23" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 63, 98 )
z_index = -1
[node name="ShaderGrass24" parent="Decor" instance=ExtResource( 4 )]
position = Vector2( 77, 100 )

View File

@ -12,7 +12,7 @@
[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=10]
[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=11]
[ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=12]
[ext_resource path="res://src/Actors/Enemies/Vacuum.tscn" type="PackedScene" id=13]
[ext_resource path="res://src/Actors/Enemies/SimpleEnemy.tscn" type="PackedScene" id=13]
[ext_resource path="res://src/Platforms/FlyingPlatform.tscn" type="PackedScene" id=14]
[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=15]
[ext_resource path="res://src/Actors/Friendlies/BoundFrog.tscn" type="PackedScene" id=16]
@ -128,11 +128,11 @@ drag_margin_bottom = 0.3
[node name="Blobby" parent="." instance=ExtResource( 11 )]
unique_name_in_owner = true
position = Vector2( -32, 0 )
position = Vector2( -64, -1.90735e-06 )
scale = Vector2( 0.878906, 0.936025 )
[node name="BlobbySprite" parent="Blobby" index="5"]
frame = 9
frame = 7
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
parameters/playback = SubResource( 6 )
@ -198,6 +198,12 @@ next_scene = "res://src/Levels/Level 3.tscn"
position = Vector2( 1248, 16 )
rotation = 1.57079
[node name="SimpleEnemy" parent="." instance=ExtResource( 13 )]
position = Vector2( 16, -207 )
[node name="SimpleEnemy2" parent="." instance=ExtResource( 13 )]
position = Vector2( 336, -206 )
[node name="Spikes" parent="." instance=ExtResource( 20 )]
position = Vector2( 447, 176 )
@ -291,14 +297,6 @@ position = Vector2( 857, -272 )
[node name="Coin3" parent="." instance=ExtResource( 21 )]
position = Vector2( 216, -272 )
[node name="Vacuum" parent="." instance=ExtResource( 13 )]
position = Vector2( 413, -204 )
killable = false
[node name="Vacuum2" parent="." instance=ExtResource( 13 )]
position = Vector2( 44, -204 )
killable = false
[connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"]
[connection signal="button_pushed" from="FrogFreeButton" to="BoundFrog" method="_on_FrogFreeButton_pushed"]

View File

@ -1011,7 +1011,7 @@ position = Vector2( -88, 96 )
scale = Vector2( 0.878906, 0.936025 )
[node name="BlobbySprite" parent="Blobby" index="5"]
frame = 5
frame = 7
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
parameters/playback = SubResource( 6 )
@ -1234,7 +1234,6 @@ next_scene = "res://src/Levels/Level 4.tscn"
[node name="BoundFrog" parent="." instance=ExtResource( 56 )]
position = Vector2( 203, -45 )
movement_radius = 9
[node name="FrogFreeButton" parent="." instance=ExtResource( 59 )]
position = Vector2( 408, -272 )
@ -1275,5 +1274,3 @@ format = 1
[editable path="UserInterface"]
[editable path="UserInterface/HUD"]
[editable path="Blobby"]
[editable path="BoundFrog"]
[editable path="BoundFrog/RopeAnchor"]

View File

@ -6,37 +6,25 @@ extends Node2D
# var b: String = "text"
export var is_armed = false
var trigger_zone_entered: bool = false
func _ready() -> void:
if(!is_armed):
if($HarmfulArea.is_in_group("harmful")):
$HarmfulArea.remove_from_group("harmful")
$Area2D.remove_from_group("harmful")
$Sprite/AnimationPlayer.play("unarmed")
else:
$HarmfulArea.add_to_group("harmful")
$Area2D.add_to_group("harmful")
$Sprite/AnimationPlayer.play("armed")
func _on_Area2D_area_exited(area: Area2D) -> void:
if(area.is_in_group("player")):
$Timer.start()
func _on_Timer_timeout() -> void:
is_armed = true
$HarmfulArea.add_to_group("harmful")
$Area2D.add_to_group("harmful")
$Sprite/AnimationPlayer.play("arming")
func _on_AnimationPlayer_animation_finished(anim_name: String) -> void:
if(anim_name == "arming"):
$Sprite/AnimationPlayer.play("armed")
func _on_DetectionArea_area_exited(area: Area2D) -> void:
if(area.is_in_group("player") && !$HarmfulArea.is_in_group("harmful")
&& trigger_zone_entered):
$Timer.start()
trigger_zone_entered = false
func _on_HarmfulArea_area_entered(area: Area2D) -> void:
if(area.is_in_group("player")):
trigger_zone_entered = true

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://assets/obstacle object/SpikyMinePlant.png" type="Texture" id=1]
[ext_resource path="res://src/ObstacleObjects/Mine.gd" type="Script" id=2]
@ -17,6 +17,18 @@ tracks/0/keys = {
"update": 0,
"values": [ 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 4.0 ]
}
[sub_resource type="Animation" id=8]
resource_name = "armed"
@ -34,6 +46,18 @@ tracks/0/keys = {
"update": 1,
"values": [ 22, 23, 24, 25, 26, 27, 28, 29 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 7.0 ]
}
[sub_resource type="Animation" id=6]
resource_name = "arming"
@ -50,6 +74,18 @@ tracks/0/keys = {
"update": 1,
"values": [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.00519588, 0.698901 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ 4.0, 7.0 ]
}
[sub_resource type="Animation" id=3]
resource_name = "unarmed"
@ -67,14 +103,22 @@ tracks/0/keys = {
"update": 1,
"values": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 4.0 ]
}
[sub_resource type="CircleShape2D" id=12]
[sub_resource type="CircleShape2D" id=7]
resource_local_to_scene = true
radius = 6.0
[sub_resource type="CircleShape2D" id=9]
resource_local_to_scene = true
radius = 9.0
radius = 4.0
[node name="Mine" type="Node2D"]
script = ExtResource( 2 )
@ -91,23 +135,16 @@ anims/armed = SubResource( 8 )
anims/arming = SubResource( 6 )
anims/unarmed = SubResource( 3 )
[node name="HarmfulArea" type="Area2D" parent="."]
[node name="Area2D" type="Area2D" parent="."]
collision_layer = 64
[node name="CollisionShape2D" type="CollisionShape2D" parent="HarmfulArea"]
shape = SubResource( 12 )
[node name="DetectionArea" type="Area2D" parent="."]
collision_layer = 64
[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea"]
shape = SubResource( 9 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 7 )
[node name="Timer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true
[connection signal="animation_finished" from="Sprite/AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
[connection signal="area_entered" from="HarmfulArea" to="." method="_on_HarmfulArea_area_entered"]
[connection signal="area_exited" from="DetectionArea" to="." method="_on_DetectionArea_area_exited"]
[connection signal="area_exited" from="Area2D" to="." method="_on_Area2D_area_exited"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

View File

@ -189,7 +189,7 @@ func _get_transition(_delta):
elif abs(parent.velocity.x) > 5:
was_coyote_hanging = false
if Input.is_action_pressed("run"):
if Input.is_action_pressed("boost_move"):
new_state = states.run
# TODO Walking when stopping and not pressing anything?
else:

View File

@ -1,32 +0,0 @@
extends StateMachine
func _ready() -> void:
add_state("darting")
state = states.darting
set_state(states.darting)
for state in states:
if state_matching_method_exists(state):
continue
else:
printerr("StateMachine -> State: " + state + " has no matching method in parent.")
push_error("StateMachine -> State: " + state + " has no matching method in parent.")
# _animation_logic()
# Game logic consequences of state
func _state_logic(delta):
#var state_action_ref = funcref(parent, self.state)
#parent.velocity = state_action_ref.call_func()
parent.execute_movement(delta)
func _get_transition(_delta):
return null
func _enter_state(_new_state, _previous_state):
pass
func _exit_state(_previous_state, _new_state):
pass

View File

@ -1,6 +1,6 @@
extends AudibleButton
export(String, FILE) var next_scene_path: String = "res://src/Levels/Level 0.1.tscn"
export(String, FILE) var next_scene_path: String = ""
onready var selected_level_base_path: String = "res://src/Levels/"
func _on_button_up() -> void:

View File

@ -38,8 +38,6 @@ func _fill_level_list():
func _spawn_level_options(levels: Array):
var first = true
for level in levels:
if !GlobalState.was_level_touched(LEVELS_PATH + level) && !first:
continue
var level_check_box = LEVEL_CHECK_BOX.instance()
vbox.add_child(level_check_box)
level_check_box.initialize_with_progress(LEVELS_PATH + level)

View File

@ -1,6 +1,6 @@
extends Node2D
export var action1 = "move_right"
export var action2 = "run"
export var action2 = "boost_move"
export var goal_state = ""
export var tutorial_text = ""
export var velocity = Vector2(0.309,0.309)

View File

@ -13,7 +13,6 @@ var is_dead := false setget set_dead
var level_time := 0.0
func _ready() -> void:
GlobalState.touch_level(levelName)
GlobalState.gsr.last_played_level = levelName
SaveManager.save_default()
signal_manager.connect("level_completed", self, "_on_level_completed")