32 lines
707 B
C#
32 lines
707 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using BITFALL.Entities.Player.Movement;
|
|
using BITFALL.Hotkey;
|
|
using BITKit;
|
|
using BITKit.Entities;
|
|
using UnityEngine;
|
|
|
|
namespace BITFALL.Player.Movement
|
|
{
|
|
public class PlayerCharacterInteractiveArea : EntityBehavior
|
|
{
|
|
[Inject] private IHotkeyCollection _hotkeyCollection;
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
foreach (var x in other.GetComponentsInChildren<IHotkeyProvider>(true))
|
|
{
|
|
_hotkeyCollection.Register(x);
|
|
}
|
|
|
|
}
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
foreach (var x in other.GetComponentsInChildren<IHotkeyProvider>(true))
|
|
{
|
|
_hotkeyCollection.UnRegister(x);
|
|
}
|
|
}
|
|
}
|
|
}
|