public Player(ContentManager content) { position = new Vector3(0, 0, -250); CameraStaticPosition = new Vector3(0, 0, 0); this.content = content; model = content.Load<Model>(@"models/maincharacter"); texture = content.Load<Texture2D>(@"models/characterTextureBody"); controls = new Controller(); initialLock = true; controls.Locked = true; shield = 3; powerup = 0; currentWeapon = new Needle(content); oldPos = Vector3.Zero; pressedDodgeLeft = false; pressedDodgeRight = false; isInvincible = false; currFireTime = new TimeSpan(currentWeapon.FireTime.Ticks); dodgeTime = TimeSpan.FromSeconds(dodgeTimeSeconds); betweenDodge = TimeSpan.FromSeconds(betweenDodgeSeconds); invincibleTime = TimeSpan.FromSeconds(invincibleTimeSeconds); flickerTime = TimeSpan.FromSeconds(flickerTimeSeconds); powerUpTime = TimeSpan.FromSeconds(powerupTimeSeconds); pressedPowerUpTime = TimeSpan.FromSeconds(pressedPowerUpTimeSeconds); playerAVC = new AudioVideoController(); cameraEnabled = true; }
public Player(ContentManager content) { position = new Vector3(0, 0, -250); CameraStaticPosition = new Vector3(0, 0, 0); this.content = content; model = content.Load <Model>(@"models/maincharacter"); texture = content.Load <Texture2D>(@"models/characterTextureBody"); controls = new Controller(); initialLock = true; controls.Locked = true; shield = 3; powerup = 0; currentWeapon = new Needle(content); oldPos = Vector3.Zero; pressedDodgeLeft = false; pressedDodgeRight = false; isInvincible = false; currFireTime = new TimeSpan(currentWeapon.FireTime.Ticks); dodgeTime = TimeSpan.FromSeconds(dodgeTimeSeconds); betweenDodge = TimeSpan.FromSeconds(betweenDodgeSeconds); invincibleTime = TimeSpan.FromSeconds(invincibleTimeSeconds); flickerTime = TimeSpan.FromSeconds(flickerTimeSeconds); powerUpTime = TimeSpan.FromSeconds(powerupTimeSeconds); pressedPowerUpTime = TimeSpan.FromSeconds(pressedPowerUpTimeSeconds); playerAVC = new AudioVideoController(); cameraEnabled = true; }
public Needle(ContentManager content) { projectile = false; name = PlayerWeaponName.Needle; this.content = content; fireSound = "fireNeedle"; fireTime = TimeSpan.FromSeconds(0.15f); avc = new AudioVideoController(); }
/// <summary> /// Loads graphics content for this screen. /// </summary> public override void LoadContent() { firstTime = true; if (content == null) content = new ContentManager(ScreenManager.Game.Services, "Content"); backgroundTexture = content.Load<Texture2D>("ui/Background-No text"); Text = content.Load<Texture2D>("ui/Background-Text"); AudioVideoController song = new AudioVideoController(); //song.playMusic("01 Ghosts I"); }
/// <summary> /// Loads graphics content for this screen. /// </summary> public override void LoadContent() { firstTime = true; if (content == null) { content = new ContentManager(ScreenManager.Game.Services, "Content"); } backgroundTexture = content.Load <Texture2D>("ui/Background-No text"); Text = content.Load <Texture2D>("ui/Background-Text"); AudioVideoController song = new AudioVideoController(); //song.playMusic("01 Ghosts I"); }
public Shield(ContentManager content, Vector3 restPos, Vector3 altRestPos) { damage = 9; fireTime = TimeSpan.FromSeconds(.15f); currentLevel = 0; name = PlayerWeaponName.Shield; this.content = content; model = content.Load<Model>(@"models/shield1"); texture = content.Load<Texture2D>(@"textures/needletexture"); position = restPos; this.restPos = restPos; this.altRestPos = altRestPos; fireSound = "fireNeedle"; velocityFactor = 1; avc = new AudioVideoController(); }
public Shield(ContentManager content, Vector3 restPos, Vector3 altRestPos) { damage = 9; fireTime = TimeSpan.FromSeconds(.15f); currentLevel = 0; name = PlayerWeaponName.Shield; this.content = content; model = content.Load <Model>(@"models/shield1"); texture = content.Load <Texture2D>(@"textures/needletexture"); position = restPos; this.restPos = restPos; this.altRestPos = altRestPos; fireSound = "fireNeedle"; velocityFactor = 1; avc = new AudioVideoController(); }