Skip to content
Snippets Groups Projects
Select Git revision
  • 5bb470f5047486226fa70d82cdcd414856d32e0f
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

GlobalBehaviour.cs

Blame
    • MaZiFAU's avatar
      3e7d4f72
      MMTFunctions; BugFixes; Refactoring; · 3e7d4f72
      MaZiFAU authored
      MMTFunctions:
      +chabged to new FUN(TYPE)
      +changet to proper Tuple usage,
      +implemented: ProjL/R, FeedForward/StepUntil
      +ToType() for SomDocs
      +...
      
      Refactoring:
      +Popup/Behaviour
      
      BugFixes:
      +RightAngle
      +FallBackJasonScroll
      3e7d4f72
      History
      MMTFunctions; BugFixes; Refactoring;
      MaZiFAU authored
      MMTFunctions:
      +chabged to new FUN(TYPE)
      +changet to proper Tuple usage,
      +implemented: ProjL/R, FeedForward/StepUntil
      +ToType() for SomDocs
      +...
      
      Refactoring:
      +Popup/Behaviour
      
      BugFixes:
      +RightAngle
      +FallBackJasonScroll
    ToolModeText.cs 1.32 KiB
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    
    public class ToolModeText : MonoBehaviour
    {
    
        // Start is called before the first frame update
        void Start()
        {
            CommunicationEvents.ToolModeChangedEvent.AddListener(OnToolModeChanged);
        }
    
        // Update is called once per frame
        void Update()
        {
    
        }
    
        void OnToolModeChanged(ToolMode ActiveToolMode) {
    
            //When ToolMode changes: Change Text of active ToolMode
            switch (ActiveToolMode) {
                case ToolMode.MarkPointMode:
                    gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Point Mode";
                    break;
                case ToolMode.CreateLineMode:
                    gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Distance Mode";
                    break;
                case ToolMode.CreateAngleMode:
                    gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Angle Mode";
                    break;
                case ToolMode.CreateRayMode:
                    gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Straight Mode";
                    break;
                case ToolMode.ExtraMode:
                    gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = "Extra Mode";
                    break;
            }
        }
    }