public static IEnumerator WakeUpHospital()
    {
        GameTime.Clock.ResetSpeed();
        yield return(new WaitForSecondsRealtime(2));

        player.GetComponent <Animator>().enabled = true;
        Stats.Status(Type.Hunger).Set(float.MaxValue);
        Stats.Status(Type.Energy).Set(float.MaxValue);
        Stats.Status(Type.Health).Set(float.MaxValue);
        Stats.Status(Type.Mood).Set(float.MaxValue);
        Stats.Status(Type.Bladder).Set(100);
        Stats.Status(Type.Hunger).Set(100);
        Stats.Status(Type.Hygiene).Set(100);

        Vector3 tempRotation = new Vector3(0, 0, 0);

        player.transform.rotation = Quaternion.Euler(tempRotation);

        Stats.GetMoney(HospitalFee);

        passedOut = false;
        player.transform.position = new Vector2(HospitalRespawnPoint.position.x, HospitalRespawnPoint.position.y);
        blackScreen.CrossFadeAlpha(0, 2, false);
        cantMove = false;
        CameraFollow.Instance.ResetCamera();

        player.GetComponent <Animator>().SetBool("PassOut", false);

        yield break;
    }
        public void CheckOut()
        {
            if (basket.Empty)
            {
                return;
            }

            if (Stats.Money < basket.TotalCost)
            {
                GameLibOfMethods.CreateFloatingText("Not enough money", 2);
                return;
            }

            if (!Inventory.PlaceOnBag(basket.Itemlist))
            {
                GameLibOfMethods.CreateFloatingText("Not enough space in inventory", 2);
                return;
            }

            Stats.GetMoney(basket.TotalCost);
            Stats.AddXP(Type.Charisma, basket.TotalCost * 0.2f);

            ClearBasketItems();

            Inventory.SetBagItemActions(ItemActionOnShopping);
        }
    public static IEnumerator <float> WakeUpHospital()
    {
        GameTime.Clock.ResetSpeed();
        GameLibOfMethods.blackScreen.CrossFadeAlpha(1, 0.5f, false);
        yield return(MEC.Timing.WaitForSeconds(2));

        var player = GameLibOfMethods.player;

        player.GetComponent <Animator>().enabled = true;


        foreach (PlayerStats.Status.Type type in Stats.PlayerStatus.Keys)
        {
            Stats.Add(type, float.MaxValue); //FULL HEAL
        }
        // can be in stead of

        player.transform.rotation = Quaternion.Euler(0, 0, 0);

        Stats.GetMoney(GameLibOfMethods.HospitalFee);

        GameLibOfMethods.passedOut = false;
        Vector3 SpawnPosition = GameLibOfMethods.HospitalRespawnPoint.position;

        SpawnPosition.z = player.transform.position.z;

        player.transform.position = SpawnPosition;

        GameLibOfMethods.blackScreen.CrossFadeAlpha(0, 2, false);
        GameLibOfMethods.cantMove = false;
        CameraFollow.Instance.ResetCamera();

        PlayerAnimationHelper.ResetPlayer();
    }
Exemple #4
0
    public void Deposit()
    {
        int inputInt = int.Parse(InputField.text);

        if (inputInt > Stats.Money)
        {
            GameLibOfMethods.CreateFloatingText("Not enough money!", 3);
            return;
        }
        Stats.GetMoney(inputInt);
        MoneyInBank += inputInt;
        UpdateBalance();
    }
        public void CheckOut()
        {
            if (basket.Empty)
            {
                return;
            }

            if (Stats.Money < basket.TotalCost)
            {
                GameLibOfMethods.CreateFloatingText("Not enough money", 2);
                return;
            }

            Stats.GetMoney(basket.TotalCost);
            Stats.AddXP(Type.Charisma, basket.TotalCost * 0.2f);

            ExecuteUpgrades();

            Shop.CloseUpgradeShop();
        }