protected override void OnEnable()
    {
        base.OnEnable();
        _entityItems = new List<TransitionFxCategoryContainer>();
        _fxItems = new List<TransitionFxCategoryContainer>();


        _target = target as ObjectTransitionFx;

        // Get all quests and sort them based on the respective quest category attribute
        foreach (var a in TransitionFxTools.GetCategoryList())
        {
            switch (a.Attribute.Category)
            {
                case TransitionFxCategory.Entity:
                    _entityItems.Add(a);
                    break;
                case TransitionFxCategory.Fx:
                    _fxItems.Add(a);
                    break;
            }
        }
    }
Пример #2
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        _instantFX = Resources.Load<ObjectTransitionFx>(INSTANT_FX_PATH);
        if(_instantFX == null)
        {
            Debug.LogErrorFormat("Level meta info could not find instant fx check path {0}", INSTANT_FX_PATH);
        }
    }
 public void TriggerInitialise(ObjectTransitionFx owner)
 {
     Owner = owner;
     OnInitialise();
 }