Exemplo n.º 1
0
    // Use this for initialization
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        //
        audioSource = gameObject.GetComponent<AudioSource>();
        //

        st = common.CreateShotPosition();
        pt = FindObjectOfType<Party>().transform;

        yield return new WaitForEndOfFrame();

        yield return StartCoroutine("Stop");

        audioSource.PlayOneShot(skillSE);
        FindObjectOfType<MessageWindow>().showMessage("「星霜の記憶」");
        stones = new GameObject[5];
        stones[0] = (GameObject)Instantiate(stoneAlex,transform.position,Quaternion.identity);
        stones[1] = (GameObject)Instantiate(stoneGuylus,transform.position,Quaternion.identity);
        stones[2] = (GameObject)Instantiate(stoneNely,transform.position,Quaternion.identity);
        stones[3] = (GameObject)Instantiate(stoneRinmaru,transform.position,Quaternion.identity);
        stones[4] = (GameObject)Instantiate(stoneMedhu,transform.position,Quaternion.identity);

        StartCoroutine("RotateStones");

        StartCoroutine("Attack");
        StartCoroutine("StonesSummon");
    }
Exemplo n.º 2
0
    // Use this for initialization
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        //SE関係
        audioSource = gameObject.GetComponent<AudioSource>();
        audioSource.clip = shootSE;
        //

        s2 = common.CreateShotPosition();
        pt = FindObjectOfType<Party>().transform;

        //FindObjectOfType<MessageWindow>().showMessage("メテオ");

        yield return new WaitForEndOfFrame();

        //StartCoroutine("Stop");

        StartCoroutine("Attack1");

        yield break;
    }
Exemplo n.º 3
0
        /// <summary>
        /// ボスキャラ本体以外の描画
        /// -- HP, 位置
        /// </summary>
        /// <param name="enemy">鍵山雛</param>
        public static void DrawOther(Enemy enemy)
        {
            //DDGround.EL.Add(() =>
            //{
            //    DDPrint.SetPrint(525, 350, 20);
            //    DDPrint.SetBorder(new I3Color(192, 0, 0));
            //    DDPrint.PrintLine("KAGIYAMA-HINA-HP = " + enemy.HP);
            //    DDPrint.Reset();

            //    DDPrint.SetPrint(SCommon.ToInt(GameConsts.FIELD_L + enemy.X - 8 * 3), DDConsts.Screen_H - 16);
            //    DDPrint.SetBorder(new I3Color(255, 0, 0));
            //    DDPrint.Print("<BOSS>");
            //    DDPrint.Reset();

            //    return false;
            //});

            DDGround.EL.Add(() =>
            {
                Draw円形体力ゲージ(
                    GameConsts.FIELD_L + enemy.X,
                    GameConsts.FIELD_T + enemy.Y,
                    (double)enemy.HP / enemy.InitialHP,
                    GameConsts.FIELD_L + Game.I.Player.X,                     // ゲージの位置がスクリーン座標ので、プレイヤーの位置もスクリーン座標にする。
                    GameConsts.FIELD_T + Game.I.Player.Y
                    );

                return(false);
            });

            EnemyCommon.DrawBossPosition(enemy.X);
        }
Exemplo n.º 4
0
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        //SE関係
        audioSource = gameObject.GetComponent<AudioSource>();
        //

        s1 = common.CreateShotPosition();

        Party p = FindObjectOfType<Party>();
        if(p){
            pt = FindObjectOfType<Party>().transform;
        }

        yield return new WaitForEndOfFrame();

        StartCoroutine("Stop");
        StartCoroutine("Attack1");

        yield break;
    }
Exemplo n.º 5
0
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        common.Init();

        Transform s1 = common.CreateShotPosition();

        //SE関係
        audioSource = gameObject.GetComponent<AudioSource>();
        audioSource.clip = shootSE;
        //

        yield return new WaitForEndOfFrame();
        while (true)
        {
            audioSource.PlayOneShot(shootSE);
            common.Shot(s1, 0+30, power, speed, BulletManager.BulletType.BlossomBullet);
            common.Shot(s1, 60 + 30, power, speed, BulletManager.BulletType.BlossomBullet);
            common.Shot(s1, 120 + 30, power, speed, BulletManager.BulletType.BlossomBullet);
            common.Shot(s1, 180 + 30, power, speed, BulletManager.BulletType.BlossomBullet);
            common.Shot(s1, 240 + 30, power, speed, BulletManager.BulletType.BlossomBullet);
            common.Shot(s1, 300 + 30, power, speed, BulletManager.BulletType.BlossomBullet);

            yield return new WaitForSeconds(spaceship.shotDelay);
        }
    }
