Skip to content
Snippets Groups Projects
Remover.cs 569 B
Newer Older
  • Learn to ignore specific revisions
  • using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using static CommunicationEvents;
    
    public class Remover : Gadget
    {
    
        /// \copydoc Gadget.s_type
        [Newtonsoft.Json.JsonProperty]
        protected static new string s_type = "Remover";
    
    
        public override void _Hit(RaycastHit hit)
    
            string hid = hit.transform.GetComponent<FactObject>()?.URI;
            if (hid == null) return;
    
            Workflow.Add(hid);
            StageStatic.stage.factState.Remove(Workflow[0], samestep: false, gadget: this);
    
            ResetGadget();