Exemple #1
0
        public WithCrateBody(Actor self, WithCrateBodyInfo info)
        {
            this.self = self;
            var rs     = self.Trait <RenderSprites>();
            var images = info.XmasImages.Any() && DateTime.Today.Month == 12 ? info.XmasImages : info.Images;

            anim = new Animation(self.World, images.Random(Game.CosmeticRandom));
            anim.Play("idle");
            rs.Add("crate", anim);
        }
Exemple #2
0
        public WithCrateBody(Actor self, WithCrateBodyInfo info)
        {
            this.self = self;
            this.info = info;

            var rs     = self.Trait <RenderSprites>();
            var image  = rs.GetImage(self);
            var images = info.XmasImages.Any() && DateTime.Today.Month == 12 ? info.XmasImages : new[] { image };

            anim = new Animation(self.World, images.Random(Game.CosmeticRandom));
            anim.Play(info.IdleSequence);
            rs.Add(anim);
        }