예제 #1
0
    public void AdvanceDemo()
    {
        switch (currentAppState)
        {
        case AppState.DemoStepInit:
            HideButton();
            arTapToPlace.EnableIndicator(true);
            arTapToPlace.objectToPlace = keyPrefab;
            currentAppState            = AppState.DemoStepPlaceKey;
            break;

        case AppState.DemoStepPlaceKey:
            arTapToPlace.objectToPlace = shovelPrefab;
            currentAppState            = AppState.DemoStepPlaceShovel;
            break;

        case AppState.DemoStepPlaceShovel:
            arTapToPlace.objectToPlace = chestPrefab;
            currentAppState            = AppState.DemoStepPlaceChest;
            break;

        case AppState.DemoStepPlaceChest:
            arTapToPlace.EnableIndicator(false);
            HideObjects();
            ShowButton();
            ChestManager chestManager = FindObjectOfType <ChestManager>();
            chestManager.placing = false;
            currentAppState      = AppState.DemoStepConfirmPlacement;
            break;

        case AppState.DemoStepConfirmPlacement:
            HideButton();
            ShowInventory();
            searching = true;
            arTapToPlace.EnableSelect(true);
            InventoryManager inventoryManager = FindObjectOfType <InventoryManager>();
            inventoryManager.SearchBegins();
            currentAppState = AppState.DemoStepSearching;
            break;

        case AppState.DemoStepSearching:
            ShowButton();
            HideInventory();
            searching = false;
            arTapToPlace.EnableSelect(false);
            currentAppState = AppState.DemoStepFoundAllItems;
            break;

        case AppState.DemoStepFoundAllItems:
            HideButton();
            readyToOpenChest = true;
            DisablePlaneColliders();
            currentAppState = AppState.DemoStepComplete;
            break;

        case AppState.DemoStepComplete:
            break;

        default:
            Debug.Log("Error, got into a bad state " + currentAppState.ToString());
            break;
        }
    }
예제 #2
0
 public void defaultToLabel()
 {
     HideSideMenu();
     SetActiveCanvas(labelUICanvas);
     arTapManager.EnableIndicator(true);
 }