Compare commits

..

No commits in common. "8e8ec8e75957c2e212a822d870369fc125795e34" and "1a82c2bdf0e77af44df1a60dd320838199b53619" have entirely different histories.

9 changed files with 1 additions and 193 deletions

View File

@ -1,27 +0,0 @@
[gd_resource type="Resource" load_steps=7 format=2]
[ext_resource path="res://src/classes/item.gd" type="Script" id=1]
[ext_resource path="res://assets/levels/LegacyFantasy-High_Forest/Tiles/Tiles.png" type="Texture" id=2]
[ext_resource path="res://assets/items/mushroom_icon.png" type="Texture" id=3]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 2 )
region = Rect2( 256, 240, 32, 32 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 2 )
region = Rect2( 288, 240, 32, 32 )
[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
"loop": true,
"name": "default",
"speed": 1.0
} ]
[resource]
script = ExtResource( 1 )
name = "mushroom"
inventory_icon = ExtResource( 3 )
in_game_sprite = SubResource( 3 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

View File

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/mushroom_icon.png-692f5daaafe395b280b8df070c417867.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/items/mushroom_icon.png"
dest_files=[ "res://.import/mushroom_icon.png-692f5daaafe395b280b8df070c417867.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

View File

@ -54,21 +54,6 @@ _global_script_classes=[ {
"language": "GDScript", "language": "GDScript",
"path": "res://lib/templates/Interactable/Interactable_Receiver.gd" "path": "res://lib/templates/Interactable/Interactable_Receiver.gd"
}, { }, {
"base": "Resource",
"class": "InventoryManager",
"language": "GDScript",
"path": "res://src/classes/inventory_manager.gd"
}, {
"base": "Resource",
"class": "Item",
"language": "GDScript",
"path": "res://src/classes/item.gd"
}, {
"base": "Interactable",
"class": "ItemPickup",
"language": "GDScript",
"path": "res://src/Interactables/ItemPickup.gd"
}, {
"base": "Node2D", "base": "Node2D",
"class": "Level", "class": "Level",
"language": "GDScript", "language": "GDScript",
@ -144,9 +129,6 @@ _global_script_class_icons={
"HealthPickup": "", "HealthPickup": "",
"Interactable": "", "Interactable": "",
"Interactable_Receiver": "", "Interactable_Receiver": "",
"InventoryManager": "",
"Item": "",
"ItemPickup": "",
"Level": "", "Level": "",
"LevelTransition": "", "LevelTransition": "",
"Modifier_Receiver": "", "Modifier_Receiver": "",

View File

@ -1,26 +0,0 @@
class_name ItemPickup
extends Interactable
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
export var item :Resource
var item_sprite :AnimatedSprite
# Called when the node enters the scene tree for the first time.
func _ready():
assert( item is Item, "Proper Item resourse type not given " + self.name)
if item is Item:
item_sprite = AnimatedSprite.new()
item_sprite.frames = item.in_game_sprite
add_child(item_sprite)
item_sprite.play()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -1,9 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://src/Interactables/ItemPickup.gd" type="Script" id=1]
[node name="ItemPickup" type="Area2D"]
script = ExtResource( 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"]

View File

@ -1,46 +0,0 @@
class_name InventoryManager
extends Resource
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var primary_selection: Item
var secondary_selection: Item
# count of items in dictionary value
var _items :Dictionary
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func add_to_inventory(_item :Item) -> int:
if _items.has(_item):
_items[_item] += 1
else:
_items[_item] = 1
return _items[_item]
func remove_from_inventory (_item :Item) -> int:
if _items.has(_item):
_items[_item] -= 1
if _items[_item] == 0:
_items.erase(_item)
return 0
else:
return _items[_item]
else:
return 0
func clear_item_from_inventory (_item :Item) -> void:
if _items.has(_item):
_items.erase(_item)
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -1,19 +0,0 @@
class_name Item
extends Resource
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
export var name :String
export var inventory_icon :Texture
export var in_game_sprite :SpriteFrames
# Called when the node enters the scene tree for the first time.
func _ready():
assert ( name != '', "Name never given to Item" + self.resource_path )
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2] [gd_scene load_steps=12 format=2]
[ext_resource path="res://src/templates/level_templates/LevelTemplate.tscn" type="PackedScene" id=1] [ext_resource path="res://src/templates/level_templates/LevelTemplate.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/levels/LegacyFantasy-High_Forest/tileset.tres" type="TileSet" id=2] [ext_resource path="res://assets/levels/LegacyFantasy-High_Forest/tileset.tres" type="TileSet" id=2]
@ -6,8 +6,6 @@
[ext_resource path="res://src/Interactables/LevelTransition.tscn" type="PackedScene" id=4] [ext_resource path="res://src/Interactables/LevelTransition.tscn" type="PackedScene" id=4]
[ext_resource path="res://assets_tmp/Music/summer nights.ogg" type="AudioStream" id=5] [ext_resource path="res://assets_tmp/Music/summer nights.ogg" type="AudioStream" id=5]
[ext_resource path="res://assets/UI/no_cam_tile.png" type="Texture" id=6] [ext_resource path="res://assets/UI/no_cam_tile.png" type="Texture" id=6]
[ext_resource path="res://src/Interactables/ItemPickup.tscn" type="PackedScene" id=7]
[ext_resource path="res://assets/items/doodad.tres" type="Resource" id=8]
[sub_resource type="CircleShape2D" id=1] [sub_resource type="CircleShape2D" id=1]
radius = 5.09902 radius = 5.09902
@ -44,8 +42,6 @@ points = PoolVector2Array( 20, 20, 0.326027, 20, 0.326027, 0.605103, 20, 0.60510
} ] } ]
0/z_index = 0 0/z_index = 0
[sub_resource type="CircleShape2D" id=6]
[node name="TestBox" instance=ExtResource( 1 )] [node name="TestBox" instance=ExtResource( 1 )]
music_track = ExtResource( 5 ) music_track = ExtResource( 5 )
@ -117,11 +113,3 @@ collision_layer = 256
collision_mask = 0 collision_mask = 0
format = 1 format = 1
tile_data = PoolIntArray( -65536, 0, 0, -65521, 0, 0, 65535, 0, 0, 524287, 0, 0, 589824, 0, 0, 589838, 0, 0 ) tile_data = PoolIntArray( -65536, 0, 0, -65521, 0, 0, 65535, 0, 0, 524287, 0, 0, 589824, 0, 0, 589838, 0, 0 )
[node name="ItemPickup" parent="." index="9" instance=ExtResource( 7 )]
position = Vector2( 203, 38 )
type_name = "item_pickup"
item = ExtResource( 8 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="ItemPickup" index="0"]
shape = SubResource( 6 )