コード例 #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
ファイル: SplatManager.cs プロジェクト: ccLemontea/Gradution
    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));
    }
コード例 #3
0
 /// <summary>
 /// Return the Range Indicator given by name.
 /// </summary>
 public RangeIndicator GetRangeIndicator(string splatName)
 {
     return(RangeIndicators.Where(x => x.name == splatName).FirstOrDefault());
 }