private void Start() { container = gameObject.AddComponent <TriggerInteractableContainer>(); container.OnExit = OnInteractableExit; handColl = GetComponent <Collider>(); StartCoroutine(SetCollPos()); }
private void Start() { GetComponent <MeshRenderer>().enabled = false; itemContainer = gameObject.AddComponent <TriggerInteractableContainer>(); itemContainer.OnEnter = OnTrueEnter; itemContainer.OnExit = OnTrueExit; StartCoroutine(SearchInteractable()); IEnumerator SearchInteractable() { yield return(null); generalItem = (GeneralItem)Interactable.GetInteractable(transform); } }
// Start is called before the first frame update private void Start() { missingObjects = new Dictionary <Types, int>(); missingObjects.Add(Types.Needle, 1); missingObjects.Add(Types.BigSyringe, 1); missingObjects.Add(Types.SmallSyringe, 6); missingObjects.Add(Types.Luerlock, 1); missingObjects.Add(Types.MedicineBottle, 1); missingObjects.Add(Types.SyringeCapBag, 1); itemContainer = childCollider.gameObject.AddComponent <TriggerInteractableContainer>(); itemContainer.OnEnter = EnterCabinet; itemContainer.OnExit = ExitCabinet; FirstEnterObjects = new Dictionary <GeneralItem, bool>(); if (syringeCapFactory != null) { syringeCapFactory.SetActive(false); } }
private void Start() { safeZone = transform.GetChild(0).gameObject.AddComponent <TriggerInteractableContainer>(); contaminateZone = transform.GetChild(1).gameObject.AddComponent <TriggerInteractableContainer>(); contaminatedItems = new HashSet <int>(); }
private void Start() { roomItems = coll.gameObject.AddComponent <TriggerInteractableContainer>(); Events.SubscribeToEvent(ItemLiftedFromFloor, this, EventType.ItemLiftedOffFloor); Events.SubscribeToEvent(ItemDroppedInTrash, this, EventType.ItemDroppedInTrash); }