Пример #1
0
    public static FriendShipCondition CreateConditionCollection()
    {
        FriendShipCondition newConditionCollection = CreateInstance <FriendShipCondition>();

        newConditionCollection.description     = "New condition collection";
        newConditionCollection.addCondition    = new Condition[1];
        newConditionCollection.addCondition[0] = ConditionEditor.CreateCondition();
        return(newConditionCollection);
    }
Пример #2
0
    private void OnEnable()
    {
        friendShipCondition = (FriendShipCondition)target;

        if (target == null)
        {
            DestroyImmediate(this);
            Debug.Log("Destroy");
            return;
        }

        descriptionProperty     = serializedObject.FindProperty(descriptionPropertyName);
        requireFriendlyProperty = serializedObject.FindProperty(requireFriendlyPropertyName);
        addConditionProperty    = serializedObject.FindProperty(addConditionPropertyName);

        CheckAndCreateSubEditors(friendShipCondition.addCondition);
    }