|
|
|
@ -51,21 +51,18 @@ public partial class PlantBehaviour2D : Node2D
|
|
|
|
_state = PlantState.Planted;
|
|
|
|
_state = PlantState.Planted;
|
|
|
|
_currentPlantSprite = GetRandomSprite(_seeds);
|
|
|
|
_currentPlantSprite = GetRandomSprite(_seeds);
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
GD.Print("PlantState is none.");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case PlantState.Planted:
|
|
|
|
case PlantState.Planted:
|
|
|
|
_state = PlantState.SmallPlant;
|
|
|
|
_state = PlantState.SmallPlant;
|
|
|
|
_currentPlantSprite.Visible = false;
|
|
|
|
_currentPlantSprite.Visible = false;
|
|
|
|
_currentPlantSprite = GetRandomSprite(_smallPlants);
|
|
|
|
_currentPlantSprite = GetRandomSprite(_smallPlants);
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
GD.Print("PlantState is planted.");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case PlantState.SmallPlant:
|
|
|
|
case PlantState.SmallPlant:
|
|
|
|
_state = PlantState.BigPlant;
|
|
|
|
_state = PlantState.BigPlant;
|
|
|
|
_currentPlantSprite.Visible = false;
|
|
|
|
_currentPlantSprite.Visible = false;
|
|
|
|
_currentPlantSprite = GetRandomSprite(_bigPlants);
|
|
|
|
_currentPlantSprite = GetRandomSprite(_bigPlants);
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
GD.Print("PlantState is Smallplant.");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case PlantState.BigPlant:
|
|
|
|
case PlantState.BigPlant:
|
|
|
|
_state = PlantState.Ready;
|
|
|
|
_state = PlantState.Ready;
|
|
|
|
@ -73,7 +70,6 @@ public partial class PlantBehaviour2D : Node2D
|
|
|
|
_currentPlantSprite = GetRandomSprite(_readyPlants);
|
|
|
|
_currentPlantSprite = GetRandomSprite(_readyPlants);
|
|
|
|
_harvestablePlant.IsActive = true;
|
|
|
|
_harvestablePlant.IsActive = true;
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
_currentPlantSprite.Visible = true;
|
|
|
|
GD.Print("PlantState is BigPlant.");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case PlantState.Ready:
|
|
|
|
case PlantState.Ready:
|
|
|
|
_state = PlantState.None;
|
|
|
|
_state = PlantState.None;
|
|
|
|
@ -96,7 +92,6 @@ public partial class PlantBehaviour2D : Node2D
|
|
|
|
|
|
|
|
|
|
|
|
public void SayMagicWord(string wordEvent)
|
|
|
|
public void SayMagicWord(string wordEvent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
GD.Print("Calling Dialogic event: " + wordEvent);
|
|
|
|
|
|
|
|
if (_magicWordDialogicEventName != wordEvent)
|
|
|
|
if (_magicWordDialogicEventName != wordEvent)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|