void HandleButton(string key, ClickedHack obj) { switch (key) { case "back_button": BackButton(); break; case "inventory_button": InventoryButton(); break; case "look_button": StartDialog(); break; case "screen": Continue(); break; default: break; } if (obj.objectIdentifier == "item") { targetItem = obj.transform.localPosition + Vector3.forward * CAM_CLOSENESS; DisableUIOnAnim(.8f); DisableUIWhileAnimation(ANIMATION_PAUSE_TO_ITEM); focusedItem = obj.idString; extra = obj.objectIdentifier; ChangeState(TypeSequence.ON_ITEM, false); } }
void HandleInv2Button(string key, ClickedHack obj) { if (focusedItem == "oso") { if (prevKey == "button" && key == "stringstring") { speechControl.Start(Events.fixBear); } } if (focusedItem == "caja_musica") { if (prevKey == "ballerina" && key == "winder") { speechControl.Start(Events.fixBox); } else if (prevKey == "winder" && key == "ballerina") { speechControl.Start(Events.fixBox); } } if (focusedItem == "retrato") { if (prevKey == "photo1" && key == "photo2") { speechControl.Start(Events.pictureButtonFinale); } else if (prevKey == "photo2" && key == "photo1") { speechControl.Start(Events.pictureButtonFinale); } } ChangeState(TypeSequence.DIALOG, inventoryButtonInOnItemView); }
public void ClickedData(string objectN, TypeOfTarget type, ClickedHack obj) { if (data.disableControls) { return; } }
public void ClickedData(string objectN, TypeOfTarget type, ClickedHack obj) { if (disableUI) { return; } print(objectN); switch (type) { case TypeOfTarget.FIXER: if (currentState != TypeSequence.ITEM_SEARCH) { break; } targetItem = obj.transform.localPosition + Vector3.forward * CAM_CLOSENESS; ChangeState(TypeSequence.ON_ITEM, true); DisableUIOnAnim(.8f); DisableUIWhileAnimation(ANIMATION_PAUSE_TO_ITEM); focusedItem = obj.objectIdentifier; break; case TypeOfTarget.ITEM: case TypeOfTarget.UI: HandleButton(objectN, obj); break; case TypeOfTarget.UI_INVENTORY: if (inventoryLayer == 0) { HandleInvButton(objectN, obj); } else { HandleInv2Button(objectN, obj); } break; default: break; } }
void HandleInvButton(string key, ClickedHack obj) { inventoryLayer = 0; prevKey = key; switch (focusedItem) { case "oso": switch (key) { case "button": speechControl.Start(Events.bearButton); inventoryLayer = 1; break; case "stringstring": speechControl.Start(Events.bearButtonThread); inventoryLayer = 1; break; default: speechControl.Start(Events.bearButtonPhotos); break; } break; case "caja_musica": switch (key) { case "winder": speechControl.Start(Events.boxButtonWinder); inventoryLayer = 1; break; case "ballerina": speechControl.Start(Events.boxButtonBall); inventoryLayer = 1; break; } break; case "retrato": switch (key) { case "photo1": speechControl.Start(Events.pictureButtonP2); inventoryLayer = 1; break; case "photo2": speechControl.Start(Events.pictureButtonP1); inventoryLayer = 1; break; } break; default: //speechControl.Start(Events.what); //FLAVOR TEXTS speechControl.Start(Events.time); switch (key) { case "button": inventoryLayer = 1; break; } break; } ChangeState(TypeSequence.DIALOG, inventoryButtonInOnItemView); }