Merged with main and fixed merge conflicts

This commit is contained in:
VoidTwo
2021-11-29 13:22:17 -06:00
161 changed files with 2958 additions and 576 deletions

6
Levels/Hub World.gd Normal file
View File

@@ -0,0 +1,6 @@
extends Node2D
func _ready() -> void:
$YSort/Player.load_hud($HUD)
return

18
Levels/Hub World.tscn Normal file
View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://Levels/Hub World.gd" type="Script" id=2]
[ext_resource path="res://GUI/HUD.tscn" type="PackedScene" id=3]
[ext_resource path="res://GUI/Pause Screen.tscn" type="PackedScene" id=4]
[node name="Hub World" type="Node2D"]
script = ExtResource( 2 )
[node name="YSort" type="YSort" parent="."]
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
position = Vector2( 160, 90 )
[node name="HUD" parent="." instance=ExtResource( 3 )]
[node name="Pause Screen" parent="." instance=ExtResource( 4 )]

View File

@@ -0,0 +1,27 @@
extends Control
export (int) var minutes =0
export (int) var seconds = 0
var dsec = 0
func _physics_process(delta: float) -> void:
if seconds > 0 and dsec <= 0:
seconds -=1
dsec = 10
if minutes > 0 and seconds <= 0:
minutes -= 1
seconds = 60
if seconds >= 10:
$sec.set_text(str(seconds))
else:
$sec.set_text("0"+str(seconds))
if dsec >=10:
$dsec.set_text(str(dsec))
else:
$dsec.set_text("0" + str(dsec))
func _on_Timer_timeout() -> void:
dsec-=1
pass # Replace with function body.

View File

