Ejemplo n.º 1
0
        public Enemy(Model model, Body body, TextureData textureData)
            : base(string.Empty)
        {
            base.Name = "Enemy";
            base.Model = model;
            base.RigidBody = body;
            base.RigidBody.OnCollision += RigidBody_OnCollision;
            base.DiffuseTexture = textureData.Diffuse;
            base.NormalTexture = textureData.Normal;
            base.SpecularTexture = textureData.Specular;

            EnemyName = "INSERT NAME";
        }
Ejemplo n.º 2
0
Archivo: Tree.cs Proyecto: TobieD/Glide
        public Tree(Model model, Body body, TextureData textureData)
            : base(string.Empty)
        {
            base.Name = "Tree";
            base.Model = model;
            base.RigidBody = body;
            base.DiffuseTexture = textureData.Diffuse;
            base.NormalTexture = textureData.Normal;
            base.SpecularTexture = textureData.Specular;

            base.Depth = -55;
            Scale(2.5f, 2.5f, 1.5f);
        }
Ejemplo n.º 3
0
        public Pickup(Model model, Body body, TextureData textureData)
            : base(string.Empty)
        {
            base.Name = "Pickup";
            base.Model = model;
            base.RigidBody = body;
            base.RigidBody.OnCollision += RigidBody_OnCollision;
            base.DiffuseTexture = textureData.Diffuse;
            base.NormalTexture = textureData.Normal;
            base.SpecularTexture = textureData.Specular;

            Rotate(90, 0, 0);

            Depth = -55.0f;
        }
Ejemplo n.º 4
0
        //send empty because models are already loaded
        public Piece(Model model, Body body,string name, 
            TextureData textureData,float scalex = 1.0f, float scaleY = 1.0f)
            : base()
        {
            Name = name;

            //Transfer model from prefab to this
            base.Model = model;
            base.RigidBody = body;

            //Scale the object with the provided size
            Scale(scalex * 1.2f,scaleY,0.7f);

            //Set the width and height
            PiecePrefab piecePrefab = (PiecePrefab)body.UserData;
            Vector2 size = piecePrefab.Size;
            m_Width = (int)size.X;
            m_Height = (int)size.Y;

            base.RigidBody.UserData = this; //Add this as userdata

            //Set Texture
            base.DiffuseTexture = textureData.Diffuse;
            base.NormalTexture = textureData.Normal;
            base.SpecularTexture = textureData.Specular;

            //Rotate/Translate based on location of the object
            if (Name == "Top")
            {
                Offset.Y = 260;
                Rotate(0, 0, 180);
                Translate(0, 0);
            }
            else if (Name == "Ground")
            {
                Offset.Y = -260;
                Translate(0, 100);
            }
        }
Ejemplo n.º 5
0
 public HealthPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Ejemplo n.º 6
0
 public WindVulcano(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
     //base.Name = "WindVulcano";
 }
Ejemplo n.º 7
0
 public SpeedDownPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Ejemplo n.º 8
0
        public Wheel(Model model, Body body, TextureData textureData)
            : base(model, body, textureData)
        {
            base.RigidBody.BodyType = BodyType.Static;
            EnemyName = "Wheel";

            Scale(1.0f, -1.0f, 1.0f);
            Depth = -3;
        }
Ejemplo n.º 9
0
 public Smash(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     EnemyName = "Smash";
     base.RigidBody.BodyType = BodyType.Static;
     Name = "Smash";
     Scale(0.5f, 0.5f, 0.5f);
 }
Ejemplo n.º 10
0
 public FallDown(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     EnemyName = "FallDown";
     base.RigidBody.BodyType = BodyType.Static;
     base.RigidBody.Mass = 3000;
 }
Ejemplo n.º 11
0

        
Ejemplo n.º 12
0
 public SpeedUpPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Ejemplo n.º 13
0
 public WindVulcano(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
     //base.Name = "WindVulcano";
 }
Ejemplo n.º 14
0
 public WindDownPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Ejemplo n.º 15
0
Archivo: Tree.cs Proyecto: TobieD/Glide
 public Tree1(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }