Merge branch 'main' of https://git.mrdanielsnider.com/snider/project-dung
This commit is contained in:
commit
2874c11658
BIN
assets/icons/stomach.png
Normal file
BIN
assets/icons/stomach.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
35
assets/icons/stomach.png.import
Normal file
35
assets/icons/stomach.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/stomach.png-43f18e7236b051f708f6adff5e1822c4.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icons/stomach.png"
|
||||
dest_files=[ "res://.import/stomach.png-43f18e7236b051f708f6adff5e1822c4.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=true
|
||||
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
|
@ -36,13 +36,15 @@
|
||||
},
|
||||
"metadata": {
|
||||
"color": null,
|
||||
"folded": true
|
||||
"folded": false
|
||||
}
|
||||
},
|
||||
"Timelines": {
|
||||
"files": [
|
||||
"timeline-1660443870.json",
|
||||
"timeline-1660444277.json"
|
||||
"timeline-1660444277.json",
|
||||
"timeline-1660454153.json",
|
||||
"timeline-1660463789.json"
|
||||
],
|
||||
"folders": {
|
||||
|
||||
|
@ -13,3 +13,7 @@ character_preview_mode=1
|
||||
[QuickTimelineTest]
|
||||
|
||||
timeline_file="timeline-1660443870.json"
|
||||
|
||||
[animations]
|
||||
|
||||
default_join_animation_length=0.5
|
||||
|
@ -16,3 +16,8 @@ disabled=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://
|
||||
[background]
|
||||
|
||||
use_image=true
|
||||
modulation=false
|
||||
|
||||
[animation]
|
||||
|
||||
show_time=0.1
|
||||
|
15
dialogic/timelines/timeline-1660454153.json
Normal file
15
dialogic/timelines/timeline-1660454153.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"events": [
|
||||
{
|
||||
"character": "",
|
||||
"event_id": "dialogic_001",
|
||||
"portrait": "",
|
||||
"text": "You have acquired a raw yam."
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"dialogic-version": "1.4.4",
|
||||
"file": "timeline-1660454153.json",
|
||||
"name": "yamget"
|
||||
}
|
||||
}
|
15
dialogic/timelines/timeline-1660463789.json
Normal file
15
dialogic/timelines/timeline-1660463789.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"events": [
|
||||
{
|
||||
"character": "",
|
||||
"event_id": "dialogic_001",
|
||||
"portrait": "",
|
||||
"text": "Looks like you've starved to death.\nBetter luck next time!"
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"dialogic-version": "1.4.4",
|
||||
"file": "timeline-1660463789.json",
|
||||
"name": "starve"
|
||||
}
|
||||
}
|
@ -101,21 +101,25 @@ common/drop_mouse_on_gui_input_disabled=true
|
||||
up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
action={
|
||||
|
@ -14,7 +14,6 @@ size = Vector3( 0.4, 1, 0.4 )
|
||||
points = PoolVector3Array( -0.0608763, 0.449247, 0.974783, -0.0608763, -0.464612, -0.974783, -0.0608763, 0.449247, -0.974783, 0.974783, -0.464612, -0.0608763, -0.974783, -0.464612, 0.0608763, 0.974783, 0.449247, 0.0608763, 0.0606902, -0.464648, 0.97486, -0.974783, 0.449247, -0.0608763, 0.7071, 0.453517, -0.7071, -0.705748, -0.468, -0.705748, -0.7071, 0.453517, 0.7071, 0.7071, 0.453517, 0.7071, 0.705748, -0.468, 0.705748, -0.705748, -0.468, 0.705748, 0.705748, -0.468, -0.705748, -0.7071, 0.453517, -0.7071, 0.0606902, -0.464648, -0.97486, -0.974783, -0.464612, -0.0608763, 0.974783, -0.464612, 0.0608763, -0.0608763, -0.464612, 0.974783, 0.0606902, 0.449283, 0.97486, 0.0606902, 0.449283, -0.97486, 0.974783, 0.449247, -0.0608763, -0.974783, 0.449247, 0.0608763, -0.642208, -0.46642, 0.73398, -0.642208, -0.46642, -0.73398, 0.578116, -0.464071, -0.760529, 0.578116, -0.464071, 0.760529, 0.760589, -0.464107, 0.577971, -0.760589, -0.464107, 0.577971, -0.760589, -0.464107, -0.577971, 0.760589, -0.464107, -0.577971 )
|
||||
|
||||
[node name="hydroponics_station" type="Spatial"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.4134, 0, -2.96909 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||
|
@ -1,9 +1,11 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/Player.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/protodungman/DungMan.glb" type="PackedScene" id=2]
|
||||
[ext_resource path="res://assets/icons/stomach.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="SphereShape" id=3]
|
||||
[sub_resource type="BoxShape" id=3]
|
||||
extents = Vector3( 0.25, 0.25, 1 )
|
||||
|
||||
[sub_resource type="CapsuleShape" id=2]
|
||||
radius = 0.210213
|
||||
@ -19,7 +21,7 @@ unique_name_in_owner = true
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.630386 )
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="DungMan/TriggerVolume"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.168703 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.778807, 0.291356 )
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="."]
|
||||
@ -31,3 +33,47 @@ transform = Transform( 1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, 0, 5.44166,
|
||||
fov = 50.0
|
||||
|
||||
[node name="ItemSpawn" type="Spatial" parent="."]
|
||||
|
||||
[node name="UI" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Control" type="Control" parent="UI"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/Control"]
|
||||
margin_right = 128.0
|
||||
margin_bottom = 128.0
|
||||
custom_constants/margin_right = 16
|
||||
custom_constants/margin_top = 16
|
||||
custom_constants/margin_left = 16
|
||||
custom_constants/margin_bottom = 16
|
||||
|
||||
[node name="stomachs" type="HBoxContainer" parent="UI/Control/MarginContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 16.0
|
||||
margin_top = 16.0
|
||||
margin_right = 540.0
|
||||
margin_bottom = 144.0
|
||||
|
||||
[node name="stomach0" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
|
||||
margin_right = 128.0
|
||||
margin_bottom = 128.0
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="stomach1" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
|
||||
margin_left = 132.0
|
||||
margin_right = 260.0
|
||||
margin_bottom = 128.0
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="stomach2" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
|
||||
margin_left = 264.0
|
||||
margin_right = 392.0
|
||||
margin_bottom = 128.0
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="stomach3" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
|
||||
margin_left = 396.0
|
||||
margin_right = 524.0
|
||||
margin_bottom = 128.0
|
||||
texture = ExtResource( 3 )
|
||||
|
@ -4,6 +4,7 @@ const EPSILON = 0.0001
|
||||
const SPEED = 3.0
|
||||
|
||||
export var inventory = { "ore" : 0 }
|
||||
var health: int = 4 setget set_health
|
||||
|
||||
var item_in_hand
|
||||
|
||||
@ -18,6 +19,19 @@ func _physics_process(delta):
|
||||
$DungMan.look_at(global_transform.origin - motion, Vector3.UP)
|
||||
move_and_slide(motion)
|
||||
|
||||
func set_health(new_value):
|
||||
health = min(new_value, 4)
|
||||
for child in $"%stomachs".get_children():
|
||||
child.visible = child.get_index() < health
|
||||
if health <= 0:
|
||||
var node = Dialogic.start("starve")
|
||||
node.pause_mode = PAUSE_MODE_PROCESS
|
||||
add_child(node)
|
||||
get_tree().paused = true
|
||||
yield(node, "timeline_end")
|
||||
get_tree().paused = false
|
||||
get_tree().quit() # go back to main menu when such a thing exists
|
||||
|
||||
func can_afford(item_name, item_amount):
|
||||
assert(item_amount > 0)
|
||||
var current_amount : int = 0
|
||||
|
@ -21,6 +21,7 @@ func _on_Timer_timeout():
|
||||
func _on_yam_item_tree_exited():
|
||||
$coin_machine.enabled = true
|
||||
$MeshInstance/Yam.visible = false
|
||||
add_child(Dialogic.start("yamget"))
|
||||
|
||||
func _process(delta):
|
||||
$"%status_label".text = "%f" % $grow_timer.time_left
|
||||
|
Loading…
x
Reference in New Issue
Block a user