public static float EnterCooldownHoursLeft(this MapParent worldObject)
        {
            EnterCooldownComp component = worldObject.GetComponent <EnterCooldownComp>();

            if (component == null)
            {
                return(0f);
            }
            return(component.DaysLeft * 24f);
        }
示例#2
0
        public static bool EnterCooldownBlocksEntering(this MapParent worldObject)
        {
            EnterCooldownComp component = worldObject.GetComponent <EnterCooldownComp>();

            return(component != null && component.BlocksEntering);
        }
示例#3
0
        public static float EnterCooldownDaysLeft(this MapParent worldObject)
        {
            EnterCooldownComp component = worldObject.GetComponent <EnterCooldownComp>();

            return((component == null) ? 0f : component.DaysLeft);
        }
        public static int EnterCooldownTicksLeft(this MapParent worldObject)
        {
            EnterCooldownComp component = worldObject.GetComponent <EnterCooldownComp>();

            return(Mathf.CeilToInt((component != null) ? (component.DaysLeft * 60000f) : 0f));
        }