mirror of
https://git.kittycat.homes/BatHeartTiger/untitled-plant-game.git
synced 2024-08-15 03:16:27 +00:00
watering :)
This commit is contained in:
parent
b7670afa78
commit
b3774be296
19 changed files with 380 additions and 6 deletions
|
@ -0,0 +1,3 @@
|
|||
source_md5="020554efba772b10d6006a7601b65caf"
|
||||
dest_md5="f480b9c8698a6c3358e849fddcbc8e3a"
|
||||
|
BIN
.import/wateringcan.png-02797907029374edc7072a259b443633.stex
Normal file
BIN
.import/wateringcan.png-02797907029374edc7072a259b443633.stex
Normal file
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
source_md5="f50950341c6cde7d8c5616ca6126b2c0"
|
||||
dest_md5="96f2bd1f12ade8bb2429f3bdb031e9e2"
|
||||
|
Binary file not shown.
BIN
Aseprite/wateringcan.aseprite
Normal file
BIN
Aseprite/wateringcan.aseprite
Normal file
Binary file not shown.
BIN
Aseprite/wateringcan.png
Normal file
BIN
Aseprite/wateringcan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 175 B |
35
Aseprite/wateringcan.png.import
Normal file
35
Aseprite/wateringcan.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/wateringcan.png-02797907029374edc7072a259b443633.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Aseprite/wateringcan.png"
|
||||
dest_files=[ "res://.import/wateringcan.png-02797907029374edc7072a259b443633.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=false
|
||||
svg/scale=1.0
|
BIN
Aseprite/wateringcanactive.aseprite
Normal file
BIN
Aseprite/wateringcanactive.aseprite
Normal file
Binary file not shown.
BIN
Aseprite/wateringcanactive.png
Normal file
BIN
Aseprite/wateringcanactive.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 175 B |
35
Aseprite/wateringcanactive.png.import
Normal file
35
Aseprite/wateringcanactive.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/wateringcanactive.png-69263cec9e8669fd6e0f8bc7fe10293b.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Aseprite/wateringcanactive.png"
|
||||
dest_files=[ "res://.import/wateringcanactive.png-69263cec9e8669fd6e0f8bc7fe10293b.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=false
|
||||
svg/scale=1.0
|
0
Menu/WateringCan.gd
Normal file
0
Menu/WateringCan.gd
Normal file
12
Tools/WateringCan.gd
Normal file
12
Tools/WateringCan.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
extends TextureButton
|
||||
var watering = false
|
||||
|
||||
func _on_WateringCan_pressed():
|
||||
watering = !watering
|
||||
if watering:
|
||||
$Timer.start(1)
|
||||
$Particles2D.emitting = true
|
||||
if !watering:
|
||||
$Timer.stop()
|
||||
$Particles2D.emitting = false
|
||||
|
40
Tools/WateringCan.tscn
Normal file
40
Tools/WateringCan.tscn
Normal file
|
@ -0,0 +1,40 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Menu/WateringCan.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Aseprite/wateringcan.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 8.0
|
||||
height = 0.0
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=2]
|
||||
flag_disable_z = true
|
||||
direction = Vector3( -1, 0, 0 )
|
||||
gravity = Vector3( 0, 10, 0 )
|
||||
initial_velocity = 5.0
|
||||
orbit_velocity = 0.0
|
||||
orbit_velocity_random = 0.0
|
||||
color = Color( 0.341176, 0.337255, 0.756863, 1 )
|
||||
|
||||
[node name="WateringCan" type="Area2D"]
|
||||
collision_mask = 2
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, 1 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Particles2D" type="Particles2D" parent="."]
|
||||
position = Vector2( -7, -4 )
|
||||
emitting = false
|
||||
amount = 25
|
||||
lifetime = 10.0
|
||||
process_material = SubResource( 2 )
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_WateringCan_area_entered"]
|
||||
[connection signal="area_exited" from="." to="." method="_on_WateringCan_area_exited"]
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_WateringCan_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="_on_WateringCan_mouse_exited"]
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=18 format=2]
|
||||
[gd_scene load_steps=22 format=2]
|
||||
|
||||
[ext_resource path="res://World/Plant.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://World/FullscreenButton.gd" type="Script" id=2]
|
||||
|
@ -11,6 +11,9 @@
|
|||
[ext_resource path="res://Aseprite/pot.png" type="Texture" id=9]
|
||||
[ext_resource path="res://Font/pixeloid-font/PixeloidMono-1G8ae.ttf" type="DynamicFontData" id=10]
|
||||
[ext_resource path="res://World/Terminal.gd" type="Script" id=11]
|
||||
[ext_resource path="res://Aseprite/wateringcan.png" type="Texture" id=12]
|
||||
[ext_resource path="res://Tools/WateringCan.gd" type="Script" id=13]
|
||||
[ext_resource path="res://Aseprite/wateringcanactive.png" type="Texture" id=14]
|
||||
|
||||
[sub_resource type="Theme" id=7]
|
||||
|
||||
|
@ -37,6 +40,15 @@ content_margin_bottom = 2.0
|
|||
bg_color = Color( 0.14902, 0.0431373, 0.129412, 1 )
|
||||
border_color = Color( 0.517647, 0.745098, 0.929412, 1 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=13]
|
||||
flag_disable_z = true
|
||||
direction = Vector3( -1, 0, 0 )
|
||||
gravity = Vector3( 0, 98, 0 )
|
||||
initial_velocity = 15.0
|
||||
orbit_velocity = 0.0
|
||||
orbit_velocity_random = 0.0
|
||||
color = Color( 0.341176, 0.337255, 0.756863, 1 )
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
|
||||
[node name="Plant" parent="." instance=ExtResource( 1 )]
|
||||
|
@ -46,6 +58,7 @@ margin_left = 236.0
|
|||
margin_top = 2.0
|
||||
margin_right = 254.0
|
||||
margin_bottom = 142.0
|
||||
mouse_filter = 2
|
||||
theme = SubResource( 7 )
|
||||
custom_styles/panel = SubResource( 1 )
|
||||
__meta__ = {
|
||||
|
@ -87,6 +100,7 @@ margin_left = 128.0
|
|||
margin_top = 2.0
|
||||
margin_right = 234.0
|
||||
margin_bottom = 142.0
|
||||
mouse_filter = 2
|
||||
theme = SubResource( 7 )
|
||||
custom_styles/panel = SubResource( 1 )
|
||||
__meta__ = {
|
||||
|
@ -113,6 +127,29 @@ __meta__ = {
|
|||
[node name="Reveal" type="Timer" parent="RightPanel/Terminal"]
|
||||
wait_time = 0.15
|
||||
|
||||
[node name="WateringCan" type="TextureButton" parent="RightPanel"]
|
||||
margin_left = 2.0
|
||||
margin_top = 122.0
|
||||
margin_right = 19.0
|
||||
margin_bottom = 139.0
|
||||
texture_normal = ExtResource( 12 )
|
||||
texture_pressed = ExtResource( 14 )
|
||||
texture_hover = ExtResource( 14 )
|
||||
texture_disabled = ExtResource( 12 )
|
||||
script = ExtResource( 13 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Timer" type="Timer" parent="RightPanel/WateringCan"]
|
||||
|
||||
[node name="Particles2D" type="Particles2D" parent="RightPanel/WateringCan"]
|
||||
position = Vector2( -56, -1 )
|
||||
emitting = false
|
||||
amount = 15
|
||||
lifetime = 0.5
|
||||
process_material = SubResource( 13 )
|
||||
|
||||
[node name="Pot" type="Sprite" parent="."]
|
||||
position = Vector2( 64, 136 )
|
||||
texture = ExtResource( 9 )
|
||||
|
@ -121,3 +158,5 @@ texture = ExtResource( 9 )
|
|||
[connection signal="pressed" from="Options/FullscreenButton" to="Options/FullscreenButton" method="_on_FullscreenButton_pressed"]
|
||||
[connection signal="value_changed" from="Options/MusicVolume" to="Options/MusicVolume" method="_on_MusicVolume_value_changed"]
|
||||
[connection signal="timeout" from="RightPanel/Terminal/Reveal" to="RightPanel/Terminal" method="_on_Reveal_timeout"]
|
||||
[connection signal="pressed" from="RightPanel/WateringCan" to="RightPanel/WateringCan" method="_on_WateringCan_pressed"]
|
||||
[connection signal="timeout" from="RightPanel/WateringCan/Timer" to="Plant" method="add_water"]
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
[node name="Pixel" type="ColorRect"]
|
||||
margin_right = 1.0
|
||||
margin_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
@ -6,7 +6,7 @@ var active = []
|
|||
var rng
|
||||
var branches = 4
|
||||
|
||||
var water = 10
|
||||
var water = 20
|
||||
var health = 100
|
||||
var social = 50
|
||||
var light = 50
|
||||
|
@ -35,8 +35,7 @@ func step():
|
|||
|
||||
func communicate_needs():
|
||||
var needs = [(50 - water) * 2, 100 - health, 100 - social, (50 - light) * 2]
|
||||
var n
|
||||
var most_important = [n, needs[0]]
|
||||
var most_important = [0, needs[0]]
|
||||
var i = 0
|
||||
for need in needs:
|
||||
if most_important[1] <= need:
|
||||
|
@ -45,7 +44,7 @@ func communicate_needs():
|
|||
i += 1
|
||||
var names = ["water", "health", "social", "light"]
|
||||
most_important[0] = names[most_important[0]]
|
||||
if (last_need[0] != most_important[0]) or (abs(last_need[1] - most_important[1]) >= 10):
|
||||
if (last_need[0] != most_important[0]) || (abs(last_need[1] - most_important[1]) >= 10):
|
||||
emit_signal("has_need", most_important)
|
||||
last_need = most_important
|
||||
|
||||
|
@ -119,3 +118,8 @@ func blossom():
|
|||
|
||||
func _on_WaterTimer_timeout() -> void:
|
||||
water = clamp(water - 1, 0, 100)
|
||||
|
||||
|
||||
func add_water():
|
||||
water = clamp(water + 1, 0, 100)
|
||||
print(water)
|
||||
|
|
|
@ -10,7 +10,7 @@ wait_time = 0.25
|
|||
autostart = true
|
||||
|
||||
[node name="WaterTimer" type="Timer" parent="."]
|
||||
wait_time = 0.25
|
||||
wait_time = 20.0
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="step"]
|
||||
|
|
|
@ -32,3 +32,204 @@ progressive_web_app/icon_144x144=""
|
|||
progressive_web_app/icon_180x180=""
|
||||
progressive_web_app/icon_512x512=""
|
||||
progressive_web_app/background_color=Color( 0, 0, 0, 1 )
|
||||
|
||||
[preset.1]
|
||||
|
||||
name="Android"
|
||||
platform="Android"
|
||||
runnable=true
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path=""
|
||||
script_export_mode=1
|
||||
script_encryption_key=""
|
||||
|
||||
[preset.1.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
custom_template/use_custom_build=false
|
||||
custom_template/export_format=0
|
||||
architectures/armeabi-v7a=true
|
||||
architectures/arm64-v8a=true
|
||||
architectures/x86=false
|
||||
architectures/x86_64=false
|
||||
keystore/debug=""
|
||||
keystore/debug_user=""
|
||||
keystore/debug_password=""
|
||||
keystore/release=""
|
||||
keystore/release_user=""
|
||||
keystore/release_password=""
|
||||
one_click_deploy/clear_previous_install=false
|
||||
version/code=1
|
||||
version/name="1.0"
|
||||
package/unique_name="org.godotengine.$genname"
|
||||
package/name=""
|
||||
package/signed=true
|
||||
package/classify_as_game=true
|
||||
package/retain_data_on_uninstall=false
|
||||
launcher_icons/main_192x192=""
|
||||
launcher_icons/adaptive_foreground_432x432=""
|
||||
launcher_icons/adaptive_background_432x432=""
|
||||
graphics/32_bits_framebuffer=true
|
||||
graphics/opengl_debug=false
|
||||
xr_features/xr_mode=0
|
||||
xr_features/hand_tracking=0
|
||||
screen/immersive_mode=true
|
||||
screen/support_small=true
|
||||
screen/support_normal=true
|
||||
screen/support_large=true
|
||||
screen/support_xlarge=true
|
||||
user_data_backup/allow=false
|
||||
command_line/extra_args=""
|
||||
apk_expansion/enable=false
|
||||
apk_expansion/SALT=""
|
||||
apk_expansion/public_key=""
|
||||
permissions/custom_permissions=PoolStringArray( )
|
||||
permissions/access_checkin_properties=false
|
||||
permissions/access_coarse_location=false
|
||||
permissions/access_fine_location=false
|
||||
permissions/access_location_extra_commands=false
|
||||
permissions/access_mock_location=false
|
||||
permissions/access_network_state=false
|
||||
permissions/access_surface_flinger=false
|
||||
permissions/access_wifi_state=false
|
||||
permissions/account_manager=false
|
||||
permissions/add_voicemail=false
|
||||
permissions/authenticate_accounts=false
|
||||
permissions/battery_stats=false
|
||||
permissions/bind_accessibility_service=false
|
||||
permissions/bind_appwidget=false
|
||||
permissions/bind_device_admin=false
|
||||
permissions/bind_input_method=false
|
||||
permissions/bind_nfc_service=false
|
||||
permissions/bind_notification_listener_service=false
|
||||
permissions/bind_print_service=false
|
||||
permissions/bind_remoteviews=false
|
||||
permissions/bind_text_service=false
|
||||
permissions/bind_vpn_service=false
|
||||
permissions/bind_wallpaper=false
|
||||
permissions/bluetooth=false
|
||||
permissions/bluetooth_admin=false
|
||||
permissions/bluetooth_privileged=false
|
||||
permissions/brick=false
|
||||
permissions/broadcast_package_removed=false
|
||||
permissions/broadcast_sms=false
|
||||
permissions/broadcast_sticky=false
|
||||
permissions/broadcast_wap_push=false
|
||||
permissions/call_phone=false
|
||||
permissions/call_privileged=false
|
||||
permissions/camera=false
|
||||
permissions/capture_audio_output=false
|
||||
permissions/capture_secure_video_output=false
|
||||
permissions/capture_video_output=false
|
||||
permissions/change_component_enabled_state=false
|
||||
permissions/change_configuration=false
|
||||
permissions/change_network_state=false
|
||||
permissions/change_wifi_multicast_state=false
|
||||
permissions/change_wifi_state=false
|
||||
permissions/clear_app_cache=false
|
||||
permissions/clear_app_user_data=false
|
||||
permissions/control_location_updates=false
|
||||
permissions/delete_cache_files=false
|
||||
permissions/delete_packages=false
|
||||
permissions/device_power=false
|
||||
permissions/diagnostic=false
|
||||
permissions/disable_keyguard=false
|
||||
permissions/dump=false
|
||||
permissions/expand_status_bar=false
|
||||
permissions/factory_test=false
|
||||
permissions/flashlight=false
|
||||
permissions/force_back=false
|
||||
permissions/get_accounts=false
|
||||
permissions/get_package_size=false
|
||||
permissions/get_tasks=false
|
||||
permissions/get_top_activity_info=false
|
||||
permissions/global_search=false
|
||||
permissions/hardware_test=false
|
||||
permissions/inject_events=false
|
||||
permissions/install_location_provider=false
|
||||
permissions/install_packages=false
|
||||
permissions/install_shortcut=false
|
||||
permissions/internal_system_window=false
|
||||
permissions/internet=false
|
||||
permissions/kill_background_processes=false
|
||||
permissions/location_hardware=false
|
||||
permissions/manage_accounts=false
|
||||
permissions/manage_app_tokens=false
|
||||
permissions/manage_documents=false
|
||||
permissions/master_clear=false
|
||||
permissions/media_content_control=false
|
||||
permissions/modify_audio_settings=false
|
||||
permissions/modify_phone_state=false
|
||||
permissions/mount_format_filesystems=false
|
||||
permissions/mount_unmount_filesystems=false
|
||||
permissions/nfc=false
|
||||
permissions/persistent_activity=false
|
||||
permissions/process_outgoing_calls=false
|
||||
permissions/read_calendar=false
|
||||
permissions/read_call_log=false
|
||||
permissions/read_contacts=false
|
||||
permissions/read_external_storage=false
|
||||
permissions/read_frame_buffer=false
|
||||
permissions/read_history_bookmarks=false
|
||||
permissions/read_input_state=false
|
||||
permissions/read_logs=false
|
||||
permissions/read_phone_state=false
|
||||
permissions/read_profile=false
|
||||
permissions/read_sms=false
|
||||
permissions/read_social_stream=false
|
||||
permissions/read_sync_settings=false
|
||||
permissions/read_sync_stats=false
|
||||
permissions/read_user_dictionary=false
|
||||
permissions/reboot=false
|
||||
permissions/receive_boot_completed=false
|
||||
permissions/receive_mms=false
|
||||
permissions/receive_sms=false
|
||||
permissions/receive_wap_push=false
|
||||
permissions/record_audio=false
|
||||
permissions/reorder_tasks=false
|
||||
permissions/restart_packages=false
|
||||
permissions/send_respond_via_message=false
|
||||
permissions/send_sms=false
|
||||
permissions/set_activity_watcher=false
|
||||
permissions/set_alarm=false
|
||||
permissions/set_always_finish=false
|
||||
permissions/set_animation_scale=false
|
||||
permissions/set_debug_app=false
|
||||
permissions/set_orientation=false
|
||||
permissions/set_pointer_speed=false
|
||||
permissions/set_preferred_applications=false
|
||||
permissions/set_process_limit=false
|
||||
permissions/set_time=false
|
||||
permissions/set_time_zone=false
|
||||
permissions/set_wallpaper=false
|
||||
permissions/set_wallpaper_hints=false
|
||||
permissions/signal_persistent_processes=false
|
||||
permissions/status_bar=false
|
||||
permissions/subscribed_feeds_read=false
|
||||
permissions/subscribed_feeds_write=false
|
||||
permissions/system_alert_window=false
|
||||
permissions/transmit_ir=false
|
||||
permissions/uninstall_shortcut=false
|
||||
permissions/update_device_stats=false
|
||||
permissions/use_credentials=false
|
||||
permissions/use_sip=false
|
||||
permissions/vibrate=false
|
||||
permissions/wake_lock=false
|
||||
permissions/write_apn_settings=false
|
||||
permissions/write_calendar=false
|
||||
permissions/write_call_log=false
|
||||
permissions/write_contacts=false
|
||||
permissions/write_external_storage=false
|
||||
permissions/write_gservices=false
|
||||
permissions/write_history_bookmarks=false
|
||||
permissions/write_profile=false
|
||||
permissions/write_secure_settings=false
|
||||
permissions/write_settings=false
|
||||
permissions/write_sms=false
|
||||
permissions/write_social_stream=false
|
||||
permissions/write_sync_settings=false
|
||||
permissions/write_user_dictionary=false
|
||||
|
|
|
@ -56,6 +56,7 @@ texture={
|
|||
click={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue