Compare commits
2 commits
10e87b8d73
...
85c16a2d69
| Author | SHA1 | Date | |
|---|---|---|---|
| 85c16a2d69 | |||
| 906cd25871 |
6 changed files with 26 additions and 6 deletions
|
|
@ -13,6 +13,9 @@ func _ready() -> void:
|
|||
position = height * Vector2.from_angle(angle)
|
||||
grid.buildings.append(self)
|
||||
|
||||
for enemy in $EnemyList.get_children():
|
||||
enemy.reparent(get_parent())
|
||||
|
||||
func overlaps(other : Building):
|
||||
# heights don't overlap
|
||||
if location.y >= other.location.y + other.dimension.y: return false # other is below
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
[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="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_f1gjg"]
|
||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_qnfc1"]
|
||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost.tscn" id="5_xr4t5"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qnfc1"]
|
||||
resource_local_to_scene = true
|
||||
|
|
@ -21,3 +22,7 @@ material = SubResource("ShaderMaterial_qnfc1")
|
|||
scale = Vector2(25, 25)
|
||||
texture = ExtResource("2_2yopf")
|
||||
script = ExtResource("4_qnfc1")
|
||||
|
||||
[node name="EnemyList" type="Node2D" parent="."]
|
||||
|
||||
[node name="Ghost" parent="EnemyList" instance=ExtResource("5_xr4t5")]
|
||||
|
|
|
|||
6
buildings/haunted_house.tscn
Normal file
6
buildings/haunted_house.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bno6flekdwx88"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_q3nfb"]
|
||||
|
||||
[node name="HauntedHouse" type="Node2D"]
|
||||
script = ExtResource("1_q3nfb")
|
||||
|
|
@ -11,7 +11,7 @@ var aggro_range = 900
|
|||
var chase_range = 1400
|
||||
|
||||
func _ready() -> void:
|
||||
player = get_parent().get_node("Player")
|
||||
player = get_tree().get_root().get_node("main/Player")
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var dist = (position - player.position).length()
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/player_walk.png-59515d82f701e5545419ecd7b3460
|
|||
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
|
||||
|
|
@ -25,6 +27,10 @@ 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
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ config_version=5
|
|||
|
||||
config/name="The Dark Side of Earth"
|
||||
run/main_scene="uid://cxo6bq26huau7"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue