tree tuorial is triggered by tree directly, failed tree validation event added, added new quest to find seed
This commit is contained in:
@@ -9,8 +9,9 @@ namespace Beyond
|
||||
public class TreesDataContainer : MonoBehaviour
|
||||
{
|
||||
public List<TreeStateData> treesData = new List<TreeStateData>();
|
||||
public bool plantingTutorialRun = false;
|
||||
}
|
||||
|
||||
/*
|
||||
public class TreePlantingManager : Singleton<TreePlantingManager>
|
||||
{
|
||||
//singleton
|
||||
@@ -26,8 +27,9 @@ namespace Beyond
|
||||
//jakas lista obiektowa miejscowa
|
||||
//miejsce
|
||||
//status
|
||||
//prefab z animacj¹
|
||||
//prefab z animacj<EFBFBD>
|
||||
//trigger?
|
||||
//plant spot controller
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -100,6 +100,10 @@ namespace Beyond
|
||||
[Header("Events")] public UnityEvent onHealTree;
|
||||
[Header("Events")] public UnityEvent<TreeState> onStateChanged;
|
||||
[Header("Events")] public UnityEvent onFullyGrown;
|
||||
[Header("Events")] public UnityEvent onPlantValidatorFailed;
|
||||
|
||||
public TutorialController m_platingTutorialController;
|
||||
private bool m_plantingTutorialRun = false;
|
||||
private bool canPlayCantDoClip = true;
|
||||
|
||||
private void Awake()
|
||||
@@ -435,12 +439,18 @@ namespace Beyond
|
||||
validatorCollider.enabled = false;
|
||||
infoText.text = "Plant seed";
|
||||
plantingCollider.enabled = true;
|
||||
if (!m_plantingTutorialRun && m_platingTutorialController != null)
|
||||
{
|
||||
m_plantingTutorialRun = true;
|
||||
m_platingTutorialController.StartTutorial();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
plantingCollider.enabled = false;
|
||||
infoTextObject.SetActive(true);
|
||||
infoText.text = "Requires " + itemRequiredToPlant.name;
|
||||
onPlantValidatorFailed?.Invoke();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user