Exemplo n.º 1
0
#pragma warning restore CS0649 // varriable is never assigned to and will always have it's default value

    private void OnValidate()
    {
        if (Application.isEditor)
        {
            InitializeFromRangedAttack();

            if (enemyListMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;

                //IMPORTNANT STEP!!!
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref enemyListMBDO);
            }

            if (playerTransformMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;

                //IMPORTNANT STEP!!!
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO);
            }

            if (entityLogic == null)
            {
                entityLogic = GetComponent <Entity_Logic>();

#if UNITY_EDITOR
                UnityEditor.EditorUtility.SetDirty(this);
#endif
            }
        }
    }
Exemplo n.º 2
0
    private void Reset()
    {
        if (Application.isEditor)
        {
            if (crossSceneSceneDataSO == null)
            {
#if UNITY_EDITOR
                crossSceneSceneDataSO = AssetManagement.FindAssetByType <CrossSceneSceneDataSO>();

                UnityEditor.EditorUtility.SetDirty(this);
#endif
            }
            if (playerTransformMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;

                //IMPORTNANT STEP!!!
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO);
#if UNITY_EDITOR
                UnityEditor.EditorUtility.SetDirty(this);
#endif
            }
        }
    }
Exemplo n.º 3
0
    private void OnValidate()
    {
        if (Application.isEditor)
        {
            spriteRenderers = GetComponentsInChildren <SpriteRenderer>();
            SpriteRenderer tmp = GetComponent <SpriteRenderer>();
            if (tmp != null)
            {
                spriteRenderers.Append(tmp);
            }

            childTransforms = GetComponentsInChildren <Transform>();

            if (crossSceneSceneDataSO == null)
            {
#if UNITY_EDITOR
                crossSceneSceneDataSO = AssetManagement.FindAssetByType <CrossSceneSceneDataSO>();
#endif
            }

            if (playerTransformMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;

                //IMPORTNANT STEP!!!
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO);
            }
#if UNITY_EDITOR
            UnityEditor.EditorUtility.SetDirty(this);
#endif
        }
    }
Exemplo n.º 4
0
    private void Reset()
    {
        if (Application.isEditor)
        {
            if (playerTransformMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;

                //IMPORTNANT STEP!!!
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO);
            }
        }
    }
Exemplo n.º 5
0
#pragma warning restore CS0649
    private void OnValidate()
    {
        if (Application.isEditor)
        {
            if (keyListMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref keyListMBDO);
#if UNITY_EDITOR
                UnityEditor.EditorUtility.SetDirty(this);
#endif
            }
        }
    }
Exemplo n.º 6
0
#pragma warning restore CS0649

    private void OnValidate()
    {
#if UNITY_EDITOR
        if (Application.isEditor)
        {
            if (enemyListMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;

                //IMPORTNANT STEP!!!
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref enemyListMBDO);
            }

            UnityEditor.EditorUtility.SetDirty(this);
        }
#endif
    }
Exemplo n.º 7
0
#pragma warning restore CS0649 // varriable is never assigned to and will always have it's default value
    private void OnValidate()
    {
        if (Application.isEditor)
        {
            if (playerTransformMBDO == null)
            {
                MBDOInitializationHelper mBDOInitializationHelper = default;

                //IMPORTNANT STEP!!!
                mBDOInitializationHelper.SetupCardinalSubSystem(this);
                mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO);

#if UNITY_EDITOR
                UnityEditor.EditorUtility.SetDirty(this);
#endif
            }
        }
    }