Exemplo n.º 6
0
        protected override void Killed()
        {
            long score;

            if (this.Mode_02)
            {
                // 次の形態へ移行する。

                Ground.I.SE.SE_ENEMYKILLED.Play();
                Game.I.Enemies.Add(new Enemy_ルーミア_03(this.X, this.Y));
                score = 7500000;
            }
            else
            {
                画面分割_Effect.Leave();
                画面分割.Enabled = false;

                // 終了

                EnemyCommon.Killed(this, 0);

                Game.I.BossKilled = true;
                Game.I.Shots.Add(new Shot_BossBomb());
                score = 17500000;
            }

            Game.I.Score += score * (Game.I.PlayerWasDead ? 1 : 2);
            EnemyCommon.Drawノーミス();
            Game.I.PlayerWasDead = false;
        }
Exemplo n.º 7
0
        protected override void Killed()
        {
            // 次の形態へ移行する。

            Ground.I.SE.SE_ENEMYKILLED.Play();
            Game.I.Enemies.Add(new Enemy_ルーミア_02_04(this.X, this.Y, false));
            Game.I.Score += 12500000 * (Game.I.PlayerWasDead ? 1 : 2);
            EnemyCommon.Drawノーミス();
            Game.I.PlayerWasDead = false;
        }
Exemplo n.º 8
0
        public static void DrawOther(Enemy enemy)
        {
            DDGround.EL.Add(() =>
            {
                Draw垂直体力ゲージ((double)enemy.HP / enemy.InitialHP);
                return(false);
            });

            EnemyCommon.DrawBossPosition(enemy.X);
        }
Exemplo n.º 9
0
        protected override void Killed()
        {
            // この形態で終了する。-> 死亡する。

            EnemyCommon.Killed(this, 0);

            Game.I.BossKilled = true;
            Game.I.Score     += 10000000 * (Game.I.PlayerWasDead ? 1 : 2);
            EnemyCommon.Drawノーミス();
            Game.I.PlayerWasDead = false;
        }
Exemplo n.º 10
0
    // Use this for initialization
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        st = common.CreateShotPosition();
        pt = FindObjectOfType<Party>().transform;

        yield return new WaitForSeconds(2.0f);

        StartCoroutine("Attack");
    }
Exemplo n.º 11
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                this.X += this.Speed.X;
                this.Y += this.Speed.Y;

                if (this.X < 0.0)
                {
                    this.Speed.X = Math.Abs(this.Speed.X);
                }
                else if (GameConsts.FIELD_W < this.X)
                {
                    this.Speed.X = -Math.Abs(this.Speed.X);
                }

                if (this.Y < 0.0)
                {
                    this.Speed.Y = Math.Abs(this.Speed.Y);
                }
                else
                {
                    this.Speed.Y += 0.03;                     // 重力加速度
                }
                if (this.AbsorbableWeapon != -1)              // ? 吸収可能
                {
                    DDDraw.SetAlpha(0.2);
                    DDDraw.SetBright(0.0, 0.5, 1.0);
                    DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], this.X, this.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0);
                    DDDraw.DrawZoom(1.2);
                    DDDraw.DrawEnd();
                    DDDraw.Reset();

                    DDPrint.SetPrint((int)this.X, (int)this.Y);
                    DDPrint.SetBorder(new I3Color(0, 0, 100));
                    DDPrint.Print("[" + this.AbsorbableWeapon + "]");
                    DDPrint.Reset();
                }

                DDDraw.DrawCenter(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y);

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0);

                yield return(this.Y < GameConsts.FIELD_H);
            }
        }
