Skip to content
Snippets Groups Projects
Select Git revision
  • dac48d77bb53192a836112a9a6dc8c3e7cfc5296
  • 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

ToolModeText.cs.meta

Blame
  • Pointer.cs 771 B
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using static CommunicationEvents;
    
    public class Pointer : Gadget
    {
        new void Awake()
        {
            base.Awake();
            this.UiName = "Point Mode";
            if (MaxRange == 0)
                MaxRange = GlobalBehaviour.GadgetLaserDistance;
        }
    
        public override void OnHit(RaycastHit hit)
        {
            //Debug.Log("pointer1");
            if (!GadgetCanBeUsed) return;
           
            if (!this.isActiveAndEnabled) return;
            
            var pid = FactManager.AddPointFact(hit).Id;
    
            if (hit.transform.gameObject.layer == LayerMask.NameToLayer("Ray"))
            {
                FactManager.AddOnLineFact(pid, hit.transform.GetComponent<FactObject>().URI, true);
            }
        }
      
    }