Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [RequireComponent(typeof(vp_FPController))]
- public class C_InteractionHandler : MonoBehaviour
- {
- public const string IGO_TAG = "IGO";
- public const string WATER_ZONE = "Water";
- public const string SWIM_STATE = "Swim";
- public const string DEFAULT_STATE = "Default";
- public string InteractionKey;
- [Space(10)]
- public List<string> InteractableTags;
- [Space(10)]
- [Header("Interaction Types")]
- public bool Input;
- public bool Trigger;
- public bool Collision;
- private vp_FPController fpsController;
- private vp_FPCamera fpsCamera;
- private IGO interObject;
- void Start()
- {
- fpsCamera = GetComponentInChildren<vp_FPCamera>();
- fpsController = GetComponent<vp_FPController>();
- }
- void Update()
- {
- if (Input && cInput.GetKeyDown("Interact"))
- {
- Debug.Log("Input type");
- if (interObject != null)
- {
- interObject.Interact();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement