/// <summary> /// Interact with this object. An event is raised /// </summary> public virtual void Interact() { if (hasInteract && interactOnce) { return; } hasInteract = true; /// A listener must decide what happens with every object InteractEventArgs interactArgs = (items.Length > 0) ? new InteractEventArgs(InteractionType, nextDoor, items[0].audioClip, Items) : new InteractEventArgs(InteractionType, nextDoor, items); OnInteract?.Invoke(this, interactArgs); }
public PuzzleConfirmEventArgs(bool acoplished, InteractEventArgs onInteract, int maxMovements = -1) { this.acoplished = acoplished; this.onInteract = onInteract; this.maxMovements = maxMovements; }