Exemple #1
0
        public WithMakeAnimation(ActorInitializer init, WithMakeAnimationInfo info)
        {
            this.info = info;
            var self = init.Self;

            renderBuilding = self.Trait <RenderBuilding>();

            var building = self.Trait <Building>();

            if (!building.SkipMakeAnimation)
            {
                renderBuilding.PlayCustomAnimThen(self, info.Sequence, () =>
                {
                    building.NotifyBuildingComplete(self);
                });
            }
        }
Exemple #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);
                });
            }
        }