Exemplo n.º 12
0
        protected override IEnumerable <bool> E_Draw()
        {
            D2Point speed = DDUtils.AngleToPoint(this.Rad + this.RadZure, 3.0);

            for (int frame = 0; frame < 90; frame++)
            {
                speed *= 0.95;

                this.X += speed.X;
                this.Y += speed.Y;

                DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.NORMAL, this.Color), this.X, this.Y);
                DDDraw.DrawRotate(this.Rad + Math.PI / 2.0);
                DDDraw.DrawEnd();

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0);

                yield return(true);
            }

            {
                double xa;
                double ya;

                DDUtils.MakeXYSpeed(this.X, this.Y, Game.I.Player.X, Game.I.Player.Y, 3.0, out xa, out ya);
                DDUtils.Rotate(ref xa, ref ya, this.RadZure);

                speed.X = xa;
                speed.Y = ya;
            }

            for (; ;)
            {
                this.X += speed.X;
                this.Y += speed.Y;

                DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.NORMAL, this.Color), this.X, this.Y);
                DDDraw.DrawRotate(this.Rad + Math.PI / 2.0);
                DDDraw.DrawEnd();

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0);

                yield return(!EnemyCommon.IsEvacuated(this));
            }
        }
Exemplo n.º 13
0
        protected override IEnumerable <bool> E_Draw()
        {
            D2Point speed = DDUtils.AngleToPoint(this.Rad, 3.0);

            for (; ;)
            {
                this.X += speed.X;
                this.Y += speed.Y;

                DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.KNIFE, this.Color), this.X, this.Y);
                DDDraw.DrawZoom(2.0);
                DDDraw.DrawRotate(this.Rad + Math.PI / 2.0);
                DDDraw.DrawEnd();

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0);

                yield return(!EnemyCommon.IsEvacuated(this));
            }
        }
Exemplo n.º 14
0
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        common.Init();

        shootSESource = gameObject.GetComponent<AudioSource>();
        shootSESource.clip = shootSE;

        Transform s1 = common.CreateShotPosition();

        yield return new WaitForEndOfFrame();
        while (true)
        {
            common.Shot(s1, 60 + Random.Range(0, 60), power, 1, BulletManager.BulletType.SlimeBullet);
            shootSESource.PlayOneShot(shootSE);

            yield return new WaitForSeconds(spaceship.shotDelay);
        }
    }
Exemplo n.º 15
0
    // Use this for initialization
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        //SE関係
        audioSource = gameObject.GetComponent<AudioSource>();

        st = common.CreateShotPosition();
        st.position = st.position + new Vector3(0,-1.7f,0);
        st2 = common.CreateShotPosition();
        st2.position = st2.position + new Vector3(0,1.7f,0);

        pt = FindObjectOfType<Party>().transform;

        StartCoroutine("MoveStop");
        StartCoroutine("Magne");
        StartCoroutine("Move");
        int span = 0;
        while(true)
        {
            audioSource.PlayOneShot(shootSE1);
            if(span % 5 == 0){
                int range = 50;
                common.Shot(st,Random.Range(-range,range),3,2,BulletManager.BulletType.StarBullet);
                common.Shot(st2,180+Random.Range(-range,range),3,2,BulletManager.BulletType.StarBullet);
            }
            else{
                int range = 5;
                common.Shot(st,Random.Range(-range,range),2,Random.Range(3,6),BulletManager.BulletType.StarBullet);
                common.Shot(st2,180+Random.Range(-range,range),2,Random.Range(3,6),BulletManager.BulletType.StarBullet);
            }
            ++span;
            yield return new WaitForSeconds(0.05f);
        }

        yield return null;
    }
Exemplo n.º 16
0
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        //SE関係
        audioSource = gameObject.GetComponent<AudioSource>();
        //audioSource.clip = shootSE;
        //

        s1 = common.CreateShotPosition();
        pt = FindObjectOfType<Party>().transform;
        preEnemyHP = enemy.hp;

        yield return new WaitForEndOfFrame();

        StartCoroutine("Stop");

        yield break;
    }
Exemplo n.º 17
0
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        common.Init();

        shootSESource = gameObject.GetComponent<AudioSource>();
        //shootSESource.clip = shootSE;

        s1 = common.CreateShotPosition();
        pt = FindObjectOfType<Party>().transform;

        yield return new WaitForEndOfFrame();
        while (true)
        {
            //common.Shot(s1,60+Random.Range(0,60),power,2,BulletManager.BulletType.BananaSlash);
            common.ShotAim(s1, pt, power, 3, BulletManager.BulletType.BananaSlash);

            shootSESource.PlayOneShot(shootSE);

            yield return new WaitForSeconds(spaceship.shotDelay);
        }
    }