@@ -0,0 +1,10 @@
extends Area2D
func _ready() -> void:
pass # Replace with function body.
func _on_Node2D_body_entered(body: Node) -> void:
if body.get_name() == "Player":
queue_free() # Replace with function body.

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Sprites/Assets/coin.png" type="Texture" id=1]
[ext_resource path="res://Levels/Interactives/coin.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 6.38067
[node name="Node2D" type="Area2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 28.3217, 41.6257 )
texture = ExtResource( 1 )
[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2( 28.4389, 40.6703 )
shape = SubResource( 1 )
[connection signal="body_entered" from="." to="." method="_on_Node2D_body_entered"]

View File

@@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Sprites/Assets/forestTreeBig.png" type="Texture" id=1]
[sub_resource type="CapsuleShape2D" id=1]
radius = 5.0
height = 9.0
[node name="Tree" type="StaticBody2D"]
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
offset = Vector2( 0, -5 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
shape = SubResource( 1 )

23
Levels/Level 3.gd Normal file
View File

@@ -0,0 +1,23 @@
extends Node2D
onready var coin = preload("res://Levels/Interactives/coin.tscn")
#onready var coin_container = get_node("YSort/coin_container")
var screensize
var score = 0
func _ready() -> void:
$YSort/Player.load_hud($HUD)
$YSort/Player.position = get_viewport_rect().size / 2
randomize()
screensize = get_viewport_rect().size
set_process(true)
spawn_coins(5)
return
func spawn_coins(num):
for i in range(num):
var g = coin.instance()
$'YSort/coin_container'.add_child(g)
#g.set_pos(Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40)))
g.position = Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40))

217
Levels/Level 3.tscn Normal file
View File

@@ -0,0 +1,217 @@
[gd_scene load_steps=15 format=2]
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://Levels/Level 3.gd" type="Script" id=2]
[ext_resource path="res://Resources/tileSet.tres" type="TileSet" id=3]
[ext_resource path="res://Enemies/snowmen_enemy.tscn" type="PackedScene" id=4]
[ext_resource path="res://Sprites/Assets/forestTreeBig.png" type="Texture" id=5]
[ext_resource path="res://Enemies/snowmen_enemy_blue.tscn" type="PackedScene" id=6]
[ext_resource path="res://Enemies/snowmen_enemy_blue.gd" type="Script" id=7]
[ext_resource path="res://Levels/Interactives/Countdown.gd" type="Script" id=8]
[ext_resource path="res://GUI/HUD.tscn" type="PackedScene" id=9]
[ext_resource path="res://GUI/Pause Screen.tscn" type="PackedScene" id=10]
[sub_resource type="CapsuleShape2D" id=1]
radius = 9.0515
height = 0.0
[sub_resource type="SegmentShape2D" id=2]
a = Vector2( 3.84175, -99.0063 )
b = Vector2( 3.44492, 75.211 )
[sub_resource type="SegmentShape2D" id=3]
a = Vector2( -12.0323, 29.5732 )
b = Vector2( 309.792, 29.724 )
[sub_resource type="SegmentShape2D" id=4]
a = Vector2( 369.611, 141.974 )
b = Vector2( 49.76, 142.724 )
[node name="World" type="Node2D"]
script = ExtResource( 2 )
[node name="TileMap" type="TileMap" parent="."]
tile_set = ExtResource( 3 )
cell_size = Vector2( 16, 16 )
cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 )
occluder_light_mask = 0
format = 1
tile_data = PoolIntArray( 0, 0, 65537, 1, 0, 65538, 2, 0, 65538, 3, 0, 65538, 4, 0, 65538, 5, 0, 65538, 6, 0, 65538, 7, 0, 65538, 8, 0, 65538, 9, 0, 65538, 10, 0, 65538, 11, 0, 65538, 12, 0, 65538, 13, 0, 65538, 14, 0, 65538, 15, 0, 65538, 16, 0, 65538, 17, 0, 65538, 18, 0, 65538, 19, 0, 65539, 65536, 0, 131073, 65537, 0, 131074, 65538, 0, 131074, 65539, 0, 131074, 65540, 0, 131074, 65541, 0, 131074, 65542, 0, 131074, 65543, 0, 131074, 65544, 0, 131074, 65545, 0, 131074, 65546, 0, 131074, 65547, 0, 131074, 65548, 0, 131074, 65549, 0, 131074, 65550, 0, 131074, 65551, 0, 131074, 65552, 0, 131074, 65553, 0, 131074, 65554, 0, 131074, 65555, 0, 131075, 131072, 0, 131073, 131073, 0, 131074, 131074, 0, 131074, 131075, 0, 131074, 131076, 0, 131074, 131077, 0, 131074, 131078, 0, 131074, 131079, 0, 131074, 131080, 0, 131074, 131081, 0, 131074, 131082, 0, 131074, 131083, 0, 131074, 131084, 0, 131074, 131085, 0, 131074, 131086, 0, 131074, 131087, 0, 131074, 131088, 0, 131074, 131089, 0, 131074, 131090, 0, 131074, 131091, 0, 131075, 196608, 0, 131073, 196609, 0, 131074, 196610, 0, 131074, 196611, 0, 131074, 196612, 0, 131074, 196613, 0, 131074, 196614, 0, 131074, 196615, 0, 131074, 196616, 0, 131074, 196617, 0, 131074, 196618, 0, 131074, 196619, 0, 131074, 196620, 0, 131074, 196621, 0, 131074, 196622, 0, 131074, 196623, 0, 131074, 196624, 0, 131074, 196625, 0, 131074, 196626, 0, 131074, 196627, 0, 131075, 262144, 0, 131073, 262145, 0, 131074, 262146, 0, 131074, 262147, 0, 131074, 262148, 0, 131074, 262149, 0, 131074, 262150, 0, 131074, 262151, 0, 131074, 262152, 0, 131074, 262153, 0, 131074, 262154, 0, 131074, 262155, 0, 131074, 262156, 0, 131074, 262157, 0, 131074, 262158, 0, 131074, 262159, 0, 131074, 262160, 0, 131074, 262161, 0, 131074, 262162, 0, 131074, 262163, 0, 131075, 327680, 0, 131073, 327681, 0, 131074, 327682, 0, 131074, 327683, 0, 131074, 327684, 0, 131074, 327685, 0, 131074, 327686, 0, 131074, 327687, 0, 131074, 327688, 0, 131074, 327689, 0, 131074, 327690, 0, 131074, 327691, 0, 131074, 327692, 0, 131074, 327693, 0, 131074, 327694, 0, 131074, 327695, 0, 131074, 327696, 0, 131074, 327697, 0, 131074, 327698, 0, 131074, 327699, 0, 131075, 393216, 0, 131073, 393217, 0, 131074, 393218, 0, 131074, 393219, 0, 131074, 393220, 0, 131074, 393221, 0, 131074, 393222, 0, 131074, 393223, 0, 131074, 393224, 0, 131074, 393225, 0, 131074, 393226, 0, 131074, 393227, 0, 131074, 393228, 0, 131074, 393229, 0, 131074, 393230, 0, 131074, 393231, 0, 131074, 393232, 0, 131074, 393233, 0, 131074, 393234, 0, 131074, 393235, 0, 131075, 458752, 0, 131073, 458753, 0, 131074, 458754, 0, 131074, 458755, 0, 131074, 458756, 0, 131074, 458757, 0, 131074, 458758, 0, 131074, 458759, 0, 131074, 458760, 0, 131074, 458761, 0, 131074, 458762, 0, 131074, 458763, 0, 131074, 458764, 0, 131074, 458765, 0, 131074, 458766, 0, 131074, 458767, 0, 131074, 458768, 0, 131074, 458769, 0, 131074, 458770, 0, 131074, 458771, 0, 131075, 524288, 0, 131073, 524289, 0, 131074, 524290, 0, 131074, 524291, 0, 131074, 524292, 0, 131074, 524293, 0, 131074, 524294, 0, 131074, 524295, 0, 131074, 524296, 0, 131074, 524297, 0, 131074, 524298, 0, 131074, 524299, 0, 131074, 524300, 0, 131074, 524301, 0, 131074, 524302, 0, 131074, 524303, 0, 131074, 524304, 0, 131074, 524305, 0, 131074, 524306, 0, 131074, 524307, 0, 131075, 589824, 0, 131073, 589825, 0, 131074, 589826, 0, 131074, 589827, 0, 131074, 589828, 0, 131074, 589829, 0, 131074, 589830, 0, 131074, 589831, 0, 131074, 589832, 0, 131074, 589833, 0, 131074, 589834, 0, 131074, 589835, 0, 131074, 589836, 0, 131074, 589837, 0, 131074, 589838, 0, 131074, 589839, 0, 131074, 589840, 0, 131074, 589841, 0, 131074, 589842, 0, 131074, 589843, 0, 131075, 655360, 0, 196609, 655361, 0, 196610, 655362, 0, 196610, 655363, 0, 196610, 655364, 0, 196610, 655365, 0, 196610, 655366, 0, 196610, 655367, 0, 196610, 655368, 0, 196610, 655369, 0, 196610, 655370, 0, 196610, 655371, 0, 196610, 655372, 0, 196610, 655373, 0, 196610, 655374, 0, 196610, 655375, 0, 196610, 655376, 0, 196610, 655377, 0, 196610, 655378, 0, 196610, 655379, 0, 196611 )
[node name="YSort" type="YSort" parent="."]
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
position = Vector2( 20, 26 )
ACCELERATION = 500
FRICTION = 500
[node name="tree6" type="StaticBody2D" parent="YSort"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree6"]
position = Vector2( 72.1774, 92.5564 )
shape = SubResource( 1 )
[node name="forestTreeBig2" type="Sprite" parent="YSort/tree6"]
position = Vector2( 72.0738, 92.0067 )
texture = ExtResource( 5 )
[node name="snowmen_enemy5" parent="YSort" instance=ExtResource( 6 )]
position = Vector2( 292.382, 22.7352 )
script = ExtResource( 7 )
[node name="snowmen_enemy4" parent="YSort" instance=ExtResource( 6 )]
position = Vector2( 261.1, 142.19 )
script = ExtResource( 7 )
[node name="snowmen_enemy2" parent="YSort" instance=ExtResource( 4 )]
position = Vector2( 190.316, 146.569 )
[node name="snowmen_enemy" parent="YSort" instance=ExtResource( 4 )]
position = Vector2( 67.4812, 153.194 )
[node name="tree5" type="StaticBody2D" parent="YSort"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree5"]
position = Vector2( 265.396, 85.2148 )
shape = SubResource( 1 )
[node name="forestTreeBig" type="Sprite" parent="YSort/tree5"]
position = Vector2( 265.238, 84.0492 )
texture = ExtResource( 5 )
[node name="tree8" type="StaticBody2D" parent="YSort"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree8"]
position = Vector2( 85.1921, 39.1628 )
shape = SubResource( 1 )
[node name="forestTreeBig5" type="Sprite" parent="YSort/tree8"]
position = Vector2( 84.7548, 38.2794 )
texture = ExtResource( 5 )
[node name="tree7" type="StaticBody2D" parent="YSort"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree7"]
position = Vector2( 38.4727, 145.283 )
shape = SubResource( 1 )
[node name="forestTreeBig6" type="Sprite" parent="YSort/tree7"]
position = Vector2( 38.7028, 144.733 )
texture = ExtResource( 5 )
[node name="tree4" type="StaticBody2D" parent="YSort"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree4"]
position = Vector2( 211.334, 36.8269 )
shape = SubResource( 1 )
[node name="forestTreeBig7" type="Sprite" parent="YSort/tree4"]
position = Vector2( 210.897, 36.2771 )
texture = ExtResource( 5 )
[node name="tree" type="StaticBody2D" parent="YSort"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree"]
position = Vector2( 235.362, 138.275 )
shape = SubResource( 1 )
[node name="forestTreeBig" type="Sprite" parent="YSort/tree/CollisionShape2D"]
position = Vector2( -0.103607, -0.883423 )
texture = ExtResource( 5 )
[node name="tree3" type="StaticBody2D" parent="YSort"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree3"]
position = Vector2( 153.603, 158.631 )
shape = SubResource( 1 )
[node name="forestTreeBig3" type="Sprite" parent="YSort/tree3"]
position = Vector2( 153.165, 157.748 )
texture = ExtResource( 5 )
[node name="tree2" type="StaticBody2D" parent="YSort"]
position = Vector2( 2.47487, 0.707108 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree2"]
position = Vector2( 157.273, 93.2238 )
shape = SubResource( 1 )
[node name="forestTreeBig4" type="Sprite" parent="YSort/tree2"]
position = Vector2( 156.836, 92.3404 )
texture = ExtResource( 5 )
[node name="wall" type="StaticBody2D" parent="YSort"]
position = Vector2( -17.4614, 141.279 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/wall"]
position = Vector2( 329.803, -41.5425 )
shape = SubResource( 2 )
[node name="wall1" type="StaticBody2D" parent="YSort"]
position = Vector2( 15.874, -26.1921 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/wall1"]
position = Vector2( -3.71627, -0.261772 )
shape = SubResource( 3 )
[node name="wall2" type="StaticBody2D" parent="YSort"]
position = Vector2( -7.93701, 71.8299 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/wall2"]
position = Vector2( 8.36367, 26.9858 )
shape = SubResource( 2 )
[node name="wall3" type="StaticBody2D" parent="YSort"]
position = Vector2( -49.6063, 34.526 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/wall3"]
position = Vector2( 0, -4.25 )
shape = SubResource( 4 )
[node name="coin_container" type="Control" parent="YSort"]
margin_right = 40.0
margin_bottom = 40.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Countdown" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 8 )
__meta__ = {
"_edit_use_anchors_": false
}
minutes = 3
[node name="sec" type="RichTextLabel" parent="Countdown"]
modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
self_modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
margin_left = 139.114
margin_top = 5.0
margin_right = 169.114
margin_bottom = 26.0
text = "00"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="dsec" type="RichTextLabel" parent="Countdown"]
modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
self_modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
margin_left = 158.512
margin_top = 4.7622
margin_right = 198.512
margin_bottom = 44.7622
text = "0"
[node name="Timer" type="Timer" parent="Countdown"]
process_mode = 0
wait_time = 0.1
autostart = true
[node name="HUD" parent="." instance=ExtResource( 9 )]
[node name="Pause Screen" parent="." instance=ExtResource( 10 )]
[connection signal="timeout" from="Countdown/Timer" to="Countdown" method="_on_Timer_timeout"]

6
Levels/Level 5.gd Normal file
View File

@@ -0,0 +1,6 @@
extends Node2D
func _ready() -> void:
$YSort/Player.load_hud($HUD)
return

71
Levels/Level 5.tscn Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,18 @@
extends Area2D
export var enemy_path: String = 'res://Enemies/ENEMY.tscn'
export var relative_x_tiles: int
export var relative_y_tiles: int
func _on_spawn_trap_area_entered(_area: Area2D) -> void:
set_deferred('monitoring', false)
$Tile.set_deferred('disabled', true)
var enemy: KinematicBody2D = load(enemy_path).instance()
enemy.position.x = position.x + (relative_x_tiles * 16 + 8)
enemy.position.y = position.y + (relative_y_tiles * 16 + 8)
var enemies: YSort = get_tree().get_current_scene().get_node('YSort/Enemies')
enemies.call_deferred('add_child', enemy)
return

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Levels/Traps/Spawn Trap.gd" type="Script" id=1]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 8, 8 )
[node name="Spawn Trap" type="Area2D"]
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false
script = ExtResource( 1 )
[node name="Tile" type="CollisionShape2D" parent="."]
position = Vector2( 8, 8 )
shape = SubResource( 1 )
[connection signal="area_entered" from="." to="." method="_on_spawn_trap_area_entered"]