WheelyCatStudios / torte

GNU General Public License v2.0
4 stars 0 forks source link

Player interaction #46

Closed jdngray77 closed 3 years ago

jdngray77 commented 3 years ago

closes #37 closes #38 closes #39 closes #40

Adds Feijao's interaction work, implementing the ability for players to interact with items.

The inheritance tree is MonoBehaviour > IInteractable > Interactable > script, where:

An interaction script should feel fairly familiar to anyone who's made a monobehaviour script:

        /// <summary>
    /// An example of an object which can be interacted with. <br/>
    /// Shows a dialog when interacted with.
    /// </summary>
    public class OBJ : Interactable
    {
        public override void onInteract()
        {
            Debug.Log("Object was interacted with.");
            TempDialogue.ShowMessage("Object was interacted with");
        }
    }

The testing environment now has an intractable script on a testing object and NPC which show a temporary dialog box.

https://user-images.githubusercontent.com/50697488/104861038-1754e100-5926-11eb-817c-32bdbed5c9e2.mov

jdngray77 commented 3 years ago

That's a spicy conflict, i'll see if i have time to look at it tomorrow.

jdngray77 commented 3 years ago

Conflicts resolved