[gd_scene load_steps=11 format=3 uid="uid://dy41q1kxray5t"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"] [ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"] [ext_resource type="AnimationLibrary" uid="uid://bv1dl1g4dmbho" path="res://resources/animations/plants/peashooter.res" id="3_8lrhp"] [ext_resource type="Script" path="res://scripts/components/plants/Shooter.cs" id="3_a4ew1"] [ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="4_saxds"] [ext_resource type="Script" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"] [ext_resource type="Script" path="res://scripts/components/plants/Eyesight.cs" id="7_2bki8"] [ext_resource type="Script" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="8_nl4jc"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"] size = Vector2(20, 44) [sub_resource type="SegmentShape2D" id="SegmentShape2D_8iovl"] [node name="Peashooter" instance=ExtResource("1_pyk3o")] [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_14qlx") hframes = 2 vframes = 10 frame = 6 [node name="AnimationPlayer" parent="." index="1"] libraries = { "peashooter": ExtResource("3_8lrhp") } autoplay = "peashooter/idle" [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] position = Vector2(0, 5) shape = SubResource("RectangleShape2D_r7xnh") [node name="Shooter" type="Marker2D" parent="." index="3" node_paths=PackedStringArray("_timer")] position = Vector2(12, -4) script = ExtResource("3_a4ew1") _projectile = ExtResource("4_saxds") _timer = NodePath("Timer") [node name="Timer" type="Timer" parent="Shooter" index="0"] wait_time = 1.5 one_shot = true [node name="Behaviour" type="Node" parent="." index="4" node_paths=PackedStringArray("_player", "_shootTimer", "_sight")] script = ExtResource("5_7qiua") _player = NodePath("../AnimationPlayer") _shootTimer = NodePath("../Shooter/Timer") _sight = NodePath("../Eysight") _libName = "peashooter" [node name="Eysight" type="Area2D" parent="." index="5"] collision_layer = 4 collision_mask = 8 script = ExtResource("7_2bki8") [node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight" index="0"] shape = SubResource("SegmentShape2D_8iovl") script = ExtResource("8_nl4jc") [node name="CollisionShape2D2" type="CollisionShape2D" parent="Eysight" index="1"] position = Vector2(0, 60) shape = SubResource("SegmentShape2D_8iovl") script = ExtResource("8_nl4jc") [node name="CollisionShape2D3" type="CollisionShape2D" parent="Eysight" index="2"] position = Vector2(0, -60) shape = SubResource("SegmentShape2D_8iovl") script = ExtResource("8_nl4jc") [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." index="6"]