start to change action system

This commit is contained in:
Vladimir Koshevarov
2022-08-18 16:07:06 +03:00
parent a9e1db4ac2
commit 9366aa479c
11 changed files with 31 additions and 49 deletions
+4 -2
View File
@@ -8,7 +8,8 @@ namespace Assets.Scripts.Buildings
{
protected string _name;
protected Dictionary<string, BaseAction> _optionsList;
[SerializeField]
private ConversationController _conversationController;
// Start is called before the first frame update
void Start()
{
@@ -28,7 +29,8 @@ namespace Assets.Scripts.Buildings
void OnTriggerEnter(Collider other)
{
ConversationController.Instance.Change(_name, _optionsList);
_conversationController.Change(_name, _optionsList);
}
}
}
+6 -11
View File
@@ -1,5 +1,4 @@
using Assets.Scripts.Actions;
using UnityEngine;
namespace Assets.Scripts.Buildings
{
@@ -12,17 +11,13 @@ namespace Assets.Scripts.Buildings
protected override void BuildOptionsList()
{
_optionsList.Add("Hamburgers - 83$", new Eat(null, 6, 1, 83));
_optionsList.Add("Cheesburger - 94$", new Eat(null, 6, 1, 94));
_optionsList.Add("Astro chicken - 131$", new Eat(null, 6, 1, 131));
_optionsList.Add("Fries - 68$", new Eat(null, 6, 1, 68));
_optionsList.Add("Shakes - 108$", new Eat(null, 6, 1, 108));
_optionsList.Add("Colas - 73$", new Eat(null, 6, 1, 73));
_optionsList.Add("Hamburgers - 83$", new Eat(6, 1, 83));
_optionsList.Add("Cheesburger - 94$", new Eat(6, 1, 94));
_optionsList.Add("Astro chicken - 131$", new Eat(6, 1, 131));
_optionsList.Add("Fries - 68$", new Eat(6, 1, 68));
_optionsList.Add("Shakes - 108$", new Eat(6, 1, 108));
_optionsList.Add("Colas - 73$", new Eat(6, 1, 73));
}
void OnTriggerEnter(Collider other)
{
ConversationController.Instance.Change(_name, _optionsList);
}
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ namespace Assets.Scripts.Buildings
{
protected override void BuildOptionsList()
{
_optionsList.Add("Rest", new Relax(null, 6, 1));
_optionsList.Add("Rest", new Relax(6, 1));
}
protected override void Initialize()