/* #region BloomingTransitions * * IEnumerator BloomingToBudding() * { * GetAnimator(); * anim.SetInteger("BlinkState", 0); * yield return new WaitForSeconds(downgradeWaitTime1); * //GetAnimator(); * anim.SetInteger("BlinkState", 2); * yield return new WaitForSeconds(downgradeWaitTime2); * bloomState = BloomStates.Bud; * BloomStateOneFrameChecks(); * } * * IEnumerator BuddingTosSeedling() * { * GetAnimator(); * anim.SetInteger("BlinkState", 0); * yield return new WaitForSeconds(downgradeWaitTime1); * anim.SetInteger("BlinkState", 2); * yield return new WaitForSeconds(downgradeWaitTime2); * bloomState = BloomStates.Seed; * BloomStateOneFrameChecks(); * } * * IEnumerator SeedlingToPop() * { * yield return new WaitForSeconds(downgradeWaitTime1); * yield return new WaitForSeconds(downgradeWaitTime2); * //Death * } #endregion * * void BloomStateOneFrameChecks() * { * StopAllCoroutines(); * foreach (Collider2D collider in playerColliders) * { * collider.isTrigger = false; * } * * //_collider.isTrigger = false; * seedObject.SetActive(false); * budObject.SetActive(false); * bloomObject.SetActive(false); * switch (bloomState) * { * case BloomStates.Bloom: * bloomObject.SetActive(true); * StartCoroutine("BloomingToBudding"); * //anim.SetInteger("FlowerForm", 2); * * break; * case BloomStates.Bud: * budObject.SetActive(true); * StartCoroutine("BuddingTosSeedling"); * //anim.SetInteger("FlowerForm", 1); * //_collider.offset = new Vector2(1, .5f); * //_collider.transform.localScale = new Vector2(1, 2); * break; * case BloomStates.Seed: * seedObject.SetActive(true); * StartCoroutine("SeedlingToPop"); * //anim.SetInteger("FlowerForm", 0); * //_collider.offset = SeedColliderOffset; * //_collider.transform.localScale = seedColliderHeight; * break; * case BloomStates.Misc: * break; * default: * break; * } * } */ /* * void RepairPoppy() * { * switch (bloomState) * { * case BloomStates.Bloom: * bloomState = BloomStates.Bloom; * break; * case BloomStates.Bud: * bloomState = BloomStates.Bloom; * break; * case BloomStates.Seed: * bloomState = BloomStates.Bud; * break; * case BloomStates.Misc: * break; * default: * break; * } * * BloomStateOneFrameChecks(); * } */ /* * void DebugFlowerState() * { * if (Input.GetKeyDown(KeyCode.Alpha1)) * { * bloomState = BloomStates.Seed; * BloomStateOneFrameChecks(); * } * else if (Input.GetKeyDown(KeyCode.Alpha2)) * { * bloomState = BloomStates.Bud; * BloomStateOneFrameChecks(); * } * else if (Input.GetKeyDown(KeyCode.Alpha3)) * { * bloomState = BloomStates.Bloom; * BloomStateOneFrameChecks(); * } * * if (Input.GetKeyDown(KeyCode.O)) * { * Death(); * } * } */ void Death() { foreach (WaterField item in waterCollection) { item.gameObject.SetActive(true); } foreach (LockedDoor item in doorCollection) { item.isOpen = false; anim.SetBool("doorOpen", false); } foreach (Key item in keyCollection) { item.gameObject.SetActive(true); } playerSpawner.PopPlayer(); }