Merge branch 'main' of https://gamejam.fachschaft.info/Florian/The_Dark_Side_of_Earth
This commit is contained in:
commit
a8f61bfce3
28 changed files with 101 additions and 73 deletions
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Building 1x2 fixed.png-e90afc0d25a8919ada5700
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Building 2x1 downside.png-4b432eb4152bab7dd59
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Building 2x1 fixed.png-b02748fa52aebae62f987c
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ void vertex()
|
|||
location = ivec2(128. * COLOR.xy);
|
||||
dimension = ivec2(128. * COLOR.zw);
|
||||
|
||||
vec2 myloc = vec2(location) + UV * (vec2(dimension) + vec2(0., .7)) - vec2(0, .2);
|
||||
vec2 myloc = vec2(location) + UV * (vec2(dimension) + vec2(0., .5));
|
||||
float angle = float(myloc.x) * TAU / 60.;
|
||||
float height = float(myloc.y) * cell_height + ground_height;
|
||||
VERTEX = vec2(cos(angle), sin(angle)) * height;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
[ext_resource type="Texture2D" uid="uid://3weywjfsapax" path="res://buildings/Building 2x1 downside.png" id="5_pfkkr"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpv1w56yr1xue" path="res://traps/morning_star.tscn" id="5_xr4t5"]
|
||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost.tscn" id="7_35wcg"]
|
||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://platform.tscn" id="8_sifiv"]
|
||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="8_sifiv"]
|
||||
[ext_resource type="PackedScene" uid="uid://xj0of571aur1" path="res://items/item_spawn.tscn" id="9_i1qmw"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pfkkr"]
|
||||
|
|
@ -16,7 +16,7 @@ shader_parameter/ground_height = 3000.0
|
|||
shader_parameter/cell_height = 300.0
|
||||
shader_parameter/num_cells = 60
|
||||
|
||||
[node name="Building" type="Node2D"]
|
||||
[node name="Building2" type="Node2D"]
|
||||
script = ExtResource("1_5j34s")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
[ext_resource type="Texture2D" uid="uid://djir4ehm8kif" path="res://buildings/Building 1x2 fixed.png" id="3_uv7v8"]
|
||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_bl5jt"]
|
||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost.tscn" id="5_23fi7"]
|
||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://platform.tscn" id="6_e6j05"]
|
||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="6_e6j05"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qnfc1"]
|
||||
resource_local_to_scene = true
|
||||
|
|
|
|||
7
items/active_item.gd
Normal file
7
items/active_item.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class_name ActiveItem extends Item
|
||||
|
||||
func collect() -> bool:
|
||||
if (player.active_item == null):
|
||||
player.active_item = self
|
||||
return true
|
||||
return false
|
||||
1
items/active_item.gd.uid
Normal file
1
items/active_item.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dyu8r5dt6qk8k
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
extends Item
|
||||
@export var heal_amount = 1
|
||||
|
||||
func collect():
|
||||
func collect() -> bool:
|
||||
if(player.current_hp < player.max_hp):
|
||||
player.current_hp += heal_amount
|
||||
player.current_hp = min(player.max_hp, player.current_hp + heal_amount)
|
||||
return true
|
||||
return false
|
||||
|
|
|
|||
8
items/healthup.gd
Normal file
8
items/healthup.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
extends Item
|
||||
@export var heal_amount = 1
|
||||
@export var max_health_increase = 1
|
||||
|
||||
func collect() -> bool:
|
||||
player.max_hp += max_health_increase
|
||||
player.current_hp = min(player.max_hp, player.current_hp + heal_amount)
|
||||
return true
|
||||
1
items/healthup.gd.uid
Normal file
1
items/healthup.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ce6fxbjarlvtk
|
||||
21
items/healthup.tscn
Normal file
21
items/healthup.tscn
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://gwctb2xqsbj"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ce6fxbjarlvtk" path="res://items/healthup.gd" id="1_ivtxh"]
|
||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_lolop"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="3_v056v"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_hvhjo"]
|
||||
|
||||
[node name="HealthUp" type="Area2D"]
|
||||
scale = Vector2(1, -1)
|
||||
script = ExtResource("1_ivtxh")
|
||||
|
||||
[node name="EarthAligner" parent="." instance=ExtResource("2_lolop")]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
scale = Vector2(7, 7)
|
||||
shape = SubResource("CircleShape2D_hvhjo")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color(1, 1, 0, 1)
|
||||
texture = ExtResource("3_v056v")
|
||||
|
|
@ -6,12 +6,11 @@ func _ready() -> void:
|
|||
|
||||
func _on_body_entered(body: Node2D):
|
||||
if(body.name == "Player"):
|
||||
set_deferred("monitoring", false)
|
||||
set_deferred("monitorable", false)
|
||||
call_deferred("reparent", player)
|
||||
collect_animation()
|
||||
if(self.has_method("collect")):
|
||||
collect()
|
||||
if(self.has_method("collect") and collect()):
|
||||
set_deferred("monitoring", false)
|
||||
set_deferred("monitorable", false)
|
||||
call_deferred("reparent", player)
|
||||
collect_animation()
|
||||
|
||||
func collect_animation():
|
||||
self.visible = false
|
||||
|
|
|
|||
9
items/updash.gd
Normal file
9
items/updash.gd
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
extends ActiveItem
|
||||
var cooldown = 10
|
||||
|
||||
|
||||
func activate():
|
||||
player.item_cooldown = cooldown
|
||||
player.reset_to_velocity = Vector2(0,1)
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
player.reset_to_velocity = Vector2(0, -2400)
|
||||
1
items/updash.gd.uid
Normal file
1
items/updash.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bbwsc2a2hd0ow
|
||||
18
items/updash.tscn
Normal file
18
items/updash.tscn
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://ewe36lqcjojk"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bbwsc2a2hd0ow" path="res://items/updash.gd" id="1_ghbl6"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="1_ptc3l"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ghbl6"]
|
||||
|
||||
[node name="Updash" type="Area2D"]
|
||||
script = ExtResource("1_ghbl6")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
scale = Vector2(3, 3)
|
||||
shape = SubResource("CircleShape2D_ghbl6")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color(1, 0, 1, 1)
|
||||
scale = Vector2(0.45, 0.45)
|
||||
texture = ExtResource("1_ptc3l")
|
||||
10
main.tscn
10
main.tscn
|
|
@ -6,8 +6,8 @@
|
|||
[ext_resource type="Script" uid="uid://colvx6wq0e8n7" path="res://world/building_generator.gd" id="4_1bvp3"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjsrtswk4vgf2" path="res://healthbar/healthbar.tscn" id="6_7mycd"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpdn2php3ydsv" path="res://death_screen/death_screen.tscn" id="7_5vw27"]
|
||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://platform.tscn" id="7_272bh"]
|
||||
[ext_resource type="PackedScene" uid="uid://b00185vygcka1" path="res://items/heal_item.tscn" id="8_5vw27"]
|
||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="7_272bh"]
|
||||
[ext_resource type="PackedScene" uid="uid://gwctb2xqsbj" path="res://items/healthup.tscn" id="9_4c57u"]
|
||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost.tscn" id="9_kek77"]
|
||||
|
||||
[node name="main" type="Node2D"]
|
||||
|
|
@ -49,12 +49,12 @@ visible = false
|
|||
position = Vector2(900, -3000)
|
||||
scale = Vector2(5, 3.1)
|
||||
|
||||
[node name="HealItem" parent="." instance=ExtResource("8_5vw27")]
|
||||
position = Vector2(0, -3150)
|
||||
|
||||
[node name="Ghost" parent="." instance=ExtResource("9_kek77")]
|
||||
position = Vector2(0, -3000)
|
||||
|
||||
[node name="HealthUp" parent="." instance=ExtResource("9_4c57u")]
|
||||
position = Vector2(0, -3100)
|
||||
|
||||
[connection signal="health_changed" from="Player" to="CanvasLayer/Healthbar" method="_on_player_health_changed"]
|
||||
[connection signal="player_died" from="Player" to="CanvasLayer/DeathScreen" method="_on_player_player_died"]
|
||||
[connection signal="timeout" from="Building Generator/Timer" to="Building Generator" method="_on_timer_timeout"]
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 1.png-47c623e9d3540b4a00d2bddf52ae0b2a.c
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 2.png-5dea4fdec55fa43e26680e08090fd654.c
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 3.png-27890c0cb512383b8ecbd848c73efee1.c
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 4.png-232b1eae2acf3ad82130431014262cde.c
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 5.png-cfb8eb15ace876127c083283fe74cdc0.c
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 6.png-f243f98e182be67eb8681a11d34ee554.c
|
|||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
|
|
|
|||
|
|
@ -42,9 +42,14 @@ var damage_knockup = 500
|
|||
var atk_cooldown = 0.5
|
||||
var atk_timer = 0
|
||||
|
||||
# Active Item
|
||||
var active_item = null
|
||||
var item_cooldown = 0
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
manage_iframes(delta)
|
||||
manage_movement_options()
|
||||
manage_active(delta)
|
||||
manage_animation()
|
||||
manage_attack(delta)
|
||||
manage_velocity(delta)
|
||||
|
|
@ -61,6 +66,11 @@ func manage_attack(delta : float):
|
|||
sword.swing()
|
||||
atk_timer = atk_cooldown
|
||||
|
||||
func manage_active(delta : float):
|
||||
item_cooldown = max(item_cooldown - delta, 0)
|
||||
if(active_item != null and Input.is_action_just_pressed("item") and item_cooldown <= 0):
|
||||
active_item.activate()
|
||||
|
||||
func manage_movement_options() -> void:
|
||||
if(is_on_floor()):
|
||||
air_jumps_current = air_jumps_max
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ config_version=5
|
|||
|
||||
config/name="The Dark Side of Earth"
|
||||
run/main_scene="uid://cxo6bq26huau7"
|
||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
|
@ -48,6 +48,11 @@ drop={
|
|||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
item={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://4l3elvxpghw8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dwmquoam37sve" path="res://platform.gd" id="1_c1gtx"]
|
||||
[ext_resource type="Script" uid="uid://dwmquoam37sve" path="res://utils/platform.gd" id="1_c1gtx"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="1_s8bxr"]
|
||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_c1gtx"]
|
||||
|
||||
Loading…
Add table
Reference in a new issue