Smart Frog, No Air-Dash
This commit is contained in:
parent
7ea7a346ea
commit
b83804b0c3
@ -327,7 +327,7 @@ func calculate_wallslide_velocity(
|
|||||||
linear_velocity.y = PhysicsFunc.two_step_euler(
|
linear_velocity.y = PhysicsFunc.two_step_euler(
|
||||||
linear_velocity.y*0.94, _gravity * mass, mass, delta
|
linear_velocity.y*0.94, _gravity * mass, mass, delta
|
||||||
)
|
)
|
||||||
air_strafe_charges = 1
|
air_strafe_charges = air_strafe_charges + 1 if max_air_strafe_charges > air_strafe_charges else 0
|
||||||
return linear_velocity.rotated(rotation)
|
return linear_velocity.rotated(rotation)
|
||||||
|
|
||||||
|
|
||||||
@ -413,6 +413,7 @@ func die() -> void:
|
|||||||
$BlobbySprite/AnimationTree.active = false
|
$BlobbySprite/AnimationTree.active = false
|
||||||
$BlobbySprite/BlobbymationPlayer.play("dying3")
|
$BlobbySprite/BlobbymationPlayer.play("dying3")
|
||||||
|
|
||||||
|
# TODO Checkpoint system
|
||||||
func respawn() -> void:
|
func respawn() -> void:
|
||||||
get_tree().reload_current_scene()
|
get_tree().reload_current_scene()
|
||||||
|
|
||||||
@ -429,7 +430,7 @@ func _on_Blobby_got_grounded() -> void:
|
|||||||
floor_friction = floor_object.slide_friction
|
floor_friction = floor_object.slide_friction
|
||||||
else:
|
else:
|
||||||
floor_friction = base_floor_friction
|
floor_friction = base_floor_friction
|
||||||
air_strafe_charges = 1
|
air_strafe_charges = air_strafe_charges + 1 if max_air_strafe_charges > air_strafe_charges else 0
|
||||||
|
|
||||||
|
|
||||||
func _on_GameplaySignalManager_getback_timer_up() -> void:
|
func _on_GameplaySignalManager_getback_timer_up() -> void:
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.8 KiB |
@ -1,35 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Blobby.png-42eed5028ccb56a7415a0793b79ec61e.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://src/Actors/Blobby/Blobby.png"
|
|
||||||
dest_files=[ "res://.import/Blobby.png-42eed5028ccb56a7415a0793b79ec61e.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=false
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=false
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=false
|
|
||||||
svg/scale=1.0
|
|
||||||
@ -215,7 +215,7 @@ func _enter_state(new_state, old_state):
|
|||||||
anim_state_playback.travel("wallsliding")
|
anim_state_playback.travel("wallsliding")
|
||||||
|
|
||||||
|
|
||||||
func _exit_state(old_state, new_state):
|
func _exit_state(_old_state, _new_state):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func _set_blendspaces_direction(value):
|
func _set_blendspaces_direction(value):
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 615 B |
@ -1,35 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Layer 1.png-0b67f940a501a482178a05e168cce974.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://src/Actors/Blobby/Layer 1.png"
|
|
||||||
dest_files=[ "res://.import/Layer 1.png-0b67f940a501a482178a05e168cce974.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=false
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=false
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=false
|
|
||||||
svg/scale=1.0
|
|
||||||
@ -97,6 +97,8 @@ func _adapt_to_movement(velocity: Vector2) -> void:
|
|||||||
var center = get_camera_screen_center()
|
var center = get_camera_screen_center()
|
||||||
var left_edge_pos = center.x - screen_rect.x/2 + camera_horizontal_shift
|
var left_edge_pos = center.x - screen_rect.x/2 + camera_horizontal_shift
|
||||||
var right_edge_pos = center.x + screen_rect.x/2 - camera_horizontal_shift
|
var right_edge_pos = center.x + screen_rect.x/2 - camera_horizontal_shift
|
||||||
|
# TODO: Blobby can go off screen, when shifting camera at level edge and returning i
|
||||||
|
# n the opposite direction slowly
|
||||||
if(move_time >= offset_adapt_seconds && !anim_player.is_playing()):
|
if(move_time >= offset_adapt_seconds && !anim_player.is_playing()):
|
||||||
target_offset.x = camera_horizontal_shift * sign(velocity.x)
|
target_offset.x = camera_horizontal_shift * sign(velocity.x)
|
||||||
if(offset == target_offset ||
|
if(offset == target_offset ||
|
||||||
@ -112,7 +114,6 @@ func _adapt_to_movement(velocity: Vector2) -> void:
|
|||||||
var new_limit_left = original_limit_left + camera_horizontal_shift
|
var new_limit_left = original_limit_left + camera_horizontal_shift
|
||||||
shiftLeft.track_set_key_value(limit_left_track, 0, limit_left)
|
shiftLeft.track_set_key_value(limit_left_track, 0, limit_left)
|
||||||
shiftLeft.track_set_key_value(limit_left_track, 1, new_limit_left)
|
shiftLeft.track_set_key_value(limit_left_track, 1, new_limit_left)
|
||||||
print("shiftleft")
|
|
||||||
anim_player.play("shiftingLeft")
|
anim_player.play("shiftingLeft")
|
||||||
else:
|
else:
|
||||||
offset_track = shiftRight.find_track(".:offset")
|
offset_track = shiftRight.find_track(".:offset")
|
||||||
@ -123,7 +124,6 @@ func _adapt_to_movement(velocity: Vector2) -> void:
|
|||||||
var new_limit_right = original_limit_right - camera_horizontal_shift
|
var new_limit_right = original_limit_right - camera_horizontal_shift
|
||||||
shiftRight.track_set_key_value(limit_right_track, 0, limit_right)
|
shiftRight.track_set_key_value(limit_right_track, 0, limit_right)
|
||||||
shiftRight.track_set_key_value(limit_right_track, 1, new_limit_right)
|
shiftRight.track_set_key_value(limit_right_track, 1, new_limit_right)
|
||||||
print("shiftright")
|
|
||||||
anim_player.play("shiftingRight")
|
anim_player.play("shiftingRight")
|
||||||
elif(slow_time >= offset_reset_seconds):
|
elif(slow_time >= offset_reset_seconds):
|
||||||
target_offset.x = 0
|
target_offset.x = 0
|
||||||
@ -145,7 +145,6 @@ func _adapt_to_movement(velocity: Vector2) -> void:
|
|||||||
shiftCenter.track_set_key_value(limit_right_track, 1,original_limit_right)
|
shiftCenter.track_set_key_value(limit_right_track, 1,original_limit_right)
|
||||||
shiftCenter.track_set_key_value(limit_top_track, 1, original_limit_top)
|
shiftCenter.track_set_key_value(limit_top_track, 1, original_limit_top)
|
||||||
shiftCenter.track_set_key_value(limit_bottom_track, 1, original_limit_bottom)
|
shiftCenter.track_set_key_value(limit_bottom_track, 1, original_limit_bottom)
|
||||||
print("shiftcenter")
|
|
||||||
anim_player.play("shiftingCenter")
|
anim_player.play("shiftingCenter")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@ -40,18 +40,5 @@ func _on_WhatAreFrog_child_exiting_tree(_node:Node) -> void:
|
|||||||
rope.rope_start_joint = anchor.get_node("cshape/pjoint")
|
rope.rope_start_joint = anchor.get_node("cshape/pjoint")
|
||||||
rope.spawn_rope(anchor.global_position, $RopeAnchor.global_position, movement_radius, false)
|
rope.spawn_rope(anchor.global_position, $RopeAnchor.global_position, movement_radius, false)
|
||||||
is_first_signal = false
|
is_first_signal = false
|
||||||
# rope.rope_start = anchor
|
|
||||||
# anchor.global_position = rope.rope_start_joint.global_position
|
|
||||||
# rope.rope_start_joint = anchor.get_node("cshape/pjoint")
|
|
||||||
# rope.rope_pieces[0] = anchor
|
|
||||||
# var first_piece = rope.rope_pieces[1]
|
|
||||||
# rope.rope_start_joint.node_a = anchor.get_path
|
|
||||||
# rope.rope_start_joint.node_b = first_piece.get_path()
|
|
||||||
# first_piece.get_node("cshape/pjoint").node_b = anchor.get_path()
|
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
# var lastPiecePath: NodePath = $WhatAreFrog/cshape/pjoint.node_b
|
|
||||||
# print(lastPiecePath)
|
|
||||||
# var lastPiece: Node = get_node(lastPiecePath)
|
|
||||||
# print(lastPiece)
|
|
||||||
# lastPiece.get_node("cshape/pjoint").node_a = anchor.get_path()
|
|
||||||
|
|||||||
@ -5,13 +5,16 @@
|
|||||||
[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.gd" type="Script" id=3]
|
[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.gd" type="Script" id=3]
|
||||||
|
|
||||||
[node name="BoundFrog" type="Node2D"]
|
[node name="BoundFrog" type="Node2D"]
|
||||||
|
position = Vector2( 0, -1 )
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
movement_radius = 7
|
movement_radius = 7
|
||||||
|
|
||||||
[node name="WhatAreFrog" parent="." instance=ExtResource( 1 )]
|
[node name="WhatAreFrog" parent="." instance=ExtResource( 1 )]
|
||||||
|
position = Vector2( 0, 1 )
|
||||||
|
|
||||||
[node name="RopeAnchor" parent="." instance=ExtResource( 2 )]
|
[node name="RopeAnchor" parent="." instance=ExtResource( 2 )]
|
||||||
position = Vector2( -80, 9 )
|
position = Vector2( -80, 6 )
|
||||||
|
scale = Vector2( 1.00167, 1 )
|
||||||
|
|
||||||
[connection signal="child_exiting_tree" from="WhatAreFrog" to="." method="_on_WhatAreFrog_child_exiting_tree"]
|
[connection signal="child_exiting_tree" from="WhatAreFrog" to="." method="_on_WhatAreFrog_child_exiting_tree"]
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@ export var vision_distance := 6.0
|
|||||||
var movement_radius: float
|
var movement_radius: float
|
||||||
var anchor: Node2D
|
var anchor: Node2D
|
||||||
var is_bound := false
|
var is_bound := false
|
||||||
|
var has_reversed := false
|
||||||
|
|
||||||
var target: Object = null
|
var target: Object = null
|
||||||
|
|
||||||
@ -83,10 +84,7 @@ func searching() -> Vector2:
|
|||||||
|
|
||||||
if(is_on_floor()):
|
if(is_on_floor()):
|
||||||
if(jump_timer.is_stopped()):
|
if(jump_timer.is_stopped()):
|
||||||
if(target != null):
|
jump_timer.start(rand_range(0.3,1.666))
|
||||||
jump_timer.start(rand_range(0.3,1))
|
|
||||||
else:
|
|
||||||
jump_timer.start(rand_range(0.3,3.333))
|
|
||||||
if(in_air):
|
if(in_air):
|
||||||
in_air = false
|
in_air = false
|
||||||
#print("Jump distance: ",global_position.x - start_x)
|
#print("Jump distance: ",global_position.x - start_x)
|
||||||
@ -99,10 +97,30 @@ func searching() -> Vector2:
|
|||||||
|
|
||||||
return velocity
|
return velocity
|
||||||
|
|
||||||
|
func hunting() -> Vector2:
|
||||||
|
detect_player()
|
||||||
|
|
||||||
|
if(is_on_floor()):
|
||||||
|
if(jump_timer.is_stopped()):
|
||||||
|
#TODO Make normal distribution
|
||||||
|
jump_timer.start(rand_range(0.3,0.7))
|
||||||
|
if(in_air):
|
||||||
|
in_air = false
|
||||||
|
#print("Jump distance: ",global_position.x - start_x)
|
||||||
|
else:
|
||||||
|
if(!in_air):
|
||||||
|
start_x = global_position.x
|
||||||
|
reversing_possible_searching = true
|
||||||
|
jump_timer.stop()
|
||||||
|
in_air = true
|
||||||
|
|
||||||
|
return velocity
|
||||||
|
|
||||||
func detect_player() -> void:
|
func detect_player() -> void:
|
||||||
var player
|
var player
|
||||||
if(!players.empty()):
|
if(players.empty()):
|
||||||
|
print("no player found")
|
||||||
|
return
|
||||||
player = players[0]
|
player = players[0]
|
||||||
vision_raycast.cast_to = (player.global_position - global_position).normalized() * 24 * vision_distance
|
vision_raycast.cast_to = (player.global_position - global_position).normalized() * 24 * vision_distance
|
||||||
var ray_angle_to_facing = vision_raycast.cast_to.angle_to(orientation.cast_to)
|
var ray_angle_to_facing = vision_raycast.cast_to.angle_to(orientation.cast_to)
|
||||||
@ -127,13 +145,15 @@ func lose_target() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func jump():
|
func jump():
|
||||||
var v: Vector2 = velocity_for_jump_distance()
|
# Calculate jump velocity with distance and angle
|
||||||
var jump_height = (pow(v.length(), 2) * pow(sin(deg2rad(65)),2))/(2*_gravity)
|
# Check if is bound
|
||||||
#print("Jump height: ", jump_height)
|
# Reverse the calculated x velocity if rope is short or there is a wall
|
||||||
velocity = v
|
print("jump")
|
||||||
|
has_reversed = false
|
||||||
|
var v: Vector2 = velocity_for_jump_distance(2 * 24, deg2rad(70))
|
||||||
|
|
||||||
if(is_bound):
|
if(is_bound):
|
||||||
var next_position = global_position + velocity * get_facing_direction() * current_delta
|
var next_position = global_position + v * get_facing_direction() * current_delta
|
||||||
var current_distance = global_position.distance_to(anchor.global_position)
|
var current_distance = global_position.distance_to(anchor.global_position)
|
||||||
var new_distance = next_position.distance_to(anchor.global_position)
|
var new_distance = next_position.distance_to(anchor.global_position)
|
||||||
#print(current_distance)
|
#print(current_distance)
|
||||||
@ -146,24 +166,133 @@ func jump():
|
|||||||
elif (($Left_Wallcast.is_colliding() || $Right_Wallcast.is_colliding()) && can_reverse_facing_direction()):
|
elif (($Left_Wallcast.is_colliding() || $Right_Wallcast.is_colliding()) && can_reverse_facing_direction()):
|
||||||
reverse_facing_direction()
|
reverse_facing_direction()
|
||||||
|
|
||||||
if sign(velocity.x) != get_facing_direction():
|
v = correct_jump_direction(v)
|
||||||
velocity.x *= -1
|
#TODO Consider distance to wall
|
||||||
|
# Will jump on top? If not, is spike under?
|
||||||
|
v = consider_jump_landing_space(v)
|
||||||
|
v = consider_jump_headspace(v)
|
||||||
|
#TODO Consider distance to wall, measure height of wall and seek angle for jumping on top
|
||||||
|
velocity = v
|
||||||
|
|
||||||
$CeilingRayCast.cast_to = Vector2(1.5*24 * get_facing_direction(), - jump_height)
|
func correct_jump_direction(v: Vector2) -> Vector2:
|
||||||
|
if sign(v.x) != get_facing_direction():
|
||||||
|
v.x *= -1
|
||||||
|
return v
|
||||||
|
|
||||||
|
# Cast a ray to the highest point of the jump
|
||||||
|
# Check the highest point for collision
|
||||||
|
# Calculate safe jump height and then a safe jump velocity
|
||||||
|
func consider_jump_headspace(v: Vector2) -> Vector2:
|
||||||
|
var height = calculate_jump_height(v)
|
||||||
|
var distance = calculate_jump_distance(v)
|
||||||
|
# Half distance is an estimate of the jumps apex()
|
||||||
|
$CeilingRayCast.cast_to = Vector2(get_facing_direction()*(distance/2), - height)
|
||||||
|
$CeilingRayCast.force_raycast_update()
|
||||||
|
var height_collider = $CeilingRayCast.get_collider()
|
||||||
|
if(height_collider != null):
|
||||||
|
# check half jump height
|
||||||
|
var half_height_v = jump_height_to_velocity(height/2, v)
|
||||||
|
var half_height = calculate_jump_height(half_height_v)
|
||||||
|
$CeilingRayCast.cast_to = Vector2(get_facing_direction()*(distance/2), - half_height)
|
||||||
|
$CeilingRayCast.force_raycast_update()
|
||||||
|
height_collider = $CeilingRayCast.get_collider()
|
||||||
|
if(height_collider != null && can_reverse_facing_direction()):
|
||||||
|
print("no safe height for frog jump")
|
||||||
|
#TODO Consider jumping ontop of target
|
||||||
|
reverse_facing_direction()
|
||||||
|
return Vector2(0,0)
|
||||||
|
else:
|
||||||
|
var collision_point = $CeilingRayCast.get_collision_point()
|
||||||
|
#TODO Consider sprite size for height
|
||||||
|
var target_height = collision_point.y - $CeilingRayCast.global_position.y
|
||||||
|
v = jump_height_to_velocity(abs(target_height), v)
|
||||||
|
return v
|
||||||
|
|
||||||
|
# Check the block in jump distance for danger or height
|
||||||
|
# If danger check neighboring blocks: if still danger, then jump closer (or jump over)
|
||||||
|
# If height move to distance which allows 1 block high jump
|
||||||
|
# TODO See if jump would land on ground before spike
|
||||||
|
func consider_jump_landing_space(v: Vector2) -> Vector2:
|
||||||
|
v = jump_to_tile_center(v)
|
||||||
|
if(!is_jump_path_safe(v, global_position)):
|
||||||
|
# print("would land in spikes")
|
||||||
|
v = jump_distance_to_velocity(calculate_jump_distance(v) - 24, v)
|
||||||
|
v = correct_jump_direction(v)
|
||||||
|
# print("next best distance")
|
||||||
|
# print(calculate_jump_distance(v))
|
||||||
|
if(!is_jump_path_safe(v, global_position) && can_reverse_facing_direction()):
|
||||||
|
print("cant jump over spikes")
|
||||||
|
reverse_facing_direction()
|
||||||
|
return Vector2(0,0)
|
||||||
|
return v
|
||||||
|
|
||||||
|
func jump_to_tile_center(v: Vector2) -> Vector2:
|
||||||
|
var distance = stepify(calculate_jump_distance(v), 0.01)
|
||||||
|
if !is_equal_approx(fmod(abs(global_position.x + distance * get_facing_direction()), 24), 12):
|
||||||
|
print(distance)
|
||||||
|
print(global_position.x + distance)
|
||||||
|
print(fmod((global_position.x + distance), 24))
|
||||||
|
var new_distance = distance
|
||||||
|
if(get_facing_direction() < 0):
|
||||||
|
new_distance = fmod((global_position.x + distance), 24) - 12 + distance
|
||||||
|
else:
|
||||||
|
new_distance = distance + 12 - fmod((global_position.x + distance), 24)
|
||||||
|
print("centering distance")
|
||||||
|
print(new_distance)
|
||||||
|
v = jump_distance_to_velocity(abs(new_distance), v)
|
||||||
|
v = correct_jump_direction(v)
|
||||||
|
return v
|
||||||
|
|
||||||
|
func is_jump_path_safe(v: Vector2, pos: Vector2) -> bool:
|
||||||
|
var v0 = v.length()
|
||||||
|
var angle = v.angle()
|
||||||
|
var jump_distance = calculate_jump_distance(v)
|
||||||
|
var harmful_nodes = get_tree().get_nodes_in_group("harmful")
|
||||||
|
# print("calculate landing spot safety")
|
||||||
|
for node in harmful_nodes:
|
||||||
|
var node_pos = node.global_position
|
||||||
|
if abs(node_pos.x - pos.x) > abs(jump_distance) * 3 || abs(node_pos.x - pos.x) < 1:
|
||||||
|
continue
|
||||||
|
var node_y = node_pos.y - 12
|
||||||
|
var initial_throw_height = node_y - global_position.y - 9
|
||||||
|
var term1 = (pow(v0, 2) * sin(2 * angle)) / (2 * _gravity)
|
||||||
|
var term2 = ((v0 * cos(angle))/_gravity) * sqrt(pow(v0, 2) * pow(sin(angle), 2) + 2 * _gravity * initial_throw_height)
|
||||||
|
var distance = abs(term1) + abs(term2)
|
||||||
|
# print("distance to next spike")
|
||||||
|
# print(pos.x + sign(v.x) * distance - node_pos.x)
|
||||||
|
if(abs(pos.x + sign(v.x) * distance - node_pos.x) < 12):
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
|
func calculate_jump_height(v: Vector2) -> float:
|
||||||
|
return abs((pow(v.length(), 2) * pow(sin(v.angle()), 2))/(2*_gravity))
|
||||||
|
|
||||||
|
# Only works for jumps on straight ground
|
||||||
|
func calculate_jump_distance(v: Vector2) -> float:
|
||||||
|
return abs((pow(v.length(), 2) * sin(-1 * 2 * v.angle()))/(_gravity))
|
||||||
|
|
||||||
|
func jump_height_to_velocity(target_height: float, v: Vector2) -> Vector2:
|
||||||
|
var initial_height = calculate_jump_height(v)
|
||||||
|
return v.normalized() * sqrt(pow(v.length(),2)/(initial_height/target_height))
|
||||||
|
|
||||||
|
#TODO Ähh Öhh das ist iwie doppelt ne
|
||||||
|
func jump_distance_to_velocity(target_distance: float, v: Vector2) -> Vector2:
|
||||||
|
var initial_distance = calculate_jump_distance(v)
|
||||||
|
return v.normalized() * sqrt(pow(v.length(),2)/(initial_distance/target_distance))
|
||||||
|
|
||||||
func velocity_for_jump_distance(distance: float = 3*24, angle: float = deg2rad(65)) -> Vector2:
|
func velocity_for_jump_distance(distance: float = 3*24, angle: float = deg2rad(65)) -> Vector2:
|
||||||
var abs_velocity = sqrt((distance * _gravity)/sin(2*angle))
|
var abs_velocity = sqrt((distance * _gravity)/sin(2*angle))
|
||||||
return Vector2(abs_velocity,0).rotated(-1*angle)
|
return Vector2(abs_velocity,0).rotated(-1*angle)
|
||||||
|
|
||||||
|
|
||||||
func can_reverse_facing_direction() -> bool:
|
func can_reverse_facing_direction() -> bool:
|
||||||
if(is_on_floor()):
|
if(is_on_floor() && !has_reversed):
|
||||||
return true
|
return true
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
|
||||||
func reverse_facing_direction() -> void:
|
func reverse_facing_direction() -> void:
|
||||||
|
has_reversed = true
|
||||||
print("reversing direction")
|
print("reversing direction")
|
||||||
orientation.cast_to.x *= -1
|
orientation.cast_to.x *= -1
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=4]
|
[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=4]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 2.72463, 1.17848 )
|
extents = Vector2( 11, 4.5 )
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=2]
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
extents = Vector2( 13, 5.12039 )
|
extents = Vector2( 13, 5.12039 )
|
||||||
@ -37,21 +37,24 @@ align = 1
|
|||||||
valign = 1
|
valign = 1
|
||||||
|
|
||||||
[node name="FrogSprite" type="Sprite" parent="."]
|
[node name="FrogSprite" type="Sprite" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
position = Vector2( 0, -1.90735e-06 )
|
position = Vector2( 0, -1.90735e-06 )
|
||||||
scale = Vector2( 0.286789, 0.276348 )
|
scale = Vector2( 0.201, 0.193 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
|
[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
|
||||||
position = Vector2( 1362.81, -0.138177 )
|
position = Vector2( 954, 0 )
|
||||||
scale = Vector2( 15.4865, 1.28502 )
|
scale = Vector2( 10.84, 0.899 )
|
||||||
rect = Rect2( -89, -10, 2, 20 )
|
rect = Rect2( -89, -10, 2, 20 )
|
||||||
process_parent = true
|
process_parent = true
|
||||||
physics_process_parent = true
|
physics_process_parent = true
|
||||||
|
|
||||||
[node name="CeilingRayCast" type="RayCast2D" parent="."]
|
[node name="CeilingRayCast" type="RayCast2D" parent="."]
|
||||||
|
position = Vector2( 0, -9 )
|
||||||
enabled = true
|
enabled = true
|
||||||
cast_to = Vector2( 0, -13 )
|
cast_to = Vector2( 0, -1 )
|
||||||
collision_mask = 56
|
collision_mask = 56
|
||||||
|
collide_with_areas = true
|
||||||
|
|
||||||
[node name="Orientation" type="RayCast2D" parent="."]
|
[node name="Orientation" type="RayCast2D" parent="."]
|
||||||
cast_to = Vector2( -1, 0 )
|
cast_to = Vector2( -1, 0 )
|
||||||
@ -59,16 +62,18 @@ collision_mask = 0
|
|||||||
collide_with_bodies = false
|
collide_with_bodies = false
|
||||||
|
|
||||||
[node name="Left_Wallcast" type="RayCast2D" parent="."]
|
[node name="Left_Wallcast" type="RayCast2D" parent="."]
|
||||||
position = Vector2( -15, 8 )
|
position = Vector2( -10, 6 )
|
||||||
enabled = true
|
enabled = true
|
||||||
cast_to = Vector2( -10, 0 )
|
cast_to = Vector2( -5, 0 )
|
||||||
collision_mask = 56
|
collision_mask = 56
|
||||||
|
collide_with_areas = true
|
||||||
|
|
||||||
[node name="Right_Wallcast" type="RayCast2D" parent="."]
|
[node name="Right_Wallcast" type="RayCast2D" parent="."]
|
||||||
position = Vector2( 15, 8 )
|
position = Vector2( 10, 6 )
|
||||||
enabled = true
|
enabled = true
|
||||||
cast_to = Vector2( 10, 0 )
|
cast_to = Vector2( 5, 0 )
|
||||||
collision_mask = 56
|
collision_mask = 56
|
||||||
|
collide_with_areas = true
|
||||||
|
|
||||||
[node name="VisionRayCast" type="RayCast2D" parent="."]
|
[node name="VisionRayCast" type="RayCast2D" parent="."]
|
||||||
enabled = true
|
enabled = true
|
||||||
@ -77,8 +82,7 @@ collision_mask = 9
|
|||||||
collide_with_areas = true
|
collide_with_areas = true
|
||||||
|
|
||||||
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]]
|
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]]
|
||||||
position = Vector2( 0, 6.48802 )
|
position = Vector2( 0, 4.5 )
|
||||||
scale = Vector2( 5.68128, 5.29182 )
|
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="cshape" type="Node2D" parent="."]
|
[node name="cshape" type="Node2D" parent="."]
|
||||||
@ -93,6 +97,7 @@ softness = 0.1
|
|||||||
[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]]
|
[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]]
|
||||||
modulate = Color( 0, 0.0392157, 1, 1 )
|
modulate = Color( 0, 0.0392157, 1, 1 )
|
||||||
position = Vector2( 0, -6.44095 )
|
position = Vector2( 0, -6.44095 )
|
||||||
|
scale = Vector2( 0.7, 0.7 )
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
input_pickable = false
|
input_pickable = false
|
||||||
|
|
||||||
@ -102,12 +107,12 @@ shape = SubResource( 2 )
|
|||||||
|
|
||||||
[node name="EnemySkin" type="Area2D" parent="." groups=["player"]]
|
[node name="EnemySkin" type="Area2D" parent="." groups=["player"]]
|
||||||
process_priority = -1
|
process_priority = -1
|
||||||
|
scale = Vector2( 0.7, 0.7 )
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
collision_mask = 126
|
collision_mask = 126
|
||||||
|
|
||||||
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"]
|
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"]
|
||||||
position = Vector2( 5.96046e-07, 2.5 )
|
position = Vector2( 0, 2.85714 )
|
||||||
scale = Vector2( 1.03, 1.04 )
|
|
||||||
shape = SubResource( 3 )
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
|
[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
|
||||||
|
|||||||
@ -33,6 +33,10 @@ func _get_transition(_delta):
|
|||||||
# + String(round(parent.velocity.y / 10))
|
# + String(round(parent.velocity.y / 10))
|
||||||
)
|
)
|
||||||
var new_state
|
var new_state
|
||||||
|
if parent.target == null:
|
||||||
|
new_state = states.searching
|
||||||
|
if parent.target != null:
|
||||||
|
new_state = states.hunting
|
||||||
if parent.is_hurt:
|
if parent.is_hurt:
|
||||||
new_state = states.sleeping
|
new_state = states.sleeping
|
||||||
if new_state != self.state:
|
if new_state != self.state:
|
||||||
|
|||||||
@ -37,4 +37,5 @@ var mass := 6.5
|
|||||||
|
|
||||||
var velocity := Vector2.ZERO
|
var velocity := Vector2.ZERO
|
||||||
|
|
||||||
var air_strafe_charges := 1
|
var max_air_strafe_charges := 0
|
||||||
|
var air_strafe_charges := 0
|
||||||
|
|||||||
@ -27,7 +27,10 @@ wait_time = 20.0
|
|||||||
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
||||||
|
|
||||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||||
frame = 1
|
frame = 9
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||||
|
frame = 4
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@ -80,10 +80,10 @@ wait_time = 20.0
|
|||||||
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
||||||
|
|
||||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||||
frame = 7
|
frame = 10
|
||||||
|
|
||||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||||
frame = 12
|
frame = 1
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=13 format=2]
|
[gd_scene load_steps=15 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=1]
|
[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=2]
|
[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=2]
|
||||||
@ -11,6 +11,8 @@
|
|||||||
[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=9]
|
[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=9]
|
||||||
[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=10]
|
[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=10]
|
||||||
[ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=11]
|
[ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=11]
|
||||||
|
[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.tscn" type="PackedScene" id=12]
|
||||||
|
[ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=13]
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=4]
|
[sub_resource type="AnimationNodeStateMachinePlayback" id=4]
|
||||||
|
|
||||||
@ -26,19 +28,40 @@ __meta__ = {
|
|||||||
[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"]
|
[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"]
|
||||||
wait_time = 20.0
|
wait_time = 20.0
|
||||||
|
|
||||||
|
[node name="PauseScreen" parent="UserInterface" index="1"]
|
||||||
|
rect_pivot_offset = Vector2( 389, 267 )
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
tile_set = ExtResource( 2 )
|
tile_set = ExtResource( 2 )
|
||||||
cell_size = Vector2( 24, 24 )
|
cell_size = Vector2( 24, 24 )
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
collision_mask = 8
|
collision_mask = 8
|
||||||
format = 1
|
format = 1
|
||||||
tile_data = PoolIntArray( 65531, -1610612734, 0, 51, -1073741822, 0, 131067, -1610612734, 0, 65587, -1073741822, 0, 196603, -1610612734, 0, 131123, -1073741822, 0, 262139, -1610612734, 0, 196659, -1073741822, 0, 327675, -1610612734, 0, 262195, -1073741822, 0, 393211, -1610612734, 0, 327731, -1073741822, 0, 458747, -1610612734, 0, 393267, -1073741822, 0, 524283, -1610612734, 0, 458803, -1073741822, 0, 589819, -1610612734, 0, 524339, -1073741822, 0, 655355, -1610612734, 0, 589875, -1073741822, 0, 720891, -1610612734, 0, 655411, -1073741822, 0, 786427, -1610612734, 0, 720947, -1073741822, 0, 851963, -1610612734, 0, 786483, -1073741822, 0, 917499, -1610612734, 0, 852019, -1073741822, 0, 983036, 2, 0, 983037, 2, 0, 983038, 2, 0, 983039, 2, 0, 917504, 2, 0, 917505, 2, 0, 917506, 2, 0, 917507, 2, 0, 917508, 2, 0, 917509, 2, 0, 917510, 2, 0, 917511, 2, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917517, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, 2, 0, 917526, 2, 0, 917527, 2, 0, 917528, 2, 0, 917529, 2, 0, 917530, 2, 0, 917531, 2, 0, 917532, 2, 0, 917533, 2, 0, 917534, 2, 0, 917535, 2, 0, 917536, 2, 0, 917537, 2, 0, 917538, 2, 0, 917539, 2, 0, 917540, 2, 0, 917541, 2, 0, 917542, 2, 0, 917543, 2, 0, 917544, 2, 0, 917545, 2, 0, 917546, 2, 0, 917547, 2, 0, 917548, 2, 0, 917549, 2, 0, 917550, 2, 0, 917551, 2, 0, 917552, 2, 0, 917553, 2, 0, 917554, 2, 0 )
|
tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, -1610612734, 0, 51, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, -1610612734, 0, 65587, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, -1610612734, 0, 131123, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, -1610612734, 0, 196659, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, -1610612734, 0, 262195, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, -1610612734, 0, 327731, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, -1610612734, 0, 393267, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, -1610612734, 0, 458803, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, -1610612734, 0, 524339, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, -1610612734, 0, 589875, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, -1610612734, 0, 655411, -1073741822, 0, 786424, 2, 0, 786427, 2, 0, 786428, 2, 0, 786429, 2, 0, 786430, 2, 0, 786431, 2, 0, 720896, 2, 0, 720897, 2, 0, 720898, 2, 0, 720899, 2, 0, 720900, 1610612738, 0, 720901, 2, 0, 720902, 2, 0, 720947, -1073741822, 0, 851960, 2, 0, 786483, -1073741822, 0, 917496, 2, 0, 852019, -1073741822, 0, 983032, 2, 0, 983034, 2, 0, 983035, 2, 0, 983036, 2, 0, 983037, 2, 0, 917511, 1610612738, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917517, 2, 0, 917518, 2, 0, 917519, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, 2, 0, 917526, 2, 0, 917527, 2, 0, 917528, 2, 0, 917529, 2, 0, 917530, 2, 0, 917531, 2, 0, 917532, 2, 0, 917533, 2, 0, 917534, 2, 0, 917535, 2, 0, 917536, 2, 0, 917537, 2, 0, 917538, 2, 0, 917539, 2, 0, 917540, 2, 0, 917541, 2, 0, 917542, 2, 0, 917543, 2, 0, 917544, 2, 0, 917545, 2, 0, 917546, 2, 0, 917547, 2, 0, 917548, 2, 0, 917549, 2, 0, 917550, 2, 0, 917551, 2, 0, 917552, 2, 0, 917553, 2, 0, 917554, 2, 0, 917555, 2, 0, 1048568, 2, 0, 1048569, 2, 0, 1048570, 2, 0, 1048571, 2, 0, 1048572, 2, 0, 1048573, 2, 0, 1048574, 2, 0, 983046, 2, 0, 983047, 1610612738, 0, 983048, 2, 0, 983049, 2, 0, 983050, 2, 0, 983051, 2, 0, 983052, 2, 0, 983053, 2, 0, 983054, 2, 0, 983055, 2, 0, 983056, 2, 0, 983057, 2, 0, 983058, 2, 0, 983059, 2, 0, 983060, 2, 0, 983061, 2, 0, 983062, 2, 0, 983063, 2, 0, 983064, 2, 0, 983065, 2, 0, 983066, 2, 0, 983067, 2, 0, 983068, 2, 0, 983069, 2, 0, 983070, 2, 0, 983071, 2, 0, 983072, 2, 0, 983073, 2, 0, 983074, 2, 0, 983075, 2, 0, 983076, 2, 0, 983077, 2, 0, 983078, 2, 0, 983079, 2, 0, 983080, 2, 0, 983081, 2, 0, 983082, 2, 0, 983083, 2, 0, 983084, 2, 0, 983085, 2, 0, 983086, 2, 0, 983087, 2, 0, 983088, 2, 0, 983089, 2, 0, 983090, 2, 0, 983091, 2, 0, 1114104, 2, 0, 1114105, 2, 0, 1114106, 2, 0, 1114107, 2, 0, 1114108, 2, 0, 1114109, 2, 0, 1114110, 2, 0, 1114111, 2, 0, 1048576, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048580, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, 2, 0, 1048588, 2, 0, 1048589, 2, 0, 1048590, 2, 0, 1048591, 2, 0, 1048592, 2, 0, 1048593, 2, 0, 1048594, 2, 0, 1048595, 2, 0, 1048596, 2, 0, 1048597, 2, 0, 1048598, 2, 0, 1048599, 2, 0, 1048600, 2, 0, 1048601, 2, 0, 1048602, 2, 0, 1048603, 2, 0, 1048604, 2, 0, 1048605, 2, 0, 1048606, 2, 0, 1048607, 2, 0, 1048608, 2, 0, 1048609, 2, 0, 1048610, 2, 0, 1048611, 2, 0, 1048612, 2, 0, 1048613, 2, 0, 1048614, 2, 0, 1048615, 2, 0, 1048616, 2, 0, 1048617, 2, 0, 1048618, 2, 0, 1048619, 2, 0, 1048620, 2, 0, 1048621, 2, 0, 1048622, 2, 0, 1048623, 2, 0, 1048624, 2, 0, 1048625, 2, 0, 1048626, 2, 0, 1048627, 2, 0, 1179640, 2, 0, 1179641, 2, 0, 1179642, 2, 0, 1179643, 2, 0, 1179644, 2, 0, 1179645, 2, 0, 1179646, 2, 0, 1179647, 2, 0, 1114112, 2, 0, 1114113, 2, 0, 1114114, 2, 0, 1114115, 2, 0, 1114116, 2, 0, 1114117, 2, 0, 1114118, 2, 0, 1114119, 2, 0, 1114120, 2, 0, 1114121, 2, 0, 1114122, 2, 0, 1114123, 2, 0, 1114124, 2, 0, 1114125, 2, 0, 1114126, 2, 0, 1114127, 2, 0, 1114128, 2, 0, 1114129, 2, 0, 1114130, 2, 0, 1114131, 2, 0, 1114132, 2, 0, 1114133, 2, 0, 1114134, 2, 0, 1114135, 2, 0, 1114136, 2, 0, 1114137, 2, 0, 1114138, 2, 0, 1114139, 2, 0, 1114140, 2, 0, 1114141, 2, 0, 1114142, 2, 0, 1114143, 2, 0, 1114144, 2, 0, 1114145, 2, 0, 1114146, 2, 0, 1114147, 2, 0, 1114148, 2, 0, 1114149, 2, 0, 1114150, 2, 0, 1114151, 2, 0, 1114152, 2, 0, 1114153, 2, 0, 1114154, 2, 0, 1114155, 2, 0, 1114156, 2, 0, 1114157, 2, 0, 1114158, 2, 0, 1114159, 2, 0, 1114160, 2, 0, 1114161, 2, 0, 1114162, 2, 0, 1114163, 2, 0 )
|
||||||
|
|
||||||
|
[node name="Spikes" parent="." instance=ExtResource( 13 )]
|
||||||
|
position = Vector2( 36, 396 )
|
||||||
|
|
||||||
|
[node name="AnimatedSprite" parent="Spikes" index="1"]
|
||||||
|
frame = 1
|
||||||
|
|
||||||
|
[node name="Spikes2" parent="." instance=ExtResource( 13 )]
|
||||||
|
position = Vector2( 132, 396 )
|
||||||
|
|
||||||
|
[node name="Spikes3" parent="." instance=ExtResource( 13 )]
|
||||||
|
position = Vector2( 36, 396 )
|
||||||
|
|
||||||
|
[node name="Spikes4" parent="." instance=ExtResource( 13 )]
|
||||||
|
position = Vector2( -156, 347 )
|
||||||
|
|
||||||
|
[node name="Spikes5" parent="." instance=ExtResource( 13 )]
|
||||||
|
position = Vector2( 396, 348 )
|
||||||
|
|
||||||
[node name="BlobbyCam" parent="." instance=ExtResource( 11 )]
|
[node name="BlobbyCam" parent="." instance=ExtResource( 11 )]
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 4 )]
|
[node name="Blobby" parent="." instance=ExtResource( 4 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2( -36, 336 )
|
position = Vector2( 107, 264 )
|
||||||
scale = Vector2( 0.878906, 0.936025 )
|
scale = Vector2( 0.878906, 0.936025 )
|
||||||
|
|
||||||
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||||
@ -106,12 +129,16 @@ next_scene = ExtResource( 6 )
|
|||||||
[node name="GameplaySignalManager" type="Node2D" parent="."]
|
[node name="GameplaySignalManager" type="Node2D" parent="."]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="WhatAreFrog" parent="." instance=ExtResource( 12 )]
|
||||||
|
position = Vector2( 468, 327 )
|
||||||
|
|
||||||
[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"]
|
[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"]
|
||||||
[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"]
|
[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"]
|
||||||
[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"]
|
[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"]
|
||||||
|
|
||||||
[editable path="UserInterface"]
|
[editable path="UserInterface"]
|
||||||
[editable path="UserInterface/HUD"]
|
[editable path="UserInterface/HUD"]
|
||||||
|
[editable path="Spikes"]
|
||||||
[editable path="Blobby"]
|
[editable path="Blobby"]
|
||||||
[editable path="TreeWhyButtons"]
|
[editable path="TreeWhyButtons"]
|
||||||
[editable path="TreeWhyButtons/WhyButton1"]
|
[editable path="TreeWhyButtons/WhyButton1"]
|
||||||
|
|||||||
@ -3,11 +3,11 @@
|
|||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 11, 11 )
|
extents = Vector2( 11, 11 )
|
||||||
|
|
||||||
[node name="DangerousBlockArea" type="Node2D" groups=["harmful"]]
|
[node name="DangerousBlockArea" type="Node2D"]
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="." groups=["harmful"]]
|
[node name="Area2D" type="Area2D" parent="." groups=["harmful"]]
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" groups=["harmful"]]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|||||||
@ -48,5 +48,5 @@ animations = [ {
|
|||||||
|
|
||||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||||
frames = SubResource( 1 )
|
frames = SubResource( 1 )
|
||||||
frame = 19
|
frame = 22
|
||||||
playing = true
|
playing = true
|
||||||
|
|||||||
@ -8,8 +8,5 @@ margin_bottom = 78.0
|
|||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
text = "Retry"
|
text = "Retry"
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[connection signal="button_up" from="." to="." method="_on_button_up"]
|
[connection signal="button_up" from="." to="." method="_on_button_up"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user