Exemplo n.º 18
0
    ////////////////////////////
    // Use this for initialization
    IEnumerator Start()
    {
        //spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        //SE関係
        audioSource = gameObject.GetComponent<AudioSource>();
        audioSource.clip = skillSE;
        //

        currentText = 0;

        yield return new WaitForEndOfFrame();

        StartCoroutine("Stop");

        //yield return new WaitForSeconds(2);
        StartCoroutine("Talk");

        yield break;
    }
Exemplo n.º 19
0
    // Use this for initialization
    IEnumerator Start()
    {
        spaceship = GetComponent<Spaceship> ();
        common = GetComponent<EnemyCommon>();
        enemy = GetComponent<Enemy>();
        common.Init();

        //SE関係
        audioSource = gameObject.GetComponent<AudioSource>();
        audioSource.clip = skillSE;

        s2 = common.CreateShotPosition();
        pt = FindObjectOfType<Party>().transform;

        common.ShowWindowMessage("剣士「追手か!」");
        yield return new WaitForSeconds(2.0f);
        common.ShowWindowMessage("剣士「メデュ様を連れて行かせるわけにはいかない!」");
        //yield return new WaitForSeconds(3.0f);

        yield return new WaitForEndOfFrame();

        StartCoroutine("Stop");
        yield return new WaitForSeconds(3.0f);
        StartCoroutine("Attack1");

        yield break;
    }
Exemplo n.º 20
0
 void Start()
 {
     player      = GameObject.FindGameObjectWithTag("Player");
     enemyCommon = GetComponent <EnemyCommon>();
 }
Exemplo n.º 21
0
 protected override void Killed()
 {
     EnemyCommon.Killed(this, 0);
 }
Exemplo n.º 22
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                if (DDUtils.IsOut(new D2Point(this.X, this.Y), new D4Rect(0, 0, GameConsts.FIELD_W, GameConsts.FIELD_H)))
                {
                    break;
                }

                this.X += this.Speed.X;
                this.Y += this.Speed.Y;

                DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y);
                DDDraw.DrawEnd();

                Game.I.EL_AfterDrawWalls.Add(SCommon.Supplier(this.E_魔法陣_1(this.X, this.Y)));

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0);

                yield return(true);
            }

            Game.I.EL_AfterDrawWalls.Add(SCommon.Supplier(this.E_魔法陣_V(this.X, this.Y)));

            {
                const double SPEED = 3.0;

                if (this.X < 0.0)                 // ? フィールド左側に衝突
                {
                    this.Speed = new D2Point(SPEED, 0.0);
                    this.Color = EnemyCommon.TAMA_COLOR_e.YELLOW;
                }
                else if (GameConsts.FIELD_W < this.X)                 // ? フィールド右側に衝突
                {
                    this.Speed = new D2Point(-SPEED, 0.0);
                    this.Color = EnemyCommon.TAMA_COLOR_e.YELLOW;
                }
                else if (this.Y < 0.0)                 // ? フィールド上側に衝突
                {
                    this.Speed = new D2Point(0.0, SPEED);
                    this.Color = EnemyCommon.TAMA_COLOR_e.ORANGE;
                }
                else                 // ? フィールド下側に衝突
                {
                    this.Speed = new D2Point(0.0, -SPEED);
                    this.Color = EnemyCommon.TAMA_COLOR_e.ORANGE;
                }
            }

            for (int frame = 0; ; frame++)
            {
                this.X += this.Speed.X;
                this.Y += this.Speed.Y;

#if true
                // 他の敵弾より上に(後に)描画する。
                // -- 見えやすいように
                //
                Game.I.EnemyEffects.Add(() =>
                {
                    DDDraw.DrawCenter(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y);
                    return(false);
                });
#else // old
                DDDraw.DrawCenter(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y);
#endif

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0);

                yield return(!EnemyCommon.IsEvacuated(this));
            }
        }