Ejemplo n.º 1
0
        void SetExplode(Explode boom, Vector3 position)
        {
            float   rad   = Helper.RandomMinMax(0.1f, 1);
            int     mc    = Helper.RandomMinMax(6, 10);
            float   speed = Helper.RandomMinMax(10, 50);
            Vector3 color = new Vector3(Helper.RandomMinMax(0.1f, 1),
                                        Helper.RandomMinMax(0.1f, 1), Helper.RandomMinMax(0.1f, 1));
            Vector3 lightcolor = new Vector3(Helper.RandomMinMax(0.01f, 0.2f),
                                             Helper.RandomMinMax(0.01f, 0.1f), Helper.RandomMinMax(0.01f, 0.2f));

            boom.Setup(color, lightcolor);
            boom.Spawn(position, rad, mc, speed, 0.1f, 2);
        }
Ejemplo n.º 2
0
        public override void Spawn(Vector3 position, Vector3 color)
        {
            base.Spawn(position);

            SpinupSound.Play();
            DefuseColor = color;
            TheExplosion.Setup(EmissiveColor, color);
            FireTimer.Reset(Helper.RandomMinMax(2, 10));
            TheState                  = State.Standby;
            Velocity                  = Vector3.Zero;
            RotationVelocity          = Vector3.Zero;
            RotationAcceleration      = Vector3.Zero;
            PO.RotationAcceleration.Z = -MathHelper.Pi;
        }