2using System.Collections.Generic;
4using System.Reflection;
5using System.Diagnostics;
6using System.Runtime.CompilerServices;
10using Microsoft.Xna.Framework;
11using Microsoft.Xna.Framework.Input;
12using Microsoft.Xna.Framework.Graphics;
20 public partial class CUIComponent : IDisposable
22 private void SetupAnimations()
24 Animations =
new Indexer<string, CUIAnimation>(
25 (key) => animations.GetValueOrDefault(key),
26 (key, value) => AddAnimation(key, value)
29 private Dictionary<string, CUIAnimation> animations =
new();
30 public Indexer<string, CUIAnimation> Animations;
31 public void AddAnimation(
string name, CUIAnimation animation)
33 animation.Target =
this;
34 animations[name] = animation;
37 public void BlockChildrenAnimations()
39 foreach (CUIComponent child
in Children)
41 foreach (CUIAnimation animation
in child.animations.Values)
44 animation.Blocked =
true;
46 child.BlockChildrenAnimations();