// Update is called once per frame void Update() { if (mPhase == -1) { return; } mSpR.sprite = mSps[mPhase]; if (mPhase == 3) { mItemsBox.MoveItemIn(mPart1); mItemsBox.MoveItemIn(mPart2); mPhase = -1; return; } if (mPhase == 2 && Common.Utils.ClickedOn(this.gameObject)) { mPhase = 3; //mRelatedSceneObj.GetComponent<SceneObj>().QuizResolved(); } if (mPhase < 2) { mPhase = this.transform.childCount; } }
// Update is called once per frame void Update() { if (mSpEnd2 != null) { if (mPhase == 0 && Common.Utils.ClickedOn(mArea)) { mSpR.sprite = mSpEnd; mPhase++; } else if (mPhase == 1 && Common.Utils.ClickedOn(mArea)) { mPhase++; mSpR.sprite = mSpEnd2; itemsBox.MoveItemIn(mItemBounus); mRestoreMask = Common.Utils.GetActiveLayer(); //Common.Utils.SetActiveLayer("Nothing"); Invoke("SeldDeactive", 1); } } else { if (!isGaved && Common.Utils.ClickedOn(mArea)) { isGaved = true; mSpR.sprite = mSpEnd; itemsBox.MoveItemIn(mItemBounus); mRestoreMask = Common.Utils.GetActiveLayer(); //Common.Utils.SetActiveLayer("Nothing"); Invoke("SeldDeactive", 1); } } }
// Update is called once per frame void Update() { if (!isGaved && Common.Utils.ClickedOn(this.gameObject)) { isGaved = true; if (mItemBounus != null) { itemsBox.MoveItemIn(mItemBounus); } if (mItemBounus2 != null) { itemsBox.MoveItemIn(mItemBounus2); } } }
// Update is called once per frame void Update() { var inventory = this.GetComponent <QuizReception>().GetItems(); if (mPhase == 1 && inventory.Count > 0) { if (itemsBox.ContainsCloneOf("ItemIdCard")) { mPhase++; FindObjectOfType <ComputerSwitch>().QuizResolved(); inventory.Clear(); } else { itemsBox.MoveItemIn(inventory[0]); inventory.Clear(); } } if (mPhase == 0 && itemsBox.ContainsCloneOf("ItemIdCard")) { mPhase++; } this.GetComponent <SpriteRenderer>().sprite = mSps[mPhase]; }
// Update is called once per frame void Update() { var inventory = quizReception.GetItems(); // first a coin if (cntReceived == 0 && inventory.Count > 0) { cntReceived++; itemsBox.MoveItemIn(mPieceBonus); quizReception.GetRefuse().Add(inventory[0]); quizReception.RemoveItem(inventory[0]); } else if (inventory.Count > 0) { itemsBox.MoveItemIn(inventory[0]); quizReception.RemoveItem(inventory[0]); } }
// Update is called once per frame void Update() { if (quizReception.GetItems().Count > 0) { //cntReceived++; itemsBox.MoveItemIn(quizReception.GetItems()[0]); quizReception.RemoveItem(quizReception.GetItems()[0]); } }
// Update is called once per frame void Update() { var inventory = quizReception.GetItems(); if (cntReceived < 2 && inventory.Count > 0) { if (inventory[0].name.IndexOf("Coin") > 0) { cntReceived++; if (mPieceBonus != null) { itemsBox.MoveItemIn(mPieceBonus); } quizReception.GetRefuse().Add(inventory[0]); inventory.Clear(); } else if (inventory[0].name.IndexOf("Booze") > 0) { mShowName[0].SetActive(false); mShowName[1].SetActive(true); cntReceived++; itemsBox.MoveItemIn(mAgreementBonus); quizReception.GetRefuse().Add(inventory[0]); inventory.Clear(); } else { itemsBox.MoveItemIn(inventory[0]); inventory.Clear(); } } if (cntReceived >= 2 && inventory.Count > 0) { itemsBox.MoveItemIn(inventory[0]); inventory.Clear(); } }
// Update is called once per frame void Update() { if (mStRed == STATE.CAN_GIVE || mStGreen == STATE.CAN_GIVE) { if (mStGreen == STATE.CAN_GIVE && Common.Utils.ClickedOn(this.gameObject)) { mStGreen = STATE.GAVE; this.GetComponent <SpriteRenderer>().sprite = mSpVide; mItemsBox.MoveItemIn(mLiguidGreen); } if (mStRed == STATE.CAN_GIVE && Common.Utils.ClickedOn(this.gameObject)) { mStRed = STATE.GAVE; this.GetComponent <SpriteRenderer>().sprite = mSpVide; mItemsBox.MoveItemIn(mLiguidRed); } return; } foreach (var it in mQuizReception.GetItems()) { if (mStGreen == STATE.HAS && Common.Utils.TrimClone(it.name) == mLiguidGreen.name) { mStGreen = STATE.CAN_GIVE; this.GetComponent <SpriteRenderer>().sprite = mSpGreen; mQuizReception.RemoveItem(it); return; } if (mStRed == STATE.HAS && Common.Utils.TrimClone(it.name) == mLiguidRed.name) { mStRed = STATE.CAN_GIVE; this.GetComponent <SpriteRenderer>().sprite = mSpRed; mQuizReception.RemoveItem(it); return; } } }