コード例 #1
0
    public void ShootBolt1_Start()
    {
        ifStopBolt1 = false;

        foreach (GameObject shotObj in shotObjs_Bolt1)
        {
            if (shotObj.activeSelf && shotObj != shotObjs_Bolt1[0])
            {
                break;
            }
            else
            {
                shotObj.SetActive(true);

                Bolt1_SubBossShootCross  crossBoltObj = new Bolt1_SubBossShootCross();
                Bolt1_SubBoltMoveToStart subBoltMove  = new Bolt1_SubBoltMoveToStart();
                RotateAndShootTest       rotateObj    = new RotateAndShootTest();

                if ((crossBoltObj = shotObj.GetComponent <Bolt1_SubBossShootCross>()) != null)
                {
                    crossBoltObj.StartShooting();
                }
                if ((subBoltMove = shotObj.GetComponent <Bolt1_SubBoltMoveToStart>()) != null)
                {
                    shotObj.GetComponent <Bolt1_SubBoltMoveToStart>().MoveToStartPos();
                }

                if ((rotateObj = shotObj.GetComponentInChildren <RotateAndShootTest>()) != null)
                {
                    rotateObj.ifCanShoot = true;
                }
            }
        }
    }
コード例 #2
0
    public void ShootBolt2_Start()
    {
        ifStopBolt2 = false;

        //  moving queen behaviour
        foreach (GameObject shotObj in movingQueen_Bolt2)
        {
            if (!shotObj.activeSelf)
            {
                shotObj.SetActive(true);
                Bolt1_SubBossShootCross  crossBoltObj = new Bolt1_SubBossShootCross();
                Bolt1_SubBoltMoveToStart subBoltMove  = new Bolt1_SubBoltMoveToStart();
                Bolt2_MoveQueen          moveQueen    = new Bolt2_MoveQueen();
                if ((crossBoltObj = shotObj.GetComponent <Bolt1_SubBossShootCross>()) != null)
                {
                    crossBoltObj.StartShooting();
                }
                if ((subBoltMove = shotObj.GetComponent <Bolt1_SubBoltMoveToStart>()) != null)
                {
                    subBoltMove.MoveToStartPos();
                }
                if ((moveQueen = shotObj.GetComponent <Bolt2_MoveQueen>()) != null)
                {
                    moveQueen.QueenMove();
                }
            }
        }

        //  vertecies bolt behaviour
        foreach (GameObject shotObj in vertexes_Bolt2)
        {
            if (!shotObj.activeSelf)
            {
                shotObj.SetActive(true);
            }
        }
    }