private void OnValidate()
        {
            StatusValidation status = GetComponent <StatusValidation>();

            status.AddCondition(() => controller != null, "controller is null");
            status.UpdateStatus();
        }
Ejemplo n.º 2
0
        private void OnValidate()
        {
            StatusValidation status = GetComponent <StatusValidation>();

            status.ClearConditions();
            status.AddCondition(() => transform.childCount == 6, "requires 6 children");
            status.UpdateStatus();
        }
Ejemplo n.º 3
0
        private void OnValidate()
        {
            StatusValidation status = GetComponent <StatusValidation>();

            status.ClearConditions();
            status.AddCondition(() => transform.childCount > 0);
            status.AddCondition(() => transform.GetChild(0).GetComponent <TextMeshProUGUI>() != null);
            status.UpdateStatus();
        }
Ejemplo n.º 4
0
        private void OnValidate()
        {
            StatusValidation status = GetComponent <StatusValidation>();

            status.ClearConditions();
            status.AddCondition(() => background != null, "background is null");
            status.AddCondition(() => roomPrefabs.Length > 0, "no rooms specified");
            status.AddCondition(() => {
                foreach (Transform prefab in roomPrefabs)
                {
                    if (prefab == null)
                    {
                        return(false);
                    }
                }
                return(true);
            }, "specified rooms are null");
            status.UpdateStatus();
        }