示例#1
0
        private void Initialize()
        {
            SpellIndicators  = GetComponentsInChildren <SpellIndicator>();
            StatusIndicators = GetComponentsInChildren <StatusIndicator>();
            RangeIndicators  = GetComponentsInChildren <RangeIndicator>();

            SpellIndicators.ToList().ForEach(x => InitializeSplat(x));
            StatusIndicators.ToList().ForEach(x => InitializeSplat(x));
            RangeIndicators.ToList().ForEach(x => InitializeSplat(x));
        }
示例#2
0
    void OnEnable()
    {
        // Create a list of all the splats available to the manager
        SpellIndicators = GetComponentsInChildren <SpellIndicator>();

        RangeIndicators = GetComponentsInChildren <RangeIndicator>();

        // Make sure each Splat has a reference to its Manager
        SpellIndicators.ToList().ForEach(x => x.Manager = this);

        RangeIndicators.ToList().ForEach(x => x.Manager = this);

        // Initialize the Splats
        SpellIndicators.ToList().ForEach(x => x.Initialize());

        RangeIndicators.ToList().ForEach(x => x.Initialize());

        // Make all Splats invisible to start with
        SpellIndicators.ToList().ForEach(x => x.gameObject.SetActive(false));
        RangeIndicators.ToList().ForEach(x => x.gameObject.SetActive(false));
    }