Exemple #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";
        }
Exemple #2
0
        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);
        }
Exemple #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;
        }
Exemple #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);
            }
        }
Exemple #5
0
 public HealthPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Exemple #6
0
 public WindVulcano(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
     //base.Name = "WindVulcano";
 }
Exemple #7
0
 public SpeedDownPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Exemple #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;
        }
Exemple #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);
 }
Exemple #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;
 }
Exemple #11
0

        
Exemple #12
0
 public SpeedUpPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Exemple #13
0
 public WindVulcano(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
     //base.Name = "WindVulcano";
 }
Exemple #14
0
 public WindDownPickup(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }
Exemple #15
0
 public Tree1(Model model, Body body, TextureData textureData)
     : base(model, body, textureData)
 {
     RigidBody.UserData = this;
 }