public PlayerController(int num) { number = num; input = ShootingGame.GetGameDevice().GetInputState(); fireTimer = new Timer(0.1f); fireDirection = new Vector2(0, -1); }
public Laser() : base("laser", BulletType.ENEMY, ColiderType.LINE, 50) { colider = new Line(Vector2.Zero, new Vector2(0, 1), 50); time = new Timer(1.0f); time2 = new Timer(1.0f); sound = ShootingGame.GetGameDevice().GetSound(); }
public BackGround(string name) { this.name = name; drawOrigin = new Vector2(0, 1); moveSpeed = 100; position = Vector2.Zero; position2 = new Vector2(0, -ShootingGame.GetGameDevice().GetRenderer().Textures[name].Height); }
public Ending(IScene playScene) { gameDevice = ShootingGame.GetGameDevice(); this.playScene = playScene; renderer = gameDevice.GetRenderer(); sound = gameDevice.GetSound(); input = gameDevice.GetInputState(); }
public Title() { gameDevice = ShootingGame.GetGameDevice(); renderer = gameDevice.GetRenderer(); sound = gameDevice.GetSound(); input = gameDevice.GetInputState(); startText = new StartText(); endFlag = false; }
public GamePlay() { gameDevice = ShootingGame.GetGameDevice(); renderer = gameDevice.GetRenderer(); sound = gameDevice.GetSound(); input = gameDevice.GetInputState(); map = new Map(); endTime = new Timer(180.0f); }
/// <summary> /// コンストラクタ /// </summary> public Load() { renderer = ShootingGame.GetGameDevice().GetRenderer(); sound = ShootingGame.GetGameDevice().GetSound(); textureLoader = new TextureLoader(renderer, TextureList()); bgmLoader = new BGMLoader(sound, BGMList()); seLoader = new SELoader(sound, SEList()); }
public Player(string name, int hp, float moveSpeed, IController controller, BulletFactory bulletFactory) : base(name, hp, controller, bulletFactory) { safeColider = damegeColider; damegeColider = new Circle(Vector2.Zero, 1f); this.moveSpeed = moveSpeed; nowState = State.START; startTimer = new Timer(1.0f); flashTimer = new Timer(0.1f); invincibleTimer = new Timer(1.5f); alpha = 1.0f; sound = ShootingGame.GetGameDevice().GetSound(); }
public Character(string name, int hp, IController controller, BulletFactory bulletFactory = null) : base(name) { this.hp = hp; nowHp = hp; SetDamegeColider(new Circle(Vector2.Zero, ShootingGame.GetGameDevice().GetRenderer().Textures[name].Width / 2)); SetEquip(controller, bulletFactory); //アニメションを設置 deadAnime = new Animation(ShootingGame.GetGameDevice().GetRenderer(), "deadAnime", 0.1f, false); animationPlayer.SetAnimation(deadAnime); }
public void Update(GameTime gameTime) { position += drawOrigin * moveSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds * Parameters.GameSpeed; position2 += drawOrigin * moveSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds * Parameters.GameSpeed; if (position.Y > Screen.Height) { position.Y = position2.Y - ShootingGame.GetGameDevice().GetRenderer().Textures[name].Height; } if (position2.Y > Screen.Height) { position2.Y = position.Y - ShootingGame.GetGameDevice().GetRenderer().Textures[name].Height; } }
public void GetControl(GameTime gameTime, ref Vector2 position, ref Vector2 velocity, ref BulletFactory bf) { fireTimer.Update(gameTime, Parameters.GameSpeed); velocity = input.Velocity() * player.MoveSpeed; position += velocity * (float)gameTime.ElapsedGameTime.TotalSeconds * Parameters.GameSpeed; position = Vector2.Clamp(position, Vector2.Zero, new Vector2(Screen.GameWidth, Screen.GameHeight)); if (input.CheckDownKey(Keys.Space, Buttons.RightTrigger) && fireTimer.IsTime()) { bf.Fire(fireDirection * 1000); fireTimer.Initialize(); ShootingGame.GetGameDevice().GetSound().PlaySE("shot"); } }
public Enemy(string name, int hp, IController controller, BulletFactory bulletFactroy) : base(name, hp, controller, bulletFactroy) { nowState = State.NORMAL; sound = ShootingGame.GetGameDevice().GetSound(); isAnim = false; }
public EnemyBulletTest() : base("enemybullet", BulletType.ENEMY, ColiderType.CIRLCE, 50) { colider = new Circle(Vector2.Zero, ShootingGame.GetGameDevice().GetRenderer().Textures["enemybullet"].Width / 2); }
public void Init() { position = new Vector2(0, 0); position2 = new Vector2(0, -ShootingGame.GetGameDevice().GetRenderer().Textures[name].Height); }
public MyTestBullet() : base("circlebullet", BulletType.PLAYER, ColiderType.CIRLCE, 10) { colider = new Circle(Vector2.Zero, ShootingGame.GetGameDevice().GetRenderer().Textures["circlebullet"].Width / 2); }
public DiffusionBullet() : base("enemybullet", BulletType.ENEMY, ColiderType.CIRLCE, 50) { colider = new Circle(Vector2.Zero, ShootingGame.GetGameDevice().GetRenderer().Textures["enemybullet"].Width / 2); fire = new Timer(1.0f); }