Skip to content
Snippets Groups Projects
Commit 4b811829 authored by thielicke's avatar thielicke
Browse files

Einblenden der Antworten gefixed, Passworträtsel beendet; Einfärben Lösungsfelder

parent 1ad69e71
No related branches found
No related tags found
No related merge requests found
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: "Gr\xFCn"
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.4194506, g: 0.78039217, b: 0.31372553, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: 12a97729996ebee419936f9a4c0364b2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
......@@ -7,11 +7,15 @@ using TMPro;
public class Aktenordner : MonoBehaviour, IMixedRealityTouchHandler
{
public List<GameObject> uiElements; // Liste fr alle bergeordneten UI-Elemente (TextMeshPro und Buttons)
public GameObject awtrue;
public GameObject awfalse;
private Coroutine hideCoroutine; // Coroutine-Referenz zum Verwalten des Timers
void Start()
{
SetElementsVisibility(false); // Initial unsichtbar
awtrue.active = false;
awfalse.active = false;
}
public void OnTouchStarted(HandTrackingInputEventData eventData)
......
......@@ -7,11 +7,15 @@ using TMPro;
public class Envelopes : MonoBehaviour, IMixedRealityTouchHandler
{
public List<GameObject> uiElements; // Liste fr alle bergeordneten UI-Elemente (TextMeshPro und Buttons)
public GameObject awtrue;
public GameObject awfalse;
private Coroutine hideCoroutine; // Coroutine-Referenz zum Verwalten des Timers
void Start()
{
SetElementsVisibility(false); // Initial unsichtbar
awtrue.active = false;
awfalse.active = false;
}
public void OnTouchStarted(HandTrackingInputEventData eventData)
......
......@@ -7,13 +7,15 @@ using TMPro;
public class Laptop : MonoBehaviour, IMixedRealityTouchHandler
{
public List<GameObject> uiElements; // Liste fr alle bergeordneten UI-Elemente (TextMeshPro und Buttons)
public GameObject awtrue;
public GameObject awfalse;
private Coroutine hideCoroutine; // Coroutine-Referenz zum Verwalten des Timers
public GameObject textElement; // Das Text-Element, das angezeigt werden soll
void Start()
{
SetElementsVisibility(false); // Initial unsichtbar
SetTextVisibility(false); // Text initial unsichtbar
awtrue.active = false;
awfalse.active = false;
}
public void OnTouchStarted(HandTrackingInputEventData eventData)
......@@ -31,7 +33,10 @@ public class Laptop : MonoBehaviour, IMixedRealityTouchHandler
hideCoroutine = StartCoroutine(HideElementsAfterDelay(10f)); // 10 Sek Verzgerung
}
public void OnTouchCompleted(HandTrackingInputEventData eventData) { }
public void OnTouchCompleted(HandTrackingInputEventData eventData)
{
}
public void OnTouchUpdated(HandTrackingInputEventData eventData) { }
......@@ -39,7 +44,6 @@ public class Laptop : MonoBehaviour, IMixedRealityTouchHandler
{
yield return new WaitForSeconds(delay);
SetElementsVisibility(false);
SetTextVisibility(false); // Text auch unsichtbar machen
}
void SetElementsVisibility(bool isVisible)
......@@ -52,6 +56,13 @@ public class Laptop : MonoBehaviour, IMixedRealityTouchHandler
void SetVisibilityRecursive(GameObject obj, bool isVisible)
{
// TextMeshPro-Komponente
TextMeshPro textMeshPro = obj.GetComponent<TextMeshPro>();
if (textMeshPro != null)
{
textMeshPro.color = new Color(textMeshPro.color.r, textMeshPro.color.g, textMeshPro.color.b, isVisible ? 1.0f : 0.0f);
}
// Renderer-Komponente (fr andere visuelle Elemente)
Renderer renderer = obj.GetComponent<Renderer>();
if (renderer != null)
......@@ -72,19 +83,4 @@ public class Laptop : MonoBehaviour, IMixedRealityTouchHandler
SetVisibilityRecursive(child.gameObject, isVisible);
}
}
void SetTextVisibility(bool isVisible)
{
TextMeshPro textMeshPro = textElement.GetComponent<TextMeshPro>();
if (textMeshPro != null)
{
textMeshPro.color = new Color(textMeshPro.color.r, textMeshPro.color.g, textMeshPro.color.b, isVisible ? 1.0f : 0.0f);
}
}
// Funktion zum Verwalten des Button-Klicks
public void OnButtonClick()
{
SetTextVisibility(true); // Text sichtbar machen
}
}
......@@ -7,11 +7,15 @@ using TMPro;
public class MID : MonoBehaviour, IMixedRealityTouchHandler
{
public List<GameObject> uiElements; // Liste fr alle bergeordneten UI-Elemente (TextMeshPro und Buttons)
public GameObject awtrue;
public GameObject awfalse;
private Coroutine hideCoroutine; // Coroutine-Referenz zum Verwalten des Timers
void Start()
{
SetElementsVisibility(false); // Initial unsichtbar
awtrue.active = false;
awfalse.active = false;
}
public void OnTouchStarted(HandTrackingInputEventData eventData)
......
......@@ -7,11 +7,21 @@ using TMPro;
public class Notizzettel : MonoBehaviour, IMixedRealityTouchHandler
{
public List<GameObject> uiElements; // Liste fr alle bergeordneten UI-Elemente (TextMeshPro und Buttons)
public GameObject textfeld;
public GameObject antworta;
public GameObject antwortb;
public GameObject antwortc;
public GameObject antwortd;
private Coroutine hideCoroutine; // Coroutine-Referenz zum Verwalten des Timers
void Start()
{
SetElementsVisibility(false); // Initial unsichtbar
textfeld.active = false;
antworta.active = false;
antwortb.active = false;
antwortc.active = false;
antwortd.active = false;
}
public void OnTouchStarted(HandTrackingInputEventData eventData)
......
......@@ -7,11 +7,15 @@ using TMPro;
public class Whiteboard : MonoBehaviour, IMixedRealityTouchHandler
{
public List<GameObject> uiElements; // Liste fr alle bergeordneten UI-Elemente (TextMeshPro und Buttons)
public GameObject awtrue;
public GameObject awfalse;
private Coroutine hideCoroutine; // Coroutine-Referenz zum Verwalten des Timers
void Start()
{
SetElementsVisibility(false); // Initial unsichtbar
awtrue.active = false;
awfalse.active = false;
}
public void OnTouchStarted(HandTrackingInputEventData eventData)
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment