Example #1
0
 public void clickOnPowerCircle()
 {
     fader._wa_fadeOut(this);
     this.isWaitingForActionToComplete = true;
     clickedItem = UIInventoryClickItem.powerCircle;
     levelRef.storeStringValue("ReturnLocation", levelRef.locationName);
     levelRef.storeStringValue("ReentryCondition", "Inventory");
     levelRef.storeIntValue("InventoryLevel", 0);
     levelRef.storePlayerCoordinates();
     //levelRef.storePhysicalCameraPosition ();
 }
Example #2
0
    public void reenter()
    {
        this.GetComponent <Animator> ().SetTrigger("InventoryReentry");
        //this.GetComponent<Animator> ().SetBool ("InventoryOpen", true);
        targetY = y = showingY;
        Vector3 newPos = this.transform.localPosition;

        newPos.y = y;
        this.transform.localPosition = newPos;
        isOpen = true;
        delay  = 0.0f;
        uiInvRef.show();
        level.storeStringValue("ReentryCondition", "Inventory");

        level.storePlayerCoordinates();
    }
Example #3
0
    // Update is called once per frame
    new void Update()
    {
        if (state == HUDCrackGlassState.cracking)
        {
            elapsedTime += Time.deltaTime;
            if (elapsedTime > nextTimeToCrack)
            {
                elapsedTime     = 0.0f;
                nextTimeToCrack = FloatRandom.floatRandomRange(minTimeToCrack, maxTimeToCrack);
                if (frame < crackedGlass.Length - 1)
                {
                    ++frame;
                    theImage.sprite = crackedGlass [frame];
                    levelController.playSound(crackAudio [frame]);
                }
                else
                {
                    state = HUDCrackGlassState.cracked;
                }
            }
        }

        if (state == HUDCrackGlassState.cracked)
        {
        }

        if (state == HUDCrackGlassState.changingActivity)
        {
            --waitFrames;
            if (waitFrames == 0)
            {
                ds.storeStringValue("ReturnLocation", levelController.locationName);
                levelController.storeStringValue("CurrentLevel", levelController.locationName);
                levelController.storePlayerCoordinates();
                SceneManager.LoadScene("Scenes/QA");
            }
        }
    }