示例#1
0
        public void DeathCheck()
        {
            if (Plane1.Hp == 0)
            {
                this.Controls.Remove(Attack1);
                Attack1.Dispose();
            }

            if (Plane2.Hp == 0)
            {
                this.Controls.Remove(button4);
                button4.Dispose();
                pictureBox5.Visible = true;
                Plane1.Target       = Tank2;
            }
            if (Tank1.Hp == 0)
            {
                this.Controls.Remove(Attack2);
                Attack2.Dispose();
            }
            if (Magic1.Hp == 0)
            {
                this.Controls.Remove(Attack3);
                Attack3.Dispose();
            }
            if (Ship1.Hp == 0)
            {
                this.Controls.Remove(Attack4);
                Attack4.Dispose();
            }
            if (Tank2.Hp == 0)
            {
                this.Controls.Remove(button3);
                button3.Dispose();
                pictureBox6.Visible = true;
                Plane1.Target       = Magic2;
            }
            if (Magic2.Hp == 0)
            {
                this.Controls.Remove(button2);
                button2.Dispose();
                pictureBox7.Visible = true;
                Plane1.Target       = Ship2;
            }
            if (Ship2.Hp == 0)
            {
                this.Controls.Remove(button1);
                button1.Dispose();
                pictureBox8.Visible = true;
            }
        }
示例#2
0
        public BitBlock GetStoredPokemonBits()
        {
            var bits = new BitBlock(BitLength);

            bits.SetInt(0, 0, 7, Level);
            bits.SetInt(0, 7, 9, ID);
            bits.SetInt(0, 16, 7, MetAt);
            bits.SetRange(23, 21, Unk1);
            bits.SetInt(0, 44, 10, IQ);
            bits.SetInt(0, 54, 10, HP);
            bits.SetInt(0, 64, 8, Attack);
            bits.SetInt(0, 72, 8, SpAttack);
            bits.SetInt(0, 80, 8, Defense);
            bits.SetInt(0, 88, 8, SpDefense);
            bits.SetInt(0, 96, 24, Exp);
            bits.SetRange(120, 43, Unk2);
            bits.SetRange(163, RBAttack.BitLength, Attack1.ToBitBlock());
            bits.SetRange(183, RBAttack.BitLength, Attack2.ToBitBlock());
            bits.SetRange(203, RBAttack.BitLength, Attack3.ToBitBlock());
            bits.SetRange(223, RBAttack.BitLength, Attack4.ToBitBlock());
            bits.SetStringPMD(0, 243, 10, Name);
            return(bits);
        }
示例#3
0
    IEnumerator BossStateMachine()
    {
        stateRunning = true;
        switch (state)
        {
        case State.Start:
            //play starting animation

            //when done start attack stage 1
            yield return(new WaitForSeconds(2));

            state = State.AttacksStage1;
            break;

        case State.AttacksStage1:
            //if we should move to next stage
            if (hitsTaken >= 20)
            {
                state = State.AttacksStage2;
            }
            //else attack
            else
            {
                if (canAttack)
                {
                    canAttack = false;
                    //do a random attack on a timer (shootingAngle1,shootingAngle2,stomp)
                    attack1 = (Attack1)Random.Range(0, 3);

                    switch (attack1)
                    {
                    case Attack1.ShootingAngle1:

                        canAttack = false;
                        yield return(StartCoroutine(LerpObjectTo(transform, firePositions[0].position, firePositions[0].rotation, 2f, -1)));

                        StartCoroutine(ShootingAngle(0));

                        break;

                    case Attack1.ShootingAngle2:

                        canAttack = false;
                        yield return(StartCoroutine(LerpObjectTo(transform, firePositions[1].position, firePositions[1].rotation, 2f, -1)));

                        StartCoroutine(ShootingAngle(1));

                        break;

                    case Attack1.Stomp:

                        canAttack = false;
                        StartCoroutine(Stomp());
                        break;
                    }
                }
            }

            break;

        case State.AttacksStage2:

            if (canAttack == true)
            {
                StartCoroutine(MegaAttack());
            }

            break;

        case State.AttacksStage3:
            //if we should move to next stage
            if (hitsTaken >= 30)
            {
                state = State.Dying;
            }
            //else attack
            else
            {
                if (canAttack)
                {
                    canAttack = false;
                    //do a random attack on a timer (shootingAngle1,shootingAngle2,stomp)
                    attack3 = (Attack3)Random.Range(0, 3);

                    switch (attack3)
                    {
                    case Attack3.blast1:

                        canAttack = false;
                        StartCoroutine(MiniBlastCross());

                        break;

                    case Attack3.barrage1:

                        canAttack = false;

                        StartCoroutine(ScaleObjectTo(transform, firePositions[3].localScale, 0));
                        yield return(StartCoroutine(LerpObjectTo(transform, firePositions[3].position, firePositions[3].rotation, 2f, -1)));

                        StartCoroutine(ShootingAngle(3));

                        break;

                    case Attack3.barrage2:

                        canAttack = false;

                        StartCoroutine(ScaleObjectTo(transform, firePositions[3].localScale, 0));
                        yield return(StartCoroutine(LerpObjectTo(transform, firePositions[4].position, firePositions[4].rotation, 2f, -1)));

                        StartCoroutine(ShootingAngle(4));
                        break;
                    }
                }
            }


            break;

        case State.Dying:

            GameWinScreen.SetActive(true);
            Time.timeScale = 0;
            break;
        }
        yield return(null);

        stateRunning = false;
    }
