Ejemplo n.º 1
0
        public DeathConfetti()
        {
            AutoDestruct = new AutoDestructComponent(this)
            {
                DestructionDelay = TimeSpan.FromSeconds(1.0f),
            };

            ParticleEmitter = new ParticleEmitterComponent(this)
            {
                Emitter = new ParticleEmitter
                {
                    MaxNumParticles = 64,
                    Colors          = Global.AllConfettiColors,
                },

                AdditionalTextures = new[]
                {
                    "confetti/confetti_01",
                    "confetti/confetti_02",
                    "confetti/confetti_03",
                    "confetti/confetti_04",
                    "confetti/confetti_05",
                    "confetti/confetti_06",
                    "confetti/confetti_07",
                },
            };
        }
Ejemplo n.º 2
0
        public Projectile()
        {
            BodyComponent = new BodyComponent(this)
            {
                InitMode = BodyComponentInitMode.Manual,
            };
            this.RootComponent = BodyComponent;

            Animation = new SpriteAnimationComponent(this)
            {
                AnimationTypes = new List <SpriteAnimationType>
                {
                    SpriteAnimationType.Bonbon_Red,
                },
            };
            Animation.Spatial.Rotation.Degrees -= 40.0f;
            Animation.AttachTo(BodyComponent);

            AutoDestruct = new AutoDestructComponent(this);
        }