public WithMakeAnimation(ActorInitializer init, WithMakeAnimationInfo info) { this.info = info; var self = init.Self; wsbs = self.TraitsImplementing <WithSpriteBody>().Where(w => info.BodyNames.Contains(w.Info.Name)).ToArray(); }
public WithMakeAnimation(ActorInitializer init, WithMakeAnimationInfo info) { this.info = info; var self = init.Self; wsb = self.Trait <WithSpriteBody>(); var building = self.TraitOrDefault <Building>(); if (building != null && !building.SkipMakeAnimation) { wsb.PlayCustomAnimation(self, info.Sequence, () => { building.NotifyBuildingComplete(self); }); } }