// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Utils { /// /// Provides access to the system's power status. /// Currently implemented on iOS and Android only. /// public abstract class PowerStatus { /// /// The maximum battery level considered as low, from 0 to 1. /// public virtual double BatteryCutoff { get; } = 0; /// /// The charge level of the battery, from 0 to 1. /// public virtual double ChargeLevel { get; } = 0; public virtual bool IsCharging { get; } = false; /// /// Returns true if = false and <= . /// public bool IsLowBattery => !IsCharging && ChargeLevel <= BatteryCutoff; } }