示例#4
0
    public void Attack(StepData _stData)
    {
        AttackProtocol attk = new Attack1();
        attk.ID_SKILL_ATTACK = _stData.skill;

        StartCoroutine(attk.handle_move_enemy(this.gameObject, BattleControls.It.lstCharater[_stData.enemyChaArr[0].enemyBattleId]));
       // attk.Attack();
    }
        public BitBlock GetQuicksavePokemonBits()
        {
            var bits = new BitBlock(BitLength);

            bits.SetRange(0, 80, Unk1);
            bits.SetInt(0, 80, 16, TransformedID.ID);
            bits.SetInt(0, 96, 16, ID.ID);
            bits.SetRange(112, 48, Unk2);
            bits.SetInt(0, 144, 8, Level);
            bits.SetRange(152, 48, Unk3);
            bits.SetInt(0, 192, 16, CurrentHP);
            bits.SetInt(0, 208, 16, MaxHP);
            bits.SetRange(240, 32, Unk4);
            bits.SetInt(0, 256, 8, Attack);
            bits.SetInt(0, 264, 8, Defense);
            bits.SetInt(0, 272, 8, SpAttack);
            bits.SetInt(0, 280, 8, SpDefense);
            bits.SetInt(0, 288, 32, Exp);
            bits.SetRange(320, 2408, Unk5);
            bits.SetRange(2696 + 0 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack1.ToBitBlock());
            bits.SetRange(2696 + 1 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack2.ToBitBlock());
            bits.SetRange(2696 + 2 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack3.ToBitBlock());
            bits.SetRange(2696 + 3 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack4.ToBitBlock());
            bits.SetRange(2840, 592, Unk6);
            return(bits);
        }
示例#6
0
    public override void OnAttackStateEnter(AnimatorStateInfo stateInfo)
    {
        base.OnAttackStateEnter(stateInfo);

        if (stateInfo.IsName("LightAttack1"))
        {
            GameObject main = Attack1.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack1.transform.position = transform.position + new Vector3(2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack1.transform.position = transform.position + new Vector3(-2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack1.Play(true);
        }

        else if (stateInfo.IsName("LightAttack2"))
        {
            GameObject main = Attack2.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(-2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack2.Play(true);
        }

        else if (stateInfo.IsName("LightAttack3"))
        {
            GameObject main = Attack3.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack3.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack3.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack3.Play(true);
        }

        if (stateInfo.IsName("Final1"))
        {
            GameObject main = FXFinal1.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXFinal1.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                FXFinal1.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            FXFinal1.Play(true);
        }

        else if (stateInfo.IsName("Final2"))
        {
            GameObject main = FXFinal2.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXFinal2.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.4984911f, 0.5015043f, -0.5015043f, 0.4984911f);
            }

            else if (!IsLookingRight)
            {
                FXFinal2.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.4984911f, -0.5015043f, 0.5015043f, 0.4984911f);
            }

            FXFinal2.Play(true);
        }

        else if (stateInfo.IsName("Final3"))
        {
            GameObject main = FXFinal3.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXFinal3.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                FXFinal3.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            FXFinal3.Play(true);
        }

        if (stateInfo.IsName("AirAttack"))
        {
            GameObject main = FXAirAttack.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position + new Vector3(0.0f, 0, 0);;
                main.transform.rotation        = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position + new Vector3(0.0f, 0, 0);;
                main.transform.rotation        = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            FXAirAttack.Play(true);
        }
    }
示例#7
0
    public override void OnAttackStateEnter(AnimatorStateInfo stateInfo)
    {
        base.OnAttackStateEnter(stateInfo);

        if (stateInfo.IsName("LightAttack1"))
        {
            GameObject main = Attack1.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack1.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(0, 1, 0, 0);
            }

            else if (!IsLookingRight)
            {
                Attack1.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(0, 0, 0, 1);
            }

            Attack1.Play(true);
        }

        else if (stateInfo.IsName("LightAttack2"))
        {
            GameObject main = Attack2.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(3.0f, 0, 0);
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(-3.0f, 0, 0);
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack2.Play(true);
        }

        else if (stateInfo.IsName("LightAttack3"))
        {
            GameObject main = Attack3.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack3.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack3.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack3.Play(true);
        }

        if ((stateInfo.IsName("AirAttack1")) || (stateInfo.IsName("AirAttack2")) || (stateInfo.IsName("AirAttack3")) || (stateInfo.IsName("AirAttack4")) || (stateInfo.IsName("AirAttack5")))
        {
            GameObject main = FXAirAttack.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position;
                main.transform.rotation        = new Quaternion(0, 1, 0, 0);
            }

            else if (!IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position;
                main.transform.rotation        = new Quaternion(0, 0, 0, 1);
            }

            FXAirAttack.Play(true);
        }

        else if (stateInfo.IsName("AirAttack6"))
        {
            GameObject mainHeavy = heavyAttackFX.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                heavyAttackFX.transform.position = transform.position + new Vector3(3.0f, 0, 0);
                mainHeavy.transform.rotation     = new Quaternion(0.7071068f, 0, 0, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                heavyAttackFX.transform.position = transform.position + new Vector3(-3.0f, 0, 0);
                mainHeavy.transform.rotation     = new Quaternion(0.7071068f, 0, 0, 0.7071068f);
            }

            heavyAttackFX.Play(true);
        }
    }
示例#8
0
 private void FlowerDied(object sender, EventArgs e)
 {
     _attack1 = null;
 }
示例#9
0
 public void Attack()
 {
     _attack1 = new Attack1(danmaku, this, CenterCoordinates, int.MaxValue / danmaku.FrameRateLimit, 50);
     _attack1.Initialize();
     _attack1.Died += FlowerDied;
 }