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"; }
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); }
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; }
//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); } }
public HealthPickup(Model model, Body body, TextureData textureData) : base(model, body, textureData) { RigidBody.UserData = this; }
public WindVulcano(Model model, Body body, TextureData textureData) : base(model, body, textureData) { RigidBody.UserData = this; //base.Name = "WindVulcano"; }
public SpeedDownPickup(Model model, Body body, TextureData textureData) : base(model, body, textureData) { RigidBody.UserData = this; }
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; }
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); }
public FallDown(Model model, Body body, TextureData textureData) : base(model, body, textureData) { EnemyName = "FallDown"; base.RigidBody.BodyType = BodyType.Static; base.RigidBody.Mass = 3000; }
public SpeedUpPickup(Model model, Body body, TextureData textureData) : base(model, body, textureData) { RigidBody.UserData = this; }
public WindDownPickup(Model model, Body body, TextureData textureData) : base(model, body, textureData) { RigidBody.UserData = this; }
public Tree1(Model model, Body body, TextureData textureData) : base(model, body, textureData) { RigidBody.UserData = this; }