It's Cow Game! Version 2.04!
This commit is contained in:
commit
a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions
39
Interactions/GardeningSpot/GardeningSpot.gd
Normal file
39
Interactions/GardeningSpot/GardeningSpot.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
extends Interaction
|
||||
|
||||
func _ready():
|
||||
add_action("Plant", plant, plant_check)
|
||||
add_action("Dig Up", dig_up, dig_up_check)
|
||||
add_action("Fertilize", fertilize, fertilize_check)
|
||||
add_action("Harvest", harvest, harvest_check)
|
||||
|
||||
func plant():
|
||||
get_parent().open_planting_menu()
|
||||
|
||||
func plant_check():
|
||||
if get_parent().currentState == PlantingSpot.PlantState.Empty:
|
||||
return true
|
||||
return false
|
||||
|
||||
func dig_up():
|
||||
get_parent().dig_up()
|
||||
|
||||
func dig_up_check():
|
||||
if get_parent().currentState == PlantingSpot.PlantState.Planted or get_parent().currentState == PlantingSpot.PlantState.GrownTree:
|
||||
return true
|
||||
return false
|
||||
|
||||
func fertilize():
|
||||
get_parent().open_fertilization_menu()
|
||||
|
||||
func fertilize_check():
|
||||
if get_parent().currentState == PlantingSpot.PlantState.Planted:
|
||||
return true
|
||||
return false
|
||||
|
||||
func harvest():
|
||||
get_parent().harvest()
|
||||
|
||||
func harvest_check():
|
||||
if get_parent().currentState == PlantingSpot.PlantState.GrownTree:
|
||||
return true
|
||||
return false
|
||||
7
Interactions/GardeningSpot/GardeningSpot.tscn
Normal file
7
Interactions/GardeningSpot/GardeningSpot.tscn
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cjocgnhcqft5t"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c5ded8kcouyci" path="res://Interactions/Interactable/interaction.tscn" id="1_2irft"]
|
||||
[ext_resource type="Script" path="res://Interactions/GardeningSpot/GardeningSpot.gd" id="2_otk8g"]
|
||||
|
||||
[node name="GardeningSpot" instance=ExtResource("1_2irft")]
|
||||
script = ExtResource("2_otk8g")
|
||||
Loading…
Add table
Add a link
Reference in a new issue