Ejemplo n.º 1
0
        public Wall()
        {
            var mesh = Game.Current.NewMesh("Wall");

            _MeshTextured = new MeshStaticPart(Game.Current.NewMesh("WallTextured"));
            Add(_Mesh     = new MeshStaticPart(mesh));
            Add(new ObbCollider(mesh));
            Add(_Dust = new IndependentParticlePart()
            {
                Translation = new Vector3(0, 0, -4),
                Sound       = Game.Current.GetSound("WallStrike.wav", EffectVolume),
                Animation   = new AnimatedQuad()
                {
                    Texture      = Game.Current.GetParticle("Dust.png"),
                    FrameSize    = new Size(512, 102),
                    FirstFrame   = 0,
                    CurrentFrame = 0,
                    FrameRate    = 15,
                    TotalFrames  = 5,
                },
                Size = new Vector2(25, 15),
            });
            MaxScale = _DefaultMaxScale;
            MinScale = _DefaultMinScale;
        }
        public Repulsor()
        {
            var mesh = Game.Current.NewMesh("Repulsor");

            Add(new MeshStaticPart(mesh)
            {
                Color = Color.FromArgb(0, 75, 0, 0)
            });
            Add(new SphereCollider(mesh));
            Add(_Spark = new IndependentParticlePart()
            {
                Translation = new Vector3(0, 0, -4),
                Sound       = Game.Current.GetSound("Repulsor.wav", EffectVolume),
                Animation   = new AnimatedQuad()
                {
                    Texture      = Game.Current.GetParticle("RedSparks.png"),
                    FrameSize    = new Size(256, 256),
                    FirstFrame   = 0,
                    CurrentFrame = 0,
                    FrameRate    = 30,
                    TotalFrames  = 10,
                },
                Size = new Vector2(50, 30),
            });
        }
Ejemplo n.º 3
0
 public Magnet()
 {
     var mesh = Game.Current.GetMesh("Magnet");
     Add(new MeshStaticPart(mesh));
     Add(_Collider = new ObbTranslatedCollider(mesh));
     Add(_Spark = new IndependentParticlePart()
     {
         Translation = new Vector3(0, 0, -4),
         Sound = Game.Current.GetSound("Magnet.wav", EffectVolume),
         Animation = new AnimatedQuad()
         {
             Texture = Game.Current.GetParticle("SparksFinal.png"),
             FrameSize = new Size(256, 256),
             FirstFrame = 0,
             CurrentFrame = 0,
             FrameRate = 30,
             TotalFrames = 10,
         },
         Size = new Vector2(25, 15),
     });
 }
Ejemplo n.º 4
0
 public Repulsor()
 {
     var mesh = Game.Current.NewMesh("Repulsor");
     Add(new MeshStaticPart(mesh) { Color = Color.FromArgb(0, 75, 0, 0) });
     Add(new SphereCollider(mesh));
     Add(_Spark = new IndependentParticlePart()
     {
         Translation = new Vector3(0, 0, -4),
         Sound = Game.Current.GetSound("Repulsor.wav", EffectVolume),
         Animation = new AnimatedQuad()
         {
             Texture = Game.Current.GetParticle("RedSparks.png"),
             FrameSize = new Size(256, 256),
             FirstFrame = 0,
             CurrentFrame = 0,
             FrameRate = 30,
             TotalFrames = 10,
         },
         Size = new Vector2(50, 30),
     });
 }
Ejemplo n.º 5
0
        public Magnet()
        {
            var mesh = Game.Current.GetMesh("Magnet");

            Add(new MeshStaticPart(mesh));
            Add(_Collider = new ObbTranslatedCollider(mesh));
            Add(_Spark    = new IndependentParticlePart()
            {
                Translation = new Vector3(0, 0, -4),
                Sound       = Game.Current.GetSound("Magnet.wav", EffectVolume),
                Animation   = new AnimatedQuad()
                {
                    Texture      = Game.Current.GetParticle("SparksFinal.png"),
                    FrameSize    = new Size(256, 256),
                    FirstFrame   = 0,
                    CurrentFrame = 0,
                    FrameRate    = 30,
                    TotalFrames  = 10,
                },
                Size = new Vector2(25, 15),
            });
        }
Ejemplo n.º 6
0
 public Wall()
 {
     var mesh = Game.Current.NewMesh("Wall");
     _MeshTextured = new MeshStaticPart(Game.Current.NewMesh("WallTextured"));
     Add(_Mesh = new MeshStaticPart(mesh));
     Add(new ObbCollider(mesh));
     Add(_Dust = new IndependentParticlePart()
     {
         Translation = new Vector3(0, 0, -4),
         Sound = Game.Current.GetSound("WallStrike.wav", EffectVolume),
         Animation = new AnimatedQuad()
         {
             Texture = Game.Current.GetParticle("Dust.png"),
             FrameSize = new Size(512, 102),
             FirstFrame = 0,
             CurrentFrame = 0,
             FrameRate = 15,
             TotalFrames = 5,
         },
         Size = new Vector2(25, 15),
     });
     MaxScale = _DefaultMaxScale;
     MinScale = _DefaultMinScale;
 }