Beginning 1.0 SBB Introduction
parent
1ec43f1676
commit
2d1aa51825
|
@ -1,20 +1,135 @@
|
||||||
Tree("Root") {
|
Tree("Root") {
|
||||||
Composite(Race) {
|
Composite(Sequence) {
|
||||||
Composite(Sequence) {
|
BTC.InitializeSpeechManager()
|
||||||
// Story A: Einkaufen und Picknicken
|
RunTree("10_SBB_Zugabteil_Szenenwahl_Selection")
|
||||||
BTC.GetKeyDown("Return")
|
|
||||||
BTC.Run("LoadScene.NEXT.20SBB")
|
|
||||||
}
|
|
||||||
Composite(Sequence) {
|
|
||||||
// Story B: Grotto Kochen und Essen
|
|
||||||
BTC.GetKeyDown("Backspace")
|
|
||||||
BTC.Run("LoadScene.NEXT.30SBB")
|
|
||||||
}
|
|
||||||
Composite(Sequence) {
|
|
||||||
// Story C: Wandern im Cavaglia
|
|
||||||
BTC.GetKeyDown("Tab")
|
|
||||||
BTC.Run("LoadScene.NEXT.40SBB")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Tree("10_SBB_Zugabteil_Szenenwahl_Selection") {
|
||||||
|
Composite(Sequence) {
|
||||||
|
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A besucht
|
||||||
|
BTC.StoryAVisited()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A + B besucht
|
||||||
|
BTC.StoryBVisited()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A + B + C besucht
|
||||||
|
BTC.StoryCVisited()
|
||||||
|
// --- Zugabteil - Story Ende ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A + B besucht
|
||||||
|
// Story C nicht besucht
|
||||||
|
// --- Zugabteil - Repetition Intro C ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
BTC.SetStoryCVisited()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A besucht
|
||||||
|
// Story B nicht besucht
|
||||||
|
BTC.StoryCVisited()
|
||||||
|
|
||||||
|
// Story A + C besucht
|
||||||
|
// Story B nicht besucht
|
||||||
|
// --- Zugabteil - Repetition Intro B ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A besucht
|
||||||
|
// Story B + C nicht besucht
|
||||||
|
// --- Zugabteil - Repetition Intro BC ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
BTC.SetStoryBVisited()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A nicht besucht
|
||||||
|
BTC.StoryBVisited()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story B besucht
|
||||||
|
// Story A nicht besucht
|
||||||
|
BTC.StoryCVisited()
|
||||||
|
|
||||||
|
// Story B + C besucht
|
||||||
|
// Story A nicht besucht
|
||||||
|
// --- Zugabteil - Repetition Intro A ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story B besucht
|
||||||
|
// Story A + C nicht besucht
|
||||||
|
// --- Zugabteil - Repetition Intro AC ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Story A + B nicht besucht
|
||||||
|
BTC.StoryCVisited()
|
||||||
|
|
||||||
|
// Story C besucht
|
||||||
|
// Story A + B nicht besucht
|
||||||
|
// --- Zugabteil - Repetition Intro AB ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Nichts besucht
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.CompareRepetitionVisitedCounter(0)
|
||||||
|
// --- Zugabteil - Intro ABC erste ---
|
||||||
|
// ...
|
||||||
|
BTC.IncrementRepetitionVisitedCounter()
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Erste Wiederholung
|
||||||
|
BTC.CompareRepetitionVisitedCounter(1)
|
||||||
|
// --- Zugabteil - Intro ABC zweite ---
|
||||||
|
// ...
|
||||||
|
BTC.IncrementRepetitionVisitedCounter()
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Zweite Wiederholung
|
||||||
|
BTC.CompareRepetitionVisitedCounter(2)
|
||||||
|
// --- Zugabteil - Intro ABC dritte ---
|
||||||
|
// ...
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // First Selector
|
||||||
|
} // Sequence
|
||||||
|
}
|
||||||
|
|
|
@ -916,6 +916,136 @@ public class BTC : MonoBehaviour {
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Visited Stories Manager
|
||||||
|
[Task]
|
||||||
|
public void StoryAVisited()
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
if (VisitedStories.StoryA)
|
||||||
|
{
|
||||||
|
Debug.Log("Story A was visited.");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Story A was not visited.");
|
||||||
|
Task.SetFailed();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Task]
|
||||||
|
public void StoryBVisited()
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
if (VisitedStories.StoryB)
|
||||||
|
{
|
||||||
|
Debug.Log("Story B was visited.");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Story B was not visited.");
|
||||||
|
Task.SetFailed();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Task]
|
||||||
|
public void StoryCVisited()
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
if (VisitedStories.StoryC)
|
||||||
|
{
|
||||||
|
Debug.Log("Story C was visited.");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Story C was not visited.");
|
||||||
|
Task.SetFailed();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Task]
|
||||||
|
public void SetStoryAVisited()
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
VisitedStories.StoryA = true;
|
||||||
|
Debug.Log($"Set Visited Story A = {VisitedStories.StoryA}");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Task]
|
||||||
|
public void SetStoryBVisited()
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
VisitedStories.StoryB = true;
|
||||||
|
Debug.Log($"Set Visited Story B = {VisitedStories.StoryB}");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Task]
|
||||||
|
public void SetStoryCVisited()
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
VisitedStories.StoryC = true;
|
||||||
|
Debug.Log($"Set Visited Story C = {VisitedStories.StoryC}");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Task]
|
||||||
|
public void IncrementRepetitionVisitedCounter()
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
VisitedStories.RepetitionCounter++;
|
||||||
|
Debug.Log($"Set Visited Repetition Counter = {VisitedStories.RepetitionCounter}");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Task]
|
||||||
|
public void CompareRepetitionVisitedCounter(int number)
|
||||||
|
{
|
||||||
|
if (Task.getState == NodeState.FirstRun)
|
||||||
|
{
|
||||||
|
if (VisitedStories.RepetitionCounter == number)
|
||||||
|
{
|
||||||
|
Debug.Log($"Visited Repetition Counter equals {number}");
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log($"Visited Repetition Counter not equals {number}");
|
||||||
|
Task.SetFailed();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Oculus Input
|
#region Oculus Input
|
||||||
#if OCULUSVR_AVAILABLE
|
#if OCULUSVR_AVAILABLE
|
||||||
[Task]
|
[Task]
|
||||||
|
|
|
@ -45,24 +45,24 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: f3657284cbc344c10b72aff76116332b, type: 3}
|
m_Script: {fileID: 11500000, guid: f3657284cbc344c10b72aff76116332b, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
action:
|
actionA:
|
||||||
m_Name: Action
|
m_Name: Action A
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_ExpectedControlType:
|
m_ExpectedControlType:
|
||||||
m_Id: c44e2df2-f504-436d-8e3e-12d803d9642e
|
m_Id: fb157a22-9a47-466e-97a1-25ded2f3a8b8
|
||||||
m_Processors:
|
m_Processors:
|
||||||
m_Interactions:
|
m_Interactions:
|
||||||
m_SingletonActionBindings:
|
m_SingletonActionBindings:
|
||||||
- m_Name:
|
- m_Name:
|
||||||
m_Id: ebca9ad8-ac87-471c-8f17-f62d8084c14e
|
m_Id: 60ed3969-99ce-484e-a6ba-c03865d49b79
|
||||||
m_Path: <XRController>{RightHand}/secondaryButton
|
m_Path: <XRController>{RightHand}/{Secondary2DAxisClick}
|
||||||
m_Interactions:
|
m_Interactions:
|
||||||
m_Processors:
|
m_Processors:
|
||||||
m_Groups:
|
m_Groups:
|
||||||
m_Action: Action
|
m_Action: Action A
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
OnPress:
|
OnPressA:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 2072566747554460033}
|
- m_Target: {fileID: 2072566747554460033}
|
||||||
|
@ -74,9 +74,45 @@ MonoBehaviour:
|
||||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
m_IntArgument: 0
|
m_IntArgument: 0
|
||||||
m_FloatArgument: 0
|
m_FloatArgument: 0
|
||||||
m_StringArgument: 1.0-SBB
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
actionB:
|
||||||
|
m_Name: Action B
|
||||||
|
m_Type: 0
|
||||||
|
m_ExpectedControlType:
|
||||||
|
m_Id: 6792c436-bf55-4146-aa93-e6be83aa5ed7
|
||||||
|
m_Processors:
|
||||||
|
m_Interactions:
|
||||||
|
m_SingletonActionBindings: []
|
||||||
|
m_Flags: 0
|
||||||
|
OnPressB:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
actionX:
|
||||||
|
m_Name: Action X
|
||||||
|
m_Type: 0
|
||||||
|
m_ExpectedControlType:
|
||||||
|
m_Id: ae0153d0-74b6-4412-80f1-4ca3572436ce
|
||||||
|
m_Processors:
|
||||||
|
m_Interactions:
|
||||||
|
m_SingletonActionBindings: []
|
||||||
|
m_Flags: 0
|
||||||
|
OnPressX:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
actionY:
|
||||||
|
m_Name: Action Y
|
||||||
|
m_Type: 0
|
||||||
|
m_ExpectedControlType:
|
||||||
|
m_Id: 0a8b5e05-add5-454f-a70b-1577042b74e0
|
||||||
|
m_Processors:
|
||||||
|
m_Interactions:
|
||||||
|
m_SingletonActionBindings: []
|
||||||
|
m_Flags: 0
|
||||||
|
OnPressY:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
--- !u!114 &2072566747554460033
|
--- !u!114 &2072566747554460033
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -596,7 +596,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &4195088450314375929
|
--- !u!224 &4195088450314375929
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -6487,24 +6487,24 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: f3657284cbc344c10b72aff76116332b, type: 3}
|
m_Script: {fileID: 11500000, guid: f3657284cbc344c10b72aff76116332b, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
action:
|
actionA:
|
||||||
m_Name: Action
|
m_Name: Action A
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_ExpectedControlType:
|
m_ExpectedControlType:
|
||||||
m_Id: c2b645eb-129c-4bbc-8990-954727edb910
|
m_Id: 77b342f4-bb75-4f94-a913-deb5f93c41b4
|
||||||
m_Processors:
|
m_Processors:
|
||||||
m_Interactions:
|
m_Interactions:
|
||||||
m_SingletonActionBindings:
|
m_SingletonActionBindings:
|
||||||
- m_Name:
|
- m_Name:
|
||||||
m_Id: 49408011-4cbc-493a-b23f-31a716de972e
|
m_Id: b76f0ec6-86c7-407a-9e72-af8eb46d85f5
|
||||||
m_Path: <XRController>{RightHand}/primaryButton
|
m_Path: <XRController>{LeftHand}/{Primary2DAxisClick}
|
||||||
m_Interactions:
|
m_Interactions:
|
||||||
m_Processors:
|
m_Processors:
|
||||||
m_Groups:
|
m_Groups:
|
||||||
m_Action: Action
|
m_Action: Action A
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
OnPress:
|
OnPressA:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 7978143806872874298}
|
- m_Target: {fileID: 7978143806872874298}
|
||||||
|
@ -6519,6 +6519,42 @@ MonoBehaviour:
|
||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
actionB:
|
||||||
|
m_Name: Action B
|
||||||
|
m_Type: 0
|
||||||
|
m_ExpectedControlType:
|
||||||
|
m_Id: f65f10a9-265c-483f-8a7d-c2dd8bc16e21
|
||||||
|
m_Processors:
|
||||||
|
m_Interactions:
|
||||||
|
m_SingletonActionBindings: []
|
||||||
|
m_Flags: 0
|
||||||
|
OnPressB:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
actionX:
|
||||||
|
m_Name: Action X
|
||||||
|
m_Type: 0
|
||||||
|
m_ExpectedControlType:
|
||||||
|
m_Id: 4d844e5a-4586-4697-9b25-c9f7d2bc995f
|
||||||
|
m_Processors:
|
||||||
|
m_Interactions:
|
||||||
|
m_SingletonActionBindings: []
|
||||||
|
m_Flags: 0
|
||||||
|
OnPressX:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
actionY:
|
||||||
|
m_Name: Action Y
|
||||||
|
m_Type: 0
|
||||||
|
m_ExpectedControlType:
|
||||||
|
m_Id: 294c5382-b9a3-4542-b6b2-79ec2b64c2a3
|
||||||
|
m_Processors:
|
||||||
|
m_Interactions:
|
||||||
|
m_SingletonActionBindings: []
|
||||||
|
m_Flags: 0
|
||||||
|
OnPressY:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
--- !u!114 &7978143806872874298
|
--- !u!114 &7978143806872874298
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2024-09-24T15:23:51.5884920Z
|
2024-09-26T08:03:09.8899210Z
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,11 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public static class VisitedStories
|
||||||
|
{
|
||||||
|
public static bool StoryA = false;
|
||||||
|
public static bool StoryB = false;
|
||||||
|
public static bool StoryC = false;
|
||||||
|
public static int RepetitionCounter = 0;
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4d7c86be25c5e45ef9471b4667f7bc21
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue