示例#1
0
 public void Shoot()
 {
     if (Game.I.Frame % 6 == 0)
     {
         Game.I.AddWeapon(IWeapons.Load(
                              new Weapon0001(),
                              this.X + 38.0,
                              this.Y
                              ));
     }
 }
示例#2
0
        public void Attack()
        {
            // 将来的に武器毎にコードが実装され、メソッドがでかくなると思われる。

            if (this.AttackFrame % 6 == 1)
            {
                double x = this.X;
                double y = this.Y;

                x += 30.0 * (this.FacingLeft ? -1 : 1);

                if (1 <= this.ShagamiFrame)
                {
                    y += 10.0;
                }
                else
                {
                    y -= 4.0;
                }

                Game.I.AddWeapon(IWeapons.Load(new Weapon0001(), x, y, this.FacingLeft));
            }
        }