Ze pew
This commit is contained in:
		
							
								
								
									
										12
									
								
								PickableItems/basic_item.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								PickableItems/basic_item.gd
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| extends Area2D | ||||
|  | ||||
| @export var Type : String; | ||||
| @export var Item : PackedScene; | ||||
|  | ||||
| func _on_body_entered(body): | ||||
| 	if body.name == "Player": | ||||
| 		pickup_routine(body); | ||||
|  | ||||
| func pickup_routine(player): | ||||
| 	player.pickup(self); | ||||
| 	queue_free(); | ||||
							
								
								
									
										19
									
								
								PickableItems/basic_item.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								PickableItems/basic_item.tscn
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| [gd_scene load_steps=4 format=3 uid="uid://ci6xls3xseci2"] | ||||
|  | ||||
| [ext_resource type="Texture2D" uid="uid://cjrh8t1n0m2e4" path="res://Sprites/t_shirt.png" id="1_mqcsa"] | ||||
| [ext_resource type="Script" path="res://PickableItems/basic_item.gd" id="1_txlye"] | ||||
|  | ||||
| [sub_resource type="RectangleShape2D" id="RectangleShape2D_0nj5p"] | ||||
| size = Vector2(29, 50) | ||||
|  | ||||
| [node name="basic_item" type="Area2D"] | ||||
| script = ExtResource("1_txlye") | ||||
|  | ||||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||||
| position = Vector2(0.5, 1) | ||||
| shape = SubResource("RectangleShape2D_0nj5p") | ||||
|  | ||||
| [node name="Sprite2D" type="Sprite2D" parent="."] | ||||
| texture = ExtResource("1_mqcsa") | ||||
|  | ||||
| [connection signal="body_entered" from="." to="." method="_on_body_entered"] | ||||
							
								
								
									
										16
									
								
								PickableItems/pickable_shoes.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								PickableItems/pickable_shoes.tscn
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| [gd_scene load_steps=4 format=3] | ||||
|  | ||||
| [ext_resource type="PackedScene" uid="uid://ci6xls3xseci2" path="res://PickableItems/basic_item.tscn" id="1_c3jw1"] | ||||
| [ext_resource type="PackedScene" uid="uid://bc4mkctxjnugk" path="res://Weapons/hourglass.tscn" id="2_f6mwn"] | ||||
| [ext_resource type="Texture2D" uid="uid://dvwb4dx0p0ypw" path="res://Sprites/shoes.png" id="3_bsb8q"] | ||||
|  | ||||
| [node name="shoes" instance=ExtResource("1_c3jw1")] | ||||
| Type = "weapon" | ||||
| Item = ExtResource("2_f6mwn") | ||||
|  | ||||
| [node name="CollisionShape2D" parent="." index="0"] | ||||
| position = Vector2(-0.5, -1) | ||||
|  | ||||
| [node name="Sprite2D" parent="." index="1"] | ||||
| position = Vector2(18, 22) | ||||
| texture = ExtResource("3_bsb8q") | ||||
							
								
								
									
										11
									
								
								PickableItems/pickable_t_shirt.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								PickableItems/pickable_t_shirt.tscn
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| [gd_scene load_steps=3 format=3 uid="uid://bbg5x0apue0ei"] | ||||
|  | ||||
| [ext_resource type="PackedScene" uid="uid://ci6xls3xseci2" path="res://PickableItems/basic_item.tscn" id="1_a7gul"] | ||||
| [ext_resource type="PackedScene" uid="uid://clusfc1udsrt3" path="res://Weapons/t_shirt_cannon.tscn" id="2_8v7ss"] | ||||
|  | ||||
| [node name="pickable_t_shirt" instance=ExtResource("1_a7gul")] | ||||
| Type = "weapon" | ||||
| Item = ExtResource("2_8v7ss") | ||||
|  | ||||
| [node name="CollisionShape2D" parent="." index="0"] | ||||
| position = Vector2(1, 0.5) | ||||
		Reference in New Issue
	
	Block a user