mirror of
https://github.com/RYGhub/the-cold-night.git
synced 2024-11-22 04:34:19 +00:00
🔧 Move behaviours to their own scenes
This commit is contained in:
parent
f74d0a6749
commit
4970753b91
3 changed files with 16 additions and 6 deletions
|
@ -1,19 +1,17 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/mechanics/Black.png" type="Texture" id=1]
|
[ext_resource path="res://src/mechanics/Black.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/entities/behaviours/AttractedTo.gd" type="Script" id=2]
|
[ext_resource path="res://src/entities/behaviours/ErraticMovement.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://src/entities/behaviours/ErraticMovement.gd" type="Script" id=3]
|
[ext_resource path="res://src/entities/behaviours/AttractedTo.tscn" type="PackedScene" id=3]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 16, 16 )
|
extents = Vector2( 16, 16 )
|
||||||
|
|
||||||
[node name="Enemy" type="KinematicBody2D"]
|
[node name="Enemy" type="KinematicBody2D"]
|
||||||
|
|
||||||
[node name="AttractedTo" type="Node" parent="."]
|
[node name="AttractedTo" parent="." instance=ExtResource( 3 )]
|
||||||
script = ExtResource( 2 )
|
|
||||||
|
|
||||||
[node name="ErraticMovement" type="Node" parent="."]
|
[node name="ErraticMovement" parent="." instance=ExtResource( 2 )]
|
||||||
script = ExtResource( 3 )
|
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
6
src/entities/behaviours/AttractedTo.tscn
Normal file
6
src/entities/behaviours/AttractedTo.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/entities/behaviours/AttractedTo.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="AttractedTo" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
6
src/entities/behaviours/ErraticMovement.tscn
Normal file
6
src/entities/behaviours/ErraticMovement.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/entities/behaviours/ErraticMovement.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="ErraticMovement" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
Loading…
Reference in a new issue