feat: gates, cam margin fix, new levels, death anim choices etc. :"D
This commit is contained in:
parent
307399349c
commit
76a13a83dc
BIN
assets/contraption/gateButton.png
Normal file
BIN
assets/contraption/gateButton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 301 B |
35
assets/contraption/gateButton.png.import
Normal file
35
assets/contraption/gateButton.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/gateButton.png-cdc009ccc6e5ca1498a619945f29b211.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/contraption/gateButton.png"
|
||||
dest_files=[ "res://.import/gateButton.png-cdc009ccc6e5ca1498a619945f29b211.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
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
assets/contraption/portal1.png
Normal file
BIN
assets/contraption/portal1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
35
assets/contraption/portal1.png.import
Normal file
35
assets/contraption/portal1.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/portal1.png-21062f2defc38e233041cea099e7b143.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/contraption/portal1.png"
|
||||
dest_files=[ "res://.import/portal1.png-21062f2defc38e233041cea099e7b143.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
|
||||
BIN
assets/contraption/portal2.png
Normal file
BIN
assets/contraption/portal2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
35
assets/contraption/portal2.png.import
Normal file
35
assets/contraption/portal2.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/portal2.png-3c3db3273d45db1fe32fbfb4c9d8b293.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/contraption/portal2.png"
|
||||
dest_files=[ "res://.import/portal2.png-3c3db3273d45db1fe32fbfb4c9d8b293.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
|
||||
@ -1,6 +1,8 @@
|
||||
extends KinematicBody2D
|
||||
class_name Actor
|
||||
|
||||
#TODO Split the blobby specific parts up from this
|
||||
|
||||
onready var levelState := get_tree().root.get_child(1).get_node("%LevelState")
|
||||
onready var signalManager := get_tree().root.get_child(1).get_node("%SignalManager")
|
||||
|
||||
@ -27,7 +29,7 @@ var init_acceleration_force := {
|
||||
# Oriented around deltas of 0.0166666...s
|
||||
# newtonmeters is the unit
|
||||
var acceleration_force := {
|
||||
"walk": Vector2(1800, 1300),
|
||||
"walk": Vector2(1800, 1350),
|
||||
"fall": Vector2(1800, 0),
|
||||
"jump": Vector2(1800, 0),
|
||||
"idle": Vector2(1800, 1233),
|
||||
@ -40,7 +42,7 @@ var acceleration_force := {
|
||||
var _gravity: float = PhysicsConst.gravity
|
||||
# Mass of Blobby
|
||||
# Kilograms
|
||||
var mass := 6.5
|
||||
export var mass := 6.5
|
||||
|
||||
var velocity := Vector2.ZERO
|
||||
|
||||
|
||||
@ -258,6 +258,7 @@ func calculate_jump_velocity(
|
||||
var state = player_state_machine.state
|
||||
var additive_jump_force = velocity_jump_boost_ratio * abs(velocity.x) * mass
|
||||
#TODO Single out stomping and make betta
|
||||
#TODO too much force intially and too high with frog jump
|
||||
if stomping:
|
||||
additive_jump_force += stomp_feedback / delta
|
||||
stomp_time -= delta
|
||||
@ -419,7 +420,7 @@ func receive_power_up(kind: String) -> void:
|
||||
shielded = true
|
||||
|
||||
# TODO Maybe this should be a state in itself?
|
||||
func die() -> void:
|
||||
func die(animation_number: int = 0) -> void:
|
||||
if shielded:
|
||||
shielded = false
|
||||
$BubbleShieldViewport/IridescenceBall.visible = false
|
||||
@ -430,9 +431,10 @@ func die() -> void:
|
||||
return
|
||||
z_index = 1
|
||||
$BlobbySprite.material = death_shader
|
||||
signalManager.emit_signal("player_died")
|
||||
signalManager.emit_signal("player_died", animation_number)
|
||||
$BlobbySprite/AnimationTree.active = false
|
||||
$BlobbySprite/BlobbymationPlayer.play("dying3")
|
||||
if animation_number < 1:
|
||||
$BlobbySprite/BlobbymationPlayer.play("expandingDisolve")
|
||||
|
||||
# TODO Checkpoint system
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
[ext_resource path="res://assets/effects/jump-point.png" type="Texture" id=8]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 12.9698, 8.9748 )
|
||||
extents = Vector2( 14.9127, 5.98593 )
|
||||
|
||||
[sub_resource type="StreamTexture" id=62]
|
||||
load_path = "res://.import/blobby-spritesheet.png-205c8efc79bec685345a637ed2dcfc9b.stex"
|
||||
@ -310,7 +310,7 @@ graph_offset = Vector2( 1057.54, -162.431 )
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=48]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 12, 8.99662 )
|
||||
extents = Vector2( 12.971, 8.99662 )
|
||||
|
||||
[sub_resource type="Animation" id=17]
|
||||
length = 0.001
|
||||
@ -4199,7 +4199,7 @@ process_priority = -1
|
||||
collision_mask = 254
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="BlobbySkin"]
|
||||
position = Vector2( 1, -8.975 )
|
||||
position = Vector2( 0.0286326, -10.0053 )
|
||||
scale = Vector2( 1.03, 1.04 )
|
||||
shape = SubResource( 2 )
|
||||
|
||||
@ -4214,11 +4214,12 @@ visible = false
|
||||
[node name="BlobbySprite" type="Sprite" parent="."]
|
||||
material = ExtResource( 2 )
|
||||
position = Vector2( 0, -16 )
|
||||
scale = Vector2( -1, 1 )
|
||||
texture = SubResource( 62 )
|
||||
offset = Vector2( 1, 0 )
|
||||
hframes = 6
|
||||
vframes = 6
|
||||
frame = 10
|
||||
frame = 5
|
||||
__meta__ = {
|
||||
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUJsb2JieVNwcml0ZS9CbG9iYnltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvYmxvYmJ5L2Jsb2JieS1zcHJpdGVzaGVldHQuYXNlcHJpdGUKbGF5ZXJ8PUJsb2JieQpvcF9leHB8PUZhbHNlCm9fZm9sZGVyfD0Kb19uYW1lfD0Kb25seV92aXNpYmxlfD1GYWxzZQpvX2V4X3B8PQo="
|
||||
}
|
||||
@ -4321,7 +4322,7 @@ position = Vector2( 0, -9 )
|
||||
scale = Vector2( 0.48, 0.48 )
|
||||
|
||||
[node name="BlobbyBody" type="CollisionShape2D" parent="." groups=["player"]]
|
||||
position = Vector2( 1, -8.975 )
|
||||
position = Vector2( 0.0392303, -10.002 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="WallRaycasts" type="Node2D" parent="."]
|
||||
@ -4330,13 +4331,13 @@ position = Vector2( 0, -1 )
|
||||
[node name="LeftWallRaycast" type="Node2D" parent="WallRaycasts"]
|
||||
|
||||
[node name="Left_Wallcast1" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
|
||||
position = Vector2( -12, -10.686 )
|
||||
position = Vector2( -11.9763, -5 )
|
||||
enabled = true
|
||||
cast_to = Vector2( -2, 0 )
|
||||
collision_mask = 40
|
||||
|
||||
[node name="Left_Wallcast2" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
|
||||
position = Vector2( -12, -1.942 )
|
||||
position = Vector2( -11.9763, 5 )
|
||||
enabled = true
|
||||
cast_to = Vector2( -2, 0 )
|
||||
collision_mask = 40
|
||||
@ -4344,13 +4345,13 @@ collision_mask = 40
|
||||
[node name="RightWallRaycast" type="Node2D" parent="WallRaycasts"]
|
||||
|
||||
[node name="Right_Wallcast1" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
|
||||
position = Vector2( 14, -10.686 )
|
||||
position = Vector2( 12.0551, -5 )
|
||||
enabled = true
|
||||
cast_to = Vector2( 2, 0 )
|
||||
collision_mask = 40
|
||||
|
||||
[node name="Right_Wallcast2" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
|
||||
position = Vector2( 14, -1.942 )
|
||||
position = Vector2( 12.0551, 5 )
|
||||
enabled = true
|
||||
cast_to = Vector2( 2, 0 )
|
||||
collision_mask = 40
|
||||
|
||||
@ -21,7 +21,7 @@ var was_coyote_hanging = false
|
||||
|
||||
# Adds the intial states
|
||||
func _ready():
|
||||
signalManager.connect("getback_timer_up", parent, "die")
|
||||
signalManager.connect("getback_timer_up", parent, "die", [1])
|
||||
signalManager.connect("power_up_collected", parent, "receive_power_up")
|
||||
signalManager.connect("got_stomped", parent, "stomp")
|
||||
anim_player.play("RESET")
|
||||
|
||||
@ -52,7 +52,7 @@ func _ready():
|
||||
signalManager.connect("terminal_activated", self, "_on_SignalManager_terminal_activated")
|
||||
signalManager.connect("player_died", self, "_death_cam")
|
||||
|
||||
func _on_SignalManager_terminal_activated():
|
||||
func _on_SignalManager_terminal_activated(animation_number: int = 0):
|
||||
get_node("LightAnimationPlayer").play("Pulsing")
|
||||
|
||||
#func _draw():
|
||||
@ -65,6 +65,7 @@ func _process(delta: float) -> void:
|
||||
screen_top = screen_center - Vector2(0, screen_rect.y/2)
|
||||
screen_left = screen_center - Vector2(screen_rect.x/2, 0)
|
||||
screen_right = screen_center + Vector2(screen_rect.x/2, 0)
|
||||
if(!levelState.is_dead):
|
||||
_adjust_offset(delta)
|
||||
|
||||
if(anim_player.is_playing()):
|
||||
@ -201,10 +202,13 @@ func reset_limits() -> void:
|
||||
limit_bottom = original_limit_bottom
|
||||
limit_top = original_limit_top
|
||||
|
||||
func _death_cam():
|
||||
func _death_cam(animation_number: int = 0) -> void:
|
||||
if(animation_number < 1):
|
||||
$CameraAnimationPlayer.play("deathCamJustZoom")
|
||||
if(animation_number == 1):
|
||||
$CameraAnimationPlayer.play("deathCamLateRotation")
|
||||
|
||||
func _update_lighting_shader():
|
||||
func _update_lighting_shader() -> void:
|
||||
# Props to gameendaevour
|
||||
# TODO get this into a central world update management system
|
||||
var lights = get_tree().get_nodes_in_group("light")
|
||||
|
||||
@ -625,7 +625,7 @@ tracks/5/path = NodePath(".:drag_margin_left")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/enabled = false
|
||||
tracks/5/keys = {
|
||||
"times": PoolRealArray( 0, 0.6 ),
|
||||
"transitions": PoolRealArray( 1, 0.5 ),
|
||||
@ -637,7 +637,7 @@ tracks/6/path = NodePath(".:drag_margin_right")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/enabled = false
|
||||
tracks/6/keys = {
|
||||
"times": PoolRealArray( 0, 0.6 ),
|
||||
"transitions": PoolRealArray( 1, 0.5 ),
|
||||
@ -870,8 +870,10 @@ current = true
|
||||
zoom = Vector2( 0.75, 0.75 )
|
||||
drag_margin_h_enabled = true
|
||||
drag_margin_v_enabled = true
|
||||
drag_margin_top = 0.0
|
||||
drag_margin_bottom = 0.25
|
||||
drag_margin_left = 0.08
|
||||
drag_margin_top = 0.16
|
||||
drag_margin_right = 0.08
|
||||
drag_margin_bottom = 0.16
|
||||
editor_draw_drag_margin = true
|
||||
script = ExtResource( 1 )
|
||||
|
||||
@ -978,10 +980,10 @@ texture = ExtResource( 8 )
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
||||
visible = false
|
||||
frames = SubResource( 7 )
|
||||
frame = 8
|
||||
frame = 5
|
||||
playing = true
|
||||
|
||||
[node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
||||
frames = SubResource( 8 )
|
||||
frame = 13
|
||||
frame = 10
|
||||
playing = true
|
||||
|
||||
@ -1,19 +1,35 @@
|
||||
extends Enemy
|
||||
const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd")
|
||||
|
||||
export var invincible := false
|
||||
export var speed := 80
|
||||
export var acceleration := 80
|
||||
|
||||
func _ready() -> void:
|
||||
set_physics_process(false)
|
||||
$StompDetector.monitoring = !invincible
|
||||
|
||||
|
||||
# TODO Only moves when on screen
|
||||
func _physics_process(delta: float) -> void:
|
||||
velocity.y += _gravity * delta
|
||||
velocity.x = 80 * player_on_floor_direction()
|
||||
var player_direction := player_on_floor_direction()
|
||||
if(player_direction != 0):
|
||||
velocity.x = PhysicsFunc.two_step_euler(velocity.x, acceleration * player_direction,
|
||||
mass, delta)
|
||||
velocity.x = clamp(velocity.x, -speed, speed)
|
||||
else:
|
||||
velocity.x = PhysicsFunc.two_step_euler(velocity.x, acceleration * -sign(velocity.x),
|
||||
mass, delta)
|
||||
|
||||
|
||||
velocity.y = move_and_slide(velocity, FLOOR_NORMAL).y
|
||||
|
||||
# TODO Detects player over gaps
|
||||
func player_on_floor_direction():
|
||||
func player_on_floor_direction() -> float:
|
||||
for raycast in $LedgeDetectorRays.get_children():
|
||||
if raycast.is_colliding():
|
||||
var collider = raycast.get_collider()
|
||||
if collider.is_in_group("player"):
|
||||
return sign(collider.position.x - self.position.x)
|
||||
return 0
|
||||
return 0.0
|
||||
|
||||
@ -278,7 +278,9 @@ func jump():
|
||||
if (get_facing_direction() > 0 && $Right_Wallcast.is_colliding()):
|
||||
v = zero_vector
|
||||
if ($Right_Wallcast.is_colliding() && $Left_Wallcast.is_colliding()):
|
||||
# TODO No idea what it might do in these situations
|
||||
print("help this is a really tight space :(")
|
||||
v = zero_vector
|
||||
|
||||
v = correct_jump_direction(v)
|
||||
if(v != zero_vector):
|
||||
@ -413,7 +415,11 @@ func is_jump_path_safe(v: Vector2, pos: Vector2) -> bool:
|
||||
harmful_nodes.append_array(get_tree().get_nodes_in_group("pit"))
|
||||
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:
|
||||
# TODO Ignores spikes more than 4 blocks below and 3 jumps away
|
||||
# Also when its too near to one
|
||||
if (abs(node_pos.x - pos.x) > abs(jump_distance) * 3
|
||||
||abs(node_pos.y - pos.y) > 24 * 4
|
||||
|| 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)
|
||||
|
||||
@ -22,6 +22,10 @@ onready var original_rotation = rotation
|
||||
onready var rotation_speed_divider = 80
|
||||
# TODO causes oscilation
|
||||
onready var min_rotation_speed = deg2rad(0.3)
|
||||
|
||||
# Detection limit in blocks
|
||||
export var vision_distance = 7
|
||||
|
||||
var prey_ref = weakref(null)
|
||||
# Ray that goes from the turret to the target
|
||||
var target_ray
|
||||
@ -37,7 +41,11 @@ func position_laserpoint():
|
||||
func searching():
|
||||
position_laserpoint()
|
||||
for sightline in sightcone.get_children():
|
||||
if sightline.is_colliding():
|
||||
if !sightline.is_colliding():
|
||||
return
|
||||
if sightline.get_collision_point().distance_to(position) > vision_distance * 24:
|
||||
print(sightline.get_collision_point().distance_to(position))
|
||||
return
|
||||
# The collider returns not the area or body it hit, but the parent of them
|
||||
var collider = sightline.get_collider()
|
||||
if collider.is_in_group("player"):
|
||||
|
||||
@ -39,10 +39,11 @@ tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 6.1 ),
|
||||
"transitions": PoolRealArray( 0.9, 1.1 ),
|
||||
"update": 0,
|
||||
"values": [ 0.0, -45.0 ]
|
||||
"values": [ 0.0, 45.0 ]
|
||||
}
|
||||
|
||||
[node name="Turret" type="KinematicBody2D" groups=["enemy"]]
|
||||
rotation = 0.571552
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
script = ExtResource( 3 )
|
||||
@ -88,7 +89,7 @@ playback_process_mode = 0
|
||||
"anims/Turret Rotation" = SubResource( 2 )
|
||||
|
||||
[node name="FiringRateTimer" type="Timer" parent="."]
|
||||
wait_time = 0.1
|
||||
wait_time = 0.618
|
||||
|
||||
[node name="Aimline" type="RayCast2D" parent="."]
|
||||
enabled = true
|
||||
|
||||
@ -18,6 +18,7 @@ func level_completion() -> void:
|
||||
|
||||
func teleport() -> void:
|
||||
anim_player.play("fade_in")
|
||||
# TODO This doesn't pause the game but should
|
||||
yield(anim_player, "animation_finished")
|
||||
get_tree().change_scene_to(next_scene)
|
||||
|
||||
|
||||
@ -71,6 +71,7 @@ next_scene = ExtResource( 3 )
|
||||
[node name="portal" type="Sprite" parent="."]
|
||||
scale = Vector2( 0.1, 0.1 )
|
||||
texture = ExtResource( 1 )
|
||||
hframes = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
|
||||
@ -6,19 +6,27 @@ onready var indicatorPlayer = $"%IndicatorPlayer"
|
||||
onready var elevator = get_node("./Portal")
|
||||
onready var signalManager := get_tree().root.get_child(1).get_node("%SignalManager")
|
||||
onready var unactivatable_timer := $Timer
|
||||
onready var get_back_timer := $GetBackTimer
|
||||
|
||||
export var elevator_time := 30
|
||||
var activatable = false
|
||||
|
||||
func _ready() -> void:
|
||||
get_back_timer.wait_time = elevator_time
|
||||
elevator.get_node("./portal").frame = 1
|
||||
elevator.monitoring = false
|
||||
|
||||
func _process(delta):
|
||||
if activatable && Input.is_action_just_released("interact"):
|
||||
selfActivate()
|
||||
signalManager.emit_signal("terminal_activated")
|
||||
signalManager.emit_signal("terminal_activated", elevator_time)
|
||||
get_back_timer.start()
|
||||
|
||||
|
||||
func selfActivate():
|
||||
indicatorPlayer.play("onning")
|
||||
buttonPlayer.play("pushing")
|
||||
elevator.visible = true
|
||||
elevator.get_node("./portal").frame = 0
|
||||
elevator.monitoring = true
|
||||
#TODO dis importante
|
||||
activatorArea.set_deferred("monitoring", false)
|
||||
@ -34,3 +42,7 @@ func _on_ActivatorArea_area_exited(area:Area2D) -> void:
|
||||
func _on_Timer_timeout():
|
||||
$Label.visible = false
|
||||
activatable = false
|
||||
|
||||
|
||||
func _on_GetBackTimer_timeout() -> void:
|
||||
signalManager.emit_signal("getback_timer_up")
|
||||
|
||||
@ -54,8 +54,9 @@ tracks/0/keys = {
|
||||
[sub_resource type="CircleShape2D" id=18]
|
||||
radius = 18.0
|
||||
|
||||
[node name="Terminal" type="Node2D"]
|
||||
[node name="ElevatorButton" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
elevator_time = 3
|
||||
|
||||
[node name="Button" type="Sprite" parent="."]
|
||||
position = Vector2( 0, -6 )
|
||||
@ -109,6 +110,9 @@ margin_bottom = -12.0
|
||||
rect_scale = Vector2( 0.590909, 0.627907 )
|
||||
text = "[e]"
|
||||
|
||||
[node name="GetBackTimer" type="Timer" parent="."]
|
||||
|
||||
[connection signal="area_entered" from="ActivatorArea" to="." method="_on_ActivatorArea_area_entered"]
|
||||
[connection signal="area_exited" from="ActivatorArea" to="." method="_on_ActivatorArea_area_exited"]
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
||||
[connection signal="timeout" from="GetBackTimer" to="." method="_on_GetBackTimer_timeout"]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://assets/meta/digits.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/contraption/freeButtonSlider.png" type="Texture" id=2]
|
||||
[ext_resource path="res://assets/contraption/freeButton.png" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/contraption/gateButton.png" type="Texture" id=3]
|
||||
[ext_resource path="res://src/Contraptions/Triggers/GateButton.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="Animation" id=19]
|
||||
|
||||
161
src/Levels/Actual Level 1.tscn
Normal file
161
src/Levels/Actual Level 1.tscn
Normal file
File diff suppressed because one or more lines are too long
216
src/Levels/Actual Level 2.tscn
Normal file
216
src/Levels/Actual Level 2.tscn
Normal file
File diff suppressed because one or more lines are too long
@ -36,17 +36,39 @@ unique_name_in_owner = true
|
||||
drag_margin_bottom = 0.3
|
||||
|
||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||
frame = 12
|
||||
frame = 9
|
||||
|
||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||
frame = 7
|
||||
frame = 4
|
||||
|
||||
[node name="Blobby" parent="." instance=ExtResource( 8 )]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="CollisionPolygon2D" parent="Blobby/BlobbySkin" index="0"]
|
||||
position = Vector2( 0.0286326, -10.0053 )
|
||||
|
||||
[node name="BlobbySprite" parent="Blobby" index="3"]
|
||||
scale = Vector2( -1, 1 )
|
||||
frame = 5
|
||||
|
||||
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||
parameters/playback = SubResource( 4 )
|
||||
|
||||
[node name="BlobbyBody" parent="Blobby" index="8"]
|
||||
position = Vector2( 0.0392303, -10.002 )
|
||||
|
||||
[node name="Left_Wallcast1" parent="Blobby/WallRaycasts/LeftWallRaycast" index="0"]
|
||||
position = Vector2( -11.9763, -5 )
|
||||
|
||||
[node name="Left_Wallcast2" parent="Blobby/WallRaycasts/LeftWallRaycast" index="1"]
|
||||
position = Vector2( -11.9763, 5 )
|
||||
|
||||
[node name="Right_Wallcast1" parent="Blobby/WallRaycasts/RightWallRaycast" index="0"]
|
||||
position = Vector2( 12.0551, -5 )
|
||||
|
||||
[node name="Right_Wallcast2" parent="Blobby/WallRaycasts/RightWallRaycast" index="1"]
|
||||
position = Vector2( 12.0551, 5 )
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
unique_name_in_owner = true
|
||||
tile_set = ExtResource( 1 )
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=19 format=2]
|
||||
[gd_scene load_steps=20 format=2]
|
||||
|
||||
[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=2]
|
||||
@ -16,6 +16,7 @@
|
||||
[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://src/Levels/Level 2.gd" type="Script" id=15]
|
||||
[ext_resource path="res://src/NeutralObjects/SavePoint.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://src/Actors/Enemies/Machines/Turret.tscn" type="PackedScene" id=17]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=4]
|
||||
|
||||
@ -44,18 +45,40 @@ unique_name_in_owner = true
|
||||
drag_margin_bottom = 0.3
|
||||
|
||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||
frame = 2
|
||||
frame = 0
|
||||
|
||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||
frame = 2
|
||||
frame = 0
|
||||
|
||||
[node name="Blobby" parent="." instance=ExtResource( 9 )]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2( 0, -3 )
|
||||
|
||||
[node name="CollisionPolygon2D" parent="Blobby/BlobbySkin" index="0"]
|
||||
position = Vector2( 0.0286326, -10.0053 )
|
||||
|
||||
[node name="BlobbySprite" parent="Blobby" index="3"]
|
||||
scale = Vector2( -1, 1 )
|
||||
frame = 5
|
||||
|
||||
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||
parameters/playback = SubResource( 4 )
|
||||
|
||||
[node name="BlobbyBody" parent="Blobby" index="8"]
|
||||
position = Vector2( 0.0392303, -10.002 )
|
||||
|
||||
[node name="Left_Wallcast1" parent="Blobby/WallRaycasts/LeftWallRaycast" index="0"]
|
||||
position = Vector2( -11.9763, -5 )
|
||||
|
||||
[node name="Left_Wallcast2" parent="Blobby/WallRaycasts/LeftWallRaycast" index="1"]
|
||||
position = Vector2( -11.9763, 5 )
|
||||
|
||||
[node name="Right_Wallcast1" parent="Blobby/WallRaycasts/RightWallRaycast" index="0"]
|
||||
position = Vector2( 12.0551, -5 )
|
||||
|
||||
[node name="Right_Wallcast2" parent="Blobby/WallRaycasts/RightWallRaycast" index="1"]
|
||||
position = Vector2( 12.0551, 5 )
|
||||
|
||||
[node name="PitArea" parent="." instance=ExtResource( 10 )]
|
||||
position = Vector2( 717, 147 )
|
||||
|
||||
@ -252,6 +275,9 @@ position = Vector2( 2502, -120 )
|
||||
[node name="AnimationPlayer" parent="SavePoint" index="2"]
|
||||
autoplay = "RollOutFlag"
|
||||
|
||||
[node name="Turret" parent="." instance=ExtResource( 17 )]
|
||||
position = Vector2( 264, -119 )
|
||||
|
||||
[connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"]
|
||||
|
||||
[editable path="SignalManager"]
|
||||
|
||||
@ -214,10 +214,10 @@ drag_margin_top = 0.13
|
||||
drag_margin_bottom = 0.3
|
||||
|
||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||
frame = 0
|
||||
frame = 2
|
||||
|
||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||
frame = 0
|
||||
frame = 2
|
||||
|
||||
[node name="Blobby" parent="." instance=ExtResource( 8 )]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@ -34,20 +34,39 @@ wait_time = 20.0
|
||||
unique_name_in_owner = true
|
||||
drag_margin_bottom = 0.3
|
||||
|
||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||
frame = 12
|
||||
|
||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||
frame = 2
|
||||
frame = 12
|
||||
|
||||
[node name="Blobby" parent="." instance=ExtResource( 7 )]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2( -70, -1.90735e-06 )
|
||||
scale = Vector2( 0.878906, 0.936025 )
|
||||
|
||||
[node name="CollisionPolygon2D" parent="Blobby/BlobbySkin" index="0"]
|
||||
position = Vector2( 0.0286326, -10.0053 )
|
||||
|
||||
[node name="BlobbySprite" parent="Blobby" index="3"]
|
||||
scale = Vector2( -1, 1 )
|
||||
frame = 5
|
||||
|
||||
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||
parameters/playback = SubResource( 4 )
|
||||
|
||||
[node name="BlobbyBody" parent="Blobby" index="8"]
|
||||
position = Vector2( 0.0392303, -10.002 )
|
||||
|
||||
[node name="Left_Wallcast1" parent="Blobby/WallRaycasts/LeftWallRaycast" index="0"]
|
||||
position = Vector2( -11.9763, -5 )
|
||||
|
||||
[node name="Left_Wallcast2" parent="Blobby/WallRaycasts/LeftWallRaycast" index="1"]
|
||||
position = Vector2( -11.9763, 5 )
|
||||
|
||||
[node name="Right_Wallcast1" parent="Blobby/WallRaycasts/RightWallRaycast" index="0"]
|
||||
position = Vector2( 12.0551, -5 )
|
||||
|
||||
[node name="Right_Wallcast2" parent="Blobby/WallRaycasts/RightWallRaycast" index="1"]
|
||||
position = Vector2( 12.0551, 5 )
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
unique_name_in_owner = true
|
||||
tile_set = ExtResource( 1 )
|
||||
@ -58,9 +77,10 @@ collision_layer = 8
|
||||
collision_mask = 8
|
||||
bake_navigation = true
|
||||
format = 1
|
||||
tile_data = PoolIntArray( -458761, 1610612738, 0, -458760, 1610612738, 0, -458759, 1610612738, 0, -458758, 1610612738, 0, -458757, 1610612738, 0, -458756, 1610612738, 0, -458755, 1610612738, 0, -458754, 1610612738, 0, -458753, 1610612738, 0, -524288, 1610612738, 0, -524287, 1610612738, 0, -524286, 1610612738, 0, -524285, 1610612738, 0, -524284, 1610612738, 0, -524283, 1610612738, 0, -524282, 1610612738, 0, -524281, 1610612738, 0, -524280, 1610612738, 0, -524279, 1610612738, 0, -524278, 1610612738, 0, -524277, 1610612738, 0, -524276, 1610612738, 0, -393226, -1610612734, 0, -458739, -1073741822, 0, -327690, -1610612734, 0, -393203, -1073741822, 0, -262154, -1610612734, 0, -327667, -1073741822, 0, -196618, -1610612734, 0, -262131, -1073741822, 0, -131082, -1610612734, 0, -196595, -1073741822, 0, -65546, -1610612734, 0, -131059, -1073741822, 0, -10, -1610612734, 0, -65523, -1073741822, 0, 65526, -1610612734, 0, 13, -1073741822, 0, 131062, -1610612734, 0, 65549, -1073741822, 0, 196598, -1610612734, 0, 131085, -1073741822, 0, 262134, -1610612734, 0, 196621, -1073741822, 0, 327670, -1610612734, 0, 262157, -1073741822, 0, 393206, -1610612734, 0, 327693, -1073741822, 0, 458743, 2, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, 2, 0, 458748, 2, 0, 458749, 2, 0, 458750, 2, 0, 458751, 2, 0, 393216, 2, 0, 393217, 2, 0, 393218, 2, 0, 393219, 2, 0, 393220, 2, 0, 393221, 2, 0, 393222, 2, 0, 393223, 2, 0, 393224, 2, 0, 393225, 2, 0, 393226, 2, 0, 393227, 2, 0, 393228, 2, 0 )
|
||||
|
||||
[node name="Portal" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 1488, -120 )
|
||||
position = Vector2( 288, 120 )
|
||||
next_scene = ExtResource( 6 )
|
||||
|
||||
[connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"]
|
||||
|
||||
@ -43,16 +43,41 @@ wait_time = 20.0
|
||||
[node name="BlobbyCam" parent="." instance=ExtResource( 6 )]
|
||||
drag_margin_bottom = 0.3
|
||||
|
||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||
frame = 2
|
||||
|
||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||
frame = 0
|
||||
frame = 8
|
||||
|
||||
[node name="Blobby" parent="." instance=ExtResource( 12 )]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2( -70, -1.90735e-06 )
|
||||
|
||||
[node name="CollisionPolygon2D" parent="Blobby/BlobbySkin" index="0"]
|
||||
position = Vector2( 0.0286326, -10.0053 )
|
||||
|
||||
[node name="BlobbySprite" parent="Blobby" index="3"]
|
||||
scale = Vector2( -1, 1 )
|
||||
frame = 5
|
||||
|
||||
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||
parameters/playback = SubResource( 4 )
|
||||
|
||||
[node name="BlobbyBody" parent="Blobby" index="8"]
|
||||
position = Vector2( 0.0392303, -10.002 )
|
||||
|
||||
[node name="Left_Wallcast1" parent="Blobby/WallRaycasts/LeftWallRaycast" index="0"]
|
||||
position = Vector2( -11.9763, -5 )
|
||||
|
||||
[node name="Left_Wallcast2" parent="Blobby/WallRaycasts/LeftWallRaycast" index="1"]
|
||||
position = Vector2( -11.9763, 5 )
|
||||
|
||||
[node name="Right_Wallcast1" parent="Blobby/WallRaycasts/RightWallRaycast" index="0"]
|
||||
position = Vector2( 12.0551, -5 )
|
||||
|
||||
[node name="Right_Wallcast2" parent="Blobby/WallRaycasts/RightWallRaycast" index="1"]
|
||||
position = Vector2( 12.0551, 5 )
|
||||
|
||||
[node name="PitArea" parent="." instance=ExtResource( 9 )]
|
||||
position = Vector2( 540, 162 )
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/environment/blocks/approx build block.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/obstacle object/mine.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/ObstacleObjects/Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 1.51498, 5.05697 )
|
||||
extents = Vector2( 6, 6 )
|
||||
|
||||
[node name="Bullet" type="Area2D" groups=["harmful"]]
|
||||
collision_layer = 64
|
||||
@ -12,9 +12,11 @@ collision_mask = 59
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( -0.00644289, 0.0188824 )
|
||||
scale = Vector2( 0.0919913, 0.313283 )
|
||||
position = Vector2( -5.96046e-07, -3.57628e-07 )
|
||||
scale = Vector2( 1.5, 1.5 )
|
||||
texture = ExtResource( 1 )
|
||||
hframes = 2
|
||||
frame = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
@ -8,5 +8,6 @@ margin_bottom = 78.0
|
||||
size_flags_vertical = 3
|
||||
text = "Begin"
|
||||
script = ExtResource( 1 )
|
||||
next_scene_path = "res://src/Levels/Level on the loose.tscn"
|
||||
|
||||
[connection signal="button_up" from="." to="." method="_on_button_up"]
|
||||
|
||||
@ -16,18 +16,18 @@ func _ready():
|
||||
signalManager.connect("currency_updated", self, "update_interface")
|
||||
signalManager.connect("kills_updated", self, "update_interface")
|
||||
signalManager.connect("frees_updated", self, "update_interface")
|
||||
signalManager.connect("terminal_activated", self, "_on_SignalManager_terminal_activated")
|
||||
signalManager.connect("terminal_activated", self, "start_timer")
|
||||
update_interface()
|
||||
|
||||
func _process(delta):
|
||||
if timer.visible:
|
||||
timer.text = String(round($HUDOverlay/GetBackTimer/Timer.time_left))
|
||||
|
||||
func start_timer():
|
||||
func start_timer(time):
|
||||
timer.visible = true
|
||||
$HUDOverlay/GetBackTimer/Timer.wait_time = time
|
||||
$HUDOverlay/GetBackTimer/Timer.start()
|
||||
$HUDOverlay/GetBackTimer/AnimationPlayer.play("Redlight")
|
||||
|
||||
_zoom_timer()
|
||||
|
||||
|
||||
@ -43,11 +43,3 @@ func update_interface() -> void:
|
||||
currency.text = "Wallet: %s Orbicles" % wallet
|
||||
kills.text = "Kills: %s" % levelState.kills
|
||||
frees.text = "Freed: %s" % levelState.frees
|
||||
|
||||
|
||||
func _on_SignalManager_terminal_activated() -> void:
|
||||
start_timer()
|
||||
|
||||
|
||||
func _on_Timer_timeout():
|
||||
pass # Replace with function body.
|
||||
|
||||
@ -60,7 +60,6 @@ size_flags_horizontal = 3
|
||||
[node name="PlayButton" parent="MenuContainer/Buttons" instance=ExtResource( 3 )]
|
||||
margin_right = 296.0
|
||||
margin_bottom = 48.0
|
||||
next_scene_path = "res://src/Levels/Level 1.tscn"
|
||||
|
||||
[node name="QuitButton" parent="MenuContainer/Buttons" instance=ExtResource( 1 )]
|
||||
anchor_left = 0.0
|
||||
|
||||
@ -80,7 +80,7 @@ func update_global_state() -> void:
|
||||
|
||||
GlobalState.set_progress(progress_dict)
|
||||
|
||||
func player_dying() -> void:
|
||||
func player_dying(animation_number: int = 0) -> void:
|
||||
currency = 0
|
||||
kills = 0
|
||||
frees = 0
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
extends Node
|
||||
|
||||
signal level_loaded()
|
||||
signal terminal_activated()
|
||||
signal terminal_activated(timer_seconds)
|
||||
signal getback_timer_up()
|
||||
signal currency_updated()
|
||||
signal kills_updated()
|
||||
signal frees_updated()
|
||||
signal player_died()
|
||||
signal player_died(animation_number)
|
||||
signal level_completed()
|
||||
signal power_up_collected(kind)
|
||||
signal got_stomped()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user