void OnPropertyChange(MadLevelProperty property)
 {
     if (property.specialType == MadLevelProperty.SpecialType.Completed)
     {
         UnlockOnComplete();
     }
 }
    // ===========================================================
    // Methods for/from SuperClass/Interfaces
    // ===========================================================

    // ===========================================================
    // Methods
    // ===========================================================

    void OnEnable() {
        property = target as MadLevelProperty;

        showWhenEnabled = serializedObject.FindProperty("showWhenEnabled");
        showWhenDisabled = serializedObject.FindProperty("showWhenDisabled");
        textFromProperty = serializedObject.FindProperty("textFromProperty");
        textPropertyName = serializedObject.FindProperty("textPropertyName");
    }
    // ===========================================================
    // Methods for/from SuperClass/Interfaces
    // ===========================================================

    // ===========================================================
    // Methods
    // ===========================================================

    void OnEnable()
    {
        property = target as MadLevelProperty;

        showWhenEnabled  = serializedObject.FindProperty("showWhenEnabled");
        showWhenDisabled = serializedObject.FindProperty("showWhenDisabled");
        textFromProperty = serializedObject.FindProperty("textFromProperty");
        textPropertyName = serializedObject.FindProperty("textPropertyName");
    }
    public MadLevelProperty.SpecialType TypeFor(MadLevelProperty property)
    {
        if (property == completedProperty)
        {
            return(MadLevelProperty.SpecialType.Completed);
        }

        if (property == lockedProperty)
        {
            return(MadLevelProperty.SpecialType.Locked);
        }

        if (property.gameObject == levelNumber.gameObject)   // comparing game object because of type differences
        {
            return(MadLevelProperty.SpecialType.LevelNumber);
        }

        return(MadLevelProperty.SpecialType.Regular);
    }
Exemple #5
0
    // ===========================================================
    // Methods
    // ===========================================================

    public MadLevelProperty.SpecialType TypeFor(MadLevelProperty property)
    {
        if (property == completedProperty)
        {
            return(MadLevelProperty.SpecialType.Completed);
        }

        if (property == lockedProperty)
        {
            return(MadLevelProperty.SpecialType.Locked);
        }

        if (property == levelNumber)
        {
            return(MadLevelProperty.SpecialType.LevelNumber);
        }

        return(MadLevelProperty.SpecialType.Regular);
    }
 void OnPropertyChange(MadLevelProperty property) {
     if (property.specialType == MadLevelProperty.SpecialType.Completed) {
         UnlockOnComplete();
     }
 }
    public MadLevelProperty.SpecialType TypeFor(MadLevelProperty property) {
        if (property == completedProperty) {
            return MadLevelProperty.SpecialType.Completed;
        }
        
        if (property == lockedProperty) {
            return MadLevelProperty.SpecialType.Locked;
        }

        if (property.gameObject == levelNumber.gameObject) { // comparing game object because of type differences
            return MadLevelProperty.SpecialType.LevelNumber;
        }
        
        return MadLevelProperty.SpecialType.Regular;
    }