Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        if (Time.time > processTime)
        {
            processTime += processTimeInc;

            if (inSafeRoom)
            {
                ChangeEnergy(energyGainRate);
            }
            else
            {
                ChangeEnergy(energyLossRate);
            }

            if (!currentRoom.isHaunted)
            {
                currentRoom.ChangeHaunting(hauntRate);
            }
        }
    }