Exemplo n.º 1
0
    void Update()
    {
        if (is_on)
        {
            float game_speed  = GameData.Get().game_time_mult;
            float hour_to_sec = game_speed / 3600f;
            fuel -= hour_to_sec * Time.deltaTime;

            PlayerData.Get().SetUniqueID(GetFireUID(), Mathf.RoundToInt(fuel));
        }

        is_on = fuel > 0f;
        fire_fx.SetActive(is_on);

        if (is_on)
        {
            select.AddGroup(fire_group);
        }
        else
        {
            select.RemoveGroup(fire_group);
        }
    }