Merge branch 'main' of https://gamejam.fachschaft.info/Florian/The_Dark_Side_of_Earth
This commit is contained in:
commit
be1aa59c7f
13 changed files with 76 additions and 18 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://djawvtdwp423v"]
|
[gd_scene load_steps=7 format=3 uid="uid://djawvtdwp423v"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_5j34s"]
|
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_5j34s"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="2_2yopf"]
|
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_xx8ra"]
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_f1gjg"]
|
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="3_xr4t5"]
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_qnfc1"]
|
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_xr4t5"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dpv1w56yr1xue" path="res://traps/morning_star.tscn" id="5_xr4t5"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qnfc1"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pfkkr"]
|
||||||
resource_local_to_scene = true
|
shader = ExtResource("2_xx8ra")
|
||||||
shader = ExtResource("2_f1gjg")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
shader_parameter/ground_height = 3000.0
|
||||||
shader_parameter/cell_height = 300.0
|
shader_parameter/cell_height = 300.0
|
||||||
shader_parameter/num_cells = 60
|
shader_parameter/num_cells = 60
|
||||||
|
|
@ -16,7 +16,10 @@ shader_parameter/num_cells = 60
|
||||||
script = ExtResource("1_5j34s")
|
script = ExtResource("1_5j34s")
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
material = SubResource("ShaderMaterial_qnfc1")
|
material = SubResource("ShaderMaterial_pfkkr")
|
||||||
scale = Vector2(250, 250)
|
texture = ExtResource("3_xr4t5")
|
||||||
texture = ExtResource("2_2yopf")
|
script = ExtResource("4_xr4t5")
|
||||||
script = ExtResource("4_qnfc1")
|
|
||||||
|
[node name="EnemyList" type="Node2D" parent="."]
|
||||||
|
|
||||||
|
[node name="MorningStar" parent="EnemyList" instance=ExtResource("5_xr4t5")]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://bno6flekdwx88"]
|
[gd_scene load_steps=7 format=3 uid="uid://cmofmd0vf3hx3"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_q3nfb"]
|
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_q3nfb"]
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_uv7v8"]
|
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_uv7v8"]
|
||||||
|
|
@ -18,7 +18,7 @@ script = ExtResource("1_q3nfb")
|
||||||
dimension = Vector2i(1, 2)
|
dimension = Vector2i(1, 2)
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
self_modulate = Color(0.1764706, 0, 0.003921569, 0.003921569)
|
self_modulate = Color(0.176471, 0, 0.00392157, 0.00392157)
|
||||||
material = SubResource("ShaderMaterial_qnfc1")
|
material = SubResource("ShaderMaterial_qnfc1")
|
||||||
scale = Vector2(25, 25)
|
scale = Vector2(25, 25)
|
||||||
texture = ExtResource("3_e6j05")
|
texture = ExtResource("3_e6j05")
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://chu67ci7sl488"]
|
[gd_scene load_steps=6 format=3 uid="uid://chu67ci7sl488"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://12jns4dppxxj" path="res://enemies/ghost.gd" id="1_6attn"]
|
[ext_resource type="Script" uid="uid://12jns4dppxxj" path="res://enemies/ghost.gd" id="1_6attn"]
|
||||||
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://enemy_hurtbox.tscn" id="2_34o1m"]
|
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="2_34o1m"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="2_obmiq"]
|
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="2_obmiq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_obmiq"]
|
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_obmiq"]
|
||||||
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
[node name="Ghost" type="Area2D"]
|
[node name="Ghost" type="Area2D"]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
scale = Vector2(0.4, 0.4)
|
scale = Vector2(0.4, 0.4)
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 4
|
||||||
script = ExtResource("1_6attn")
|
script = ExtResource("1_6attn")
|
||||||
|
|
||||||
[node name="EnemyHurtbox" parent="." instance=ExtResource("2_34o1m")]
|
[node name="EnemyHurtbox" parent="." instance=ExtResource("2_34o1m")]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://cxo6bq26huau7"]
|
[gd_scene load_steps=8 format=3 uid="uid://cxo6bq26huau7"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
|
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
|
||||||
[ext_resource type="Script" uid="uid://vgxh2xdevat7" path="res://world/earth.gd" id="2_lquwl"]
|
[ext_resource type="Script" uid="uid://vgxh2xdevat7" path="res://world/earth.gd" id="2_lquwl"]
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://jjoyj1ldafkf" path="res://world/earth.tscn" id="3_lquwl"]
|
[ext_resource type="PackedScene" uid="uid://jjoyj1ldafkf" path="res://world/earth.tscn" id="3_lquwl"]
|
||||||
[ext_resource type="Script" uid="uid://colvx6wq0e8n7" path="res://world/building_generator.gd" id="4_1bvp3"]
|
[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://cjsrtswk4vgf2" path="res://healthbar/healthbar.tscn" id="6_7mycd"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dpv1w56yr1xue" path="res://traps/morning_star.tscn" id="7_272bh"]
|
||||||
|
|
||||||
[node name="main" type="Node2D"]
|
[node name="main" type="Node2D"]
|
||||||
|
|
||||||
|
|
@ -42,5 +43,8 @@ autostart = true
|
||||||
offset_right = 128.0
|
offset_right = 128.0
|
||||||
offset_bottom = 128.0
|
offset_bottom = 128.0
|
||||||
|
|
||||||
|
[node name="MorningStar" parent="." instance=ExtResource("7_272bh")]
|
||||||
|
position = Vector2(989, -2939)
|
||||||
|
|
||||||
[connection signal="health_changed" from="Player" to="CanvasLayer/Healthbar" method="_on_player_health_changed"]
|
[connection signal="health_changed" from="Player" to="CanvasLayer/Healthbar" method="_on_player_health_changed"]
|
||||||
[connection signal="timeout" from="Building Generator/Timer" to="Building Generator" method="_on_timer_timeout"]
|
[connection signal="timeout" from="Building Generator/Timer" to="Building Generator" method="_on_timer_timeout"]
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ animations = [{
|
||||||
|
|
||||||
[node name="Player" type="CharacterBody2D"]
|
[node name="Player" type="CharacterBody2D"]
|
||||||
z_index = 10
|
z_index = 10
|
||||||
|
collision_layer = 5
|
||||||
script = ExtResource("1_4flbx")
|
script = ExtResource("1_4flbx")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
|
|
||||||
|
|
@ -47,3 +47,4 @@ attack={
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
2d_physics/layer_2="EnemyHurtBox"
|
2d_physics/layer_2="EnemyHurtBox"
|
||||||
|
2d_physics/layer_3="PlayerHurtBox"
|
||||||
|
|
|
||||||
23
traps/morning_star.gd
Normal file
23
traps/morning_star.gd
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
extends Node2D
|
||||||
|
@onready var ball : Area2D = $Area2D
|
||||||
|
var anglespeed = 0.3
|
||||||
|
var player_damage = 1
|
||||||
|
var enemy_damage = 10
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
rotate(randf() * TAU)
|
||||||
|
anglespeed = anglespeed * (2 * randi_range(0,1) - 1)
|
||||||
|
|
||||||
|
func _physics_process(delta: float) -> void:
|
||||||
|
rotate(anglespeed * delta * TAU)
|
||||||
|
for target in ball.get_overlapping_areas():
|
||||||
|
damage_target(target)
|
||||||
|
for target in ball.get_overlapping_bodies():
|
||||||
|
damage_target(target)
|
||||||
|
|
||||||
|
func damage_target(target: CollisionObject2D):
|
||||||
|
var dir = (position - target.position).normalized()
|
||||||
|
if(target.get_collision_layer_value(3)):
|
||||||
|
target.hurt(player_damage, dir)
|
||||||
|
else:
|
||||||
|
target.hurt(enemy_damage, 2.5*dir)
|
||||||
1
traps/morning_star.gd.uid
Normal file
1
traps/morning_star.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bjarfrf4tf3b1
|
||||||
23
traps/morning_star.tscn
Normal file
23
traps/morning_star.tscn
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://dpv1w56yr1xue"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bjarfrf4tf3b1" path="res://traps/morning_star.gd" id="1_iuq6u"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="1_ytaxb"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_iuq6u"]
|
||||||
|
|
||||||
|
[node name="MorningStar" type="Node2D"]
|
||||||
|
script = ExtResource("1_iuq6u")
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="."]
|
||||||
|
position = Vector2(0, -200)
|
||||||
|
scale = Vector2(3, 3)
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 6
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||||
|
shape = SubResource("CircleShape2D_iuq6u")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="Area2D"]
|
||||||
|
modulate = Color(1, 0, 0, 1)
|
||||||
|
scale = Vector2(0.15, 0.15)
|
||||||
|
texture = ExtResource("1_ytaxb")
|
||||||
|
|
@ -2,7 +2,7 @@ extends Area2D
|
||||||
|
|
||||||
@export var max_hp : int
|
@export var max_hp : int
|
||||||
@onready var hp = max_hp
|
@onready var hp = max_hp
|
||||||
var hit_invulnerability = 0.15
|
@export var hit_invulnerability = 0.35
|
||||||
var inv_time = 0;
|
var inv_time = 0;
|
||||||
|
|
||||||
signal damage_taken
|
signal damage_taken
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://mtfsdd4cdf3a"]
|
[gd_scene load_steps=2 format=3 uid="uid://mtfsdd4cdf3a"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://ct8am2xeyymuj" path="res://enemy_hurtbox.gd" id="1_wa58b"]
|
[ext_resource type="Script" uid="uid://ct8am2xeyymuj" path="res://utils/enemy_hurtbox.gd" id="1_wa58b"]
|
||||||
|
|
||||||
[node name="EnemyHurtbox" type="Area2D"]
|
[node name="EnemyHurtbox" type="Area2D"]
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
[ext_resource type="Script" uid="uid://b5fhsy1xlreco" path="res://world/draw_circle.gd" id="2_2bhor"]
|
[ext_resource type="Script" uid="uid://b5fhsy1xlreco" path="res://world/draw_circle.gd" id="2_2bhor"]
|
||||||
[ext_resource type="Script" uid="uid://m3vyyfk8gnma" path="res://world/grid.gd" id="3_2bhor"]
|
[ext_resource type="Script" uid="uid://m3vyyfk8gnma" path="res://world/grid.gd" id="3_2bhor"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djawvtdwp423v" path="res://buildings/building.tscn" id="3_nihcy"]
|
[ext_resource type="PackedScene" uid="uid://djawvtdwp423v" path="res://buildings/building.tscn" id="3_nihcy"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bno6flekdwx88" path="res://buildings/haunted_house.tscn" id="4_ml5no"]
|
[ext_resource type="PackedScene" uid="uid://cmofmd0vf3hx3" path="res://buildings/haunted_house.tscn" id="4_ml5no"]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_5i67w"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_5i67w"]
|
||||||
radius = 3000.0
|
radius = 3000.0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue