Back

Friday 1.7 | Interactable Objectives & Item Holding

Platformer Prototype

Adding interactivity for the objectives to enable a key pick up and a gate opening in the future.


Interactable Objective

Interaction types:

  • Give item
    • Gives the player an item when interacted with
  • Item as condition
    • Player has to be holding a certain item to interact
  • None
    • Can be interacted with but no item's are in the process (Just events)

First objective in inspector:

InteractableObjective

Day's Work

  • Objectives
    • Trigger colliders changed to boxes so you cant interract with them from below the floor
    • Interactable items can be given to player or be received from the player
    • ATM
      • Objective 1 gives a key when interracted with
        • Shows a tip when inside the trigger box "Press R1/RB to interract!"
      • Objective 2 needs a key to be interracted with
        • If can't be interracted with => show tip saying "You need a key to open the gate"
  • UI
    • TipManager singleton
      • Can show tips with a simple method that takes duration and a text
  • Player
    • Can hold a single item with left hand
Back