Compare commits

...

8 Commits

5 changed files with 117 additions and 20 deletions

View File

@ -228,7 +228,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Intro") {
Composite(Sequence) {
BTC.CompareIntentID("Castelli_di_Bellinzona.Intro.18")
BTC.ClearPossbileSpeechIntents()
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli")
}
}
}
@ -268,7 +269,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Intro") {
BTC.Hide("GO.GO.SpeechButton")
BTC.Show("GO.GO.Home")
BTC.Hide("GO.GO.SpeechOptions")
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli")
}
}
}
@ -283,7 +285,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Intro") {
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli")
}
}
}
@ -455,7 +458,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Chatbot_Burgen") {
Composite(Sequence) {
BTC.CompareIntentID("Castelli_di_Bellinzona.Chatbot_Burgen.7")
BTC.ClearPossbileSpeechIntents()
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot")
}
}
}
@ -494,7 +498,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Chatbot_Burgen") {
BTC.Hide("GO.GO.SpeechButton")
BTC.Show("GO.GO.Home")
BTC.Hide("GO.GO.SpeechOptions")
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot")
}
}
}
@ -559,7 +564,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") {
Composite(Sequence) {
BTC.CompareIntentID("Castelli_di_Bellinzona.Geschichte_Castelli_Bot.6")
BTC.ClearPossbileSpeechIntents()
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_weitererzaehlen")
}
}
}
@ -598,7 +604,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") {
BTC.Hide("GO.GO.SpeechButton")
BTC.Show("GO.GO.Home")
BTC.Hide("GO.GO.SpeechOptions")
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_weitererzaehlen")
}
}
}
@ -613,7 +620,8 @@ Tree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") {
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
//RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli")
RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_weitererzaehlen")
}
}
}
@ -648,6 +656,7 @@ Tree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_weitererzaehlen") {
// TODO: Button Chatbot starten drücken
// ... Tree?
BTC.GetKeyDown("Return")
RunTree("26_Castello_Hide")
}
Composite(Sequence) {

View File

@ -61,23 +61,49 @@ public class BTC : MonoBehaviour {
}
public List<ComponentController> namedObjects = new List<ComponentController>();
private Dictionary<string, ComponentController> namedLookup = new();
private void OnEnable()
{
BuildLookup();
}
#region update list of objects in rooms
public void ClearObjects() {
namedObjects = new List<ComponentController>();
//namedObjects = new List<ComponentController>();
namedObjects.Clear();
namedLookup.Clear();
}
public T GetNamedObject<T>(string objectName) where T : ComponentController {
/* public T GetNamedObject<T>(string objectName) where T : ComponentController {
for (int i = namedObjects.Count - 1; i >= 0; i--) {
T ngo = namedObjects[i] as T;
if (ngo != null) {
// if name equals
if (ngo.objectName == objectName) {
Debug.Log("BTC returns namedObject");
return ngo;
}
}
}
return null;
}*/
public void BuildLookup()
{
namedLookup.Clear();
foreach (var ctrl in namedObjects)
{
if (!string.IsNullOrEmpty(ctrl.objectName))
namedLookup[ctrl.objectName] = ctrl;
}
}
public T GetNamedObject<T>(string objectName) where T : ComponentController
{
if (namedLookup.TryGetValue(objectName, out var obj))
return obj as T;
return null;
}
public List<ComponentHandler> GetHandlers (string objectName) {

View File

@ -2339,6 +2339,11 @@ Material:
- _QueueOffset: 0
m_Colors: []
m_BuildTextureStacks: []
--- !u!1 &402695755 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 151263976682561481, guid: 267e1a3cccdee864eae72b84dff113b6, type: 3}
m_PrefabInstance: {fileID: 5118595464362422450}
m_PrefabAsset: {fileID: 0}
--- !u!1 &404695440
GameObject:
m_ObjectHideFlags: 0
@ -6642,7 +6647,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2636888980393329576, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_LocalRotation.w
value: -0.013962198
value: 0.14003733
objectReference: {fileID: 0}
- target: {fileID: 2636888980393329576, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_LocalRotation.x
@ -6650,7 +6655,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2636888980393329576, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_LocalRotation.y
value: 0.9999026
value: 0.9901462
objectReference: {fileID: 0}
- target: {fileID: 2636888980393329576, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_LocalRotation.z
@ -6662,7 +6667,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2636888980393329576, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
value: 163.9
objectReference: {fileID: 0}
- target: {fileID: 2636888980393329576, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
@ -11170,7 +11175,7 @@ MonoBehaviour:
overrideLogStringDisplay: 0
overrideDebugInternalActive: 0
overrideDebugChangesActive: 0
instanceID: 293088
instanceID: 2197656
__behaviourTreeGenerator: {fileID: 0}
taskScripts:
- {fileID: 4900000, guid: f304d07c67c1a479d815a03f4ab1812a, type: 3}
@ -13761,13 +13766,42 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 7021710801637878581, guid: acaf5c77cd50ccf4392fb3b616681531, type: 3}
insertIndex: -1
addedObject: {fileID: 5036470093194660844}
m_SourcePrefab: {fileID: 100100000, guid: acaf5c77cd50ccf4392fb3b616681531, type: 3}
--- !u!4 &5036470093194660842 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6515287977375258606, guid: acaf5c77cd50ccf4392fb3b616681531, type: 3}
m_PrefabInstance: {fileID: 5036470093194660841}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5036470093194660843 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7021710801637878581, guid: acaf5c77cd50ccf4392fb3b616681531, type: 3}
m_PrefabInstance: {fileID: 5036470093194660841}
m_PrefabAsset: {fileID: 0}
--- !u!65 &5036470093194660844
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5036470093194660843}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1.7928102, y: 0.17820683, z: 0.61167526}
m_Center: {x: 0.0030288398, y: -0.005500421, z: 0.0010574162}
--- !u!1001 &5118595464362422450
PrefabInstance:
m_ObjectHideFlags: 0
@ -13827,13 +13861,37 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 151263976682561481, guid: 267e1a3cccdee864eae72b84dff113b6, type: 3}
insertIndex: -1
addedObject: {fileID: 5118595464362422454}
m_SourcePrefab: {fileID: 100100000, guid: 267e1a3cccdee864eae72b84dff113b6, type: 3}
--- !u!4 &5118595464362422451 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 671798742374565235, guid: 267e1a3cccdee864eae72b84dff113b6, type: 3}
m_PrefabInstance: {fileID: 5118595464362422450}
m_PrefabAsset: {fileID: 0}
--- !u!65 &5118595464362422454
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 402695755}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 5.816161, y: 0.17567542, z: 5.816161}
m_Center: {x: 0, y: -0.07606208, z: 0}
--- !u!1001 &5259105087185012179
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -7,7 +7,9 @@
"Prendo A.",
"Picnic.",
"Prendo Picnic.",
"Preferisco fare un picnic."
"Preferisco fare un picnic.",
"Faccio castelli.",
"Bellinzona."
]
},
{
@ -17,7 +19,9 @@
"Prendo B.",
"Grotto.",
"Prendo il Grotto.",
"Preferisco il Grotto."
"Preferisco il Grotto.",
"Faccio cucinare.",
"Nonna."
]
},
{

View File

@ -3,7 +3,7 @@
--- !u!5 &1
TimeManager:
m_ObjectHideFlags: 0
Fixed Timestep: 0.1
Fixed Timestep: 0.02
Maximum Allowed Timestep: 0.33333334
m_TimeScale: 1
Maximum Particle Timestep: 0.1
Maximum Particle Timestep: 0.03