public Projectile(Vector2 pos, Vector2 spd, Vector2 dir, GameManager m, int r, int d) : base(pos, m) { width = 15; height = 15; speed = 6; baseDamage = 1; range = r; damage = d; if (dir.X > 0) { spd.X = Math.Max(spd.X, 0); position.Y += (float)((GameConst.random.NextDouble() * 12) - 6); } else if (dir.X < 0) { spd.X = Math.Min(spd.X, 0); position.Y += (float)((GameConst.random.NextDouble() * 12) - 6); } else if (dir.Y < 0) { spd.Y = Math.Min(spd.Y, 0); position.X += (float)((GameConst.random.NextDouble() * 12) - 6); } else { spd.Y = Math.Max(spd.Y, 0); position.X += (float)((GameConst.random.NextDouble() * 12) - 6); } velocity = new Vector2((dir.X * speed) + (spd.X / 1.75f), (dir.Y * speed) + (spd.Y / 1.75f)); }
public Character(Vector2 pos, GameManager m) : base(pos, m) { ignorePlayerMovement = false; range = 60; damage = 1; }
public Bomb(Vector2 pos, GameManager gm, Player sp) : base(pos, gm) { spawningPlayer = sp; exploding = false; radius = 75; width = WIDTH; height = HEIGHT; ignorePlayerMovement = true; }
public Projectile(Vector2 pos, Vector2 spd, GameManager m, int r, int d) : base(pos, m) { width = 15; height = 15; speed = 6; baseDamage = 1; range = r; damage = d; damageEnemies = false; velocity = new Vector2( (spd.X / 1.75f), (spd.Y / 1.75f)); }
public Player(Vector2 pos, GameManager m) : base(pos, m) { width = 50; height = 60; dadt = 1.2f; maxHealth = 6; health = maxHealth; targetSource = new Vector2(0, 10); CurrentRoom = manager.Map.CurrentRoom; sbItem = new Binding.Items.AnarchistCookbook(this, manager); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 600; graphics.ApplyChanges(); GameConst.Initialize(Content); gm = new GameManager(graphics); hud = new HUD(gm); base.Initialize(); }
public Actor(Vector2 pos, GameManager m) : base(pos, m) { height = 30; width = 30; speed = new Vector2(0, 0); targetSource = new Vector2(0, 0); maxSpeed = 4.85f; maxAcc = 1.5f; maxDcc = 2f; dadt = 1.02f; time = new GameTime(); }
public AggressiveFly(Vector2 pos, GameManager m) : base(pos, m) { height = 20; width = 20; speed = new Vector2(0, 0); targetSource = new Vector2(0, 0); maxSpeed = 5f; maxAcc = 1.5f; maxDcc = 2f; dadt = 1.02f; maxHealth = 2; health = maxHealth; rand = GameConst.random; }
public Jumper(Vector2 pos, GameManager m) : base(pos, m) { height = 35; width = 40; speed = new Vector2(0, 0); targetSource = new Vector2(0, 0); maxSpeed = 5f; maxAcc = 1.0f; maxDcc = 2f; dadt = 1.02f; maxHealth = 2; health = maxHealth; rand = GameConst.random; jumpTimer = MAX_JUMP; }
public HeadlessZombie(Vector2 pos, GameManager m) : base(pos, m) { height = 40; width = 35; speed = new Vector2(0, 0); targetSource = new Vector2(0, 0); maxSpeed = 0.5f; maxAcc = 1.5f; maxDcc = .5f; dadt = 1.02f; maxHealth = 3; health = maxHealth; rand = GameConst.random; fireRate = 2; }
public Gish(Vector2 pos, GameManager m) : base(pos, m) { height = 50; width = 50; speed = new Vector2(0, 0); targetSource = new Vector2(0, 0); maxSpeed = 1.3f; maxAcc = 1.5f; maxDcc = 2f; dadt = 1.02f; maxHealth = 5; health = maxHealth; rand = GameConst.random; fireRate = 2; }
public ShootingFly(Vector2 pos, GameManager m) : base(pos, m) { height = 30; width = 25; speed = new Vector2(0, 0); targetSource = new Vector2(0, -15); maxSpeed = 5f; maxAcc = 1.5f; maxDcc = 2f; dadt = 1.02f; maxHealth = 3; health = maxHealth; rand = GameConst.random; sightRange = 300; fireRate = 2; }
public Enemy(Vector2 pos, GameManager m) : base(pos, m) { ignorePlayerMovement = false; height = 30; width = 30; speed = new Vector2(0, 0); targetSource = new Vector2(0, 30); maxSpeed = 4.85f; maxAcc = 1.5f; maxDcc = 2f; dadt = 1.02f; range = 60; maxHealth = 3; health = 3; pauseUpdatingTimer = 50; }
public Horf(Vector2 pos, GameManager m) : base(pos, m) { height = 40; width = 45; speed = new Vector2(0, 0); targetSource = new Vector2(0, -15); maxSpeed = 2f; maxAcc = 1.5f; maxDcc = 2f; dadt = 1.12f; maxHealth = 3; health = maxHealth; rand = GameConst.random; sightRange = 250; fireRate = 2; }
public Map(GameManager gm) { manager = gm; rand = new Random(); }
public Key(Vector2 pos, GameManager gm) : base(pos, gm) { width = 25; height = 40; }
public Entity(Vector2 pos, GameManager m) { position = pos; manager = m; }
public HUD(GameManager m) { manager = m; }
public SpacebarItem(Player p, GameManager m) { player = p; manager = m; charge = maxCharge; }