generated from outfrost/godot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
477 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/inventorybottles.png-298d746d7f28f9cc2b955e3f3924a5ae.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://environment/inventorybottles.png" | ||
dest_files=[ "res://.import/inventorybottles.png-298d746d7f28f9cc2b955e3f3924a5ae.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 | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
extends Area2D | ||
|
||
onready var panel: Panel = $CanvasLayer/ResearchPanel | ||
|
||
var character: Node2D = null | ||
|
||
func _ready() -> void: | ||
connect("body_entered", self, "on_body_entered") | ||
connect("body_exited", self, "on_body_exited") | ||
|
||
func on_body_entered(body): | ||
if body.has_method("entered_interactive_range"): | ||
character = body | ||
body.entered_interactive_range(self) | ||
|
||
func on_body_exited(body): | ||
if body.has_method("exited_interactive_range"): | ||
if body == character: | ||
character = null | ||
body.exited_interactive_range(self) | ||
|
||
func interact(): | ||
if !character || !is_instance_valid(character): | ||
character = null | ||
return | ||
character.set_process_input(false) | ||
character.set_physics_process(false) | ||
panel.show() | ||
|
||
func done_interacting(): | ||
panel.hide() | ||
if !character || !is_instance_valid(character): | ||
character = null | ||
return | ||
character.set_process_input(true) | ||
character.set_physics_process(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,153 @@ | ||
[gd_scene load_steps=3 format=2] | ||
[gd_scene load_steps=7 format=2] | ||
|
||
[ext_resource path="res://environment/props/table.png" type="Texture" id=1] | ||
[ext_resource path="res://environment/props/ResearchTable.gd" type="Script" id=2] | ||
[ext_resource path="res://game/ui-theme/ui_theme.tres" type="Theme" id=3] | ||
[ext_resource path="res://game/menu/InventoryButton.tscn" type="PackedScene" id=4] | ||
|
||
[sub_resource type="RectangleShape2D" id=1] | ||
[sub_resource type="CircleShape2D" id=1] | ||
radius = 40.0 | ||
|
||
[sub_resource type="RectangleShape2D" id=2] | ||
extents = Vector2( 30, 5 ) | ||
|
||
[node name="StaticBody2D" type="StaticBody2D"] | ||
[node name="ResearchTable" type="Area2D"] | ||
script = ExtResource( 2 ) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
position = Vector2( 0, 8 ) | ||
shape = SubResource( 1 ) | ||
|
||
[node name="Sprite" type="Sprite" parent="."] | ||
[node name="StaticBody2D" type="StaticBody2D" parent="."] | ||
|
||
[node name="Sprite" type="Sprite" parent="StaticBody2D"] | ||
texture = ExtResource( 1 ) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] | ||
position = Vector2( 0.0883942, 10.0342 ) | ||
shape = SubResource( 1 ) | ||
shape = SubResource( 2 ) | ||
|
||
[node name="CanvasLayer" type="CanvasLayer" parent="."] | ||
layer = 2 | ||
|
||
[node name="ResearchPanel" type="Panel" parent="CanvasLayer"] | ||
anchor_left = 0.5 | ||
anchor_top = 0.5 | ||
anchor_right = 0.5 | ||
anchor_bottom = 0.5 | ||
margin_left = -280.0 | ||
margin_top = -200.0 | ||
margin_right = 280.0 | ||
margin_bottom = 200.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
theme = ExtResource( 3 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="InventoryButtons" type="Control" parent="CanvasLayer/ResearchPanel"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="InventoryButton1" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 60.0 | ||
margin_top = 100.0 | ||
margin_right = 100.0 | ||
margin_bottom = 140.0 | ||
|
||
[node name="InventoryButton2" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 110.0 | ||
margin_top = 100.0 | ||
margin_right = 150.0 | ||
margin_bottom = 140.0 | ||
|
||
[node name="InventoryButton3" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 160.0 | ||
margin_top = 100.0 | ||
margin_right = 200.0 | ||
margin_bottom = 140.0 | ||
|
||
[node name="InventoryButton4" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 210.0 | ||
margin_top = 100.0 | ||
margin_right = 250.0 | ||
margin_bottom = 140.0 | ||
|
||
[node name="InventoryButton5" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 60.0 | ||
margin_top = 150.0 | ||
margin_right = 100.0 | ||
margin_bottom = 190.0 | ||
|
||
[node name="InventoryButton6" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 110.0 | ||
margin_top = 150.0 | ||
margin_right = 150.0 | ||
margin_bottom = 190.0 | ||
|
||
[node name="InventoryButton7" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 160.0 | ||
margin_top = 150.0 | ||
margin_right = 200.0 | ||
margin_bottom = 190.0 | ||
|
||
[node name="InventoryButton8" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 210.0 | ||
margin_top = 150.0 | ||
margin_right = 250.0 | ||
margin_bottom = 190.0 | ||
|
||
[node name="InventoryButton9" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 60.0 | ||
margin_top = 200.0 | ||
margin_right = 100.0 | ||
margin_bottom = 240.0 | ||
|
||
[node name="InventoryButton10" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 110.0 | ||
margin_top = 200.0 | ||
margin_right = 150.0 | ||
margin_bottom = 240.0 | ||
|
||
[node name="InventoryButton11" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 160.0 | ||
margin_top = 200.0 | ||
margin_right = 200.0 | ||
margin_bottom = 240.0 | ||
|
||
[node name="InventoryButton12" parent="CanvasLayer/ResearchPanel/InventoryButtons" instance=ExtResource( 4 )] | ||
margin_left = 210.0 | ||
margin_top = 200.0 | ||
margin_right = 250.0 | ||
margin_bottom = 240.0 | ||
|
||
[node name="ChosenItemIconRect" type="TextureRect" parent="CanvasLayer/ResearchPanel"] | ||
margin_left = 390.0 | ||
margin_top = 90.0 | ||
margin_right = 422.0 | ||
margin_bottom = 122.0 | ||
expand = true | ||
|
||
[node name="ConfirmButton" type="Button" parent="CanvasLayer/ResearchPanel"] | ||
margin_left = 200.0 | ||
margin_top = 300.0 | ||
margin_right = 360.0 | ||
margin_bottom = 334.0 | ||
text = "Research" | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="ConfirmButton2" type="Button" parent="CanvasLayer/ResearchPanel"] | ||
margin_left = 200.0 | ||
margin_top = 350.0 | ||
margin_right = 360.0 | ||
margin_bottom = 384.0 | ||
text = "Done" | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[gd_scene load_steps=4 format=2] | ||
|
||
[ext_resource path="res://game/ui-theme/button_inventory_empty.tres" type="StyleBox" id=1] | ||
[ext_resource path="res://game/ui-theme/button_inventory_base.tres" type="StyleBox" id=2] | ||
[ext_resource path="res://game/ui-theme/button_inventory_pressed.tres" type="StyleBox" id=3] | ||
|
||
[node name="InventoryButton" type="Button"] | ||
margin_right = 40.0 | ||
margin_bottom = 40.0 | ||
custom_styles/hover = ExtResource( 2 ) | ||
custom_styles/pressed = ExtResource( 3 ) | ||
custom_styles/focus = ExtResource( 1 ) | ||
custom_styles/disabled = ExtResource( 2 ) | ||
custom_styles/normal = ExtResource( 2 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[gd_resource type="StyleBoxTexture" load_steps=2 format=2] | ||
|
||
[ext_resource path="res://game/ui-theme/oinventoryitembackground.png" type="Texture" id=1] | ||
|
||
[resource] | ||
content_margin_left = 12.0 | ||
content_margin_right = 12.0 | ||
content_margin_top = 12.0 | ||
content_margin_bottom = 12.0 | ||
texture = ExtResource( 1 ) | ||
region_rect = Rect2( 0, 0, 32, 32 ) | ||
margin_left = 12.0 | ||
margin_right = 12.0 | ||
margin_top = 12.0 | ||
margin_bottom = 12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[gd_resource type="StyleBoxTexture" format=2] | ||
|
||
[resource] | ||
content_margin_left = 12.0 | ||
content_margin_right = 12.0 | ||
content_margin_top = 12.0 | ||
content_margin_bottom = 12.0 | ||
margin_left = 12.0 | ||
margin_right = 12.0 | ||
margin_top = 12.0 | ||
margin_bottom = 12.0 | ||
draw_center = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[gd_resource type="StyleBoxTexture" load_steps=2 format=2] | ||
|
||
[ext_resource path="res://game/ui-theme/oinventoryitembackground.png" type="Texture" id=1] | ||
|
||
[resource] | ||
content_margin_left = 12.0 | ||
content_margin_right = 12.0 | ||
content_margin_top = 12.0 | ||
content_margin_bottom = 12.0 | ||
texture = ExtResource( 1 ) | ||
region_rect = Rect2( 0, 0, 32, 32 ) | ||
margin_left = 12.0 | ||
margin_right = 12.0 | ||
margin_top = 12.0 | ||
margin_bottom = 12.0 | ||
modulate_color = Color( 0.866667, 0.607843, 0.717647, 1 ) |
Oops, something went wrong.