diff --git a/project.godot b/project.godot index eb160cd..b041c0e 100644 --- a/project.godot +++ b/project.godot @@ -160,6 +160,7 @@ click={ 2d_physics/layer_6="contraption" 2d_physics/layer_7="finnemajig" 2d_physics/layer_8="dropThrough" +2d_physics/layer_9="food" [physics] diff --git a/src/Actors/Blobby/Blobby.tscn b/src/Actors/Blobby/Blobby.tscn index ed4fc2a..9cbfe1c 100644 --- a/src/Actors/Blobby/Blobby.tscn +++ b/src/Actors/Blobby/Blobby.tscn @@ -4637,6 +4637,7 @@ cast_to = Vector2( 1.5, 0 ) collision_mask = 56 [node name="SlopeRaycastLeft" type="RayCast2D" parent="."] +visible = false position = Vector2( -9, 0 ) enabled = true cast_to = Vector2( 0, 24 ) @@ -4644,11 +4645,13 @@ collision_mask = 8 [node name="SlopeRaycast" type="RayCast2D" parent="."] unique_name_in_owner = true +visible = false enabled = true cast_to = Vector2( 0, 16 ) collision_mask = 8 [node name="SlopeRaycastRight" type="RayCast2D" parent="."] +visible = false position = Vector2( 10, 0 ) enabled = true cast_to = Vector2( 0, 24 ) diff --git a/src/Actors/BlobbyCam.gd b/src/Actors/BlobbyCam.gd index 86d0de5..33fab4a 100644 --- a/src/Actors/BlobbyCam.gd +++ b/src/Actors/BlobbyCam.gd @@ -3,7 +3,8 @@ extends Camera2D var horizontal_facing = 0 var vertical_facing = 0 var camera_vertical_shift = 0 -var move_time: float = 0 +var right_move_time: float = 0 +var left_move_time: float = 0 var slow_time: float = 0 var original_limit_left: int var original_limit_right: int @@ -13,8 +14,8 @@ var camera_is_panning: bool = false var target_offset: Vector2 = Vector2(0,0) export var camera_horizontal_shift = 60 -export var offset_reset_seconds := 0.9 -export var offset_adapt_seconds := 0.7 +export var offset_reset_seconds := 1 +export var offset_adapt_seconds := 1 onready var shiftLeft = $CameraAnimationPlayer.get_animation("shiftingLeft") onready var shiftRight = $CameraAnimationPlayer.get_animation("shiftingRight") @@ -44,14 +45,21 @@ func _physics_process(delta: float) -> void: if(!GlobalState.is_dead): var player_vel = (blobby.position - prev_pos)/delta # TODO Take average of velocity here - if(abs(player_vel.x) >= blobby.max_velocity["walk"] * 0.97 + if(abs(player_vel.x) >= blobby.max_velocity["walk"] * 0.97 && (sign(player_vel.x) == sign(target_offset.x) || target_offset.x == 0)): - move_time += delta - elif(abs(player_vel.x) <= blobby.max_velocity["walk"] * 0.05 + if(player_vel.x > 0): + right_move_time += delta + left_move_time = max(0, left_move_time - delta) + slow_time = max(0, slow_time - delta) + else: + left_move_time += delta + right_move_time = max(0, right_move_time - delta) + slow_time = max(0, slow_time - delta) + elif(abs(player_vel.x) <= blobby.max_velocity["walk"] * 0.9 || sign(player_vel.x) != sign(target_offset.x) || target_offset.x == 0): slow_time += delta - else: - move_time = max(0, move_time - delta) + left_move_time = max(0, left_move_time - delta) + right_move_time = max(0, right_move_time - delta) if(!anim_player.is_playing()): _adapt_to_movement(player_vel) @@ -66,7 +74,7 @@ func _physics_process(delta: float) -> void: func _set_boundaries(): # This is ok, because it only happens on initialization # But it is also quite fickle - var tilemap = get_node("../%TileMap") + var tilemap = get_node("./%TileMap") # TODO: This goes wrong when overwriting old tiles with new sprites # New pngs -> completely new tiles and rebuild map var rect = tilemap.get_used_rect() @@ -98,33 +106,38 @@ func _adapt_to_movement(velocity: Vector2) -> void: 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()): - move_time = 0 - target_offset.x = camera_horizontal_shift * sign(velocity.x) + if(left_move_time >= offset_adapt_seconds && !anim_player.is_playing()): + left_move_time = 0 + target_offset.x = -camera_horizontal_shift if(offset == target_offset || left_edge_pos + target_offset.x - 24 < limit_left || right_edge_pos + target_offset.x + 24 > limit_right ): return - if(sign(velocity.x) < 0): - offset_track = shiftLeft.find_track(".:offset") - shiftLeft.track_set_key_value(offset_track, 0, offset) - shiftLeft.track_set_key_value(offset_track, 1, target_offset) - # limit_left = original_limit_left + camera_horizontal_shift - var limit_left_track = shiftLeft.find_track(".:limit_left") - 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, 1, new_limit_left) - anim_player.play("shiftingLeft") - else: - offset_track = shiftRight.find_track(".:offset") - shiftRight.track_set_key_value(offset_track, 0, offset) - shiftRight.track_set_key_value(offset_track, 1, target_offset) - # limit_right = original_limit_right - camera_horizontal_shift - var limit_right_track = shiftRight.find_track(".:limit_right") - 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, 1, new_limit_right) - anim_player.play("shiftingRight") + offset_track = shiftLeft.find_track(".:offset") + shiftLeft.track_set_key_value(offset_track, 0, offset) + shiftLeft.track_set_key_value(offset_track, 1, target_offset) + # limit_left = original_limit_left + camera_horizontal_shift + var limit_left_track = shiftLeft.find_track(".:limit_left") + 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, 1, new_limit_left) + anim_player.play("shiftingLeft") + elif(right_move_time >= offset_adapt_seconds && !anim_player.is_playing()): + right_move_time = 0 + target_offset.x = camera_horizontal_shift + if(offset == target_offset || + left_edge_pos + target_offset.x - 24 < limit_left || + right_edge_pos + target_offset.x + 24 > limit_right ): + return + offset_track = shiftRight.find_track(".:offset") + shiftRight.track_set_key_value(offset_track, 0, offset) + shiftRight.track_set_key_value(offset_track, 1, target_offset) + # limit_right = original_limit_right - camera_horizontal_shift + var limit_right_track = shiftRight.find_track(".:limit_right") + 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, 1, new_limit_right) + anim_player.play("shiftingRight") elif(slow_time >= offset_reset_seconds): slow_time = 0 target_offset.x = 0 @@ -173,7 +186,6 @@ func _update_lighting_shader(): # var top_left = -vtrans.origin / vtrans.get_scale() # var vsize = get_viewport_rect().size # var t = Transform2D(0, (top_left + 0.5*vsize/vtrans.get_scale()).rotated(rotation)) - image.set_pixel(i, 0, Color( light.position.x, light.position.y, light.strength, light.radius diff --git a/src/Actors/BlobbyCam.tscn b/src/Actors/BlobbyCam.tscn index 2a96746..c3b0b8c 100644 --- a/src/Actors/BlobbyCam.tscn +++ b/src/Actors/BlobbyCam.tscn @@ -532,7 +532,7 @@ drag_margin_v_enabled = true drag_margin_left = 0.05 drag_margin_top = 0.0 drag_margin_right = 0.05 -drag_margin_bottom = 0.01 +drag_margin_bottom = 0.0 editor_draw_drag_margin = true script = ExtResource( 1 ) @@ -633,10 +633,10 @@ texture = ExtResource( 8 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"] visible = false frames = SubResource( 7 ) -frame = 10 +frame = 6 playing = true [node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"] frames = SubResource( 8 ) -frame = 1 +frame = 11 playing = true diff --git a/src/Actors/Enemies/Beings/Flyer.gd b/src/Actors/Enemies/Beings/Flyer.gd index 207c305..d6155fd 100644 --- a/src/Actors/Enemies/Beings/Flyer.gd +++ b/src/Actors/Enemies/Beings/Flyer.gd @@ -3,37 +3,116 @@ const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd") onready var players = get_tree().get_nodes_in_group("player") -onready var nav_agent: NavigationAgent2D = $NavigationAgent2D +onready var vision_raycast: RayCast2D = $VisionRayCast +onready var orientation: RayCast2D = $Orientation onready var feeler_raycast: RayCast2D = $FeelerRayCast +onready var nav_agent: NavigationAgent2D = $NavigationAgent2D onready var tilemap: TileMap = $"../%TileMap" +onready var target_lost_timer: Timer +onready var update_navigation_timer: Timer onready var rng = RandomNumberGenerator.new() export var score := 100 # Is given in blocks export var vision_distance := 6.0 +export var blindspot_angle := 20 +export var loose_target_seconds := 3.0 +export var patrolling := false +export var aggressive := true +export var acceleration := 50 +export var patrolling_slowdown := 0.80 +export var max_speed := 90 +export var weight := 0.15 +var path_direction: Vector2 = Vector2() var target: Object = null +var patrol_waypoints := [] +var patrol_waypoint_index := 0 +var next_waypoint: Vector2 var is_hurt := false var has_reversed := false var avoidance_raycasts := [] +var slow_down_factor := 1.0 + +var detect_timer := 0.0 func _ready(): - spawn_avoidance_raycasts(32, 20) + spawn_avoidance_raycasts(32, 24) + target_lost_timer = Timer.new() + target_lost_timer.set_one_shot(true) + target_lost_timer.connect("timeout", self, "lose_target") + add_child(target_lost_timer) + update_navigation_timer = Timer.new() + update_navigation_timer.connect("timeout", self, "update_navigation") + add_child(update_navigation_timer) + update_navigation_timer.start(0.5) + # TODO Hat immer den Spawn im Patrolpath + patrol_waypoints.append(global_position) + for waypoint in $PatrolPath.get_children(): + patrol_waypoints.append(waypoint.global_position) pass func searching() -> Vector2: -# TODO Less often! + slow_down_factor = patrolling_slowdown + if(aggressive && detect_timer > 0.33): + detect_player() + detect_timer = 0.0 + if(patrolling && nav_agent.is_target_reached()): + next_waypoint = get_next_patrol_target() + update_navigation() + elif(patrolling): + next_waypoint = patrol_waypoints[patrol_waypoint_index] + else: + # Spawn location + return patrol_waypoints[0] return nav_agent.get_next_location() -func execute_movement(_delta: float) -> void: - nav_agent.set_target_location(players[0].global_position) - var next_pos = velocity - global_position +func get_next_patrol_target() -> Vector2: + var waypoint_count = patrol_waypoints.size() + for wp in patrol_waypoints: + if next_waypoint == wp: + patrol_waypoint_index = patrol_waypoint_index + 1 if patrol_waypoint_index < waypoint_count - 1 else 0 + return patrol_waypoints[patrol_waypoint_index] + patrol_waypoint_index = 0 + return patrol_waypoints[0] + +func hunting() -> Vector2: + slow_down_factor = 1.0 + if(detect_timer > 0.33): + detect_player() + detect_timer = 0.0 + next_waypoint = players[0].global_position - Vector2(0,9) + return nav_agent.get_next_location() + +func detect_player() -> void: + var player + if(players.empty()): + print("no player found") + return + player = players[0] + #TODO Depends on height of blobby sprite since blobbys bottom and not his middle is on y=0 + vision_raycast.cast_to = (player.global_position - global_position - Vector2(0,9)).normalized() * 24 * vision_distance + var ray_angle_to_facing = vision_raycast.cast_to.angle_to(orientation.cast_to) + vision_raycast.force_raycast_update() + var collider = vision_raycast.get_collider() + if(abs(ray_angle_to_facing) < PI/2-deg2rad(blindspot_angle) && collider != null && collider.is_in_group("player")): + target_lost_timer.stop() + target = collider + print("target found") + elif(target != null && target_lost_timer.is_stopped()): + target_lost_timer.start(loose_target_seconds) + +func execute_movement(delta: float) -> void: + detect_timer += delta + var next_direction = path_direction - global_position + orientation.cast_to = Vector2(sign(next_direction.x),0)*50 var avoidance_obstacle_distance = average_collision_vector(avoidance_raycasts) - next_pos = next_pos.normalized() + avoidance_obstacle_distance.rotated(PI).normalized() - check_feeler((next_pos * 100)) - #TODO - velocity = move_and_slide(next_pos.normalized() * 50, FLOOR_NORMAL, false, 4, 0.785398,false) + next_direction = next_direction.normalized() + avoidance_obstacle_distance.rotated(PI).normalized() + # TODO Make parameters more tunable + velocity = move_and_slide(PhysicsFunc.two_step_euler_vec(velocity, next_direction.normalized() * acceleration * slow_down_factor, weight, delta) + ,FLOOR_NORMAL, false, 4, 0.785398,false) + velocity = velocity/max((velocity.length()/(max_speed*slow_down_factor)),1) func average_collision_vector(var raycasts: Array) -> Vector2: var total_distances = Vector2() @@ -44,11 +123,6 @@ func average_collision_vector(var raycasts: Array) -> Vector2: total_distances += collision_point return total_distances/raycasts.size() -func can_reverse_facing_direction() -> bool: - if(is_on_floor() && !has_reversed): - return true - return false - func spawn_avoidance_raycasts(var raycount: int, var length: float = 24) -> void: var direction: float = 0 while direction <= 2*PI: @@ -72,3 +146,14 @@ func check_feeler(v: Vector2, _offset = Vector2(0,0)) -> Object: feeler_raycast.force_raycast_update() feeler_raycast.position = prev_position return feeler_raycast.get_collider() + +func lose_target() -> void: + print("flyer target lost") + target = null + +func update_navigation() -> void: + nav_agent.set_target_location(next_waypoint) + +func die() -> void: + GlobalState.score += score + queue_free() diff --git a/src/Actors/Enemies/Beings/Flyer.tscn b/src/Actors/Enemies/Beings/Flyer.tscn index e1ebfe4..1034827 100644 --- a/src/Actors/Enemies/Beings/Flyer.tscn +++ b/src/Actors/Enemies/Beings/Flyer.tscn @@ -3,10 +3,10 @@ [ext_resource path="res://src/Actors/Enemies/Beings/Flyer.gd" type="Script" id=1] [ext_resource path="res://src/Actors/Enemies/Beings/FlyerStateMachine.gd" type="Script" id=2] [ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=3] -[ext_resource path="res://assets/blobby/idle/blobby1.png" type="Texture" id=4] +[ext_resource path="res://assets/for testing/Adventurer Sprite Sheet v1.1.png" type="Texture" id=4] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 12, 9 ) +extents = Vector2( 11, 9 ) [sub_resource type="RectangleShape2D" id=2] extents = Vector2( 15, 5.12039 ) @@ -14,16 +14,19 @@ extents = Vector2( 15, 5.12039 ) [sub_resource type="RectangleShape2D" id=3] extents = Vector2( 18.2143, 14.3338 ) -[node name="Flyer" type="KinematicBody2D" groups=["harmful"]] -collision_layer = 2 +[node name="Flyer" type="KinematicBody2D" groups=["frogfood", "harmful"]] +collision_layer = 258 collision_mask = 9 script = ExtResource( 1 ) +vision_distance = 8.0 +blindspot_angle = 30 +loose_target_seconds = 5.0 +patrolling = true [node name="Statemachine" type="Node2D" parent="."] script = ExtResource( 2 ) [node name="StateLabel" type="Label" parent="."] -visible = false show_behind_parent = true margin_left = -36.0 margin_top = -30.0 @@ -37,9 +40,12 @@ align = 1 valign = 1 [node name="FlyerSprite" type="Sprite" parent="."] -position = Vector2( -1, -1 ) +position = Vector2( 2, -8 ) scale = Vector2( 1, 1.34375 ) texture = ExtResource( 4 ) +hframes = 13 +vframes = 16 +frame = 81 [node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."] position = Vector2( 954, 0 ) @@ -58,7 +64,9 @@ collide_with_areas = true shape = SubResource( 1 ) [node name="NavigationAgent2D" type="NavigationAgent2D" parent="."] -path_max_distance = 100.0 +path_desired_distance = 4.0 +target_desired_distance = 8.0 +path_max_distance = 50.0 [node name="cshape" type="Node2D" parent="."] position = Vector2( 0, -3.8147e-06 ) @@ -89,5 +97,24 @@ collision_mask = 126 [node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"] shape = SubResource( 3 ) +[node name="PatrolPath" type="Node2D" parent="."] + +[node name="Position2D2" type="Position2D" parent="PatrolPath"] +position = Vector2( 72, 0 ) + +[node name="Position2D3" type="Position2D" parent="PatrolPath"] +position = Vector2( -72, 0 ) + +[node name="Orientation" type="RayCast2D" parent="."] +cast_to = Vector2( -1, 0 ) +collision_mask = 0 +collide_with_bodies = false + +[node name="VisionRayCast" type="RayCast2D" parent="."] +enabled = true +cast_to = Vector2( 0, -1 ) +collision_mask = 9 +collide_with_areas = true + [connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"] [connection signal="area_entered" from="EnemySkin" to="." method="_on_EnemySkin_area_entered"] diff --git a/src/Actors/Enemies/Beings/FlyerStateMachine.gd b/src/Actors/Enemies/Beings/FlyerStateMachine.gd index d3dd627..3d80f41 100644 --- a/src/Actors/Enemies/Beings/FlyerStateMachine.gd +++ b/src/Actors/Enemies/Beings/FlyerStateMachine.gd @@ -20,7 +20,7 @@ func _ready() -> void: # 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.path_direction = state_action_ref.call_func() parent.execute_movement(delta) diff --git a/src/Actors/Enemies/Beings/WhatAreFrog.gd b/src/Actors/Enemies/Beings/WhatAreFrog.gd index ba50d5c..cae96e6 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrog.gd +++ b/src/Actors/Enemies/Beings/WhatAreFrog.gd @@ -3,10 +3,12 @@ const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd") onready var players = get_tree().get_nodes_in_group("player") + onready var vision_raycast: RayCast2D = $VisionRayCast onready var orientation: RayCast2D = $Orientation onready var feeler_raycast: RayCast2D = $FeelerRayCast onready var tilemap: TileMap = $"../%TileMap" +onready var state_machine = $Statemachine onready var jump_timer: Timer onready var target_lost_timer: Timer onready var rng = RandomNumberGenerator.new() @@ -14,6 +16,8 @@ onready var rng = RandomNumberGenerator.new() export var score := 100 # Is given in blocks export var vision_distance := 6.0 +export var attack_jump_range := 6.0 +export var loose_target_seconds := 3.0 # Jump distance in blocks export var default_jump_distance := 3.0 export var default_jump_angle := 70.0 @@ -27,9 +31,12 @@ var movement_radius: float var anchor: Node2D var is_bound := false var was_restricted := false +var barely_held_back_counter := 0 var has_reversed := false +var food_sources = [] var target: Object = null +var food_target: Object = null var start_x := 0.0 var in_air := false @@ -37,6 +44,7 @@ var is_hurt := false var stored_x_vel = 0.0 var current_delta = 0.0 +var detect_timer := 0.0 var reversing_possible_searching := true @@ -48,7 +56,7 @@ func _ready(): jump_timer.connect("timeout", self, "jump") target_lost_timer = Timer.new() target_lost_timer.set_one_shot(true) - target_lost_timer.connect("timeout", self, "lose_target") + target_lost_timer.connect("timeout", self, "loose_target") add_child(jump_timer) add_child(target_lost_timer) @@ -70,6 +78,7 @@ func _on_StompDetector_body_entered(body: Node) -> void: func execute_movement(delta: float) -> void: # Navigation2DServer.map_get_path() current_delta = delta + detect_timer += delta velocity.y += _gravity * delta if(is_bound): var next_position = global_position + velocity * current_delta @@ -99,9 +108,16 @@ func _on_EnemySkin_area_entered(area:Area2D) -> void: die() -func searching() -> Vector2: - detect_player() +func _on_EnemySkin_body_entered(body: Node) -> void: + if body.is_in_group("frogfood"): + loose_target() + body.die() + +func searching() -> Vector2: + if(detect_timer > 0.333): + search_next_target() + detect_timer = 0.0 if(is_on_floor()): if(jump_timer.is_stopped()): jump_timer.start(rng.randfn(jump_time_search, jump_time_standard_deviation)) @@ -113,18 +129,37 @@ func searching() -> Vector2: reversing_possible_searching = true jump_timer.stop() in_air = true - return velocity -func hunting() -> Vector2: - detect_player() +func search_next_target(): + if(target != null && !weakref(target).get_ref()): + return + detect_food() + if(food_target == null): + detect_player() + +func hunting() -> Vector2: + var was_target_freed = !weakref(target).get_ref() + if(detect_timer > 0.333): + search_next_target() + detect_timer = 0.0 + #TODO Dependent on block size + elif(is_on_floor() && food_target != null && !was_target_freed && + global_position.distance_to(food_target.global_position) <= attack_jump_range * 24): + + var collider = check_feeler(food_target.global_position - global_position) + if(barely_held_back_counter == 0 && collider != null && collider.is_in_group("frogfood")): + jump_timer.stop() + return attack_jump(food_target.global_position) + if(is_on_floor()): if(jump_timer.is_stopped()): jump_timer.start(rng.randfn(jump_time_hunt, jump_time_standard_deviation)) if(in_air): in_air = false + else: if(!in_air): start_x = global_position.x @@ -132,25 +167,61 @@ func hunting() -> Vector2: jump_timer.stop() in_air = true + if(barely_held_back_counter > 1): + barely_held_back_counter = 0 + loose_target() + + if(target != null && !was_target_freed && + sign((target.global_position - global_position).x) != get_facing_direction()): + reverse_facing_direction() + return velocity +func detect_food() -> void: + # TODO What if food spawns in + food_sources = get_tree().get_nodes_in_group("frogfood") + if(food_sources.empty()): + return + var i = 0 + var min_dist_f_index = 0 + var min_dist = (food_sources[0].global_position - global_position).length() + var food_node = null + for f in food_sources: + var new_dist = (food_sources[i].global_position - global_position).length() + min_dist = new_dist if new_dist < min_dist else min_dist + min_dist_f_index = i if new_dist < min_dist else min_dist_f_index + i += 1 + food_node = food_sources[min_dist_f_index] + #TODO Depends on height of blobby sprite since blobbys bottom and not his middle is on y=0 + vision_raycast.cast_to = (food_node.global_position - global_position).normalized() * 24 * vision_distance + var ray_angle_to_facing = vision_raycast.cast_to.angle_to(orientation.cast_to) + vision_raycast.force_raycast_update() + var collider = vision_raycast.get_collider() + if(abs(ray_angle_to_facing) < PI/3 && collider != null && collider.is_in_group("frogfood")): + target_lost_timer.stop() + target = collider + food_target = collider + elif(target != null && target_lost_timer.is_stopped()): + target_lost_timer.start(loose_target_seconds) + + func detect_player() -> void: var player if(players.empty()): print("no player found") return player = players[0] - vision_raycast.cast_to = (player.global_position - global_position).normalized() * 24 * vision_distance + #TODO Depends on height of blobby sprite since blobbys bottom and not his middle is on y=0 + vision_raycast.cast_to = (player.global_position - global_position - Vector2(0, 9)).normalized() * 24 * vision_distance var ray_angle_to_facing = vision_raycast.cast_to.angle_to(orientation.cast_to) vision_raycast.force_raycast_update() var collider = vision_raycast.get_collider() - if(target == null && abs(ray_angle_to_facing) < PI/4 && collider != null && collider.is_in_group("player")): + if(abs(ray_angle_to_facing) < PI/4 && collider != null && collider.is_in_group("player")): target_lost_timer.stop() target = collider - print("target found") elif(target != null && target_lost_timer.is_stopped()): - target_lost_timer.start(3.0) + target_lost_timer.start(loose_target_seconds) func sleeping() -> Vector2: @@ -159,9 +230,10 @@ func sleeping() -> Vector2: return velocity -func lose_target() -> void: - print("target lost") +func loose_target() -> void: + print("frog target lost") target = null + food_target = null func jump(): @@ -178,8 +250,11 @@ func jump(): var new_distance = next_position.distance_to(anchor.global_position) # print(current_distance) # print(new_distance) + # Would go out of distance if((new_distance >= movement_radius && new_distance > current_distance) || (new_distance > current_distance && was_restricted)): - if can_reverse_facing_direction(): + if(state_machine.state == "hunting"): + barely_held_back_counter += 1 + if can_reverse_facing_direction() && (barely_held_back_counter == 0 || barely_held_back_counter > 1): reverse_facing_direction() was_restricted = false @@ -228,10 +303,9 @@ func consider_jump_headspace(v: Vector2) -> Vector2: var new_distance = default_jump_distance * (0.66 if target_height > -26 else 0.75) v = velocity_for_jump_distance(new_distance, abs(new_angle)) v = correct_jump_direction(v) - height = calculate_jump_height(v) + height = calculate_jump_height(v) * -1 distance = calculate_jump_distance(v) * get_facing_direction() - height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-height)), Vector2(0,-23)) - if(height_collider != null && can_reverse_facing_direction()): + if(height < target_height && can_reverse_facing_direction()): print("no safe height for frog jump") return Vector2(0,0) return v @@ -263,6 +337,7 @@ func consider_jump_landing_space(v: Vector2) -> Vector2: return Vector2(0,0) return v + func consider_jumping_on_top() -> Vector2: var collider = check_feeler(Vector2(42 * get_facing_direction(),0)) var facing = 0 if get_facing_direction() >= 0 else - 1 @@ -358,8 +433,9 @@ func change_jump_distance(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)) + # Takes an angle and a distance to calculate a jump launching at that angle and covering the distance -func velocity_for_jump_distance(distance: float = 3*24, angle: float = deg2rad(65)) -> Vector2: +func velocity_for_jump_distance(distance: float = default_jump_distance*24, angle: float = deg2rad(default_jump_angle)) -> Vector2: var abs_velocity = sqrt((distance * _gravity)/sin(2*angle)) return Vector2(abs_velocity,0).rotated(-1*angle) @@ -370,14 +446,31 @@ func can_reverse_facing_direction() -> bool: return false -# Checks the feeler ray for collisions and returns collision or null +# Returns a jump velocity that has the target_position in it's path +func attack_jump(target_position: Vector2) -> Vector2: + var target_vector = target_position - global_position + target_vector = Vector2(abs(target_vector.x), target_vector.y) + var jump_angle = target_vector.angle() + var v = Vector2() + # TODO Tunable parameters + if jump_angle < deg2rad(-30): + v = velocity_for_jump_distance(target_vector.x, deg2rad(default_jump_angle)) + v = jump_height_to_velocity(abs(target_vector.y), v) + else: + v = velocity_for_jump_distance(target_vector.x * 1.5,deg2rad(45)) + v = correct_jump_direction(v) + return v + + +# Checks the feeler ray for collisions and returns collider or null func check_feeler(v: Vector2, _offset = Vector2(0,0)) -> Object: var prev_position = feeler_raycast.position feeler_raycast.position += _offset feeler_raycast.cast_to = v feeler_raycast.force_raycast_update() + var collider = feeler_raycast.get_collider() feeler_raycast.position = prev_position - return feeler_raycast.get_collider() + return collider func reverse_facing_direction() -> void: diff --git a/src/Actors/Enemies/Beings/WhatAreFrog.tscn b/src/Actors/Enemies/Beings/WhatAreFrog.tscn index 4bf791b..aef2c87 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrog.tscn +++ b/src/Actors/Enemies/Beings/WhatAreFrog.tscn @@ -410,15 +410,17 @@ physics_process_parent = true [node name="FeelerRayCast" type="RayCast2D" parent="."] enabled = true cast_to = Vector2( 0, -1 ) -collision_mask = 56 +collision_mask = 312 collide_with_areas = true [node name="Orientation" type="RayCast2D" parent="."] +visible = false cast_to = Vector2( -1, 0 ) collision_mask = 0 collide_with_bodies = false [node name="Left_Wallcast" type="RayCast2D" parent="."] +visible = false position = Vector2( -10, 6 ) enabled = true cast_to = Vector2( -5, 0 ) @@ -426,6 +428,7 @@ collision_mask = 56 collide_with_areas = true [node name="Right_Wallcast" type="RayCast2D" parent="."] +visible = false position = Vector2( 10, 6 ) enabled = true cast_to = Vector2( 5, 0 ) @@ -433,9 +436,10 @@ collision_mask = 56 collide_with_areas = true [node name="VisionRayCast" type="RayCast2D" parent="."] +visible = false enabled = true cast_to = Vector2( 0, -1 ) -collision_mask = 9 +collision_mask = 265 collide_with_areas = true [node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]] @@ -473,3 +477,4 @@ shape = SubResource( 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"] diff --git a/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd b/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd index 3a891f7..e7d3abb 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd +++ b/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd @@ -20,7 +20,7 @@ func _ready() -> void: # Game logic consequences of state -func _state_logic(delta): +func _state_logic(delta): var state_action_ref = funcref(parent, self.state) parent.velocity = state_action_ref.call_func() parent.execute_movement(delta) diff --git a/src/Contraptions/Rope/RopeAnchor.tscn b/src/Contraptions/Rope/RopeAnchor.tscn index d61f16f..b3b1097 100644 --- a/src/Contraptions/Rope/RopeAnchor.tscn +++ b/src/Contraptions/Rope/RopeAnchor.tscn @@ -7,7 +7,7 @@ radius = 2.0 [node name="RopeAnchor" type="RigidBody2D"] z_index = -1 -collision_layer = 256 +collision_layer = 0 collision_mask = 8 input_pickable = true mode = 1 diff --git a/src/Contraptions/Rope/RopePiece.tscn b/src/Contraptions/Rope/RopePiece.tscn index a731fd6..8032b59 100644 --- a/src/Contraptions/Rope/RopePiece.tscn +++ b/src/Contraptions/Rope/RopePiece.tscn @@ -7,7 +7,7 @@ radius = 1.0 height = 1.0 [node name="RigidBody2D" type="RigidBody2D"] -collision_layer = 256 +collision_layer = 0 collision_mask = 8 gravity_scale = 3.0 linear_damp = 1.0 diff --git a/src/Levels/Flyer Test Level.tscn b/src/Levels/Flyer Test Level.tscn index ec46269..2c0a19e 100644 --- a/src/Levels/Flyer Test Level.tscn +++ b/src/Levels/Flyer Test Level.tscn @@ -28,7 +28,7 @@ collision_layer = 8 collision_mask = 8 bake_navigation = true format = 1 -tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, 9, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, -1073741822, 0, 10, -1073741822, 0, 11, -1073741822, 0, 12, -1073741822, 0, 13, 9, 0, 14, 9, 0, 15, 9, 0, 16, 9, 0, 17, 9, 0, 18, 9, 0, 19, 9, 0, 20, 9, 0, 21, 9, 0, 22, 9, 0, 23, 9, 0, 24, 9, 0, 25, 9, 0, 26, 9, 0, 27, 9, 0, 28, 9, 0, 29, 9, 0, 30, 9, 0, 31, 9, 0, 32, 9, 0, 33, 9, 0, 34, 9, 0, 35, 9, 0, 36, 9, 0, 37, 9, 0, 38, 9, 0, 39, 9, 0, 40, 9, 0, 41, 9, 0, 42, 9, 0, 43, 9, 0, 44, 9, 0, 45, 9, 0, 46, 9, 0, 47, 9, 0, 48, 9, 0, 49, 9, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, 9, 0, 131068, 9, 0, 131069, 9, 0, 131070, 9, 0, 131071, 9, 0, 65536, 9, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, 9, 0, 65541, 9, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, -1073741822, 0, 65546, -1073741822, 0, 65547, -1073741822, 0, 65548, -1073741822, 0, 65549, 9, 0, 65550, 9, 0, 65551, 9, 0, 65552, 9, 0, 65553, 9, 0, 65554, 9, 0, 65555, 9, 0, 65556, 9, 0, 65557, 9, 0, 65558, 9, 0, 65559, 9, 0, 65560, 9, 0, 65561, 9, 0, 65562, 9, 0, 65563, 9, 0, 65564, 9, 0, 65565, 9, 0, 65566, 9, 0, 65567, 9, 0, 65568, 9, 0, 65569, 9, 0, 65570, 9, 0, 65571, 9, 0, 65572, 9, 0, 65573, 9, 0, 65574, 9, 0, 65575, 9, 0, 65576, 9, 0, 65577, 9, 0, 65578, 9, 0, 65579, 9, 0, 65580, 9, 0, 65581, 9, 0, 65582, 9, 0, 65583, 9, 0, 65584, 9, 0, 65585, 9, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, 9, 0, 196604, 9, 0, 196605, 9, 0, 196606, 9, 0, 196607, 9, 0, 131072, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, 9, 0, 131077, 9, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, -1073741822, 0, 131082, -1073741822, 0, 131083, -1073741822, 0, 131084, -1073741822, 0, 131085, 9, 0, 131086, 9, 0, 131087, 9, 0, 131088, 9, 0, 131089, 9, 0, 131090, 9, 0, 131091, 9, 0, 131092, 9, 0, 131093, 9, 0, 131094, 9, 0, 131095, 9, 0, 131096, 9, 0, 131097, 9, 0, 131098, 9, 0, 131099, 9, 0, 131100, 9, 0, 131101, 9, 0, 131102, 9, 0, 131103, 9, 0, 131104, 9, 0, 131105, 9, 0, 131106, 9, 0, 131107, 9, 0, 131108, 9, 0, 131109, 9, 0, 131110, 9, 0, 131111, 9, 0, 131112, 9, 0, 131113, 9, 0, 131114, 9, 0, 131115, 9, 0, 131116, 9, 0, 131117, 9, 0, 131118, 9, 0, 131119, 9, 0, 131120, 9, 0, 131121, 9, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, 9, 0, 262140, 9, 0, 262141, 9, 0, 262142, 9, 0, 262143, 9, 0, 196608, 9, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, 9, 0, 196613, 9, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, -1073741822, 0, 196618, -1073741822, 0, 196619, -1073741822, 0, 196620, -1073741822, 0, 196621, 9, 0, 196622, 9, 0, 196623, 9, 0, 196624, 9, 0, 196625, 9, 0, 196626, 9, 0, 196627, 9, 0, 196628, 9, 0, 196629, 9, 0, 196630, 9, 0, 196631, 9, 0, 196632, 9, 0, 196633, 9, 0, 196634, 9, 0, 196635, 9, 0, 196636, 9, 0, 196637, 9, 0, 196638, 9, 0, 196639, 9, 0, 196640, 9, 0, 196641, 9, 0, 196642, 9, 0, 196643, 9, 0, 196644, 9, 0, 196645, 9, 0, 196646, 9, 0, 196647, 9, 0, 196648, 9, 0, 196649, 9, 0, 196650, 9, 0, 196651, 9, 0, 196652, 9, 0, 196653, 9, 0, 196654, 9, 0, 196655, 9, 0, 196656, 9, 0, 196657, 9, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, 9, 0, 327676, 9, 0, 327677, 9, 0, 327678, 9, 0, 327679, 9, 0, 262144, 9, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, 9, 0, 262149, 9, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, -1073741822, 0, 262154, -1073741822, 0, 262155, -1073741822, 0, 262156, -1073741822, 0, 262157, 9, 0, 262158, 9, 0, 262159, 9, 0, 262160, 9, 0, 262161, 9, 0, 262162, 9, 0, 262163, 9, 0, 262164, 9, 0, 262165, 9, 0, 262166, 9, 0, 262167, 9, 0, 262168, 9, 0, 262169, 9, 0, 262170, 9, 0, 262171, 9, 0, 262172, 9, 0, 262173, 9, 0, 262174, 9, 0, 262175, 9, 0, 262176, 9, 0, 262177, 9, 0, 262178, 9, 0, 262179, 9, 0, 262180, 9, 0, 262181, 9, 0, 262182, 9, 0, 262183, 9, 0, 262184, 9, 0, 262185, 9, 0, 262186, 9, 0, 262187, 9, 0, 262188, 9, 0, 262189, 9, 0, 262190, 9, 0, 262191, 9, 0, 262192, 9, 0, 262193, 9, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, 9, 0, 393212, 9, 0, 393213, 9, 0, 393214, 9, 0, 393215, 9, 0, 327680, 9, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, 9, 0, 327685, 9, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, -1073741822, 0, 327690, -1073741822, 0, 327691, -1073741822, 0, 327692, -1073741822, 0, 327693, 9, 0, 327694, 9, 0, 327695, 9, 0, 327696, 9, 0, 327697, 9, 0, 327698, 9, 0, 327699, 9, 0, 327700, 9, 0, 327701, 9, 0, 327702, 9, 0, 327703, 9, 0, 327704, 9, 0, 327705, 9, 0, 327706, 9, 0, 327707, 9, 0, 327708, 9, 0, 327709, 9, 0, 327710, 9, 0, 327711, 9, 0, 327712, 9, 0, 327713, 9, 0, 327714, 9, 0, 327715, 9, 0, 327716, 9, 0, 327717, 9, 0, 327718, 9, 0, 327719, 9, 0, 327720, 9, 0, 327721, 9, 0, 327722, 9, 0, 327723, 9, 0, 327724, 9, 0, 327725, 9, 0, 327726, 9, 0, 327727, 9, 0, 327728, 9, 0, 327729, 9, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, 9, 0, 458748, 9, 0, 458749, 9, 0, 458750, 9, 0, 458751, 9, 0, 393216, 9, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, 9, 0, 393221, 9, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, -1073741822, 0, 393226, -1073741822, 0, 393227, -1073741822, 0, 393228, -1073741822, 0, 393229, 9, 0, 393230, 9, 0, 393231, 9, 0, 393232, 9, 0, 393233, 9, 0, 393234, 9, 0, 393235, 9, 0, 393236, 9, 0, 393237, 9, 0, 393238, 9, 0, 393239, 9, 0, 393240, 9, 0, 393241, 9, 0, 393242, 9, 0, 393243, 9, 0, 393244, 9, 0, 393245, 9, 0, 393246, 9, 0, 393247, 9, 0, 393248, 9, 0, 393249, 9, 0, 393250, 9, 0, 393251, 9, 0, 393252, 9, 0, 393253, 9, 0, 393254, 9, 0, 393255, 9, 0, 393256, 9, 0, 393257, 9, 0, 393258, 9, 0, 393259, 9, 0, 393260, 9, 0, 393261, 9, 0, 393262, 9, 0, 393263, 9, 0, 393264, 9, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, 9, 0, 524284, 9, 0, 524285, 9, 0, 524286, 9, 0, 524287, 9, 0, 458752, 9, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, -1073741822, 0, 458762, -1073741822, 0, 458763, -1073741822, 0, 458764, -1073741822, 0, 458765, 9, 0, 458766, 9, 0, 458767, 9, 0, 458768, 9, 0, 458769, 9, 0, 458770, 9, 0, 458771, 9, 0, 458772, 9, 0, 458773, 9, 0, 458774, 9, 0, 458775, 9, 0, 458776, 9, 0, 458777, 9, 0, 458778, 9, 0, 458779, 9, 0, 458780, 9, 0, 458781, 9, 0, 458782, 9, 0, 458783, 9, 0, 458784, 9, 0, 458785, 9, 0, 458786, 9, 0, 458787, 9, 0, 458788, 9, 0, 458789, 9, 0, 458790, 9, 0, 458791, 9, 0, 458792, 9, 0, 458793, 9, 0, 458794, 9, 0, 458795, 9, 0, 458796, 9, 0, 458797, 9, 0, 458798, 9, 0, 458799, 9, 0, 458800, 9, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, 9, 0, 589820, 9, 0, 589821, 9, 0, 589822, 9, 0, 589823, 9, 0, 524288, 9, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, -1073741822, 0, 524298, -1073741822, 0, 524299, -1073741822, 0, 524300, -1073741822, 0, 524301, 9, 0, 524302, 9, 0, 524303, 9, 0, 524304, 9, 0, 524305, 9, 0, 524306, 9, 0, 524307, 9, 0, 524308, 9, 0, 524309, 9, 0, 524310, 9, 0, 524311, 9, 0, 524312, 9, 0, 524313, 9, 0, 524314, 9, 0, 524315, 9, 0, 524316, 9, 0, 524317, 9, 0, 524318, 9, 0, 524319, 9, 0, 524320, 9, 0, 524321, 9, 0, 524322, 9, 0, 524323, 9, 0, 524324, 9, 0, 524325, 9, 0, 524326, 9, 0, 524327, 9, 0, 524328, 9, 0, 524329, 9, 0, 524330, 9, 0, 524331, 9, 0, 524332, 9, 0, 524333, 9, 0, 524334, 9, 0, 524335, 9, 0, 524336, 9, 0, 524337, 9, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, 9, 0, 655356, 9, 0, 655357, 9, 0, 655358, 9, 0, 655359, 9, 0, 589824, 9, 0, 589825, 9, 0, 589826, 2, 0, 589827, 2, 0, 589828, 9, 0, 589829, 9, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, -1073741822, 0, 589834, -1073741822, 0, 589835, -1073741822, 0, 589836, -1073741822, 0, 589837, 9, 0, 589838, 9, 0, 589839, 9, 0, 589840, 9, 0, 589841, 9, 0, 589842, 9, 0, 589843, 9, 0, 589844, 9, 0, 589845, 9, 0, 589846, 9, 0, 589847, 9, 0, 589848, 9, 0, 589849, 9, 0, 589850, 9, 0, 589851, 9, 0, 589852, 9, 0, 589853, 9, 0, 589854, 9, 0, 589855, 9, 0, 589856, 9, 0, 589857, 9, 0, 589858, 9, 0, 589859, 9, 0, 589860, 9, 0, 589861, 9, 0, 589862, 9, 0, 589863, 9, 0, 589864, 9, 0, 589865, 9, 0, 589866, 9, 0, 589867, 9, 0, 589868, 9, 0, 589869, 9, 0, 589870, 9, 0, 589871, 9, 0, 589872, 9, 0, 589873, 9, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, 9, 0, 720892, 9, 0, 720893, 9, 0, 720894, 9, 0, 720895, 9, 0, 655360, 9, 0, 655361, 9, 0, 655362, 2, 0, 655363, 2, 0, 655364, 9, 0, 655365, 9, 0, 655366, 9, 0, 655367, 9, 0, 655368, 9, 0, 655369, -1073741822, 0, 655370, -1073741822, 0, 655371, -1073741822, 0, 655372, -1073741822, 0, 655373, 9, 0, 655374, 9, 0, 655375, 9, 0, 655376, 9, 0, 655377, 9, 0, 655378, 9, 0, 655379, 9, 0, 655380, 9, 0, 655381, 9, 0, 655382, 9, 0, 655383, 9, 0, 655384, 9, 0, 655385, 9, 0, 655386, 9, 0, 655387, 9, 0, 655388, 9, 0, 655389, 9, 0, 655390, 9, 0, 655391, 9, 0, 655392, 9, 0, 655393, 9, 0, 655394, 9, 0, 655395, 9, 0, 655396, 9, 0, 655397, 9, 0, 655398, 9, 0, 655399, 9, 0, 655400, 9, 0, 655401, 9, 0, 655402, 9, 0, 655403, 9, 0, 655404, 9, 0, 655405, 9, 0, 786424, 2, 0, 786425, -1610612734, 0, 786426, -1610612734, 0, 786427, 9, 0, 786428, 9, 0, 786429, 9, 0, 786430, 9, 0, 786431, 9, 0, 720896, 9, 0, 720897, 9, 0, 720898, 9, 0, 720899, 9, 0, 720900, 9, 0, 720901, 9, 0, 720902, 9, 0, 720903, 2, 0, 720904, 2, 0, 720905, -1073741822, 0, 720906, -1073741822, 0, 720907, -1073741822, 0, 720908, -1073741822, 0, 720909, 9, 0, 720910, 9, 0, 720911, 9, 0, 720912, 9, 0, 720913, 9, 0, 720914, 9, 0, 720915, 9, 0, 720916, 9, 0, 720917, 9, 0, 720918, 9, 0, 720919, 9, 0, 720920, 9, 0, 720921, 9, 0, 720922, 9, 0, 720923, 9, 0, 720924, 9, 0, 720925, 9, 0, 720926, 9, 0, 720927, 9, 0, 720928, 9, 0, 720929, 9, 0, 720930, 9, 0, 720931, 9, 0, 720932, 9, 0, 720933, 9, 0, 720934, 9, 0, 720935, 9, 0, 720936, 9, 0, 720937, 9, 0, 720938, 9, 0, 720939, 9, 0, 720943, 9, 0, 720944, 9, 0, 720945, 9, 0, 851960, 2, 0, 851961, -1610612734, 0, 851962, -1610612734, 0, 851963, 9, 0, 851964, 9, 0, 851965, 2, 0, 851966, 2, 0, 851967, 9, 0, 786432, 9, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, 9, 0, 786437, 9, 0, 786438, 9, 0, 786439, 2, 0, 786440, 2, 0, 786441, -1073741822, 0, 786442, -1073741822, 0, 786443, -1073741822, 0, 786444, -1073741822, 0, 786445, 9, 0, 786446, 9, 0, 786447, 9, 0, 786448, 9, 0, 786449, 9, 0, 786450, 9, 0, 786451, 9, 0, 786452, 9, 0, 786453, 9, 0, 786454, 9, 0, 786455, 9, 0, 786456, 9, 0, 786457, 9, 0, 786458, 9, 0, 786459, 9, 0, 786460, 9, 0, 786461, 9, 0, 786462, 9, 0, 786463, 9, 0, 786464, 9, 0, 786465, 9, 0, 786466, 9, 0, 786467, 9, 0, 786468, 9, 0, 786469, 9, 0, 786470, 9, 0, 786471, 9, 0, 786472, 9, 0, 786476, 9, 0, 786477, 9, 0, 786478, 9, 0, 786479, 9, 0, 786480, 9, 0, 786481, 9, 0, 786482, 9, 0, 917496, 2, 0, 917497, -1610612734, 0, 917498, -1610612734, 0, 917499, 9, 0, 917500, 9, 0, 917501, 1610612738, 0, 917502, 1610612738, 0, 917503, 9, 0, 851968, 9, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, 9, 0, 851973, 9, 0, 851974, 9, 0, 851975, 9, 0, 851976, 9, 0, 851977, -1073741822, 0, 851978, -1073741822, 0, 851979, -1073741822, 0, 851980, -1073741822, 0, 851981, 9, 0, 851982, 9, 0, 851983, 9, 0, 851984, 9, 0, 851985, 9, 0, 851986, 9, 0, 851987, 9, 0, 851988, 9, 0, 851989, 9, 0, 851990, 9, 0, 851991, 9, 0, 851992, 9, 0, 851993, 9, 0, 851994, 9, 0, 851995, 9, 0, 851996, 9, 0, 851997, 9, 0, 851998, 9, 0, 851999, 9, 0, 852000, 9, 0, 852001, 9, 0, 852002, 9, 0, 852003, 9, 0, 852004, 9, 0, 852005, 9, 0, 852006, 9, 0, 852007, 9, 0, 852008, 9, 0, 852009, 9, 0, 852010, 9, 0, 852011, 9, 0, 852012, 9, 0, 852013, 9, 0, 852014, 9, 0, 852015, 9, 0, 852016, 9, 0, 852017, 9, 0, 852018, 9, 0, 983032, 2, 0, 983033, -1610612734, 0, 983034, 2, 0, 983035, 9, 0, 983036, 9, 0, 983037, 9, 0, 983038, 9, 0, 983039, 9, 0, 917504, 9, 0, 917505, 9, 0, 917506, 2, 0, 917507, 2, 0, 917508, 9, 0, 917509, 9, 0, 917510, 9, 0, 917511, 9, 0, 917512, 9, 0, 917513, -1073741822, 0, 917514, -1073741822, 0, 917515, -1073741822, 0, 917516, -1073741822, 0, 917517, 9, 0, 917518, 9, 0, 917519, 9, 0, 917520, 9, 0, 917521, 9, 0, 917522, 9, 0, 917523, 9, 0, 917524, 9, 0, 917525, 9, 0, 917526, 9, 0, 917527, 9, 0, 917528, 9, 0, 917529, 9, 0, 917530, 9, 0, 917531, 9, 0, 917532, 9, 0, 917533, 9, 0, 917534, 9, 0, 917535, 9, 0, 917536, 9, 0, 917537, 9, 0, 917538, 9, 0, 917539, 9, 0, 917540, 9, 0, 917541, 9, 0, 917542, 9, 0, 917543, 9, 0, 917544, 9, 0, 917545, 9, 0, 917546, 9, 0, 917547, 9, 0, 917548, 9, 0, 917549, 9, 0, 917550, 9, 0, 917551, 9, 0, 917552, 9, 0, 917553, 9, 0, 917554, 9, 0, 1048568, 2, 0, 1048569, 2, 0, 1048570, 2, 0, 1048571, 9, 0, 1048572, 9, 0, 1048573, 9, 0, 1048574, 9, 0, 1048575, 9, 0, 983040, 9, 0, 983041, 9, 0, 983044, 9, 0, 983045, 9, 0, 983046, 9, 0, 983047, 9, 0, 983048, 9, 0, 983049, -1073741822, 0, 983050, -1073741822, 0, 983051, -1073741822, 0, 983052, -1073741822, 0, 983053, 9, 0, 983058, 9, 0, 983059, 9, 0, 983060, 9, 0, 983061, 9, 0, 983062, 9, 0, 983063, 9, 0, 983064, 9, 0, 983065, 9, 0, 983066, 9, 0, 983067, 9, 0, 983068, 9, 0, 983069, 9, 0, 983070, 9, 0, 983071, 9, 0, 983078, 9, 0, 983079, 9, 0, 983080, 9, 0, 983081, 9, 0, 983082, 9, 0, 983084, 9, 0, 983085, 9, 0, 983086, 9, 0, 983087, 9, 0, 983088, 9, 0, 983089, 9, 0, 983090, 9, 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, 1048577, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048580, 2, 0, 1048581, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, -1073741822, 0, 1048588, -1073741822, 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 ) +tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, 9, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, -1073741822, 0, 10, -1073741822, 0, 11, -1073741822, 0, 12, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, 9, 0, 131068, 9, 0, 131069, 9, 0, 131070, 9, 0, 131071, 9, 0, 65536, 9, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, 9, 0, 65541, 9, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, -1073741822, 0, 65546, -1073741822, 0, 65547, -1073741822, 0, 65548, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, 9, 0, 196604, 9, 0, 196605, 9, 0, 196606, 9, 0, 196607, 9, 0, 131072, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, 9, 0, 131077, 9, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, -1073741822, 0, 131082, -1073741822, 0, 131083, -1073741822, 0, 131084, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, 9, 0, 262140, 9, 0, 262141, 9, 0, 262142, 9, 0, 262143, 9, 0, 196608, 9, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, 9, 0, 196613, 9, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, -1073741822, 0, 196618, -1073741822, 0, 196619, -1073741822, 0, 196620, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, 9, 0, 327676, 9, 0, 327677, 9, 0, 327678, 9, 0, 327679, 9, 0, 262144, 9, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, 9, 0, 262149, 9, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, -1073741822, 0, 262154, -1073741822, 0, 262155, -1073741822, 0, 262156, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, 9, 0, 393212, 9, 0, 393213, 9, 0, 393214, 9, 0, 393215, 9, 0, 327680, 9, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, 9, 0, 327685, 9, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, -1073741822, 0, 327690, -1073741822, 0, 327691, -1073741822, 0, 327692, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, 9, 0, 458748, 9, 0, 458749, 9, 0, 458750, 9, 0, 458751, 9, 0, 393216, 9, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, 9, 0, 393221, 9, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, -1073741822, 0, 393226, -1073741822, 0, 393227, -1073741822, 0, 393228, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, 9, 0, 524284, 9, 0, 524285, 9, 0, 524286, 9, 0, 524287, 9, 0, 458752, 9, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, -1073741822, 0, 458762, -1073741822, 0, 458763, -1073741822, 0, 458764, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, 9, 0, 589820, 9, 0, 589821, 9, 0, 589822, 9, 0, 589823, 9, 0, 524288, 9, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, -1073741822, 0, 524298, -1073741822, 0, 524299, -1073741822, 0, 524300, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, 9, 0, 655356, 9, 0, 655357, 9, 0, 655358, 9, 0, 655359, 9, 0, 589824, 9, 0, 589825, 9, 0, 589826, 2, 0, 589827, 2, 0, 589828, 9, 0, 589829, 9, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, -1073741822, 0, 589834, -1073741822, 0, 589835, -1073741822, 0, 589836, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, 9, 0, 720892, 9, 0, 720893, 9, 0, 720894, 9, 0, 720895, 9, 0, 655360, 9, 0, 655361, 9, 0, 655362, 2, 0, 655363, 2, 0, 655364, 9, 0, 655365, 9, 0, 655366, 9, 0, 655367, 9, 0, 655368, 9, 0, 655369, -1073741822, 0, 655370, -1073741822, 0, 655371, -1073741822, 0, 655372, -1073741822, 0, 786424, 2, 0, 786425, -1610612734, 0, 786426, -1610612734, 0, 786427, 9, 0, 786428, 9, 0, 786429, 9, 0, 786430, 9, 0, 786431, 9, 0, 720896, 9, 0, 720897, 9, 0, 720898, 9, 0, 720899, 9, 0, 720900, 9, 0, 720901, 9, 0, 720902, 9, 0, 720903, 2, 0, 720904, 2, 0, 720905, -1073741822, 0, 720906, -1073741822, 0, 720907, -1073741822, 0, 720908, -1073741822, 0, 851960, 2, 0, 851961, -1610612734, 0, 851962, -1610612734, 0, 851963, 9, 0, 851964, 9, 0, 851965, 2, 0, 851966, 2, 0, 851967, 9, 0, 786432, 9, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, 9, 0, 786437, 9, 0, 786438, 9, 0, 786439, 2, 0, 786440, 2, 0, 786441, -1073741822, 0, 786442, -1073741822, 0, 786443, -1073741822, 0, 786444, -1073741822, 0, 917496, 2, 0, 917497, -1610612734, 0, 917498, -1610612734, 0, 917499, 9, 0, 917500, 9, 0, 917501, 1610612738, 0, 917502, 1610612738, 0, 917503, 9, 0, 851968, 9, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, 9, 0, 851973, 9, 0, 851974, 9, 0, 851975, 9, 0, 851976, 9, 0, 851977, -1073741822, 0, 851978, -1073741822, 0, 851979, -1073741822, 0, 851980, -1073741822, 0, 983032, 2, 0, 983033, -1610612734, 0, 983034, 2, 0, 983035, 9, 0, 983036, 9, 0, 983037, 9, 0, 983038, 9, 0, 983039, 9, 0, 917504, 9, 0, 917505, 9, 0, 917506, 2, 0, 917507, 2, 0, 917508, 9, 0, 917509, 9, 0, 917510, 9, 0, 917511, 9, 0, 917512, 9, 0, 917513, -1073741822, 0, 917514, -1073741822, 0, 917515, -1073741822, 0, 917516, -1073741822, 0, 1048568, 2, 0, 1048569, 2, 0, 1048570, 2, 0, 1048571, 9, 0, 1048572, 9, 0, 1048573, 9, 0, 1048574, 9, 0, 1048575, 9, 0, 983040, 9, 0, 983045, 9, 0, 983046, 9, 0, 983047, 9, 0, 983048, 9, 0, 983049, -1073741822, 0, 983050, -1073741822, 0, 983051, -1073741822, 0, 983052, -1073741822, 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, 1048577, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048580, 2, 0, 1048581, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, -1073741822, 0, 1048588, -1073741822, 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 ) [node name="UserInterface" parent="." instance=ExtResource( 13 )] @@ -39,11 +39,18 @@ wait_time = 20.0 rect_pivot_offset = Vector2( 389, 267 ) [node name="Flyer" parent="." instance=ExtResource( 8 )] -position = Vector2( 72, 320 ) +position = Vector2( 72, 301 ) +patrolling_slowdown = 0.4 [node name="NavigationAgent2D" parent="Flyer" index="6"] path_max_distance = 10.0 +[node name="Position2D2" parent="Flyer/PatrolPath" index="0"] +position = Vector2( -168, 59 ) + +[node name="Position2D3" parent="Flyer/PatrolPath" index="1"] +position = Vector2( 108, 49 ) + [node name="BlobbyCam" parent="." instance=ExtResource( 4 )] [node name="Blobby" parent="." instance=ExtResource( 12 )] diff --git a/src/Levels/Froggy Test Level.tscn b/src/Levels/Froggy Test Level.tscn index 3ad025e..4da5309 100644 --- a/src/Levels/Froggy Test Level.tscn +++ b/src/Levels/Froggy Test Level.tscn @@ -7,12 +7,12 @@ [ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=5] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Levels/Enemy Test Level.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.tscn" type="PackedScene" id=8] [ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=10] [ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=11] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=12] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=13] +[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=14] [sub_resource type="AnimationNodeStateMachinePlayback" id=4] @@ -39,13 +39,13 @@ collision_layer = 8 collision_mask = 8 bake_navigation = true format = 1 -tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, -1610612734, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, 9, 0, 10, 9, 0, 11, 9, 0, 12, 9, 0, 13, 9, 0, 14, 9, 0, 15, 9, 0, 16, 9, 0, 17, 9, 0, 18, 9, 0, 19, 9, 0, 20, 9, 0, 21, 9, 0, 22, 9, 0, 23, 9, 0, 24, 9, 0, 25, 9, 0, 26, 9, 0, 27, 9, 0, 28, 9, 0, 29, 9, 0, 30, 9, 0, 31, 9, 0, 32, 9, 0, 33, 9, 0, 34, 9, 0, 35, 9, 0, 36, 9, 0, 37, 9, 0, 38, 9, 0, 39, 9, 0, 40, 9, 0, 41, 9, 0, 42, 9, 0, 43, 9, 0, 44, 9, 0, 45, 9, 0, 46, 9, 0, 47, 9, 0, 48, 9, 0, 49, 9, 0, 50, 9, 0, 51, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, -1610612734, 0, 131068, 9, 0, 131069, 9, 0, 131070, 9, 0, 131071, 9, 0, 65536, 9, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, 9, 0, 65541, 9, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, 9, 0, 65546, 9, 0, 65547, 9, 0, 65548, 9, 0, 65549, 9, 0, 65550, 9, 0, 65551, 9, 0, 65552, 9, 0, 65553, 9, 0, 65554, 9, 0, 65555, 9, 0, 65556, 9, 0, 65557, 9, 0, 65558, 9, 0, 65559, 9, 0, 65560, 9, 0, 65561, 9, 0, 65562, 9, 0, 65563, 9, 0, 65564, 9, 0, 65565, 9, 0, 65566, 9, 0, 65567, 9, 0, 65568, 9, 0, 65569, 9, 0, 65570, 9, 0, 65571, 9, 0, 65572, 9, 0, 65573, 9, 0, 65574, 9, 0, 65575, 9, 0, 65576, 9, 0, 65577, 9, 0, 65578, 9, 0, 65579, 9, 0, 65580, 9, 0, 65581, 9, 0, 65582, 9, 0, 65583, 9, 0, 65584, 9, 0, 65585, 9, 0, 65586, 9, 0, 65587, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, -1610612734, 0, 196604, 9, 0, 196605, 9, 0, 196606, 9, 0, 196607, 9, 0, 131072, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, 9, 0, 131077, 9, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, 9, 0, 131082, 9, 0, 131083, 9, 0, 131084, 9, 0, 131085, 9, 0, 131086, 9, 0, 131087, 9, 0, 131088, 9, 0, 131089, 9, 0, 131090, 9, 0, 131091, 9, 0, 131092, 9, 0, 131093, 9, 0, 131094, 9, 0, 131095, 9, 0, 131096, 9, 0, 131097, 9, 0, 131098, 9, 0, 131099, 9, 0, 131100, 9, 0, 131101, 9, 0, 131102, 9, 0, 131103, 9, 0, 131104, 9, 0, 131105, 9, 0, 131106, 9, 0, 131107, 9, 0, 131108, 9, 0, 131109, 9, 0, 131110, 9, 0, 131111, 9, 0, 131112, 9, 0, 131113, 9, 0, 131114, 9, 0, 131115, 9, 0, 131116, 9, 0, 131117, 9, 0, 131118, 9, 0, 131119, 9, 0, 131120, 9, 0, 131121, 9, 0, 131122, 9, 0, 131123, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, -1610612734, 0, 262140, 9, 0, 262141, 9, 0, 262142, 9, 0, 262143, 9, 0, 196608, 9, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, 9, 0, 196613, 9, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, 9, 0, 196618, 9, 0, 196619, 9, 0, 196620, 9, 0, 196621, 9, 0, 196622, 9, 0, 196623, 9, 0, 196624, 9, 0, 196625, 9, 0, 196626, 9, 0, 196627, 9, 0, 196628, 9, 0, 196629, 9, 0, 196630, 9, 0, 196631, 9, 0, 196632, 9, 0, 196633, 9, 0, 196634, 9, 0, 196635, 9, 0, 196636, 9, 0, 196637, 9, 0, 196638, 9, 0, 196639, 9, 0, 196640, 9, 0, 196641, 9, 0, 196642, 9, 0, 196643, 9, 0, 196644, 9, 0, 196645, 9, 0, 196646, 9, 0, 196647, 9, 0, 196648, 9, 0, 196649, 9, 0, 196650, 9, 0, 196651, 9, 0, 196652, 9, 0, 196653, 9, 0, 196654, 9, 0, 196655, 9, 0, 196656, 9, 0, 196657, 9, 0, 196658, 9, 0, 196659, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, -1610612734, 0, 327676, 9, 0, 327677, 9, 0, 327678, 9, 0, 327679, 9, 0, 262144, 9, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, 9, 0, 262149, 9, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, 9, 0, 262154, 9, 0, 262155, 9, 0, 262156, 9, 0, 262157, 9, 0, 262158, 9, 0, 262159, 9, 0, 262160, 9, 0, 262161, 9, 0, 262162, 9, 0, 262163, 9, 0, 262164, 9, 0, 262165, 9, 0, 262166, 9, 0, 262167, 9, 0, 262168, 9, 0, 262169, 9, 0, 262170, 9, 0, 262171, 9, 0, 262172, 9, 0, 262173, 9, 0, 262174, 9, 0, 262175, 9, 0, 262176, 9, 0, 262177, 9, 0, 262178, 9, 0, 262179, 9, 0, 262180, 9, 0, 262181, 9, 0, 262182, 9, 0, 262183, 9, 0, 262184, 9, 0, 262185, 9, 0, 262186, 9, 0, 262187, 9, 0, 262188, 9, 0, 262189, 9, 0, 262190, 9, 0, 262191, 9, 0, 262192, 9, 0, 262193, 9, 0, 262194, 9, 0, 262195, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, -1610612734, 0, 393212, 9, 0, 393213, 9, 0, 393214, 9, 0, 393215, 9, 0, 327680, 9, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, 9, 0, 327685, 9, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, 9, 0, 327690, 9, 0, 327691, 9, 0, 327692, 9, 0, 327693, 9, 0, 327694, 9, 0, 327695, 9, 0, 327696, 9, 0, 327697, 9, 0, 327698, 9, 0, 327699, 9, 0, 327700, 9, 0, 327701, 9, 0, 327702, 9, 0, 327703, 9, 0, 327704, 9, 0, 327705, 9, 0, 327706, 9, 0, 327707, 9, 0, 327708, 9, 0, 327709, 9, 0, 327710, 9, 0, 327711, 9, 0, 327712, 9, 0, 327713, 9, 0, 327714, 9, 0, 327715, 9, 0, 327716, 9, 0, 327717, 9, 0, 327718, 9, 0, 327719, 9, 0, 327720, 9, 0, 327721, 9, 0, 327722, 9, 0, 327723, 9, 0, 327724, 9, 0, 327725, 9, 0, 327726, 9, 0, 327727, 9, 0, 327728, 9, 0, 327729, 9, 0, 327730, 9, 0, 327731, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, -1610612734, 0, 458748, 9, 0, 458749, 9, 0, 458750, 9, 0, 458751, 9, 0, 393216, 9, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, 9, 0, 393221, 9, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, 9, 0, 393226, 9, 0, 393227, 9, 0, 393228, 9, 0, 393229, 9, 0, 393230, 9, 0, 393231, 9, 0, 393232, 9, 0, 393233, 9, 0, 393234, 9, 0, 393235, 9, 0, 393236, 9, 0, 393237, 9, 0, 393238, 9, 0, 393239, 9, 0, 393240, 9, 0, 393241, 9, 0, 393242, 9, 0, 393243, 9, 0, 393244, 9, 0, 393245, 9, 0, 393246, 9, 0, 393247, 9, 0, 393248, 9, 0, 393249, 9, 0, 393250, 9, 0, 393251, 9, 0, 393252, 9, 0, 393253, 9, 0, 393254, 9, 0, 393255, 9, 0, 393256, 9, 0, 393257, 9, 0, 393258, 9, 0, 393259, 9, 0, 393260, 9, 0, 393261, 9, 0, 393262, 9, 0, 393263, 9, 0, 393264, 9, 0, 393265, 9, 0, 393266, 9, 0, 393267, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, -1610612734, 0, 524284, 9, 0, 524285, 9, 0, 524286, 9, 0, 524287, 9, 0, 458752, 9, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, 9, 0, 458762, 9, 0, 458763, 9, 0, 458764, 9, 0, 458765, 9, 0, 458766, 9, 0, 458767, 9, 0, 458768, 9, 0, 458769, 9, 0, 458770, 9, 0, 458771, 9, 0, 458772, 9, 0, 458773, 9, 0, 458774, 9, 0, 458775, 9, 0, 458776, 9, 0, 458777, 9, 0, 458778, 9, 0, 458779, 9, 0, 458780, 9, 0, 458781, 9, 0, 458782, 9, 0, 458783, 9, 0, 458784, 9, 0, 458785, 9, 0, 458786, 9, 0, 458787, 9, 0, 458788, 9, 0, 458789, 9, 0, 458790, 9, 0, 458791, 9, 0, 458792, 9, 0, 458793, 9, 0, 458794, 9, 0, 458795, 9, 0, 458796, 9, 0, 458797, 9, 0, 458798, 9, 0, 458799, 9, 0, 458800, 9, 0, 458801, 9, 0, 458802, 9, 0, 458803, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, -1610612734, 0, 589820, 9, 0, 589821, 9, 0, 589822, 9, 0, 589823, 9, 0, 524288, 9, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, 9, 0, 524298, 9, 0, 524299, 9, 0, 524300, 9, 0, 524301, 9, 0, 524302, 9, 0, 524303, 9, 0, 524304, 9, 0, 524305, 9, 0, 524306, 9, 0, 524307, 9, 0, 524308, 9, 0, 524309, 9, 0, 524310, 9, 0, 524311, 9, 0, 524312, 9, 0, 524313, 9, 0, 524314, 9, 0, 524315, 9, 0, 524316, 9, 0, 524317, 9, 0, 524318, 9, 0, 524319, 9, 0, 524320, 9, 0, 524321, 9, 0, 524322, 9, 0, 524323, 9, 0, 524324, 9, 0, 524325, 9, 0, 524326, 9, 0, 524327, 9, 0, 524328, 9, 0, 524329, 9, 0, 524330, 9, 0, 524331, 9, 0, 524332, 9, 0, 524333, 9, 0, 524334, 9, 0, 524335, 9, 0, 524336, 9, 0, 524337, 9, 0, 524338, 9, 0, 524339, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, -1610612734, 0, 655356, 9, 0, 655357, 9, 0, 655358, 9, 0, 655359, 9, 0, 589824, 9, 0, 589825, 9, 0, 589826, 9, 0, 589827, 9, 0, 589828, 9, 0, 589829, 9, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, 9, 0, 589834, 9, 0, 589835, 9, 0, 589836, 9, 0, 589837, 9, 0, 589838, 9, 0, 589839, 9, 0, 589840, 9, 0, 589841, 9, 0, 589842, 9, 0, 589843, 9, 0, 589844, 9, 0, 589845, 9, 0, 589846, 9, 0, 589847, 9, 0, 589848, 9, 0, 589849, 9, 0, 589850, 9, 0, 589851, 9, 0, 589852, 9, 0, 589853, 9, 0, 589854, 9, 0, 589855, 9, 0, 589856, 9, 0, 589857, 9, 0, 589858, 9, 0, 589859, 9, 0, 589860, 9, 0, 589861, 9, 0, 589862, 9, 0, 589863, 9, 0, 589864, 9, 0, 589865, 9, 0, 589866, 9, 0, 589867, 9, 0, 589868, 9, 0, 589869, 9, 0, 589870, 9, 0, 589871, 9, 0, 589872, 9, 0, 589873, 9, 0, 589874, 9, 0, 589875, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, -1610612734, 0, 720892, 9, 0, 720893, 9, 0, 720894, 9, 0, 720895, 9, 0, 655360, 9, 0, 655361, 9, 0, 655362, 9, 0, 655363, 9, 0, 655364, 9, 0, 655365, 9, 0, 655366, 9, 0, 655367, 9, 0, 655368, 9, 0, 655369, 9, 0, 655370, 9, 0, 655371, 9, 0, 655372, 9, 0, 655373, 9, 0, 655374, 9, 0, 655375, 9, 0, 655376, 9, 0, 655377, 9, 0, 655378, 9, 0, 655379, 9, 0, 655380, 9, 0, 655381, 9, 0, 655382, 9, 0, 655383, 9, 0, 655384, 9, 0, 655385, 9, 0, 655386, 9, 0, 655387, 9, 0, 655388, 9, 0, 655389, 9, 0, 655390, 9, 0, 655391, 9, 0, 655392, 9, 0, 655393, 9, 0, 655394, 9, 0, 655395, 9, 0, 655396, 9, 0, 655397, 9, 0, 655398, 9, 0, 655399, 9, 0, 655400, 9, 0, 655401, 9, 0, 655402, 9, 0, 655403, 9, 0, 655404, 9, 0, 655405, 9, 0, 655406, 9, 0, 655407, 9, 0, 655408, 9, 0, 655409, 9, 0, 655410, 9, 0, 655411, -1073741822, 0, 786424, 2, 0, 786425, 9, 0, 786426, 9, 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, 720903, 2, 0, 720904, 2, 0, 720905, 2, 0, 720906, 2, 0, 720907, 2, 0, 720908, 2, 0, 720909, 2, 0, 720910, 2, 0, 720911, 2, 0, 720912, 2, 0, 720913, 2, 0, 720914, -1610612734, 0, 720915, 9, 0, 720916, 9, 0, 720917, 9, 0, 720918, 9, 0, 720919, 9, 0, 720920, 9, 0, 720921, 9, 0, 720922, 9, 0, 720923, 9, 0, 720924, 9, 0, 720925, 9, 0, 720926, 9, 0, 720927, 9, 0, 720928, 9, 0, 720929, 9, 0, 720930, 9, 0, 720931, 9, 0, 720932, 9, 0, 720933, 9, 0, 720934, 9, 0, 720935, 9, 0, 720936, 9, 0, 720937, 9, 0, 720938, 9, 0, 720939, 9, 0, 720940, 9, 0, 720941, 9, 0, 720942, 9, 0, 720943, 9, 0, 720944, 9, 0, 720945, 9, 0, 720946, 9, 0, 720947, -1073741822, 0, 851960, 2, 0, 851961, 9, 0, 851962, 9, 0, 851963, 9, 0, 851964, 9, 0, 851965, 9, 0, 851966, 9, 0, 851967, 9, 0, 786432, 9, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, 9, 0, 786437, 9, 0, 786438, 9, 0, 786439, 9, 0, 786440, 9, 0, 786441, 9, 0, 786442, 9, 0, 786443, 9, 0, 786444, 9, 0, 786445, 9, 0, 786446, 9, 0, 786447, 9, 0, 786448, 9, 0, 786449, 9, 0, 786450, -1610612729, 0, 786451, -1610612729, 0, 786452, 9, 0, 786453, 9, 0, 786454, 9, 0, 786455, 9, 0, 786456, 9, 0, 786457, 9, 0, 786458, 9, 0, 786459, 9, 0, 786460, 9, 0, 786461, 9, 0, 786462, 2, 0, 786463, -1610612729, 0, 786464, -1610612729, 0, 786465, -1610612729, 0, 786466, -1610612729, 0, 786467, -1610612729, 0, 786468, 9, 0, 786469, 9, 0, 786470, 9, 0, 786471, 9, 0, 786472, 9, 0, 786473, 9, 0, 786474, 9, 0, 786475, 9, 0, 786476, 9, 0, 786477, 9, 0, 786478, 9, 0, 786479, 9, 0, 786480, 9, 0, 786481, 9, 0, 786482, 9, 0, 786483, -1073741822, 0, 917496, 2, 0, 917497, 9, 0, 917498, 9, 0, 917499, 9, 0, 917500, 9, 0, 917501, 9, 0, 917502, 9, 0, 917503, 9, 0, 851968, 9, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, 9, 0, 851973, 9, 0, 851974, 9, 0, 851975, 9, 0, 851976, 9, 0, 851977, 9, 0, 851978, 9, 0, 851979, 9, 0, 851980, 9, 0, 851981, 9, 0, 851982, 9, 0, 851983, 9, 0, 851984, 9, 0, 851985, 9, 0, 851986, -1610612729, 0, 851987, -1610612729, 0, 851988, 2, 0, 851989, 2, 0, 851990, 9, 0, 851991, 9, 0, 851992, 9, 0, 851993, 9, 0, 851994, 9, 0, 851995, 9, 0, 851996, 9, 0, 851997, -1610612729, 0, 851998, 2, 0, 851999, -1610612729, 0, 852000, -1610612729, 0, 852001, -1610612729, 0, 852002, -1610612729, 0, 852003, -1610612729, 0, 852004, 9, 0, 852005, 9, 0, 852006, 9, 0, 852007, 9, 0, 852008, 9, 0, 852009, 9, 0, 852010, 9, 0, 852011, 9, 0, 852012, 9, 0, 852013, 9, 0, 852014, 9, 0, 852015, 9, 0, 852016, 9, 0, 852017, 9, 0, 852018, 9, 0, 852019, -1073741822, 0, 983032, 2, 0, 983034, 2, 0, 983035, 2, 0, 983036, 2, 0, 983037, 9, 0, 983038, 9, 0, 983039, 9, 0, 917504, 9, 0, 917505, 9, 0, 917506, 9, 0, 917507, 9, 0, 917508, 9, 0, 917509, 9, 0, 917510, 2, 0, 917511, 1610612738, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, -1610612729, 0, 917526, 2, 0, 917527, 2, 0, 917529, 2, 0, 917530, -1610612729, 0, 917531, 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, 1048575, 9, 0, 983040, 9, 0, 983041, 9, 0, 983042, 9, 0, 983043, 9, 0, 983044, 9, 0, 983045, 9, 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, 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 ) +tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, -1610612734, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, 9, 0, 10, 9, 0, 11, 9, 0, 12, 9, 0, 13, 9, 0, 14, 9, 0, 15, 9, 0, 16, 9, 0, 17, 9, 0, 18, 9, 0, 19, 9, 0, 20, 9, 0, 21, 9, 0, 22, 9, 0, 23, 9, 0, 24, 9, 0, 25, 9, 0, 26, 9, 0, 27, 9, 0, 28, 9, 0, 29, 9, 0, 30, 9, 0, 31, 9, 0, 32, 9, 0, 33, 9, 0, 34, 9, 0, 35, 9, 0, 36, 9, 0, 37, 9, 0, 38, 9, 0, 39, 9, 0, 40, 9, 0, 41, 9, 0, 42, 9, 0, 43, 9, 0, 44, 9, 0, 45, 9, 0, 46, 9, 0, 47, 9, 0, 48, 9, 0, 49, 9, 0, 50, 9, 0, 51, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, -1610612734, 0, 131068, 9, 0, 131069, 9, 0, 131070, 9, 0, 131071, 9, 0, 65536, 9, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, 9, 0, 65541, 9, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, 9, 0, 65546, 9, 0, 65547, 9, 0, 65548, 9, 0, 65549, 9, 0, 65550, 9, 0, 65551, 9, 0, 65552, 9, 0, 65553, 9, 0, 65554, 9, 0, 65555, 9, 0, 65556, 9, 0, 65557, 9, 0, 65558, 9, 0, 65559, 9, 0, 65560, 9, 0, 65561, 9, 0, 65562, 9, 0, 65563, 9, 0, 65564, 9, 0, 65565, 9, 0, 65566, 9, 0, 65567, 9, 0, 65568, 9, 0, 65569, 9, 0, 65570, 9, 0, 65571, 9, 0, 65572, 9, 0, 65573, 9, 0, 65574, 9, 0, 65575, 9, 0, 65576, 9, 0, 65577, 9, 0, 65578, 9, 0, 65579, 9, 0, 65580, 9, 0, 65581, 9, 0, 65582, 9, 0, 65583, 9, 0, 65584, 9, 0, 65585, 9, 0, 65586, 9, 0, 65587, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, -1610612734, 0, 196604, 9, 0, 196605, 9, 0, 196606, 9, 0, 196607, 9, 0, 131072, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, 9, 0, 131077, 9, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, 9, 0, 131082, 9, 0, 131083, 9, 0, 131084, 9, 0, 131085, 9, 0, 131086, 9, 0, 131087, 9, 0, 131088, 9, 0, 131089, 9, 0, 131090, 9, 0, 131091, 9, 0, 131092, 9, 0, 131093, 9, 0, 131094, 9, 0, 131095, 9, 0, 131096, 9, 0, 131097, 9, 0, 131098, 9, 0, 131099, 9, 0, 131100, 9, 0, 131101, 9, 0, 131102, 9, 0, 131103, 9, 0, 131104, 9, 0, 131105, 9, 0, 131106, 9, 0, 131107, 9, 0, 131108, 9, 0, 131109, 9, 0, 131110, 9, 0, 131111, 9, 0, 131112, 9, 0, 131113, 9, 0, 131114, 9, 0, 131115, 9, 0, 131116, 9, 0, 131117, 9, 0, 131118, 9, 0, 131119, 9, 0, 131120, 9, 0, 131121, 9, 0, 131122, 9, 0, 131123, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, -1610612734, 0, 262140, 9, 0, 262141, 9, 0, 262142, 9, 0, 262143, 9, 0, 196608, 9, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, 9, 0, 196613, 9, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, 9, 0, 196618, 9, 0, 196619, 9, 0, 196620, 9, 0, 196621, 9, 0, 196622, 9, 0, 196623, 9, 0, 196624, 9, 0, 196625, 9, 0, 196626, 9, 0, 196627, 9, 0, 196628, 9, 0, 196629, 9, 0, 196630, 9, 0, 196631, 9, 0, 196632, 9, 0, 196633, 9, 0, 196634, 9, 0, 196635, 9, 0, 196636, 9, 0, 196637, 9, 0, 196638, 9, 0, 196639, 9, 0, 196640, 9, 0, 196641, 9, 0, 196642, 9, 0, 196643, 9, 0, 196644, 9, 0, 196645, 9, 0, 196646, 9, 0, 196647, 9, 0, 196648, 9, 0, 196649, 9, 0, 196650, 9, 0, 196651, 9, 0, 196652, 9, 0, 196653, 9, 0, 196654, 9, 0, 196655, 9, 0, 196656, 9, 0, 196657, 9, 0, 196658, 9, 0, 196659, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, -1610612734, 0, 327676, 9, 0, 327677, 9, 0, 327678, 9, 0, 327679, 9, 0, 262144, 9, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, 9, 0, 262149, 9, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, 9, 0, 262154, 9, 0, 262155, 9, 0, 262156, 9, 0, 262157, 9, 0, 262158, 9, 0, 262159, 9, 0, 262160, 9, 0, 262161, 9, 0, 262162, 9, 0, 262163, 9, 0, 262164, 9, 0, 262165, 9, 0, 262166, 9, 0, 262167, 9, 0, 262168, 9, 0, 262169, 9, 0, 262170, 9, 0, 262171, 9, 0, 262172, 9, 0, 262173, 9, 0, 262174, 9, 0, 262175, 9, 0, 262176, 9, 0, 262177, 9, 0, 262178, 9, 0, 262179, 9, 0, 262180, 9, 0, 262181, 9, 0, 262182, 9, 0, 262183, 9, 0, 262184, 9, 0, 262185, 9, 0, 262186, 9, 0, 262187, 9, 0, 262188, 9, 0, 262189, 9, 0, 262190, 9, 0, 262191, 9, 0, 262192, 9, 0, 262193, 9, 0, 262194, 9, 0, 262195, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, -1610612734, 0, 393212, 9, 0, 393213, 9, 0, 393214, 9, 0, 393215, 9, 0, 327680, 9, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, 9, 0, 327685, 9, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, 9, 0, 327690, 9, 0, 327691, 9, 0, 327692, 9, 0, 327693, 9, 0, 327694, 9, 0, 327695, 9, 0, 327696, 9, 0, 327697, 9, 0, 327698, 9, 0, 327699, 9, 0, 327700, 9, 0, 327701, 9, 0, 327702, 9, 0, 327703, 9, 0, 327704, 9, 0, 327705, 9, 0, 327706, 9, 0, 327707, 9, 0, 327708, 9, 0, 327709, 9, 0, 327710, 9, 0, 327711, 9, 0, 327712, 9, 0, 327713, 9, 0, 327714, 9, 0, 327715, 9, 0, 327716, 9, 0, 327717, 9, 0, 327718, 9, 0, 327719, 9, 0, 327720, 9, 0, 327721, 9, 0, 327722, 9, 0, 327723, 9, 0, 327724, 9, 0, 327725, 9, 0, 327726, 9, 0, 327727, 9, 0, 327728, 9, 0, 327729, 9, 0, 327730, 9, 0, 327731, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, -1610612734, 0, 458748, 9, 0, 458749, 9, 0, 458750, 9, 0, 458751, 9, 0, 393216, 9, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, 9, 0, 393221, 9, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, 9, 0, 393226, 9, 0, 393227, 9, 0, 393228, 9, 0, 393229, 9, 0, 393230, 9, 0, 393231, 9, 0, 393232, 9, 0, 393233, 9, 0, 393234, 9, 0, 393235, 9, 0, 393236, 9, 0, 393237, 9, 0, 393238, 9, 0, 393239, 9, 0, 393240, 9, 0, 393241, 9, 0, 393242, 9, 0, 393243, 9, 0, 393244, 9, 0, 393245, 9, 0, 393246, 9, 0, 393247, 9, 0, 393248, 9, 0, 393249, 9, 0, 393250, 9, 0, 393251, 9, 0, 393252, 9, 0, 393253, 9, 0, 393254, 9, 0, 393255, 9, 0, 393256, 9, 0, 393257, 9, 0, 393258, 9, 0, 393259, 9, 0, 393260, 9, 0, 393261, 9, 0, 393262, 9, 0, 393263, 9, 0, 393264, 9, 0, 393265, 9, 0, 393266, 9, 0, 393267, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, -1610612734, 0, 524284, 9, 0, 524285, 9, 0, 524286, 9, 0, 524287, 9, 0, 458752, 9, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, 9, 0, 458762, 9, 0, 458763, 9, 0, 458764, 9, 0, 458765, 9, 0, 458766, 9, 0, 458767, 9, 0, 458768, 9, 0, 458769, 9, 0, 458770, 9, 0, 458771, 9, 0, 458772, 9, 0, 458773, 9, 0, 458774, 9, 0, 458775, 9, 0, 458776, 9, 0, 458777, 9, 0, 458778, 9, 0, 458779, 9, 0, 458780, 9, 0, 458781, 9, 0, 458782, 9, 0, 458783, 9, 0, 458784, 9, 0, 458785, 9, 0, 458786, 9, 0, 458787, 9, 0, 458788, 9, 0, 458789, 9, 0, 458790, 9, 0, 458791, 9, 0, 458792, 9, 0, 458793, 9, 0, 458794, 9, 0, 458795, 9, 0, 458796, 9, 0, 458797, 9, 0, 458798, 9, 0, 458799, 9, 0, 458800, 9, 0, 458801, 9, 0, 458802, 9, 0, 458803, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, -1610612734, 0, 589820, 9, 0, 589821, 9, 0, 589822, 9, 0, 589823, 9, 0, 524288, 9, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, 9, 0, 524298, 9, 0, 524299, 9, 0, 524300, 9, 0, 524301, 9, 0, 524302, 9, 0, 524303, 9, 0, 524304, 9, 0, 524305, 9, 0, 524306, 9, 0, 524307, 9, 0, 524308, 9, 0, 524309, 9, 0, 524310, 9, 0, 524311, 9, 0, 524312, 9, 0, 524313, 9, 0, 524314, 9, 0, 524315, 9, 0, 524316, 9, 0, 524317, 9, 0, 524318, 9, 0, 524319, 9, 0, 524320, 9, 0, 524321, 9, 0, 524322, 9, 0, 524323, 9, 0, 524324, 9, 0, 524325, 9, 0, 524326, 9, 0, 524327, 9, 0, 524328, 9, 0, 524329, 9, 0, 524330, 9, 0, 524331, 9, 0, 524332, 9, 0, 524333, 9, 0, 524334, 9, 0, 524335, 9, 0, 524336, 9, 0, 524337, 9, 0, 524338, 9, 0, 524339, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, -1610612734, 0, 655356, 9, 0, 655357, 9, 0, 655358, 9, 0, 655359, 9, 0, 589824, 9, 0, 589825, 9, 0, 589826, 9, 0, 589827, 9, 0, 589828, 9, 0, 589829, 9, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, 9, 0, 589834, 9, 0, 589835, 9, 0, 589836, 9, 0, 589837, 9, 0, 589838, 9, 0, 589839, 9, 0, 589840, 9, 0, 589841, 9, 0, 589842, 9, 0, 589843, 9, 0, 589844, 9, 0, 589845, 9, 0, 589846, 9, 0, 589847, 9, 0, 589848, 9, 0, 589849, 9, 0, 589850, 9, 0, 589851, 9, 0, 589852, 9, 0, 589853, 9, 0, 589854, 9, 0, 589855, 9, 0, 589856, 9, 0, 589857, 9, 0, 589858, 9, 0, 589859, 9, 0, 589860, 9, 0, 589861, 9, 0, 589862, 9, 0, 589863, 9, 0, 589864, 9, 0, 589865, 9, 0, 589866, 9, 0, 589867, 9, 0, 589868, 9, 0, 589869, 9, 0, 589870, 9, 0, 589871, 9, 0, 589872, 9, 0, 589873, 9, 0, 589874, 9, 0, 589875, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, -1610612734, 0, 720892, 9, 0, 720893, 9, 0, 720894, 9, 0, 720895, 9, 0, 655360, 9, 0, 655361, 9, 0, 655362, 9, 0, 655363, 9, 0, 655364, 9, 0, 655365, 9, 0, 655366, 9, 0, 655367, 9, 0, 655368, 9, 0, 655369, 9, 0, 655370, 9, 0, 655371, 9, 0, 655372, 9, 0, 655373, 9, 0, 655374, 9, 0, 655375, 9, 0, 655376, 9, 0, 655377, 9, 0, 655378, 9, 0, 655379, 9, 0, 655380, 9, 0, 655381, 9, 0, 655382, 9, 0, 655383, 9, 0, 655384, 9, 0, 655385, 9, 0, 655386, 9, 0, 655387, 9, 0, 655388, 9, 0, 655389, 9, 0, 655390, 9, 0, 655391, 9, 0, 655392, 9, 0, 655393, 9, 0, 655394, 9, 0, 655395, 9, 0, 655396, 9, 0, 655397, 9, 0, 655398, 9, 0, 655399, 9, 0, 655400, 9, 0, 655401, 9, 0, 655402, 9, 0, 655403, 9, 0, 655404, 9, 0, 655405, 9, 0, 655406, 9, 0, 655407, 9, 0, 655408, 9, 0, 655409, 9, 0, 655410, 9, 0, 655411, -1073741822, 0, 786424, 2, 0, 786425, 9, 0, 786426, 9, 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, 720903, 2, 0, 720904, 2, 0, 720905, 2, 0, 720906, 2, 0, 720907, 2, 0, 720908, 2, 0, 720909, 2, 0, 720910, 2, 0, 720911, 2, 0, 720912, 2, 0, 720913, 2, 0, 720914, -1610612734, 0, 720915, 9, 0, 720916, 9, 0, 720917, 9, 0, 720918, 9, 0, 720919, 9, 0, 720920, 9, 0, 720921, 9, 0, 720922, 9, 0, 720923, 9, 0, 720924, 9, 0, 720925, 9, 0, 720926, 9, 0, 720932, 9, 0, 720933, 9, 0, 720934, 9, 0, 720935, 9, 0, 720936, 9, 0, 720937, 9, 0, 720938, 9, 0, 720939, 9, 0, 720940, 9, 0, 720941, 9, 0, 720942, 9, 0, 720943, 9, 0, 720944, 9, 0, 720945, 9, 0, 720946, 9, 0, 720947, -1073741822, 0, 851960, 2, 0, 851961, 9, 0, 851962, 9, 0, 851963, 9, 0, 851964, 9, 0, 851965, 9, 0, 851966, 9, 0, 851967, 9, 0, 786432, 9, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, 9, 0, 786437, 9, 0, 786438, 9, 0, 786439, 9, 0, 786440, 9, 0, 786441, 9, 0, 786442, 9, 0, 786443, 9, 0, 786444, 9, 0, 786445, 9, 0, 786446, 9, 0, 786447, 9, 0, 786448, 9, 0, 786449, 9, 0, 786450, -1610612729, 0, 786451, -1610612729, 0, 786452, 9, 0, 786453, 9, 0, 786454, 9, 0, 786455, 9, 0, 786456, 9, 0, 786457, 9, 0, 786458, 9, 0, 786459, 9, 0, 786460, 9, 0, 786470, 9, 0, 786471, 9, 0, 786472, 9, 0, 786473, 9, 0, 786474, 9, 0, 786475, 9, 0, 786476, 9, 0, 786477, 9, 0, 786478, 9, 0, 786479, 9, 0, 786480, 9, 0, 786481, 9, 0, 786482, 9, 0, 786483, -1073741822, 0, 917496, 2, 0, 917497, 9, 0, 917498, 9, 0, 917499, 9, 0, 917500, 9, 0, 917501, 9, 0, 917502, 9, 0, 917503, 9, 0, 851968, 9, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, 9, 0, 851973, 9, 0, 851974, 9, 0, 851975, 9, 0, 851976, 9, 0, 851977, 9, 0, 851978, 9, 0, 851979, 9, 0, 851980, 9, 0, 851981, 9, 0, 851982, 9, 0, 851983, 9, 0, 851984, 9, 0, 851985, 9, 0, 851986, -1610612729, 0, 851987, -1610612729, 0, 851988, 2, 0, 851989, 2, 0, 851990, 9, 0, 851991, 9, 0, 851992, 9, 0, 851993, 9, 0, 851994, 9, 0, 851995, 9, 0, 852005, 9, 0, 852006, 9, 0, 852007, 9, 0, 852008, 9, 0, 852009, 9, 0, 852010, 9, 0, 852011, 9, 0, 852012, 9, 0, 852013, 9, 0, 852014, 9, 0, 852015, 9, 0, 852016, 9, 0, 852017, 9, 0, 852018, 9, 0, 852019, -1073741822, 0, 983032, 2, 0, 983034, 2, 0, 983035, 2, 0, 983036, 2, 0, 983037, 9, 0, 983038, 9, 0, 983039, 9, 0, 917504, 9, 0, 917505, 9, 0, 917506, 9, 0, 917507, 9, 0, 917508, 9, 0, 917509, 9, 0, 917510, 2, 0, 917511, 1610612738, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, -1610612729, 0, 917526, 2, 0, 917527, 2, 0, 917529, 2, 0, 917530, -1610612729, 0, 917531, 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, 1048575, 9, 0, 983040, 9, 0, 983041, 9, 0, 983042, 9, 0, 983043, 9, 0, 983044, 9, 0, 983045, 9, 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, 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( 11 )] position = Vector2( 36, 396 ) [node name="AnimatedSprite" parent="Spikes" index="1"] -frame = 15 +frame = 8 [node name="Spikes2" parent="." instance=ExtResource( 11 )] position = Vector2( 132, 396 ) @@ -65,9 +65,6 @@ position = Vector2( 684, 348 ) [node name="Spikes6" parent="." instance=ExtResource( 11 )] position = Vector2( 324, 348 ) -[node name="WhatAreFrog" parent="." instance=ExtResource( 8 )] -position = Vector2( 396, 327 ) - [node name="BlobbyCam" parent="." instance=ExtResource( 4 )] [node name="Blobby" parent="." instance=ExtResource( 12 )] @@ -137,12 +134,23 @@ position = Vector2( -1464, 84 ) monitoring = false next_scene = ExtResource( 7 ) -[node name="BoundFrog" parent="." instance=ExtResource( 9 )] -position = Vector2( 644, 326 ) - [node name="GameplaySignalManager" type="Node2D" parent="."] script = ExtResource( 2 ) +[node name="Flyer" parent="." instance=ExtResource( 14 )] +position = Vector2( 241, 207 ) +aggressive = false +patrolling_slowdown = 0.3 + +[node name="Position2D2" parent="Flyer/PatrolPath" index="0"] +position = Vector2( -1, -23 ) + +[node name="Position2D3" parent="Flyer/PatrolPath" index="1"] +position = Vector2( -1, 20 ) + +[node name="BoundFrog" parent="." instance=ExtResource( 9 )] +position = Vector2( 320, 254 ) + [connection signal="ready" from="." to="BoundFrog" method="_on_LevelTemplate_ready"] [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"] @@ -156,3 +164,6 @@ script = ExtResource( 2 ) [editable path="TreeWhyButtons/WhyButton1"] [editable path="TreeWhyButtons/WhyButton2"] [editable path="TreeWhyButtons/WhyButton3"] +[editable path="Flyer"] +[editable path="BoundFrog"] +[editable path="BoundFrog/RopeAnchor"] diff --git a/src/Utilities/Physic/PhysicsFunc.gd b/src/Utilities/Physic/PhysicsFunc.gd index d659994..9ebf5fb 100644 --- a/src/Utilities/Physic/PhysicsFunc.gd +++ b/src/Utilities/Physic/PhysicsFunc.gd @@ -18,3 +18,8 @@ static func two_step_euler(v0, force, mass, delta) -> float: var v1 = v0 + force / mass * delta var v2 = v1 + force / mass * delta return (v1 + v2) / 2 + +static func two_step_euler_vec(v0: Vector2, force: Vector2, mass: float, delta: float) -> Vector2: + var v1 = v0 + force / mass * delta + var v2 = v1 + force / mass * delta + return (v1 + v2) / 2 \ No newline at end of file