/** * Event: Focus item */ public void OnFocusInteractiveActor(InteractiveActor item) { this.SetHeading(item.title); this.SetBody(item.action); this.SetVisible(true); }
/** * Looking at an InteractiveActor */ public virtual void Focus(InteractiveActor actor) { actor.OnFocused(); this.OnFocusInteractiveActor(actor); this.prevFocus = actor; if(InputManager.GetButtonDown("Interact")) { this.Interact(actor); } }
/** * Interact with InteractiveActor */ public virtual void Interact(InteractiveActor actor) { actor.OnInteract(this); }