/// Loads any required ressources for this components /// animation and projectile as well as for its children public void load(ContentManager content) { if (AnimationAsset != null) { AnimationAsset.load(content); } if (ProjectileAsset != null) { ProjectileAsset.load(content); } if (EffectAsset != null) { EffectAsset.load(content); } if (ExecutionSoundFile != null) { ExecutionSound = content.Load <SoundEffect>(ExecutionSoundFile); } if (Animation != null) { Animation.load(content); } if (UserAnimation != null) { UserAnimation.load(content); // TODO check why this load is necessary when loading a save game } if (Projectile != null) { Projectile.load(content); } if (Effect != null) { Effect.load(content); } Creature user; if ((user = Ability.User as Creature) != null) { if (UserAnimations.ContainsKey(user.Name)) { UserAnimations[user.Name].load(content); UserAnimation = UserAnimations[user.Name].Object as SpriteAnimation; } } Children.ForEach(child => { child.Parent = this; child.load(content); }); }
public UserAnimationPage() { InitializeComponent(); Animation = new UserAnimation(); }