TriggerPackage.cs (766B)
1 using UnityEngine; 2 using UnityEngine.InputSystem; 3 4 namespace Slimecing.Triggers 5 { 6 public struct TriggerPackage 7 { 8 9 public TriggerState triggerState { get; set; } 10 public GameObject user { get; set; } 11 public InputAction.CallbackContext ctx { get; set; } 12 13 public TriggerPackage(TriggerState triggerState, GameObject user) 14 { 15 this.triggerState = triggerState; 16 this.user = user; 17 ctx = new InputAction.CallbackContext(); 18 } 19 public TriggerPackage(TriggerState triggerState, GameObject user, InputAction.CallbackContext ctx) 20 { 21 this.triggerState = triggerState; 22 this.user = user; 23 this.ctx = ctx; 24 } 25 26 } 27 }