diff --git a/assets/Data/tutorial/hints.json b/assets/Data/tutorial/hints.json index 0b6c2860..fda2912b 100644 --- a/assets/Data/tutorial/hints.json +++ b/assets/Data/tutorial/hints.json @@ -5,6 +5,18 @@ "titleString": "Navigation", "descriptionString": "You can move the mouse to move the camera around. Also, you can use the W, A, S, and D keys to move your character.", "image": "" + }, + { + "id": "GrabbingItems", + "titleString": "Items", + "descriptionString": "Using the interact key will pick up items if they are currently targeted. You can then access the items by opening the inventory (I) and the character screen (C).", + "image": "" + }, + { + "id": "EquippingItems", + "titleString": "Equipment", + "descriptionString": "Once items are equipped to the player, you may use left click and right click to perform their functions.", + "image": "" } ] } \ No newline at end of file diff --git a/assets/Scenes/defaultLevel_2/scene.ts b/assets/Scenes/defaultLevel_2/scene.ts index 92fc1e26..f1095b04 100644 --- a/assets/Scenes/defaultLevel_2/scene.ts +++ b/assets/Scenes/defaultLevel_2/scene.ts @@ -27,8 +27,15 @@ class TestScene1 extends Scene { { signal: "equipItem", callback: (entityId: number) => { - // console.log("Item equipped to entity " + entityId) - // engine.classes.simulation.static.setFramestep(0) + // throw tutorial message + engine.classes.simulation.static.setFramestep(0) + engine.classes.tutorialUtils.static.showTutorialHint( + "EquippingItems", + true, + () => { + engine.classes.simulation.static.setFramestep(2) + } + ) } }, @@ -48,10 +55,10 @@ class TestScene1 extends Scene { { signal: "itemPickup", callback: (entityId: number, inWorldItemEntityId: number, inInventoryItemEntityId: number) => { - // console.log(entityId + ' picked up an item, destroying ' + inWorldItemEntityId + ' and creating ' + inInventoryItemEntityId) + // throw tutorial message engine.classes.simulation.static.setFramestep(0) engine.classes.tutorialUtils.static.showTutorialHint( - "BasicNavigation", + "GrabbingItems", true, () => { engine.classes.simulation.static.setFramestep(2) diff --git a/docs/src/progress/currenttarget.md b/docs/src/progress/currenttarget.md index 6bece1da..b600109c 100644 --- a/docs/src/progress/currenttarget.md +++ b/docs/src/progress/currenttarget.md @@ -1,8 +1,6 @@ + spawn into the world + there is a sword lying on the ground + when you grab the sword, a tutorial popup appears to tell you how to use in - Make tutorial popup prettier - Prevent tutorial popup opening firing twice + on clearing the tutorial, continue the game+ when the sword is equipped, create another popup to teach sword controls. it pauses the game + when popup is accepted, spawn an enemy with an effect enemy ai