public Weapon(GraphicsContext g, Collision c, Texture2D t) { graphics = g; collisions = c; s = new Sprite (g, t); s.Center = new Vector2(0.5f, 0.8f); }
public Machinegun(Vector3 pos, GraphicsContext g, Collision c) : base(g, c, new Texture2D("/Application/Assets/weapon3.png",false)) { FireRate = 0.1f;//Bullets per Second ReloadRate = 4000;//Milliseconds Mag = 50;//Max rounds in magazine s.Position = pos; }
public Pistol(Vector3 pos, GraphicsContext g, Collision c) : base(g, c, new Texture2D("/Application/Assets/weapon1.png",false)) { FireRate = 0;//Seconds per bullet ReloadRate = 1000;//Milliseconds Mag = 10;//Max rounds in magazine s.Position = pos; }
public Item3(GraphicsContext g, Collision c, Vector3 pos, Item3.Type i) { type = i; s = new Sprite(g, new Texture2D("/Application/Assets/weapon3.png", false)); s.Position = pos; graphics = g; col = c; IsAlive = true; }
public Enemy1(GraphicsContext g, Collision c, Vector3 pos) : base(g, c, new Texture2D("/Application/Assets/player.png",false), pos) { Duration = 50; Size = 40; Frames = 8; MovementSpeed = 2; s.SetColor(new Vector4(1f, 0f, 0f, 1f)); }
public Enemy(GraphicsContext g, Collision c, Texture2D t, Vector3 pos) { graphics = g; collisions = c; s = new Sprite(g,t); s.Center = new Vector2(0.5f, 0.5f); s.Position = pos; s.Width = 40; isAlive = true; }
public Item(GraphicsContext g, Collision c, Vector3 pos, Item.Type i, Vector4 uc) { type = i; s = new Sprite(g, new Texture2D("/Application/Assets/weaponbase.png", false)); s.Position = pos; s.SetColor(uc); graphics = g; col = c; IsAlive = true; }
public Enemy3(GraphicsContext g, Collision c, Vector3 pos) : base(g, c, new Texture2D("/Application/Assets/player.png",false), pos) { Duration = 50; Size = 40; Frames = 8; MovementSpeed = 2; s.SetColor(new Vector4(0f, 0f, 1f, 1f)); random = new Vector3(rand.Next(30, 930), rand.Next (30, 514),0); }
public Bullet(GraphicsContext g, Collision c, float rot, Vector3 pos) { graphics = g; collisions = c; Texture2D t = new Texture2D("/Application/Assets/bullet.png",false); s = new Sprite (g, t); s.SetColor(new Vector4(1,1,1,1)); isAlive = true; velocity = 10; s.Position = pos; s.Rotation = rot; s.Center = new Vector2(0.5f, 0.5f); }
public static void Initialize() { // Set up the graphics system Random rand = new Random(); graphics = new GraphicsContext (); clock = new Stopwatch(); clock.Start(); col = new Collision(graphics); p = new Player(graphics, col); col.p = p; col.elist.Add (new Enemy1(graphics, col, new Vector3(rand.Next (0,960),rand.Next (0,544),0))); col.ilist.Add(new Item(graphics, col, new Vector3(rand.Next(60,901), rand.Next(44,501), 0), Item.Type.Pistol, new Vector4(1,.5f,0,1))); col.ilist.Add(new Item(graphics, col, new Vector3(rand.Next(60,901), rand.Next(44,501), 0), Item.Type.Shotgun, new Vector4(0,1,0,1))); col.ilist.Add(new Item(graphics, col, new Vector3(rand.Next(60,901), rand.Next(44,501), 0), Item.Type.Machinegun,new Vector4(0,0,1,1))); }
public Player(GraphicsContext g, Collision c) { graphics = g; collisions = c; Texture2D tex = new Texture2D("/Application/Assets/player.png", false); s = new Sprite(g,tex); isAlive = true; movementSpeed = 5; rotSpeed = .05f; s.Position= new Vector3(25,25,0); duration = 50; size = 40; frames = 8; s.Width = size; s.Center= new Vector2(0.5f, 0.5f); s.Rotation = (float)Math.PI/2f; wlist = new List<Weapon>(); health = 5; }
public PistolItem(GraphicsContext g, Collision c, Vector3 pos) : base(g, c, pos, new Texture2D("/Application/Assets/weapon1.png", false)) { }