public ClearScene(Key key, ShootingGame game) { this.key = key; this.game = game; scriptName = Path.GetFileNameWithoutExtension(game.ScriptPath); }
public PlayerController(int num) { number = num; input = ShootingGame.GetGameDevice().GetInputState(); fireTimer = new Timer(0.1f); fireDirection = new Vector2(0, -1); }
public ClearScene(Key key, ShootingGame game) { this.key = key; this.game = game; scriptName = Path.GetFileNameWithoutExtension(game.ScriptPath); }
public TurnSEnemy(ShootingGame game, Position startPos, int startTime, Position stopPos, int stopTime, Position leavePos, int leaveTime, int interval, int bulletsCount) : base(game, startPos, startTime, stopPos, stopTime, leavePos, leaveTime, interval, bulletsCount) { }
public TurnSEnemy(ShootingGame game, Position startPos, int startTime, Position stopPos, int stopTime, Position leavePos, int leaveTime, int interval, int bulletsCount) : base(game, startPos, startTime, stopPos, stopTime, leavePos, leaveTime, interval, bulletsCount) { }
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 TestBoss(ShootingGame game) : base(game) { Position = new Position(320, 100); Radius = 32; MaxHP = 100; HP = 100; }
public Ending(IScene playScene) { gameDevice = ShootingGame.GetGameDevice(); this.playScene = playScene; renderer = gameDevice.GetRenderer(); sound = gameDevice.GetSound(); input = gameDevice.GetInputState(); }
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 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 BoarEnemy(ShootingGame game, Position pos) : base(game) { this.Position = pos.Clone(); Radius = 20; color = DX.GetColor(255, 128, 0); speed = 3.0; angle = Math.Atan2(game.OwnChar.Position.Y - Position.Y, game.OwnChar.Position.X - Position.X); }
public Title() { gameDevice = ShootingGame.GetGameDevice(); renderer = gameDevice.GetRenderer(); sound = gameDevice.GetSound(); input = gameDevice.GetInputState(); startText = new StartText(); endFlag = false; }
public BoarEnemy(ShootingGame game, Position pos) : base(game) { this.Position = pos.Clone(); Radius = 20; color = DX.GetColor(255, 128, 0); speed = 3.0; angle = Math.Atan2(game.OwnChar.Position.Y - Position.Y, game.OwnChar.Position.X - Position.X); }
/// <summary> /// StraightEnemy を初期化する。 /// </summary> public StraightEnemy(ShootingGame game, Position pos, double angle, double speed, int interval) : base(game) { Radius = 20; Color = DX.GetColor(0, 0, 255); this.Position = pos.Clone(); this.Angle = angle; this.Speed = speed; this.Interval = interval; }
public TurnSprinklerEnemy(ShootingGame game, Position startPos, int startTime, Position stopPos, int stopTime, Position leavePos, int leaveTime, int interval, int bulletsCount, double startAngle, double endAngle) : base(game, startPos, startTime, stopPos, stopTime, leavePos, leaveTime, interval, bulletsCount) { this.StartAngle = startAngle; this.EndAngle = endAngle; }
public BackColorTask(ShootingGame game, int r, int g, int b, int frame) { this.game = game; this.r = r; this.g = g; this.b = b; this.frameLen = frame; pr = game.BackR; pg = game.BackG; pb = game.BackB; }
public BackColorTask(ShootingGame game, int r, int g, int b, int frame) { this.game = game; this.r = r; this.g = g; this.b = b; this.frameLen = frame; pr = game.BackR; pg = game.BackG; pb = game.BackB; }
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 ColorStatement(ShootingGame game, List <string> args) { this.game = game; if (args.Count < 4) { throw new FormatException("color with too few arguments."); } r = int.Parse(args[1]); g = int.Parse(args[2]); b = int.Parse(args[3]); frame = (args.Count >= 5) ? int.Parse(args[4]) : 1; }
public ColorStatement(ShootingGame game, List<string> args) { this.game = game; if (args.Count < 4) { throw new FormatException("color with too few arguments."); } r = int.Parse(args[1]); g = int.Parse(args[2]); b = int.Parse(args[3]); frame = (args.Count >= 5) ? int.Parse(args[4]) : 1; }
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 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 BossStatement(ShootingGame game, List<string> args) { this.game = game; if (args.Count < 2) { throw new FormatException("b without boss name."); } var name = args[1]; if (name == "test") { factory = new TestBossFactory(game); } else { throw new FormatException(string.Format("Unknown boss name \"{0}\"", name)); } }
public BossStatement(ShootingGame game, List <string> args) { this.game = game; if (args.Count < 2) { throw new FormatException("b without boss name."); } var name = args[1]; if (name == "test") { factory = new TestBossFactory(game); } else { throw new FormatException(string.Format("Unknown boss name \"{0}\"", name)); } }
public TurnEnemy(ShootingGame game, Position startPos, int startTime, Position stopPos, int stopTime, Position leavePos, int leaveTime, int interval, int bulletsCount) : base(game) { Radius = 20; Position = startPos.Clone(); this.StartPos = startPos.Clone(); this.StartTime = startTime; this.StopPos = stopPos.Clone(); this.StopTime = stopTime; this.LeavePos = leavePos.Clone(); this.LeaveTime = leaveTime; this.Interval = interval; this.BulletsCount = bulletsCount; }
public TurnEnemy(ShootingGame game, Position startPos, int startTime, Position stopPos, int stopTime, Position leavePos, int leaveTime, int interval, int bulletsCount) : base(game) { Radius = 20; Position = startPos.Clone(); this.StartPos = startPos.Clone(); this.StartTime = startTime; this.StopPos = stopPos.Clone(); this.StopTime = stopTime; this.LeavePos = leavePos.Clone(); this.LeaveTime = leaveTime; this.Interval = interval; this.BulletsCount = bulletsCount; }
public RandomWalkerEnemy(ShootingGame game, int rangeX1, int rangeY1, int rangeX2, int rangeY2, Position startPos, Position endPos, int moveFrame, int stopFrame, int moveCount) : base(game) { Radius = 20; Position = new Position(320, -20); this.RangeX1 = rangeX1; this.RangeY1 = rangeY1; this.RangeX2 = rangeX2; this.RangeY2 = rangeY2; this.StartPos = startPos.Clone(); this.EndPos = endPos.Clone(); this.MoveFrame = moveFrame; this.StopFrame = stopFrame; this.MoveCount = moveCount; prevPos = this.StartPos; nextPos = new Position((double)Game.Rnd.Next(RangeX1, RangeX2), (double)Game.Rnd.Next(RangeY1, RangeY2)); }
public RandomWalkerEnemy(ShootingGame game, int rangeX1, int rangeY1, int rangeX2, int rangeY2, Position startPos, Position endPos, int moveFrame, int stopFrame, int moveCount) : base(game) { Radius = 20; Position = new Position(320, -20); this.RangeX1 = rangeX1; this.RangeY1 = rangeY1; this.RangeX2 = rangeX2; this.RangeY2 = rangeY2; this.StartPos = startPos.Clone(); this.EndPos = endPos.Clone(); this.MoveFrame = moveFrame; this.StopFrame = stopFrame; this.MoveCount = moveCount; prevPos = this.StartPos; nextPos = new Position((double)Game.Rnd.Next(RangeX1, RangeX2), (double)Game.Rnd.Next(RangeY1, RangeY2)); }
public TestBossFactory(ShootingGame game) { this.game = game; }
public StgScene(Key key, string scriptPath) { this.key = key; game = new ShootingGame(key, scriptPath); }
public StraightSEnemy(ShootingGame game, Position pos, double angle, double speed, int interval) : base(game, pos, angle, speed, interval) { }
public ScriptLoader(ShootingGame game) { this.game = game; }
public ScriptRunner(ShootingGame game, Script script) { this.game = game; this.Script = script; }
public void Init() { position = new Vector2(0, 0); position2 = new Vector2(0, -ShootingGame.GetGameDevice().GetRenderer().Textures[name].Height); }
public TurnEnemyFactory(ShootingGame game) { this.game = game; }
public RandomWalkerEnemyFactory(ShootingGame game) : base() { this.game = game; }
public RandomWalkerEnemyFactory(ShootingGame game) : base() { this.game = game; }
public BoarEnemyFactory(ShootingGame game) { this.game = game; }
public EnemyBulletTest() : base("enemybullet", BulletType.ENEMY, ColiderType.CIRLCE, 50) { colider = new Circle(Vector2.Zero, ShootingGame.GetGameDevice().GetRenderer().Textures["enemybullet"].Width / 2); }
public TurnSprinklerEnemyFactory(ShootingGame game) : base(game) { this.game = game; }
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 MyTestBullet() : base("circlebullet", BulletType.PLAYER, ColiderType.CIRLCE, 10) { colider = new Circle(Vector2.Zero, ShootingGame.GetGameDevice().GetRenderer().Textures["circlebullet"].Width / 2); }
public StraightSEnemyFactory(ShootingGame game) : base(game) { }
public StraightSEnemyFactory(ShootingGame game) : base(game) { }
public StraightEnemyFactory(ShootingGame game) { this.game = game; }
public TestBossFactory(ShootingGame game) { this.game = game; }