Ejemplo n.º 1
0
 /// <summary>
 /// 弾丸の位置を更新する
 /// </summary>
 /// <param name='bl'>
 /// Bullet1
 /// </param>
 public static void Update(Bullet1 bl)
 {
     var newblPosition = new Vector2(bl.Sprite.Position.X,bl.Sprite.Position.Y);
     newblPosition += new Vector2(bl.DX,bl.DY);
     bl.Sprite.RunAction(new MoveTo(newblPosition,0.0f));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 新たに弾丸を生成
        /// </summary>
        /// <param name='x'>
        /// 初期位置のx座標
        /// </param>
        /// <param name='y'>
        /// 初期位置のy座標
        /// </param>
        /// <param name='dx'>
        /// x方向の速度
        /// </param>
        /// <param name='dy'>
        /// y方向の速度
        /// </param>
        public static void MakeNewBullet(float x, float y, float dx, float dy)
        {
            var newBullet = new Bullet1(x,y,dx,dy);

            newBullet.Sprite = new SpriteUV(){TextureInfo = TextureInfo};
            newBullet.Sprite.Quad.S = TextureInfo.TextureSizef;
            newBullet.Sprite.CenterSprite();
            newBullet.Sprite.Position = new Sce.PlayStation.Core.Vector2(x,y);
            BulletList.Add(newBullet);
            Scenes.sceneOnGame.AddChild(((Bullet1)BulletList[BulletList.Count-1]).Sprite);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 弾丸を削除する
 /// </summary>
 /// <param name='bl'>
 /// Bullet1
 /// </param>
 public static void RemoveBullet(Bullet1 bl)
 {
     bl.Sprite.RemoveAllChildren(true);
     Scenes.sceneOnGame.RemoveChild(bl.Sprite,true);
     BulletList.Remove(bl);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 弾丸1つ生成
 /// </summary>
 /// <param name='type'>
 /// 弾丸タイプ
 /// </param>
 /// <param name='x'>
 /// 初期位置
 /// </param>
 /// <param name='y'>
 /// 初期位置
 /// </param>
 /// <param name='dx'>
 /// フレームあたり変化量
 /// </param>
 /// <param name='dy'>
 /// フレームあたり変化量
 /// </param>
 private static void NewBullet(BulletType type, float x, float y, float dx, float dy)
 {
     var newBullet = new Bullet1(x,y,dx,dy);
     newBullet.Sprite = new SpriteUV(){TextureInfo = BulletTextureInfo[(int)type]};
     newBullet.Sprite.Quad.S = BulletTextureInfo[(int)type].TextureSizef;
     newBullet.Sprite.CenterSprite();
     newBullet.Sprite.Position = new Sce.PlayStation.Core.Vector2(x,y);
     BulletList.Add(newBullet);
     Scenes.sceneOnGame.AddChild(((Bullet1)BulletList[BulletList.Count-1]).Sprite);
 }