Compare commits
No commits in common. "e4a6188d89b3c79be2e0ebfa26935e9ca8d74043" and "1cb72d1e436ea92c2a93d349f98533aa96f44c13" have entirely different histories.
e4a6188d89
...
1cb72d1e43
Binary file not shown.
|
Before Width: | Height: | Size: 566 B |
|
|
@ -1,35 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/quick_health.png-ab4d63b30abc1b0088589c308b6afa54.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/quick_health.png"
|
||||
dest_files=[ "res://.import/quick_health.png-ab4d63b30abc1b0088589c308b6afa54.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
|
@ -24,20 +24,15 @@ _global_script_classes=[ {
|
|||
"language": "GDScript",
|
||||
"path": "res://src/components/Health_Component.gd"
|
||||
}, {
|
||||
"base": "Interactable",
|
||||
"class": "HealthPickup",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/Interactables/HealthPickup.gd"
|
||||
}, {
|
||||
"base": "Area2D",
|
||||
"class": "Interactable",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/templates/Interactable/Interactable_Component.gd"
|
||||
"path": "res://src/components/Interactable_Component.gd"
|
||||
}, {
|
||||
"base": "Node2D",
|
||||
"class": "Interactable_Receiver",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/templates/Interactable/Interactable_Receiver.gd"
|
||||
"path": "res://src/components/Interactable_Receiver.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"class": "MovementComponent",
|
||||
|
|
@ -78,7 +73,6 @@ _global_script_class_icons={
|
|||
"Actor": "",
|
||||
"FrameSoundEffects": "",
|
||||
"HealthComponent": "",
|
||||
"HealthPickup": "",
|
||||
"Interactable": "",
|
||||
"Interactable_Receiver": "",
|
||||
"MovementComponent": "",
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
extends Interactable
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
onready var sprite: Sprite = $Sprite
|
||||
|
||||
|
||||
func trigger_interaction():
|
||||
# This is something that should maybe be extended for every differant interactible.
|
||||
# They could inherit from this base class and implement this function.
|
||||
sprite.frame = 1
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://src/templates/Interactable/Interactable_Component.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/Interactables/Chest.gd" type="Script" id=2]
|
||||
[ext_resource path="res://assets/High Forest/Assets/Interior-01.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
[node name="Chest" instance=ExtResource( 1 )]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="." index="0"]
|
||||
texture = ExtResource( 3 )
|
||||
vframes = 2
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 49, 80, 30, 64 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"]
|
||||
modulate = Color( 0.0313726, 1, 0, 1 )
|
||||
position = Vector2( 0, 3 )
|
||||
shape = SubResource( 1 )
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
class_name HealthPickup
|
||||
extends Interactable
|
||||
|
||||
|
||||
onready var health_icon: AnimatedSprite = $AnimatedSprite
|
||||
|
||||
func trigger_interaction():
|
||||
# This is something that should maybe be extended for every differant interactible.
|
||||
# They could inherit from this base class and implement this function.
|
||||
# sprite.frame = 1
|
||||
queue_free()
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://src/Interactables/HealthPickup.gd" type="Script" id=1]
|
||||
[ext_resource path="res://src/templates/Interactable/Interactable_Component.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://src/Interactables/QuickHealthPickup.tres" type="SpriteFrames" id=3]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 6.0
|
||||
|
||||
[node name="HealthPickup" instance=ExtResource( 2 )]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
|
||||
frames = ExtResource( 3 )
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"]
|
||||
shape = SubResource( 1 )
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
[gd_resource type="SpriteFrames" load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/quick_health.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 15, 13 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 15, 0, 15, 13 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 30, 0, 15, 13 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 45, 0, 15, 13 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
[gd_scene load_steps=8 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://src/templates/Actor/ActorTemplate.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://assets/Tiles/Assets/Demo TileSet.tres" type="TileSet" id=2]
|
||||
[ext_resource path="res://assets/Backgrounds/bgmuck.png" type="Texture" id=3]
|
||||
[ext_resource path="res://src/Interactables/Chest.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://src/Interactables/HealthPickup.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://src/components/Interactable_Component.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://assets/Music/platformer_level03_loop.ogg" type="AudioStream" id=6]
|
||||
[ext_resource path="res://src/enemyC/EnemyC.tscn" type="PackedScene" id=7]
|
||||
|
||||
|
|
@ -74,11 +73,5 @@ __meta__ = {
|
|||
}
|
||||
actor_type = "NPC"
|
||||
|
||||
[node name="HealthPickup" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 226, 153 )
|
||||
|
||||
[node name="Chest2" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 319, 112 )
|
||||
|
||||
[node name="Chest" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 187, 144 )
|
||||
[node name="Interactable_Component" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 186, 144 )
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ tile_set = SubResource( 11 )
|
|||
cell_size = Vector2( 16, 16 )
|
||||
show_collision = true
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 196636, 4, 131072, 196637, 4, 131073, 196638, 4, 131073, 196639, 4, 131073, 196640, 4, 131073, 196641, 4, 131073, 196642, 4, 131073, 196643, 4, 131074, 262172, 4, 196608, 262173, 4, 196609, 262174, 4, 196609, 262175, 4, 196609, 262176, 4, 196609, 262177, 4, 196609, 262178, 4, 196609, 262179, 4, 196610, 458770, 2, 1, 458771, 0, 1, 458772, 0, 2, 458773, 0, 3, 458774, 0, 1, 458775, 0, 2, 458776, 0, 3, 458777, 4, 2, 458778, 0, 1, 458779, 0, 2, 458780, 0, 3, 458781, 0, 1, 458782, 0, 2, 458783, 0, 3, 458784, 4, 2, 458785, 0, 1, 458786, 0, 2, 458787, 0, 3, 458788, 0, 1, 458789, 0, 2, 458790, 0, 3, 458791, 4, 2, 458792, 0, 4, 458796, 0, 3, 458797, 0, 1, 458798, 0, 2, 458799, 0, 3, 458800, 0, 1, 458801, 0, 2, 458802, 0, 3, 458803, 0, 1, 458804, 0, 2, 458805, 0, 3, 458806, 0, 1, 458807, 0, 2, 458808, 0, 3, 524304, 2, 1, 524305, 2, 65536, 524306, 2, 65537, 524307, 0, 65537, 524308, 0, 65538, 524309, 0, 65539, 524310, 0, 65537, 524311, 0, 65538, 524312, 0, 65539, 524313, 4, 65538, 524314, 0, 65537, 524315, 0, 65538, 524316, 0, 65539, 524317, 0, 65537, 524318, 0, 65538, 524319, 0, 65539, 524320, 4, 65538, 524321, 0, 65537, 524322, 0, 65538, 524323, 0, 65539, 524324, 0, 65537, 524325, 0, 65538, 524326, 0, 65539, 524327, 4, 65538, 524328, 0, 65540, 524332, 0, 65536, 524333, 0, 65537, 524334, 0, 65538, 524335, 0, 65539, 524336, 0, 65537, 524337, 0, 65538, 524338, 0, 65539, 524339, 0, 65537, 524340, 0, 65538, 524341, 0, 65539, 524342, 0, 65537, 524343, 0, 65538, 524344, 0, 65539, 589826, 0, 0, 589827, 0, 1, 589828, 0, 2, 589829, 0, 3, 589830, 0, 1, 589831, 0, 2, 589832, 0, 3, 589833, 0, 1, 589834, 0, 2, 589835, 0, 3, 589836, 0, 1, 589837, 0, 2, 589838, 0, 3, 589839, 2, 65536, 589840, 2, 65537, 589841, 2, 131072, 589842, 2, 131073, 589843, 0, 131073, 589844, 0, 131074, 589845, 0, 131075, 589846, 0, 131073, 589847, 0, 131074, 589848, 0, 131075, 589849, 0, 131074, 589850, 0, 131073, 589851, 0, 131074, 589852, 0, 131075, 589853, 0, 131073, 589854, 0, 131074, 589855, 0, 131075, 589856, 0, 131074, 589857, 0, 131073, 589858, 0, 131074, 589859, 0, 131075, 589860, 0, 131073, 589861, 0, 131074, 589862, 0, 131075, 589863, 0, 131074, 589864, 0, 131076, 589868, 0, 131072, 589869, 0, 131073, 589870, 0, 131074, 589871, 0, 131075, 589872, 0, 131073, 589873, 0, 131074, 589874, 0, 131075, 589875, 0, 131073, 589876, 0, 131074, 589877, 0, 131075, 589878, 0, 131073, 589879, 0, 131074, 589880, 0, 131075, 655362, 0, 65536, 655363, 0, 65537, 655364, 0, 65538, 655365, 0, 65539, 655366, 0, 65537, 655367, 0, 65538, 655368, 0, 65539, 655369, 0, 65537, 655370, 0, 65538, 655371, 0, 65539, 655372, 0, 65537, 655373, 0, 65538, 655374, 0, 65539, 655375, 2, 131072, 655376, 2, 131073, 655377, 4, 0, 655378, 4, 1, 655379, 0, 196610, 655380, 0, 196610, 655381, 0, 196610, 655382, 0, 196610, 655383, 0, 196610, 655384, 0, 196610, 655385, 0, 196610, 655386, 0, 196610, 655387, 0, 196610, 655388, 0, 196610, 655389, 0, 196610, 655390, 0, 196610, 655391, 0, 196610, 655392, 0, 196610, 655393, 0, 196610, 655394, 0, 196610, 655395, 0, 196610, 655396, 0, 196610, 655397, 0, 196610, 655398, 0, 196610, 655399, 0, 196610, 655400, 0, 196612, 655404, 0, 196608, 655405, 0, 196610, 655406, 0, 196610, 655407, 0, 196610, 655408, 0, 196610, 655409, 0, 196610, 655410, 0, 196610, 655411, 0, 196610, 655412, 0, 196610, 655413, 0, 196610, 655414, 0, 196610, 655415, 0, 196610, 655416, 0, 196610, 720898, 0, 131072, 720899, 0, 131073, 720900, 0, 131074, 720901, 0, 131075, 720902, 0, 131073, 720903, 0, 131074, 720904, 0, 131075, 720905, 0, 131073, 720906, 0, 131074, 720907, 0, 131075, 720908, 0, 131073, 720909, 0, 131074, 720910, 0, 131075, 720911, 4, 0, 720912, 4, 1, 720913, 0, 196610, 720914, 0, 196610, 720915, 0, 196610, 720916, 0, 196610, 720917, 0, 196610, 720918, 0, 196610, 720919, 0, 196610, 720920, 0, 196610, 720921, 0, 196610, 720922, 0, 196610, 720923, 0, 196610, 720924, 0, 196610, 720925, 0, 196610, 720926, 0, 196610, 720927, 0, 196610, 720928, 0, 196610, 720929, 0, 196610, 720930, 0, 196610, 720931, 0, 196610, 720932, 0, 196610, 720933, 0, 196610, 720934, 0, 196610, 720935, 0, 262147, 720936, 0, 262148, 720940, 0, 262144, 720941, 0, 262145, 720942, 0, 262146, 720943, 0, 262147, 720944, 0, 262145, 720945, 0, 262146, 720946, 0, 262147, 720947, 0, 262145, 720948, 0, 262146, 720949, 0, 262147, 720950, 0, 262145, 720951, 0, 262146, 720952, 0, 262147 )
|
||||
tile_data = PoolIntArray( 196636, 4, 131072, 196637, 4, 131073, 196638, 4, 131073, 196639, 4, 131073, 196640, 4, 131073, 196641, 4, 131073, 196642, 4, 131073, 196643, 4, 131074, 262172, 4, 196608, 262173, 4, 196609, 262174, 4, 196609, 262175, 4, 196609, 262176, 4, 196609, 262177, 4, 196609, 262178, 4, 196609, 262179, 4, 196610, 458770, 2, 1, 458771, 0, 1, 458772, 0, 2, 458773, 0, 3, 458774, 0, 1, 458775, 0, 2, 458776, 0, 3, 458777, 4, 2, 458778, 0, 1, 458779, 0, 2, 458780, 0, 3, 458781, 0, 1, 458782, 0, 2, 458783, 0, 3, 458784, 4, 2, 458785, 0, 1, 458786, 0, 2, 458787, 0, 3, 458788, 0, 1, 458789, 0, 2, 458790, 0, 3, 458791, 4, 2, 458792, 0, 4, 524304, 2, 1, 524305, 2, 65536, 524306, 2, 65537, 524307, 0, 65537, 524308, 0, 65538, 524309, 0, 65539, 524310, 0, 65537, 524311, 0, 65538, 524312, 0, 65539, 524313, 4, 65538, 524314, 0, 65537, 524315, 0, 65538, 524316, 0, 65539, 524317, 0, 65537, 524318, 0, 65538, 524319, 0, 65539, 524320, 4, 65538, 524321, 0, 65537, 524322, 0, 65538, 524323, 0, 65539, 524324, 0, 65537, 524325, 0, 65538, 524326, 0, 65539, 524327, 4, 65538, 524328, 0, 65540, 589826, 0, 0, 589827, 0, 1, 589828, 0, 2, 589829, 0, 3, 589830, 0, 1, 589831, 0, 2, 589832, 0, 3, 589833, 0, 1, 589834, 0, 2, 589835, 0, 3, 589836, 0, 1, 589837, 0, 2, 589838, 0, 3, 589839, 2, 65536, 589840, 2, 65537, 589841, 2, 131072, 589842, 2, 131073, 589843, 0, 131073, 589844, 0, 131074, 589845, 0, 131075, 589846, 0, 131073, 589847, 0, 131074, 589848, 0, 131075, 589849, 0, 131074, 589850, 0, 131073, 589851, 0, 131074, 589852, 0, 131075, 589853, 0, 131073, 589854, 0, 131074, 589855, 0, 131075, 589856, 0, 131074, 589857, 0, 131073, 589858, 0, 131074, 589859, 0, 131075, 589860, 0, 131073, 589861, 0, 131074, 589862, 0, 131075, 589863, 0, 131074, 589864, 0, 131076, 655362, 0, 65536, 655363, 0, 65537, 655364, 0, 65538, 655365, 0, 65539, 655366, 0, 65537, 655367, 0, 65538, 655368, 0, 65539, 655369, 0, 65537, 655370, 0, 65538, 655371, 0, 65539, 655372, 0, 65537, 655373, 0, 65538, 655374, 0, 65539, 655375, 2, 131072, 655376, 2, 131073, 655377, 4, 0, 655378, 4, 1, 655379, 0, 196610, 655380, 0, 196610, 655381, 0, 196610, 655382, 0, 196610, 655383, 0, 196610, 655384, 0, 196610, 655385, 0, 196610, 655386, 0, 196610, 655387, 0, 196610, 655388, 0, 196610, 655389, 0, 196610, 655390, 0, 196610, 655391, 0, 196610, 655392, 0, 196610, 655393, 0, 196610, 655394, 0, 196610, 655395, 0, 196610, 655396, 0, 196610, 655397, 0, 196610, 655398, 0, 196610, 655399, 0, 196610, 655400, 0, 196612, 720898, 0, 131072, 720899, 0, 131073, 720900, 0, 131074, 720901, 0, 131075, 720902, 0, 131073, 720903, 0, 131074, 720904, 0, 131075, 720905, 0, 131073, 720906, 0, 131074, 720907, 0, 131075, 720908, 0, 131073, 720909, 0, 131074, 720910, 0, 131075, 720911, 4, 0, 720912, 4, 1, 720913, 0, 196610, 720914, 0, 196610, 720915, 0, 196610, 720916, 0, 196610, 720917, 0, 196610, 720918, 0, 196610, 720919, 0, 196610, 720920, 0, 196610, 720921, 0, 196610, 720922, 0, 196610, 720923, 0, 196610, 720924, 0, 196610, 720925, 0, 196610, 720926, 0, 196610, 720927, 0, 196610, 720928, 0, 196610, 720929, 0, 196610, 720930, 0, 196610, 720931, 0, 196610, 720932, 0, 196610, 720933, 0, 196610, 720934, 0, 196610, 720935, 0, 262147, 720936, 0, 262148 )
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
|
|
@ -289,6 +289,3 @@ __meta__ = {
|
|||
"_edit_lock_": true
|
||||
}
|
||||
actor_type = "NPC"
|
||||
|
||||
[node name="EnemyC3" parent="." instance=ExtResource( 7 )]
|
||||
position = Vector2( 796, 89 )
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ extends Area2D
|
|||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
export (NodePath) var sprite_node
|
||||
|
||||
export var type_name :String
|
||||
onready var sprite: Sprite = get_node(sprite_node)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
|
@ -27,7 +28,6 @@ func _ready():
|
|||
func trigger_interaction():
|
||||
# This is something that should maybe be extended for every differant interactible.
|
||||
# They could inherit from this base class and implement this function.
|
||||
# sprite.frame = 1
|
||||
pass
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
24
src/components/Interactable_Component.tscn
Normal file
24
src/components/Interactable_Component.tscn
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/High Forest/Assets/Interior-01.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/components/Interactable_Component.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
[node name="Interactable_Component" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
sprite_node = NodePath("Sprite")
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
vframes = 2
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 49, 80, 30, 64 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
modulate = Color( 0.290196, 1, 0, 1 )
|
||||
position = Vector2( -1, 3 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Interactable_Component_body_entered"]
|
||||
[connection signal="body_exited" from="." to="." method="_on_Interactable_Component_body_exited"]
|
||||
|
|
@ -32,12 +32,9 @@ func _ready():
|
|||
# Switching to a new model that starts with Hitbox
|
||||
func register_interactable(sender):
|
||||
print("Interactable Registered " + sender.name)
|
||||
if call_function.is_valid():
|
||||
var should_register: bool = call_function.call_func(sender)
|
||||
if should_register:
|
||||
interactable_function_callables.append(sender)
|
||||
else:
|
||||
print("Interactable handled by Player")
|
||||
if interactable_parent_callback:
|
||||
call_function.call_func()
|
||||
interactable_function_callables.append(sender)
|
||||
|
||||
func remove_interactable(sender):
|
||||
print("Interactable Removal " + sender.name)
|
||||
|
|
@ -24,13 +24,8 @@ func hit_Receiver(damage):
|
|||
yield( get_tree().create_timer(2 + $movement_state_machine/hurt.timeout_seconds), "timeout")
|
||||
$Hurtbox_Component.set_hurtbox(true)
|
||||
|
||||
func touch_the_thing(the_thing: Interactable) -> bool:
|
||||
print("You see! a THING...", the_thing.name)
|
||||
if the_thing is HealthPickup:
|
||||
# Do some healthy stuff.
|
||||
the_thing.trigger_interaction()
|
||||
return false
|
||||
return true
|
||||
func touch_the_thing():
|
||||
print("You see! a THING...")
|
||||
|
||||
func _on_attack_do_attack():
|
||||
var is_shooting = false
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
[ext_resource path="res://src/Gun.gd" type="Script" id=13]
|
||||
[ext_resource path="res://src/playerD/states/roll.gd" type="Script" id=14]
|
||||
[ext_resource path="res://src/state_animated_actor.gd" type="Script" id=15]
|
||||
[ext_resource path="res://src/templates/Interactable/Interactable_Receiver.gd" type="Script" id=16]
|
||||
[ext_resource path="res://src/components/Interactable_Receiver.gd" type="Script" id=16]
|
||||
|
||||
[sub_resource type="StreamTexture" id=90]
|
||||
load_path = "res://.import/Mega.png-93dfe0790902b932f7b46f7b23c5d4e7.stex"
|
||||
|
|
@ -561,7 +561,6 @@ __meta__ = {
|
|||
[node name="movement_component" parent="." index="2"]
|
||||
script = ExtResource( 2 )
|
||||
player_number = 1
|
||||
interactable_node = NodePath("../Interactable_Receiver")
|
||||
|
||||
[node name="idle" parent="movement_state_machine" index="0"]
|
||||
script = ExtResource( 4 )
|
||||
|
|
@ -638,7 +637,7 @@ jump_node = NodePath("../jump")
|
|||
|
||||
[node name="roll" type="Node" parent="movement_state_machine" index="7"]
|
||||
script = ExtResource( 14 )
|
||||
move_speed = 150.0
|
||||
move_speed = 50.0
|
||||
animation_sequence = [ "roll" ]
|
||||
emitter_frame_subscriptions = {
|
||||
2: "roll"
|
||||
|
|
|
|||
|
|
@ -17,23 +17,12 @@ extends MovementComponent
|
|||
|
||||
export var player_number: int = 1
|
||||
|
||||
export (NodePath) var interactable_node
|
||||
|
||||
onready var interactable_receiver_node: Interactable_Receiver = get_node(interactable_node)
|
||||
|
||||
|
||||
func process_physics(delta):
|
||||
PlayerInfo.player_position = owner.global_position
|
||||
|
||||
func process_input(event: InputEvent):
|
||||
var interactables = interactable_receiver_node.interactable_function_callables
|
||||
for interactable in interactables: # Iterate through the interactable collection
|
||||
if interactable is Interactable: # Make sure we didn't push something dumb in there.
|
||||
if (Input.is_action_pressed("ui_up")): # We pressed up?
|
||||
interactable.trigger_interaction()
|
||||
get_movement_direction()
|
||||
|
||||
|
||||
# Return the desired direction of movement for the character
|
||||
# in the range [-1, 1], where positive values indicate a desire
|
||||
# to move to the right and negative values to the left.
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://src/templates/Interactable/Interactable_Component.gd" type="Script" id=2]
|
||||
|
||||
[node name="Interactable_Template" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Interactable_Component_body_entered"]
|
||||
[connection signal="body_exited" from="." to="." method="_on_Interactable_Component_body_exited"]
|
||||
Loading…
Reference in New Issue
Block a user