コード例 #1
0
        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();
        }
コード例 #2
0
        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);
                });
            }
        }