Result of the GDQuest Tutorial
7
default_env.tres
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="Environment" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSky" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
background_mode = 2
|
||||||
|
background_sky = SubResource( 1 )
|
||||||
34
icon.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://icon.png"
|
||||||
|
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
79
project.godot
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
; Engine configuration file.
|
||||||
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
|
config_version=4
|
||||||
|
|
||||||
|
_global_script_classes=[ {
|
||||||
|
"base": "KinematicBody2D",
|
||||||
|
"class": "Actor",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://src/Actor/Actor.gd"
|
||||||
|
} ]
|
||||||
|
_global_script_class_icons={
|
||||||
|
"Actor": ""
|
||||||
|
}
|
||||||
|
|
||||||
|
[application]
|
||||||
|
|
||||||
|
config/name="Wumper"
|
||||||
|
run/main_scene="res://src/Screens/MainScreen.tscn"
|
||||||
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
|
[autoload]
|
||||||
|
|
||||||
|
PlayerData="*res://src/Autoload/PlayerData.tscn"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/stretch/mode="2d"
|
||||||
|
|
||||||
|
[input]
|
||||||
|
|
||||||
|
move_left={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
move_right={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
jump={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
pause={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
[layer_names]
|
||||||
|
|
||||||
|
2d_physics/layer_1="player"
|
||||||
|
2d_physics/layer_2="enemies"
|
||||||
|
2d_physics/layer_3="coins"
|
||||||
|
2d_physics/layer_4="world"
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
quality/intended_usage/framebuffer_allocation=0
|
||||||
|
quality/intended_usage/framebuffer_allocation.mobile=0
|
||||||
|
quality/2d/use_pixel_snap=true
|
||||||
|
environment/default_environment="res://default_env.tres"
|
||||||
|
environment/2d/use_nvidia_rect_flicker_workaround=true
|
||||||
|
environment/stretch/aspect="ignore"
|
||||||
|
environment/intended_usage/framebuffer_allocation.mobile=0
|
||||||
9
src/Actor/Actor.gd
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
extends KinematicBody2D
|
||||||
|
class_name Actor
|
||||||
|
|
||||||
|
const FLOOR_NORMAL: = Vector2.UP
|
||||||
|
|
||||||
|
export var speed: = Vector2(300, 1000)
|
||||||
|
export var gravity: = 100.0
|
||||||
|
|
||||||
|
var _velocity: = Vector2.ZERO
|
||||||
49
src/Actor/Blobby.gd
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
extends Actor
|
||||||
|
|
||||||
|
export var stomp_impulse: = 1000.0
|
||||||
|
|
||||||
|
func _on_EnemyDetector_area_entered(area: Area2D) -> void:
|
||||||
|
_velocity = calculate_stomp_velocity(_velocity, stomp_impulse)
|
||||||
|
|
||||||
|
func _on_EnemyDetector_body_entered(body: Node) -> void:
|
||||||
|
die()
|
||||||
|
|
||||||
|
func _physics_process(delta: float) -> void:
|
||||||
|
var is_jump_interrupted: = Input.is_action_just_released("jump") and _velocity.y < 0.0
|
||||||
|
var direction: = get_direction()
|
||||||
|
_velocity = calculate_move_velocity(_velocity, speed, direction, is_jump_interrupted)
|
||||||
|
_velocity = move_and_slide(_velocity, FLOOR_NORMAL)
|
||||||
|
|
||||||
|
func get_direction() -> Vector2:
|
||||||
|
return Vector2(
|
||||||
|
Input.get_action_strength("move_right") - Input.get_action_strength("move_left"),
|
||||||
|
-1.0 if Input.is_action_just_pressed("jump") and is_on_floor() else 1.0
|
||||||
|
)
|
||||||
|
|
||||||
|
func calculate_move_velocity(
|
||||||
|
linear_velocity: Vector2,
|
||||||
|
speed: Vector2,
|
||||||
|
direction: Vector2,
|
||||||
|
is_jump_interrupted: bool
|
||||||
|
) -> Vector2:
|
||||||
|
var out: = linear_velocity
|
||||||
|
out.x = speed.x * direction.x
|
||||||
|
out.y += gravity * get_physics_process_delta_time()
|
||||||
|
if direction.y == -1:
|
||||||
|
out.y = speed.y * direction.y
|
||||||
|
if is_jump_interrupted:
|
||||||
|
out.y = 0
|
||||||
|
return out
|
||||||
|
|
||||||
|
func calculate_stomp_velocity(linear_velocity: Vector2, impulse: float) -> Vector2:
|
||||||
|
var out: = linear_velocity
|
||||||
|
out.y = -impulse
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
func die() -> void:
|
||||||
|
queue_free()
|
||||||
|
PlayerData.deaths += 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
48
src/Actor/Blobby.tscn
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/player.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://src/Actor/Blobby.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 4.85252, 5.80644 )
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
|
extents = Vector2( 30.9321, 24.5597 )
|
||||||
|
|
||||||
|
[node name="Blobby" type="KinematicBody2D"]
|
||||||
|
collision_mask = 8
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
speed = Vector2( 300, 3000 )
|
||||||
|
|
||||||
|
[node name="player" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 2.38419e-07, -31.3866 )
|
||||||
|
scale = Vector2( 0.641109, 0.653888 )
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( 1.05112, -31.5796 )
|
||||||
|
scale = Vector2( 5.68128, 5.29182 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
position = Vector2( 0, -181 )
|
||||||
|
current = true
|
||||||
|
limit_left = 0
|
||||||
|
limit_top = 0
|
||||||
|
limit_smoothed = true
|
||||||
|
drag_margin_h_enabled = true
|
||||||
|
drag_margin_v_enabled = true
|
||||||
|
smoothing_enabled = true
|
||||||
|
drag_margin_left = 0.0
|
||||||
|
drag_margin_right = 0.0
|
||||||
|
|
||||||
|
[node name="EnemyDetector" type="Area2D" parent="."]
|
||||||
|
monitorable = false
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyDetector"]
|
||||||
|
modulate = Color( 0.2, 0, 0.494118, 1 )
|
||||||
|
position = Vector2( -0.210228, -30.5284 )
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
[connection signal="area_entered" from="EnemyDetector" to="." method="_on_EnemyDetector_area_entered"]
|
||||||
|
[connection signal="body_entered" from="EnemyDetector" to="." method="_on_EnemyDetector_body_entered"]
|
||||||
24
src/Actor/Enemy.gd
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
extends Actor
|
||||||
|
|
||||||
|
export var score: = 100
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
set_physics_process(false)
|
||||||
|
_velocity.x = -speed.x
|
||||||
|
|
||||||
|
func _on_StompDetector_body_entered(body: Node) -> void:
|
||||||
|
if body.global_position.y > get_node("StompDetector").global_position.y:
|
||||||
|
return
|
||||||
|
get_node("CollisionShape2D").disabled = true
|
||||||
|
die()
|
||||||
|
|
||||||
|
|
||||||
|
func _physics_process(delta: float) -> void:
|
||||||
|
_velocity.y += gravity * delta
|
||||||
|
if is_on_wall():
|
||||||
|
_velocity.x *= -1.0
|
||||||
|
_velocity.y = move_and_slide(_velocity, FLOOR_NORMAL).y
|
||||||
|
|
||||||
|
func die() -> void:
|
||||||
|
queue_free()
|
||||||
|
PlayerData.score += score
|
||||||
41
src/Actor/Enemy.tscn
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/enemy.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://src/Actor/Enemy.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 8.68243, 5.8581 )
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
|
extents = Vector2( 45, 14 )
|
||||||
|
|
||||||
|
[node name="Enemy" type="KinematicBody2D"]
|
||||||
|
collision_layer = 2
|
||||||
|
collision_mask = 9
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="enemy" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 0, -48 )
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
|
||||||
|
position = Vector2( 3895.22, -31 )
|
||||||
|
scale = Vector2( 44.2501, 3.1 )
|
||||||
|
rect = Rect2( -89, -10, 2, 20 )
|
||||||
|
process_parent = true
|
||||||
|
physics_process_parent = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( -0.445457, -31.2227 )
|
||||||
|
scale = Vector2( 5.68128, 5.29182 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="StompDetector" type="Area2D" parent="."]
|
||||||
|
modulate = Color( 0, 0.0392157, 1, 1 )
|
||||||
|
position = Vector2( 0, -62 )
|
||||||
|
collision_layer = 2
|
||||||
|
|
||||||
|
[node name="CollisionShape2D2" type="CollisionShape2D" parent="StompDetector"]
|
||||||
|
position = Vector2( 0.44545, -13 )
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
|
||||||
19
src/Autoload/PlayerData.gd
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
signal score_updated
|
||||||
|
signal player_died
|
||||||
|
|
||||||
|
var score: = 0 setget set_score
|
||||||
|
var deaths: = 0 setget set_deaths
|
||||||
|
|
||||||
|
func reset() -> void:
|
||||||
|
score = 0
|
||||||
|
deaths = 0
|
||||||
|
|
||||||
|
func set_score(value: int) -> void:
|
||||||
|
score = value
|
||||||
|
emit_signal("score_updated")
|
||||||
|
|
||||||
|
func set_deaths(value: int) -> void:
|
||||||
|
deaths = value
|
||||||
|
emit_signal("player_died")
|
||||||
6
src/Autoload/PlayerData.tscn
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/Autoload/PlayerData.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="PlayerData" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
87
src/Levels/Level02.tscn
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
[gd_scene load_steps=8 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/Actor/Blobby.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://start-assets/tileset.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://src/Actor/Enemy.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://start-assets/background.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://src/Objects/Coin.tscn" type="PackedScene" id=5]
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||||
|
points = PoolVector2Array( 0, 0, 80, 0, 80, 80, 0, 80 )
|
||||||
|
|
||||||
|
[sub_resource type="TileSet" id=2]
|
||||||
|
0/name = "tileset.png 0"
|
||||||
|
0/texture = ExtResource( 2 )
|
||||||
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
0/region = Rect2( 0, 0, 80, 80 )
|
||||||
|
0/tile_mode = 0
|
||||||
|
0/occluder_offset = Vector2( 0, 0 )
|
||||||
|
0/navigation_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
0/shape = SubResource( 1 )
|
||||||
|
0/shape_one_way = false
|
||||||
|
0/shape_one_way_margin = 1.0
|
||||||
|
0/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 1 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
} ]
|
||||||
|
0/z_index = 0
|
||||||
|
|
||||||
|
[node name="LevelTemplate" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
layer = -1
|
||||||
|
|
||||||
|
[node name="background" type="TextureRect" parent="CanvasLayer"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_bottom = 76.0
|
||||||
|
texture = ExtResource( 4 )
|
||||||
|
expand = true
|
||||||
|
stretch_mode = 1
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
tile_set = SubResource( 2 )
|
||||||
|
cell_size = Vector2( 80, 80 )
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 0
|
||||||
|
format = 1
|
||||||
|
tile_data = PoolIntArray( 0, 0, 0, 65536, 0, 0, 131072, 0, 0, 196608, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 0, 0, 262153, 0, 0, 262154, 0, 0, 327680, 0, 0, 327686, 0, 0, 327702, 0, 0, 327703, 0, 0, 393216, 0, 0, 393221, 0, 0, 393222, 0, 0, 393237, 0, 0, 393238, 0, 0, 393239, 0, 0, 393247, 0, 0, 393248, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 0, 0, 458773, 0, 0, 458774, 0, 0, 458775, 0, 0, 458776, 0, 0, 458777, 0, 0, 458778, 0, 0, 458779, 0, 0, 458780, 0, 0, 458781, 0, 0, 458782, 0, 0, 458783, 0, 0, 458784, 0, 0, 458785, 0, 0, 458786, 0, 0, 458787, 0, 0, 458788, 0, 0, 458789, 0, 0, 458790, 0, 0, 458791, 0, 0, 458792, 0, 0, 458793, 0, 0, 458794, 0, 0, 458795, 0, 0, 458796, 0, 0, 458797, 0, 0, 458798, 0, 0, 458799, 0, 0, 458800, 0, 0, 458801, 0, 0, 458802, 0, 0, 458803, 0, 0, 458804, 0, 0, 458805, 0, 0, 458806, 0, 0, 458807, 0, 0, 458808, 0, 0, 458809, 0, 0, 458810, 0, 0, 458811, 0, 0, 458812, 0, 0, 458813, 0, 0, 458814, 0, 0, 458815, 0, 0, 458816, 0, 0, 458817, 0, 0, 458818, 0, 0, 458819, 0, 0, 458820, 0, 0, 458821, 0, 0, 458822, 0, 0, 458823, 0, 0, 458824, 0, 0, 458825, 0, 0, 458826, 0, 0, 458827, 0, 0, 458828, 0, 0, 458829, 0, 0, 458830, 0, 0, 458831, 0, 0, 458832, 0, 0, 458833, 0, 0, 458834, 0, 0, 458835, 0, 0, 458836, 0, 0, 458837, 0, 0, 458838, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 0, 0, 524309, 0, 0, 524310, 0, 0, 524311, 0, 0, 524312, 0, 0, 524313, 0, 0, 524314, 0, 0, 524315, 0, 0, 524316, 0, 0, 524317, 0, 0, 524318, 0, 0, 524319, 0, 0, 524320, 0, 0, 524321, 0, 0, 524322, 0, 0, 524323, 0, 0, 524324, 0, 0, 524325, 0, 0, 524326, 0, 0, 524327, 0, 0, 524328, 0, 0, 524329, 0, 0, 524330, 0, 0, 524331, 0, 0, 524332, 0, 0, 524333, 0, 0, 524334, 0, 0, 524335, 0, 0, 524336, 0, 0, 524337, 0, 0, 524338, 0, 0, 524339, 0, 0, 524340, 0, 0, 524341, 0, 0, 524342, 0, 0, 524343, 0, 0, 524344, 0, 0, 524345, 0, 0, 524346, 0, 0, 524347, 0, 0, 524348, 0, 0, 524349, 0, 0, 524350, 0, 0, 524351, 0, 0, 524352, 0, 0, 524353, 0, 0, 524354, 0, 0, 524355, 0, 0, 524356, 0, 0, 524357, 0, 0, 524358, 0, 0, 524359, 0, 0, 524360, 0, 0, 524361, 0, 0, 524362, 0, 0, 524363, 0, 0, 524364, 0, 0, 524365, 0, 0, 524366, 0, 0, 524367, 0, 0, 524368, 0, 0, 524369, 0, 0, 524370, 0, 0, 524371, 0, 0, 524372, 0, 0, 524373, 0, 0, 524374, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 589845, 0, 0, 589846, 0, 0, 589847, 0, 0, 589848, 0, 0, 589849, 0, 0, 589850, 0, 0, 589851, 0, 0, 589852, 0, 0, 589853, 0, 0, 589854, 0, 0, 589855, 0, 0, 589856, 0, 0, 589857, 0, 0, 589858, 0, 0, 589859, 0, 0, 589860, 0, 0, 589861, 0, 0, 589862, 0, 0, 589863, 0, 0, 589864, 0, 0, 589865, 0, 0, 589866, 0, 0, 589867, 0, 0, 589868, 0, 0, 589869, 0, 0, 589870, 0, 0, 589871, 0, 0, 589872, 0, 0, 589873, 0, 0, 589874, 0, 0, 589875, 0, 0, 589876, 0, 0, 589877, 0, 0, 589878, 0, 0, 589879, 0, 0, 589880, 0, 0, 589881, 0, 0, 589882, 0, 0, 589883, 0, 0, 589884, 0, 0, 589885, 0, 0, 589886, 0, 0, 589887, 0, 0, 589888, 0, 0, 589889, 0, 0, 589890, 0, 0, 589891, 0, 0, 589892, 0, 0, 589893, 0, 0, 589894, 0, 0, 589895, 0, 0, 589896, 0, 0, 589897, 0, 0, 589898, 0, 0, 589899, 0, 0, 589900, 0, 0, 589901, 0, 0, 589902, 0, 0, 589903, 0, 0, 589904, 0, 0, 589905, 0, 0, 589906, 0, 0, 589907, 0, 0, 589908, 0, 0, 589909, 0, 0, 589910, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Blobby" parent="." instance=ExtResource( 1 )]
|
||||||
|
position = Vector2( 131, 560 )
|
||||||
|
speed = Vector2( 800, 1000 )
|
||||||
|
gravity = 4000.0
|
||||||
|
|
||||||
|
[node name="Camera2D" parent="Blobby" index="2"]
|
||||||
|
limit_right = 85000
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Blobby/EnemyDetector" index="0"]
|
||||||
|
position = Vector2( 0, -44 )
|
||||||
|
|
||||||
|
[node name="Enemy" parent="." instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 2174, 560 )
|
||||||
|
|
||||||
|
[node name="Coin" parent="." instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 592, 352 )
|
||||||
|
|
||||||
|
[node name="coin" parent="Coin" index="0"]
|
||||||
|
position = Vector2( 0, 3 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Coin" index="1"]
|
||||||
|
position = Vector2( 0, 3 )
|
||||||
|
|
||||||
|
[node name="Coin2" parent="." instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 749, 274 )
|
||||||
|
|
||||||
|
[editable path="Blobby"]
|
||||||
|
|
||||||
|
[editable path="Coin"]
|
||||||
87
src/Levels/Level03.tscn
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/Actor/Blobby.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://start-assets/tileset.tres" type="TileSet" id=2]
|
||||||
|
[ext_resource path="res://src/Actor/Enemy.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://start-assets/background.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://src/Objects/Coin.tscn" type="PackedScene" id=5]
|
||||||
|
[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=6]
|
||||||
|
[ext_resource path="res://src/UserInterface/EndsScreen.tscn" type="PackedScene" id=7]
|
||||||
|
[ext_resource path="res://src/Objects/Portal.tscn" type="PackedScene" id=8]
|
||||||
|
|
||||||
|
[node name="Level03" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="UserInterface" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="UserInterface" parent="UserInterface" instance=ExtResource( 6 )]
|
||||||
|
|
||||||
|
[node name="BackgroundLayer" type="CanvasLayer" parent="."]
|
||||||
|
layer = -1
|
||||||
|
|
||||||
|
[node name="background" type="TextureRect" parent="BackgroundLayer"]
|
||||||
|
anchor_right = 1.016
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_right = -0.384033
|
||||||
|
texture = ExtResource( 4 )
|
||||||
|
expand = true
|
||||||
|
stretch_mode = 1
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
tile_set = ExtResource( 2 )
|
||||||
|
cell_size = Vector2( 80, 80 )
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 0
|
||||||
|
format = 1
|
||||||
|
tile_data = PoolIntArray( -1048576, 0, 0, -1048564, 0, 0, -983040, 0, 0, -983028, 0, 0, -917504, 0, 0, -917492, 0, 0, -851968, 0, 0, -851956, 0, 0, -786432, 0, 0, -786420, 0, 0, -720896, 0, 0, -720884, 0, 0, -655360, 0, 0, -655348, 0, 0, -589824, 0, 0, -589812, 0, 0, -524288, 0, 0, -524276, 0, 0, -458752, 0, 0, -458740, 0, 0, -393216, 0, 0, -393215, 0, 0, -393214, 0, 0, -393213, 0, 0, -393204, 0, 0, -327680, 0, 0, -327668, 0, 0, -262144, 0, 0, -262132, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196596, 0, 0, -131072, 0, 0, -131060, 0, 0, -65536, 0, 0, -65524, 0, 0, 0, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 12, 0, 0, 65536, 0, 0, 65544, 0, 0, 65548, 0, 0, 131072, 0, 0, 131084, 0, 0, 196608, 0, 0, 196620, 0, 0, 262144, 0, 0, 262149, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 327680, 0, 0, 327681, 0, 0, 327692, 0, 0, 393216, 0, 0, 393228, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Blobby" parent="." instance=ExtResource( 1 )]
|
||||||
|
position = Vector2( 131, 560 )
|
||||||
|
speed = Vector2( 800, 1500 )
|
||||||
|
gravity = 4000.0
|
||||||
|
|
||||||
|
[node name="player" parent="Blobby" index="0"]
|
||||||
|
position = Vector2( 0, -32 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Blobby" index="1"]
|
||||||
|
position = Vector2( 0.224487, -32.0436 )
|
||||||
|
|
||||||
|
[node name="Camera2D" parent="Blobby" index="2"]
|
||||||
|
position = Vector2( 390.714, -75 )
|
||||||
|
limit_top = -10000
|
||||||
|
limit_right = 1040
|
||||||
|
limit_bottom = 700
|
||||||
|
drag_margin_h_enabled = false
|
||||||
|
smoothing_enabled = false
|
||||||
|
editor_draw_limits = true
|
||||||
|
|
||||||
|
[node name="EnemyDetector" parent="Blobby" index="3"]
|
||||||
|
position = Vector2( 14.6832, -44.0497 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Blobby/EnemyDetector" index="0"]
|
||||||
|
position = Vector2( -15.3507, 14.3845 )
|
||||||
|
|
||||||
|
[node name="Enemy" parent="." instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 715.5, 560 )
|
||||||
|
|
||||||
|
[node name="Coin" parent="." instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 592, 352 )
|
||||||
|
|
||||||
|
[node name="coin" parent="Coin" index="0"]
|
||||||
|
position = Vector2( 0, 3 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Coin" index="1"]
|
||||||
|
position = Vector2( 0, 3 )
|
||||||
|
|
||||||
|
[node name="Coin2" parent="." instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 749, 274 )
|
||||||
|
|
||||||
|
[node name="Portal" parent="." instance=ExtResource( 8 )]
|
||||||
|
position = Vector2( 130.332, -461.479 )
|
||||||
|
next_scene = ExtResource( 7 )
|
||||||
|
|
||||||
|
[editable path="Blobby"]
|
||||||
|
|
||||||
|
[editable path="Coin"]
|
||||||
99
src/Levels/LevelTemplate.tscn
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
[gd_scene load_steps=10 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/Actor/Blobby.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://start-assets/tileset.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://src/Actor/Enemy.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://start-assets/background.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://src/Objects/Coin.tscn" type="PackedScene" id=5]
|
||||||
|
[ext_resource path="res://src/Levels/Level03.tscn" type="PackedScene" id=6]
|
||||||
|
[ext_resource path="res://src/Objects/Portal.tscn" type="PackedScene" id=7]
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||||
|
points = PoolVector2Array( 0, 0, 80, 0, 80, 80, 0, 80 )
|
||||||
|
|
||||||
|
[sub_resource type="TileSet" id=2]
|
||||||
|
0/name = "tileset.png 0"
|
||||||
|
0/texture = ExtResource( 2 )
|
||||||
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
0/region = Rect2( 0, 0, 80, 80 )
|
||||||
|
0/tile_mode = 0
|
||||||
|
0/occluder_offset = Vector2( 0, 0 )
|
||||||
|
0/navigation_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
0/shape = SubResource( 1 )
|
||||||
|
0/shape_one_way = false
|
||||||
|
0/shape_one_way_margin = 1.0
|
||||||
|
0/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 1 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
} ]
|
||||||
|
0/z_index = 0
|
||||||
|
|
||||||
|
[node name="LevelTemplate" type="Node2D"]
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_horizontal_guides_": [ 464.0 ],
|
||||||
|
"_edit_vertical_guides_": [ 2880.0 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
layer = -1
|
||||||
|
|
||||||
|
[node name="background" type="TextureRect" parent="CanvasLayer"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_bottom = 76.0
|
||||||
|
texture = ExtResource( 4 )
|
||||||
|
expand = true
|
||||||
|
stretch_mode = 1
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
tile_set = SubResource( 2 )
|
||||||
|
cell_size = Vector2( 80, 80 )
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 0
|
||||||
|
format = 1
|
||||||
|
tile_data = PoolIntArray( 0, 0, 0, 34, 0, 0, 35, 0, 0, 65536, 0, 0, 65570, 0, 0, 65571, 0, 0, 131072, 0, 0, 131106, 0, 0, 131107, 0, 0, 196608, 0, 0, 196613, 0, 0, 196614, 0, 0, 196619, 0, 0, 196620, 0, 0, 196623, 0, 0, 196627, 0, 0, 196628, 0, 0, 196629, 0, 0, 196634, 0, 0, 196635, 0, 0, 196636, 0, 0, 196642, 0, 0, 196643, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 0, 0, 262177, 0, 0, 262178, 0, 0, 262179, 0, 0, 327680, 0, 0, 327712, 0, 0, 327713, 0, 0, 327714, 0, 0, 327715, 0, 0, 393216, 0, 0, 393247, 0, 0, 393248, 0, 0, 393249, 0, 0, 393250, 0, 0, 393251, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 0, 0, 458773, 0, 0, 458774, 0, 0, 458775, 0, 0, 458776, 0, 0, 458777, 0, 0, 458778, 0, 0, 458779, 0, 0, 458780, 0, 0, 458781, 0, 0, 458782, 0, 0, 458783, 0, 0, 458784, 0, 0, 458785, 0, 0, 458786, 0, 0, 458787, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 0, 0, 524309, 0, 0, 524310, 0, 0, 524311, 0, 0, 524312, 0, 0, 524313, 0, 0, 524314, 0, 0, 524315, 0, 0, 524316, 0, 0, 524317, 0, 0, 524318, 0, 0, 524319, 0, 0, 524320, 0, 0, 524321, 0, 0, 524322, 0, 0, 524323, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 589845, 0, 0, 589846, 0, 0, 589847, 0, 0, 589848, 0, 0, 589849, 0, 0, 589850, 0, 0, 589851, 0, 0, 589852, 0, 0, 589853, 0, 0, 589854, 0, 0, 589855, 0, 0, 589856, 0, 0, 589857, 0, 0, 589858, 0, 0, 589859, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Blobby" parent="." instance=ExtResource( 1 )]
|
||||||
|
position = Vector2( 131, 560 )
|
||||||
|
speed = Vector2( 800, 3000 )
|
||||||
|
gravity = 4000.0
|
||||||
|
|
||||||
|
[node name="Camera2D" parent="Blobby" index="2"]
|
||||||
|
limit_top = 100000000
|
||||||
|
limit_right = 2826
|
||||||
|
limit_bottom = 1410065408
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Blobby/EnemyDetector" index="0"]
|
||||||
|
position = Vector2( 0.280624, -31.3723 )
|
||||||
|
|
||||||
|
[node name="Enemy" parent="." instance=ExtResource( 3 )]
|
||||||
|
position = Vector2( 2174, 560 )
|
||||||
|
|
||||||
|
[node name="Coin" parent="." instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 1161, 276 )
|
||||||
|
|
||||||
|
[node name="coin" parent="Coin" index="0"]
|
||||||
|
position = Vector2( 0, -2.76055 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Coin" index="1"]
|
||||||
|
position = Vector2( 0, -2.83396 )
|
||||||
|
|
||||||
|
[node name="Coin2" parent="." instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 445, 199 )
|
||||||
|
|
||||||
|
[node name="Portal" parent="." instance=ExtResource( 7 )]
|
||||||
|
position = Vector2( 131, 339 )
|
||||||
|
next_scene = ExtResource( 6 )
|
||||||
|
|
||||||
|
[editable path="Blobby"]
|
||||||
|
|
||||||
|
[editable path="Coin"]
|
||||||
10
src/Objects/Coin.gd
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
extends Area2D
|
||||||
|
|
||||||
|
onready var anim_player: AnimationPlayer = get_node("AnimationPlayer")
|
||||||
|
|
||||||
|
export var scoreValue: = 100
|
||||||
|
|
||||||
|
func _on_body_entered(body: Node) -> void:
|
||||||
|
PlayerData.score += scoreValue
|
||||||
|
anim_player.play("fade_out")
|
||||||
|
queue_free()
|
||||||
86
src/Objects/Coin.tscn
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/coin.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://src/Objects/Coin.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=1]
|
||||||
|
radius = 34.0147
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=2]
|
||||||
|
resource_name = "fade_out"
|
||||||
|
length = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:modulate")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.1 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "method"
|
||||||
|
tracks/1/path = NodePath(".")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0.1 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"values": [ {
|
||||||
|
"args": [ ],
|
||||||
|
"method": "queue_free"
|
||||||
|
} ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=3]
|
||||||
|
resource_name = "oscilating"
|
||||||
|
length = 1.2
|
||||||
|
loop = true
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("coin:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1 ),
|
||||||
|
"transitions": PoolRealArray( 0.500001, 1.18921 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 3 ), Vector2( 0, -4 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("CollisionShape2D:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1 ),
|
||||||
|
"transitions": PoolRealArray( 0.482969, 1.23114 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 3 ), Vector2( 0, -4 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Coin" type="Area2D"]
|
||||||
|
position = Vector2( 0, 3 )
|
||||||
|
monitorable = false
|
||||||
|
collision_layer = 4
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="coin" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 0, -4 )
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( 0, -4 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
autoplay = "oscilating"
|
||||||
|
anims/fade_out = SubResource( 2 )
|
||||||
|
anims/oscilating = SubResource( 3 )
|
||||||
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
20
src/Objects/Portal.gd
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
tool
|
||||||
|
extends Area2D
|
||||||
|
|
||||||
|
|
||||||
|
onready var anim_player: AnimationPlayer = $AnimationPlayer
|
||||||
|
|
||||||
|
export var next_scene: PackedScene
|
||||||
|
|
||||||
|
func _get_configuration_warning() -> String:
|
||||||
|
return "The next scene property can't be empty" if not next_scene else ""
|
||||||
|
|
||||||
|
|
||||||
|
func teleport() -> void:
|
||||||
|
anim_player.play("fade_in")
|
||||||
|
yield(anim_player, "animation_finished")
|
||||||
|
get_tree().change_scene_to(next_scene)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_body_entered(body: Node) -> void:
|
||||||
|
teleport()
|
||||||
94
src/Objects/Portal.tscn
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/portal.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://src/Objects/Portal.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id=1]
|
||||||
|
radius = 39.0
|
||||||
|
height = 2.0
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=2]
|
||||||
|
resource_name = "Start"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("TransitionLayer/ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 0, 0, 0, 0 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("TransitionLayer/ColorRect:visible")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ false ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=3]
|
||||||
|
resource_name = "fade_in"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("TransitionLayer/ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 0, 0, 0, 0 ), Color( 0, 0, 0, 1 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("TransitionLayer/ColorRect:visible")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ true ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Portal" type="Area2D"]
|
||||||
|
monitorable = false
|
||||||
|
collision_layer = 0
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="portal" type="Sprite" parent="."]
|
||||||
|
position = Vector2( -1.90735e-06, -65 )
|
||||||
|
scale = Vector2( 0.673913, 0.400498 )
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( 0, -63 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="TransitionLayer" type="CanvasLayer" parent="."]
|
||||||
|
layer = 100
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="TransitionLayer"]
|
||||||
|
visible = false
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 600.0
|
||||||
|
color = Color( 0, 0, 0, 0 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
autoplay = "Start"
|
||||||
|
anims/Start = SubResource( 2 )
|
||||||
|
anims/fade_in = SubResource( 3 )
|
||||||
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
64
src/Screens/MainScreen.tscn
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/UserInterface/QuitButton.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://src/UserInterface/Titel.tscn" type="PackedScene" id=2]
|
||||||
|
[ext_resource path="res://src/UserInterface/ChangeSceneButton.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://start-assets/background.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://start-assets/ui_theme.tres" type="Theme" id=5]
|
||||||
|
|
||||||
|
[node name="MainScreen" type="Control"]
|
||||||
|
anchor_right = 1.25
|
||||||
|
anchor_bottom = 1.2
|
||||||
|
margin_right = -256.0
|
||||||
|
margin_bottom = -120.0
|
||||||
|
theme = ExtResource( 5 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="background" type="TextureRect" parent="."]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
texture = ExtResource( 4 )
|
||||||
|
expand = true
|
||||||
|
stretch_mode = 2
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Titel" parent="." instance=ExtResource( 2 )]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
margin_left = -162.5
|
||||||
|
margin_top = 104.0
|
||||||
|
margin_right = 162.5
|
||||||
|
margin_bottom = 189.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
size_flags_vertical = 2
|
||||||
|
text = "Wumper"
|
||||||
|
|
||||||
|
[node name="MenuContainer" type="VBoxContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -73.0
|
||||||
|
margin_top = -80.5
|
||||||
|
margin_right = 73.0
|
||||||
|
margin_bottom = 80.5
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="PlayButton" parent="MenuContainer" instance=ExtResource( 3 )]
|
||||||
|
margin_right = 146.0
|
||||||
|
next_scene_path = "res://src/Levels/Level03.tscn"
|
||||||
|
|
||||||
|
[node name="QuitButton" parent="MenuContainer" instance=ExtResource( 1 )]
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
margin_left = 0.0
|
||||||
|
margin_top = 82.0
|
||||||
|
margin_right = 146.0
|
||||||
|
margin_bottom = 161.0
|
||||||
14
src/UserInterface/ChangeSceneButton.tscn
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/UserInterface/PlayButton.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="ChangeSceneButton" type="Button"]
|
||||||
|
margin_right = 139.0
|
||||||
|
margin_bottom = 78.0
|
||||||
|
size_flags_vertical = 3
|
||||||
|
text = "Begin"
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
[connection signal="button_up" from="." to="." method="_on_button_up"]
|
||||||
78
src/UserInterface/EndsScreen.tscn
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/background.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://src/UserInterface/ChangeSceneButton.tscn" type="PackedScene" id=2]
|
||||||
|
[ext_resource path="res://src/UserInterface/QuitButton.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://src/UserInterface/StatsLabel.tscn" type="PackedScene" id=4]
|
||||||
|
[ext_resource path="res://src/UserInterface/StatsLabel.gd" type="Script" id=5]
|
||||||
|
[ext_resource path="res://start-assets/ui_theme.tres" type="Theme" id=6]
|
||||||
|
[ext_resource path="res://src/UserInterface/Titel.tscn" type="PackedScene" id=7]
|
||||||
|
[ext_resource path="res://start-assets/new_dynamicfont.tres" type="DynamicFont" id=8]
|
||||||
|
|
||||||
|
[node name="EndScreen" type="Control"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
theme = ExtResource( 6 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="background" type="TextureRect" parent="."]
|
||||||
|
anchor_left = 0.00195313
|
||||||
|
anchor_right = 1.00195
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
expand = true
|
||||||
|
stretch_mode = 2
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="EndScreenLabel" parent="." instance=ExtResource( 7 )]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
margin_left = -169.0
|
||||||
|
margin_top = 55.0
|
||||||
|
margin_right = 171.0
|
||||||
|
margin_bottom = 148.0
|
||||||
|
rect_pivot_offset = Vector2( 170, 0 )
|
||||||
|
size_flags_horizontal = 2
|
||||||
|
size_flags_vertical = 2
|
||||||
|
size_flags_stretch_ratio = 0.0
|
||||||
|
custom_fonts/font = ExtResource( 8 )
|
||||||
|
text = "Thank You For Playing!"
|
||||||
|
autowrap = true
|
||||||
|
|
||||||
|
[node name="StatsLabel" parent="." instance=ExtResource( 4 )]
|
||||||
|
margin_left = -146.5
|
||||||
|
margin_top = -64.5
|
||||||
|
margin_right = 146.5
|
||||||
|
margin_bottom = 2.5
|
||||||
|
align = 1
|
||||||
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="MenuContainer" type="VBoxContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -123.0
|
||||||
|
margin_top = 72.5001
|
||||||
|
margin_right = 123.0
|
||||||
|
margin_bottom = 233.5
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="PlayButton" parent="MenuContainer" instance=ExtResource( 2 )]
|
||||||
|
margin_right = 246.0
|
||||||
|
text = "Begin Again"
|
||||||
|
next_scene_path = "res://src/Screens/MainScreen.tscn"
|
||||||
|
|
||||||
|
[node name="QuitButton" parent="MenuContainer" instance=ExtResource( 3 )]
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
margin_left = 0.0
|
||||||
|
margin_top = 82.0
|
||||||
|
margin_right = 246.0
|
||||||
|
margin_bottom = 160.0
|
||||||
10
src/UserInterface/PlayButton.gd
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
tool
|
||||||
|
extends Button
|
||||||
|
|
||||||
|
export(String, FILE) var next_scene_path: = ""
|
||||||
|
|
||||||
|
func _on_button_up() -> void:
|
||||||
|
get_tree().change_scene(next_scene_path)
|
||||||
|
|
||||||
|
func _get_configuration_warning() -> String:
|
||||||
|
return "next_scene_path must be set for the button to work" if next_scene_path == "" else ""
|
||||||
4
src/UserInterface/QuitButton.gd
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
extends Button
|
||||||
|
|
||||||
|
func _on_button_up() -> void:
|
||||||
|
get_tree().quit()
|
||||||
17
src/UserInterface/QuitButton.tscn
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/UserInterface/QuitButton.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="QuitButton" type="Button"]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
margin_left = -69.5
|
||||||
|
margin_right = 69.5
|
||||||
|
margin_bottom = 79.0
|
||||||
|
size_flags_vertical = 3
|
||||||
|
text = "End"
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
[connection signal="button_up" from="." to="." method="_on_button_up"]
|
||||||
7
src/UserInterface/RetryButton.gd
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
extends Button
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_up() -> void:
|
||||||
|
PlayerData.score = 0
|
||||||
|
get_tree().paused = false
|
||||||
|
get_tree().reload_current_scene()
|
||||||
14
src/UserInterface/RetryButton.tscn
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/UserInterface/RetryButton.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="RetryButton" type="Button"]
|
||||||
|
margin_right = 139.0
|
||||||
|
margin_bottom = 78.0
|
||||||
|
size_flags_vertical = 3
|
||||||
|
text = "Retry"
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
[connection signal="button_up" from="." to="." method="_on_button_up"]
|
||||||
4
src/UserInterface/StatsLabel.gd
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
extends Label
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
self.text = self.text % [PlayerData.score, PlayerData.deaths]
|
||||||
25
src/UserInterface/StatsLabel.tscn
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/montserrat_extrabold.otf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
size = 24
|
||||||
|
use_mipmaps = true
|
||||||
|
use_filter = true
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="StatsLabel" type="Label"]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -206.5
|
||||||
|
margin_top = -46.5
|
||||||
|
margin_right = 206.5
|
||||||
|
margin_bottom = 46.5
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Your final score is %s.
|
||||||
|
Your died %s times."
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
21
src/UserInterface/Titel.tscn
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/montserrat_extrabold.otf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
size = 69
|
||||||
|
use_mipmaps = true
|
||||||
|
use_filter = true
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Titel" type="Label"]
|
||||||
|
margin_right = 57.0
|
||||||
|
margin_bottom = 31.0
|
||||||
|
size_flags_vertical = 0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Title"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
33
src/UserInterface/UserInterface.gd
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
# Smart ist es die notwendigen Resourcen vor dem Skriptstart zu laden
|
||||||
|
onready var scene_tree: = get_tree()
|
||||||
|
onready var pause_overlay: ColorRect = get_node("PauseOverlay")
|
||||||
|
onready var score: Label = get_node("Label")
|
||||||
|
onready var pause_title: Label = get_node("PauseOverlay/Title")
|
||||||
|
|
||||||
|
var paused: = false setget set_paused
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
PlayerData.connect("score_updated", self, "update_interface")
|
||||||
|
PlayerData.connect("player_died", self, "_on_PlayerData_player_died")
|
||||||
|
update_interface()
|
||||||
|
|
||||||
|
func _on_PlayerData_player_died() -> void:
|
||||||
|
self.paused = true
|
||||||
|
pause_title.text = "You lost"
|
||||||
|
|
||||||
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
|
if event.is_action_pressed("pause") and pause_title.text != "You lost":
|
||||||
|
#not oder ! schaltet einen boolean um
|
||||||
|
#Ist self hier notwendig?
|
||||||
|
self.paused = not paused
|
||||||
|
scene_tree.set_input_as_handled()
|
||||||
|
|
||||||
|
func update_interface() -> void:
|
||||||
|
score.text = "Score: %s" % PlayerData.score
|
||||||
|
|
||||||
|
func set_paused(value: bool) -> void:
|
||||||
|
paused = value
|
||||||
|
scene_tree.paused = value
|
||||||
|
pause_overlay.visible = value
|
||||||
89
src/UserInterface/UserInterface.tscn
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/ui_theme.tres" type="Theme" id=1]
|
||||||
|
[ext_resource path="res://src/UserInterface/QuitButton.tscn" type="PackedScene" id=2]
|
||||||
|
[ext_resource path="res://src/UserInterface/ChangeSceneButton.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://src/UserInterface/RetryButton.tscn" type="PackedScene" id=4]
|
||||||
|
[ext_resource path="res://src/UserInterface/UserInterface.gd" type="Script" id=5]
|
||||||
|
|
||||||
|
[node name="UserInterface" type="Control"]
|
||||||
|
pause_mode = 2
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
theme = ExtResource( 1 )
|
||||||
|
script = ExtResource( 5 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="PauseOverlay" type="ColorRect" parent="."]
|
||||||
|
visible = false
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
color = Color( 0, 0, 0, 0.235294 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Title" type="Label" parent="PauseOverlay"]
|
||||||
|
margin_right = 170.0
|
||||||
|
margin_bottom = 45.0
|
||||||
|
text = "Wumper"
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="PauseOverlay"]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -111.0
|
||||||
|
margin_top = -125.0
|
||||||
|
margin_right = 111.0
|
||||||
|
margin_bottom = 125.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="RetryButton" parent="PauseOverlay/VBoxContainer" instance=ExtResource( 4 )]
|
||||||
|
margin_right = 222.0
|
||||||
|
margin_bottom = 80.0
|
||||||
|
|
||||||
|
[node name="MainMenuButton" parent="PauseOverlay/VBoxContainer" instance=ExtResource( 3 )]
|
||||||
|
margin_top = 84.0
|
||||||
|
margin_right = 222.0
|
||||||
|
margin_bottom = 164.0
|
||||||
|
text = "Main Menu"
|
||||||
|
next_scene_path = "res://src/Screens/MainScreen.tscn"
|
||||||
|
|
||||||
|
[node name="QuitButton" parent="PauseOverlay/VBoxContainer" instance=ExtResource( 2 )]
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
margin_left = 0.0
|
||||||
|
margin_top = 168.0
|
||||||
|
margin_right = 222.0
|
||||||
|
margin_bottom = 250.0
|
||||||
|
|
||||||
|
[node name="PauseLabel" type="Label" parent="PauseOverlay"]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -59.0
|
||||||
|
margin_top = -187.5
|
||||||
|
margin_right = 59.0
|
||||||
|
margin_bottom = -142.5
|
||||||
|
text = "Pause"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
margin_left = -180.0
|
||||||
|
margin_bottom = 45.0
|
||||||
|
rect_scale = Vector2( 0.590909, 0.627907 )
|
||||||
|
text = "Score: %s"
|
||||||
|
align = 2
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
BIN
start-assets/background.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
34
start-assets/background.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/background.png-81d2bbbda17f3da939f0efdb2d10572c.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/background.png"
|
||||||
|
dest_files=[ "res://.import/background.png-81d2bbbda17f3da939f0efdb2d10572c.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
start-assets/bumper.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
34
start-assets/bumper.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/bumper.png-e2c935794cf24ca0beff14ba53ce0fb4.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/bumper.png"
|
||||||
|
dest_files=[ "res://.import/bumper.png-e2c935794cf24ca0beff14ba53ce0fb4.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
start-assets/coin.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
34
start-assets/coin.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/coin.png-b66abcdd76eda96a7416be76d32e7f3f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/coin.png"
|
||||||
|
dest_files=[ "res://.import/coin.png-b66abcdd76eda96a7416be76d32e7f3f.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
start-assets/enemy.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
34
start-assets/enemy.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/enemy.png-1c716757e52981306f381ad5bad394ac.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/enemy.png"
|
||||||
|
dest_files=[ "res://.import/enemy.png-1c716757e52981306f381ad5bad394ac.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
10
start-assets/font_default.tres
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://assets/montserrat_extrabold.otf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
size = 24
|
||||||
|
use_mipmaps = true
|
||||||
|
use_filter = true
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
9
start-assets/font_title.tres
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://assets/montserrat_extrabold.otf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
size = 46
|
||||||
|
use_mipmaps = true
|
||||||
|
use_filter = true
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
BIN
start-assets/icon.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
34
start-assets/icon.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/icon.png-fc66d857429a1b59b2fa881b4c230697.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/icon.png"
|
||||||
|
dest_files=[ "res://.import/icon.png-fc66d857429a1b59b2fa881b4c230697.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
start-assets/light.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
34
start-assets/light.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/light.png-032cd0595f1dc9a0c36b1cff34ddab1f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/light.png"
|
||||||
|
dest_files=[ "res://.import/light.png-032cd0595f1dc9a0c36b1cff34ddab1f.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
start-assets/montserrat_extrabold.otf
Normal file
9
start-assets/new_dynamicfont.tres
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/montserrat_extrabold.otf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
size = 36
|
||||||
|
use_mipmaps = true
|
||||||
|
use_filter = true
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
BIN
start-assets/player.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
34
start-assets/player.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/player.png-8cef2a46c175270e62c64717d7716e7f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/player.png"
|
||||||
|
dest_files=[ "res://.import/player.png-8cef2a46c175270e62c64717d7716e7f.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
start-assets/portal.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
34
start-assets/portal.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/portal.png-3d0d266d5a0173717713545e4f6b6852.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/portal.png"
|
||||||
|
dest_files=[ "res://.import/portal.png-3d0d266d5a0173717713545e4f6b6852.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
BIN
start-assets/tileset.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
34
start-assets/tileset.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/tileset.png-7d62e0550cb9afaf31af18a1fd42a92a.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://start-assets/tileset.png"
|
||||||
|
dest_files=[ "res://.import/tileset.png-7d62e0550cb9afaf31af18a1fd42a92a.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=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
||||||
38
start-assets/tileset.tres
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
[gd_resource type="TileSet" load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/tileset.png" type="Texture" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||||
|
points = PoolVector2Array( 0, 0, 80, 0, 80, 80, 0, 80 )
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||||
|
points = PoolVector2Array( 0, 0, 80, 0, 80, 80, 0, 80 )
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
0/name = "tileset.png 0"
|
||||||
|
0/texture = ExtResource( 1 )
|
||||||
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
0/region = Rect2( 0, 0, 80, 80 )
|
||||||
|
0/tile_mode = 0
|
||||||
|
0/occluder_offset = Vector2( 0, 0 )
|
||||||
|
0/navigation_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
0/shape = SubResource( 1 )
|
||||||
|
0/shape_one_way = false
|
||||||
|
0/shape_one_way_margin = 1.0
|
||||||
|
0/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 1 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
}, {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 2 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
} ]
|
||||||
|
0/z_index = 0
|
||||||
6
start-assets/ui_theme.tres
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[gd_resource type="Theme" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://start-assets/new_dynamicfont.tres" type="DynamicFont" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
default_font = ExtResource( 1 )
|
||||||