enemy occlusion

This commit is contained in:
Victor Turgeon 2023-10-11 04:37:40 -04:00
parent 6663e7daf1
commit fce86322c7
3 changed files with 11 additions and 4 deletions

View File

@ -2,8 +2,8 @@
[ext_resource type="Script" path="res://Scripts/level.gd" id="1_0nmok"]
[ext_resource type="PackedScene" uid="uid://b8s2seg2lf7wo" path="res://Scenes/Tilemaps/tileset_1.tscn" id="1_4n82n"]
[ext_resource type="PackedScene" uid="uid://dgtscjxcqoxls" path="res://Scenes/Props/candle_1.tscn" id="2_5hdq4"]
[ext_resource type="PackedScene" uid="uid://cf7al5uln33rn" path="res://Scenes/Props/candle_2.tscn" id="2_o33c4"]
[ext_resource type="PackedScene" uid="uid://cl7w6ndvons1a" path="res://Scenes/Props/candle_1.tscn" id="2_5hdq4"]
[ext_resource type="PackedScene" uid="uid://by2xmwcng01uy" path="res://Scenes/Props/candle_2.tscn" id="2_o33c4"]
[ext_resource type="PackedScene" uid="uid://b5lnjonlf4i1b" path="res://Scenes/enemy.tscn" id="4_g0oey"]
[ext_resource type="PackedScene" uid="uid://0onqgygm832d" path="res://Scenes/Player/player.tscn" id="5_ik47y"]
[ext_resource type="AudioStream" uid="uid://c3dy35dv368ft" path="res://Assets/Music/SisNeufPiDoozHuit.mp3" id="7_but47"]

View File

@ -10,7 +10,7 @@ region = Rect2(0, 0, 64, 64)
[node name="BatSpawnable" instance=ExtResource("1_verf7")]
maxHp = 10
attackSpeed = 50.0
attackSpeed = 20.0
speed = 4000.0
damage = 1
priority = 1

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=61 format=3 uid="uid://b5lnjonlf4i1b"]
[gd_scene load_steps=62 format=3 uid="uid://b5lnjonlf4i1b"]
[ext_resource type="Script" path="res://Scripts/Enemy.gd" id="1_xj62t"]
[ext_resource type="Texture2D" uid="uid://xn7yb3f5w17m" path="res://Assets/Knight/noBKG_KnightAttack_strip.png" id="2_dclcl"]
@ -11,6 +11,9 @@
[ext_resource type="AudioStream" uid="uid://dj7884l6tki3g" path="res://Assets/Audio/whoosh.ogg" id="8_ygdkj"]
[ext_resource type="AudioStream" uid="uid://bmu622w5ea05y" path="res://Assets/Audio/mixkit-weak-fast-blow-2145.wav" id="9_myh6x"]
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_xq5nx"]
polygon = PackedVector2Array(-2, 11, 2, 2, 2, -7, 0, -18, -5, -18, -6, -7, -6, 1)
[sub_resource type="AtlasTexture" id="AtlasTexture_6gjg8"]
atlas = ExtResource("2_dclcl")
region = Rect2(1296, 0, 144, 64)
@ -380,6 +383,9 @@ collision_layer = 5
collision_mask = 5
script = ExtResource("1_xj62t")
[node name="LightOccluder2D" type="LightOccluder2D" parent="."]
occluder = SubResource("OccluderPolygon2D_xq5nx")
[node name="Sprite" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_dqf8u")
animation = &"Idle"
@ -449,6 +455,7 @@ position = Vector2(0, -3)
shape = SubResource("CapsuleShape2D_p2hkm")
[node name="AttackArea" type="Area2D" parent="."]
visible = false
collision_layer = 2
collision_mask = 2