Example #1
0
        public ClearScene(Key key, ShootingGame game)
        {
            this.key  = key;
            this.game = game;

            scriptName = Path.GetFileNameWithoutExtension(game.ScriptPath);
        }
Example #2
0
 public PlayerController(int num)
 {
     number        = num;
     input         = ShootingGame.GetGameDevice().GetInputState();
     fireTimer     = new Timer(0.1f);
     fireDirection = new Vector2(0, -1);
 }
Example #3
0
        public ClearScene(Key key, ShootingGame game)
        {
            this.key = key;
            this.game = game;

            scriptName = Path.GetFileNameWithoutExtension(game.ScriptPath);
        }
Example #4
0
 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)
 {
 }
Example #5
0
 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)
 {
 }
Example #6
0
 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();
 }
Example #7
0
 public TestBoss(ShootingGame game)
     : base(game)
 {
     Position = new Position(320, 100);
     Radius   = 32;
     MaxHP    = 100;
     HP       = 100;
 }
Example #8
0
 public Ending(IScene playScene)
 {
     gameDevice     = ShootingGame.GetGameDevice();
     this.playScene = playScene;
     renderer       = gameDevice.GetRenderer();
     sound          = gameDevice.GetSound();
     input          = gameDevice.GetInputState();
 }
Example #9
0
 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);
 }
Example #10
0
 public GamePlay()
 {
     gameDevice = ShootingGame.GetGameDevice();
     renderer   = gameDevice.GetRenderer();
     sound      = gameDevice.GetSound();
     input      = gameDevice.GetInputState();
     map        = new Map();
     endTime    = new Timer(180.0f);
 }
Example #11
0
        /// <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());
        }
Example #12
0
 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);
 }
Example #13
0
 public Title()
 {
     gameDevice = ShootingGame.GetGameDevice();
     renderer   = gameDevice.GetRenderer();
     sound      = gameDevice.GetSound();
     input      = gameDevice.GetInputState();
     startText  = new StartText();
     endFlag    = false;
 }
Example #14
0
 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);
 }
Example #15
0
 /// <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;
 }
Example #16
0
 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;
 }
Example #17
0
 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;
 }
Example #18
0
 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;
 }
Example #19
0
        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);
        }
Example #20
0
 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;
 }
Example #21
0
 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;
 }
Example #22
0
 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();
 }
Example #23
0
        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;
            }
        }
Example #24
0
        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");
            }
        }
Example #25
0
 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));
     }
 }
Example #26
0
        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));
            }
        }
Example #27
0
 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;
 }
Example #28
0
 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));
 }
Example #31
0
 public TestBossFactory(ShootingGame game)
 {
     this.game = game;
 }
Example #32
0
 public StgScene(Key key, string scriptPath)
 {
     this.key = key;
     game = new ShootingGame(key, scriptPath);
 }
Example #33
0
 public StraightSEnemy(ShootingGame game, Position pos, double angle, double speed, int interval)
     : base(game, pos, angle, speed, interval)
 {
 }
Example #34
0
 public ScriptLoader(ShootingGame game)
 {
     this.game = game;
 }
Example #35
0
 public ScriptRunner(ShootingGame game, Script script)
 {
     this.game = game;
     this.Script = script;
 }
Example #36
0
 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;
 }
Example #41
0
 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;
 }
Example #43
0
 public Enemy(string name, int hp, IController controller, BulletFactory bulletFactroy) : base(name, hp, controller, bulletFactroy)
 {
     nowState = State.NORMAL;
     sound    = ShootingGame.GetGameDevice().GetSound();
     isAnim   = false;
 }
Example #44
0
 public MyTestBullet() : base("circlebullet", BulletType.PLAYER, ColiderType.CIRLCE, 10)
 {
     colider = new Circle(Vector2.Zero, ShootingGame.GetGameDevice().GetRenderer().Textures["circlebullet"].Width / 2);
 }
Example #45
0
 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;
 }