Skip to content
Snippets Groups Projects
Remover.cs 622 B
Newer Older
  • Learn to ignore specific revisions
  • using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using static CommunicationEvents;
    
    public class Remover : Gadget
    {
    
        public override void _Awake()
    
        {
            this.UiName = "Remove Mode";
    
            if (MaxRange == 0)
                MaxRange = GlobalBehaviour.GadgetLaserDistance;
    
        public override void _OnDisable() { }
    
        public override void _OnEnable() { }
    
        public override void _OnHit(RaycastHit hit)
    
        {
            // TODO: ask/warn user to cascade
    
            var hid = hit.transform.GetComponent<FactObject>().URI;
    
            StageStatic.stage.factState.Remove(hid);